From 46b8dc6717569c4d66d44d2e72d45ec6e75bc119 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 13 Sep 2026 18:27:32 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A8=EC=9D=80=20API=20=EC=B0=B8=EA=B3=A0?= =?UTF-8?q?=20=ED=99=94=EB=A9=B4=205=EA=B0=9C=20=ED=95=9C=EA=B8=80?= =?UTF-8?q?=ED=99=94=EC=99=80=20Swagger=20=EB=AC=B8=EC=84=9C=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- updates/2026-09-05/CHANGELOG.ko.md | 22 + updates/2026-09-05/PROGRESS.md | 38 +- updates/2026-09-05/SHA256SUMS.json | 236 +- updates/2026-09-05/deployed/main.cjs | 10 +- updates/2026-09-05/phase9/api-audit.json | 12 + .../doc_notes/en/User Guide/!!!meta.json | 3087 ++++++++++++ .../phase9/doc_notes/en/api-ko/backend.html | 150 + .../phase9/doc_notes/en/api-ko/etapi.json | 1776 +++++++ .../phase9/doc_notes/en/api-ko/fnote.html | 184 + .../phase9/doc_notes/en/api-ko/frontend.html | 167 + .../phase9/doc_notes/en/api-ko/internal.json | 2712 +++++++++++ .../doc_notes/en/api-ko/swagger/LICENSE | 202 + .../phase9/doc_notes/en/api-ko/swagger/NOTICE | 2 + .../en/api-ko/swagger/favicon-16x16.png | Bin 0 -> 665 bytes .../en/api-ko/swagger/favicon-32x32.png | Bin 0 -> 628 bytes .../en/api-ko/swagger/oauth2-redirect.html | 79 + .../doc_notes/en/api-ko/swagger/package.json | 20 + .../en/api-ko/swagger/swagger-ui-bundle.js | 2 + .../swagger/swagger-ui-standalone-preset.js | 2 + .../en/api-ko/swagger/swagger-ui.css | 3 + .../phase9/korean-phase9-pending.json | 20 + updates/2026-09-05/phase9/main.cjs | 4153 +++++++++++++++++ updates/2026-09-05/phase9/manifest.json | 25 + updates/2026-09-05/phase9/script-audit.json | 14 + updates/2026-09-05/phase9/swagger-ko.js | 1 + .../2026-09-05/work/trilium/api-etapi-ko.txt | 118 + .../work/trilium/api-internal-ko.txt | 166 + .../work/trilium/api-script-extra.json | 49 + .../2026-09-05/work/trilium/api-script-ko.txt | 196 + .../work/trilium/api-source/backend.html | 164 + .../trilium/api-source/etapi-strings.json | 120 + .../work/trilium/api-source/etapi.json | 1 + .../work/trilium/api-source/fnote.html | 184 + .../work/trilium/api-source/frontend.html | 182 + .../trilium/api-source/internal-strings.json | 168 + .../api-source/phase9-main-before-final.cjs | 4153 +++++++++++++++++ .../api-source/phase9-main-before-swagger.cjs | 4153 +++++++++++++++++ .../trilium/api-source/script-strings.json | 198 + .../api-source/swagger-package-metadata.json | 1 + .../swagger-package/package/LICENSE | 202 + .../api-source/swagger-package/package/NOTICE | 2 + .../swagger-package/package/favicon-16x16.png | Bin 0 -> 665 bytes .../swagger-package/package/favicon-32x32.png | Bin 0 -> 628 bytes .../package/oauth2-redirect.html | 79 + .../swagger-package/package/package.json | 20 + .../package/swagger-ui-bundle.js | 2 + .../package/swagger-ui-standalone-preset.js | 2 + .../swagger-package/package/swagger-ui.css | 3 + .../api-source/swagger-ui-dist-5.21.0.tgz | Bin 0 -> 3144963 bytes .../api-source/trilium-etapi.openapi.yaml | 1168 +++++ .../trilium/api-source/trilium-openapi.json | 1 + .../work/trilium/build-api-pages.py | 57 + .../2026-09-05/work/trilium/build-phase9.mjs | 46 + .../2026-09-05/work/trilium/deploy-phase9.py | 44 + .../work/trilium/extract-api-prose.py | 18 + .../2026-09-05/work/trilium/finalize-api.py | 21 + .../work/trilium/fix-api-swagger.py | 16 + .../work/trilium/inspect-api-attributes.py | 6 + .../work/trilium/verify-api-server.py | 13 + .../2026-09-05/work/trilium/verify-api.mjs | 8 + 60 files changed, 24452 insertions(+), 26 deletions(-) create mode 100644 updates/2026-09-05/phase9/api-audit.json create mode 100644 updates/2026-09-05/phase9/doc_notes/en/User Guide/!!!meta.json create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/backend.html create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/etapi.json create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/fnote.html create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/frontend.html create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/internal.json create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/LICENSE create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/NOTICE create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/favicon-16x16.png create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/favicon-32x32.png create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/oauth2-redirect.html create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/package.json create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/swagger-ui-bundle.js create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/swagger-ui-standalone-preset.js create mode 100644 updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/swagger-ui.css create mode 100644 updates/2026-09-05/phase9/korean-phase9-pending.json create mode 100644 updates/2026-09-05/phase9/main.cjs create mode 100644 updates/2026-09-05/phase9/manifest.json create mode 100644 updates/2026-09-05/phase9/script-audit.json create mode 100644 updates/2026-09-05/phase9/swagger-ko.js create mode 100644 updates/2026-09-05/work/trilium/api-etapi-ko.txt create mode 100644 updates/2026-09-05/work/trilium/api-internal-ko.txt create mode 100644 updates/2026-09-05/work/trilium/api-script-extra.json create mode 100644 updates/2026-09-05/work/trilium/api-script-ko.txt create mode 100644 updates/2026-09-05/work/trilium/api-source/backend.html create mode 100644 updates/2026-09-05/work/trilium/api-source/etapi-strings.json create mode 100644 updates/2026-09-05/work/trilium/api-source/etapi.json create mode 100644 updates/2026-09-05/work/trilium/api-source/fnote.html create mode 100644 updates/2026-09-05/work/trilium/api-source/frontend.html create mode 100644 updates/2026-09-05/work/trilium/api-source/internal-strings.json create mode 100644 updates/2026-09-05/work/trilium/api-source/phase9-main-before-final.cjs create mode 100644 updates/2026-09-05/work/trilium/api-source/phase9-main-before-swagger.cjs create mode 100644 updates/2026-09-05/work/trilium/api-source/script-strings.json create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package-metadata.json create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/LICENSE create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/NOTICE create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/favicon-16x16.png create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/favicon-32x32.png create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/oauth2-redirect.html create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/package.json create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/swagger-ui-bundle.js create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/swagger-ui-standalone-preset.js create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-package/package/swagger-ui.css create mode 100644 updates/2026-09-05/work/trilium/api-source/swagger-ui-dist-5.21.0.tgz create mode 100644 updates/2026-09-05/work/trilium/api-source/trilium-etapi.openapi.yaml create mode 100644 updates/2026-09-05/work/trilium/api-source/trilium-openapi.json create mode 100644 updates/2026-09-05/work/trilium/build-api-pages.py create mode 100644 updates/2026-09-05/work/trilium/build-phase9.mjs create mode 100644 updates/2026-09-05/work/trilium/deploy-phase9.py create mode 100644 updates/2026-09-05/work/trilium/extract-api-prose.py create mode 100644 updates/2026-09-05/work/trilium/finalize-api.py create mode 100644 updates/2026-09-05/work/trilium/fix-api-swagger.py create mode 100644 updates/2026-09-05/work/trilium/inspect-api-attributes.py create mode 100644 updates/2026-09-05/work/trilium/verify-api-server.py create mode 100644 updates/2026-09-05/work/trilium/verify-api.mjs diff --git a/updates/2026-09-05/CHANGELOG.ko.md b/updates/2026-09-05/CHANGELOG.ko.md index aa871be..9e7b14a 100644 --- a/updates/2026-09-05/CHANGELOG.ko.md +++ b/updates/2026-09-05/CHANGELOG.ko.md @@ -155,3 +155,25 @@ PDF SHA-256: 1141ea4fb9d619fd55d75d0bdcd6bbd5678b161633586764d0eadfc4b9235400 ### 미완료 범위 API 참고 웹 보기 5개가 남았습니다. 내부 주소 /etapi/docs 및 /api/docs와 외부 스크립트 API 문서 3개입니다. 이들 페이지의 본문 번역은 아직 완료하지 않았습니다. 도움말 173개 및 목록 제목 181개와 이번 이미지 설명 206개가 완료됐다는 수치를 전체 100%로 해석하지 않습니다. 이미지 설명 보완 선택은 외부 API 원문을 번역한 것으로 간주하는 허가가 아닙니다. + +## 2026-09-13 API 참고 화면 5개 추가 완료 + +- 외부 ETAPI 명세: 경로 24개. 제목과 설명 154개 필드에 원문 중복을 제외한 번역 118개를 적용했습니다. +- 내부 API 명세: 경로 37개. 제목과 설명 198개 필드에 원문 중복을 제외한 번역 166개를 적용했습니다. +- 스크립트 참고 자료: 프런트엔드 API와 FNote 및 백엔드 API의 한국어 사본을 만들었습니다. 설명 문구와 반환값 및 매개변수 설명을 번역했습니다. 최종 변환된 텍스트 노드는 각각 170개와 179개 및 213개입니다. 식별자와 코드 형식은 유지했습니다. +- 기본 도움말 노트 3개의 webViewSrc를 한국어 사본으로 연결했습니다. 원문 링크와 연결된 다른 형식의 공식 문서 링크는 보존했습니다. 개인 노트는 수정하지 않았습니다. +- Swagger 화면의 인증 설정과 직접 실행 및 매개변수와 응답 등 조작 문구를 번역했습니다. 예제 오류 메시지 3개도 번역했습니다. ETAPI 예제 서버 주소는 브라우저에서 현재 서버를 사용할 수 있도록 /etapi로 지정했습니다. +- 실제 화면 검증 중 기존 번들에서 Swagger 정적 파일이 빠져 문서가 비어 보이는 문제를 발견했습니다. 공식 npm swagger-ui-dist 5.21.0의 배포 무결성을 검증한 뒤 필요한 파일만 추가했습니다. LICENSE와 NOTICE를 보존했습니다. 번들 내부 정적 경로도 해당 위치로 연결했습니다. +- 새 정적 파일의 읽기 권한을 컨테이너에 맞췄습니다. 초기 검증의 일반 문구 검사 조건은 문서별 실제 제목 검사로 수정했습니다. 최종 검증은 모두 통과했습니다. +- 검증: API 호출 방식과 매개변수 및 스키마의 구조를 원본과 비교했습니다. 번역 대상 설명과 예제 메시지 및 문서용 서버 주소 외에는 일치합니다. 스크립트 문서의 미번역 일반 영문 문장 검사 결과는 0개입니다. 코드와 이름 및 URL은 이 검사에서 번역 대상으로 보지 않습니다. +- 운영 검증: 정적 응답 8개 해시 일치. Swagger 경로 2개 정상. 기본 노트 연결 3개 일치. 브라우저에서 외부 API 검색 항목을 펼쳐 한국어 설명과 매개변수를 확인했습니다. 내부 API 목록과 프런트엔드 한국어 사본도 실제로 열어 확인했습니다. API 실행 요청으로 사용자 데이터를 생성하거나 삭제하지 않았습니다. +- 현재 자산 버전: v0.95.0-ko-20260913-r8 +- 현재 main.cjs SHA-256: 5209c39355837fb21714c1b61d8569d3eee71f620a8e8c1a3755ccc38aa92616 +- 최초 백업: /www/dk_project/dk_app/trilium/backups/before-korean-phase9-20260913-181647 +- 최종 보완 전 백업: /www/dk_project/dk_app/trilium/backups/before-api-final-20260913-182417 + +### 적용 범위와 유지한 원문 + +앞서 남겨 둔 API 참고 화면 5개는 이번에 모두 처리했습니다. 기존 이미지를 유지하고 한국어 설명을 추가한다는 사용자 선택을 따릅니다. 코드 문법과 함수·매개변수 이름 및 제품 이름과 URL은 원문을 유지합니다. 한국어 사본에서 다시 연결되는 외부 사이트 전체를 번역하거나 수정한 것은 아닙니다. 외부 스크립트 문서는 공식 연결 주소의 사본이므로 현재 운영 버전 0.95.0과 API 지원 범위가 다를 수 있음을 화면에 명시했습니다. + +현재 도움말 구성은 phase3/doc_notes/en에 phase8/doc_notes/en을 덮고 phase9/doc_notes/en을 덮은 결과입니다. 현재 앱 파일은 deployed에 있습니다. 초기 빌드 산출물과 단계별 파일을 현재 운영본으로 오인하지 마세요. diff --git a/updates/2026-09-05/PROGRESS.md b/updates/2026-09-05/PROGRESS.md index 6ff6946..1fc6860 100644 --- a/updates/2026-09-05/PROGRESS.md +++ b/updates/2026-09-05/PROGRESS.md @@ -2,29 +2,35 @@ 갱신: 2026-09-13 -대상은 Trilium입니다. 한국어 표기는 이스톰을 사용합니다. +이번에 남아 있던 API 참고 화면 5개까지 번역과 서버 반영 및 검증을 마쳤습니다. 대상은 Trilium입니다. | 구분 | 완료 | 진행률 | |---|---:|---:| | 도움말 본문 | 173/173 | 100% | | 도움말 목록 제목 | 181/181 | 100% | -| 영문 감지 이미지의 한국어 설명 보완 | 206/206 | 100% | -| API 참고 웹 보기 | 0/5 | 0% | +| 영문 감지 이미지의 한국어 설명 | 206/206 | 100% | +| API 참고 화면 | 5/5 | 100% | -기본 예제의 본문과 도표 및 통계 표시와 속성 이름 및 PDF는 번역하여 운영에 적용했습니다. PDF는 11쪽이며 194개 문단의 누락 검사와 브라우저 확인을 마쳤습니다. 전체 완료율은 항목마다 규모가 달라 단순 평균으로 계산하지 않습니다. +기본 예제와 예제 PDF 및 UI 수정분도 운영에 반영했습니다. 이미지는 원본 유지와 한국어 설명 보완 방식입니다. -## 2026-09-13 추가 적용: 화면 문구와 이미지 한국어 설명 +## 2026-09-13 API 참고 화면 5개 추가 완료 -- 사용자 선택: 사용량을 절약하기 위해 기존 이미지는 유지하고 한국어 설명을 보완합니다. 이미지 내부 글자를 모두 교체한다는 기존 목표를 이 방식으로 변경했습니다. -- phase7: 글자 둘러싸기와 관련 설정 및 코드 색상 설정 문구를 번역했습니다. 위치 정보 오류와 지도 새 노트 및 확대 비율과 AI 대화 기본 제목도 수정했습니다. 총 11개 치환 규칙을 적용했습니다. -- phase8: 래스터 이미지 286개를 OCR로 점검했습니다. 영문이 감지된 206개 모두가 본문에서 참조됨을 확인했습니다. 해당 도움말 92개에 이미지 순서별 한국어 설명과 주요 영문 메뉴의 한국어 뜻을 덧붙였습니다. GIF는 첫 프레임을 검사했습니다. OCR 결과는 모든 글자를 정확하게 판독했다는 의미가 아닙니다. -- 메뉴 대응은 영어와 한국어 UI 사전을 대조해 생성했습니다. 대응 메뉴가 없는 이미지 25개에는 개별 기능 설명을 작성했습니다. 원본 이미지와 링크 및 이미지 경로를 보존했습니다. -- Trilium 도움말에 포함된 Grafana 대시보드 JSON의 제목과 설명 및 범례 60곳을 번역했습니다. 범례와 일치해야 하는 표시 재정의 조건도 함께 수정했습니다. 실제 Grafana 서비스는 수정하지 않았습니다. -- 운영 검증: phase7의 layout_commons.js SHA-256은 39f4a0f5854e52ad221f872a9a50671161a3de2a4835eda044d9db537e010b2a입니다. phase8의 수정 도움말 92개와 대시보드 JSON 1개의 HTTP 응답 해시가 모두 배포본과 일치했습니다. 브라우저에서 측정 지표 도움말의 한국어 이미지 설명 표시를 확인했습니다. -- 현재 자산 버전: v0.95.0-ko-20260913-r7. 현재 앱 파일은 deployed에 있습니다. 도움말의 현재 내용은 phase3/doc_notes/en에 phase8/doc_notes/en을 덮어 적용한 구성입니다. -- 백업: /www/dk_project/dk_app/trilium/backups/before-korean-phase7-20260913-172503 -- 백업: /www/dk_project/dk_app/trilium/backups/before-korean-phase8-20260913-173210 +- 외부 ETAPI 명세: 경로 24개. 제목과 설명 154개 필드에 원문 중복을 제외한 번역 118개를 적용했습니다. +- 내부 API 명세: 경로 37개. 제목과 설명 198개 필드에 원문 중복을 제외한 번역 166개를 적용했습니다. +- 스크립트 참고 자료: 프런트엔드 API와 FNote 및 백엔드 API의 한국어 사본을 만들었습니다. 설명 문구와 반환값 및 매개변수 설명을 번역했습니다. 최종 변환된 텍스트 노드는 각각 170개와 179개 및 213개입니다. 식별자와 코드 형식은 유지했습니다. +- 기본 도움말 노트 3개의 webViewSrc를 한국어 사본으로 연결했습니다. 원문 링크와 연결된 다른 형식의 공식 문서 링크는 보존했습니다. 개인 노트는 수정하지 않았습니다. +- Swagger 화면의 인증 설정과 직접 실행 및 매개변수와 응답 등 조작 문구를 번역했습니다. 예제 오류 메시지 3개도 번역했습니다. ETAPI 예제 서버 주소는 브라우저에서 현재 서버를 사용할 수 있도록 /etapi로 지정했습니다. +- 실제 화면 검증 중 기존 번들에서 Swagger 정적 파일이 빠져 문서가 비어 보이는 문제를 발견했습니다. 공식 npm swagger-ui-dist 5.21.0의 배포 무결성을 검증한 뒤 필요한 파일만 추가했습니다. LICENSE와 NOTICE를 보존했습니다. 번들 내부 정적 경로도 해당 위치로 연결했습니다. +- 새 정적 파일의 읽기 권한을 컨테이너에 맞췄습니다. 초기 검증의 일반 문구 검사 조건은 문서별 실제 제목 검사로 수정했습니다. 최종 검증은 모두 통과했습니다. +- 검증: API 호출 방식과 매개변수 및 스키마의 구조를 원본과 비교했습니다. 번역 대상 설명과 예제 메시지 및 문서용 서버 주소 외에는 일치합니다. 스크립트 문서의 미번역 일반 영문 문장 검사 결과는 0개입니다. 코드와 이름 및 URL은 이 검사에서 번역 대상으로 보지 않습니다. +- 운영 검증: 정적 응답 8개 해시 일치. Swagger 경로 2개 정상. 기본 노트 연결 3개 일치. 브라우저에서 외부 API 검색 항목을 펼쳐 한국어 설명과 매개변수를 확인했습니다. 내부 API 목록과 프런트엔드 한국어 사본도 실제로 열어 확인했습니다. API 실행 요청으로 사용자 데이터를 생성하거나 삭제하지 않았습니다. +- 현재 자산 버전: v0.95.0-ko-20260913-r8 +- 현재 main.cjs SHA-256: 5209c39355837fb21714c1b61d8569d3eee71f620a8e8c1a3755ccc38aa92616 +- 최초 백업: /www/dk_project/dk_app/trilium/backups/before-korean-phase9-20260913-181647 +- 최종 보완 전 백업: /www/dk_project/dk_app/trilium/backups/before-api-final-20260913-182417 -### 미완료 범위 +### 적용 범위와 유지한 원문 -API 참고 웹 보기 5개가 남았습니다. 내부 주소 /etapi/docs 및 /api/docs와 외부 스크립트 API 문서 3개입니다. 이들 페이지의 본문 번역은 아직 완료하지 않았습니다. 도움말 173개 및 목록 제목 181개와 이번 이미지 설명 206개가 완료됐다는 수치를 전체 100%로 해석하지 않습니다. 이미지 설명 보완 선택은 외부 API 원문을 번역한 것으로 간주하는 허가가 아닙니다. +앞서 남겨 둔 API 참고 화면 5개는 이번에 모두 처리했습니다. 기존 이미지를 유지하고 한국어 설명을 추가한다는 사용자 선택을 따릅니다. 코드 문법과 함수·매개변수 이름 및 제품 이름과 URL은 원문을 유지합니다. 한국어 사본에서 다시 연결되는 외부 사이트 전체를 번역하거나 수정한 것은 아닙니다. 외부 스크립트 문서는 공식 연결 주소의 사본이므로 현재 운영 버전 0.95.0과 API 지원 범위가 다를 수 있음을 화면에 명시했습니다. + +현재 도움말 구성은 phase3/doc_notes/en에 phase8/doc_notes/en을 덮고 phase9/doc_notes/en을 덮은 결과입니다. 현재 앱 파일은 deployed에 있습니다. 초기 빌드 산출물과 단계별 파일을 현재 운영본으로 오인하지 마세요. diff --git a/updates/2026-09-05/SHA256SUMS.json b/updates/2026-09-05/SHA256SUMS.json index 5908024..3a15c91 100644 --- a/updates/2026-09-05/SHA256SUMS.json +++ b/updates/2026-09-05/SHA256SUMS.json @@ -4,12 +4,12 @@ "sha256": "52b083643858fc11a8a832e4ca068c58635fad41ad76972e821d1253d8fa72bd" }, "CHANGELOG.ko.md": { - "bytes": 14829, - "sha256": "2a3518913e4e93f498cfba1035f98c5b709081ac77478475dc7a711671f58bf0" + "bytes": 18562, + "sha256": "6ec8ac1a693ead639251010c60a4eb21cce357ff303898692409f5e666f5b4c6" }, "PROGRESS.md": { - "bytes": 3374, - "sha256": "c0e70432c735fe4bed02a1734e683d1e3f1bd52df6c53fbf6580bfb62ea5ea43" + "bytes": 4295, + "sha256": "9529f468d9b709035f754ae83072857e289a3da9dc22f217d87dce457e504b59" }, "README.md": { "bytes": 5545, @@ -40,8 +40,8 @@ "sha256": "39f4a0f5854e52ad221f872a9a50671161a3de2a4835eda044d9db537e010b2a" }, "deployed/main.cjs": { - "bytes": 9022693, - "sha256": "7f4e4a2f8e03c44131b51b2942cf327d310a657c4fe2b2c35ee154f70688efe4" + "bytes": 9031127, + "sha256": "5209c39355837fb21714c1b61d8569d3eee71f620a8e8c1a3755ccc38aa92616" }, "deployed/mobile_layout.js": { "bytes": 9771, @@ -2391,6 +2391,90 @@ "bytes": 28977, "sha256": "b3ec0326b9fc9dbe2dc99cf27bfcfe25b94b66b40cf6273fcaafaaa1e519e212" }, + "phase9/api-audit.json": { + "bytes": 149, + "sha256": "600bd80e97db08e4fb9c1001b6681e94a35410bd512a2bc195d7e03d4b2db722" + }, + "phase9/doc_notes/en/User Guide/!!!meta.json": { + "bytes": 86516, + "sha256": "85320f7f273604cd1ef963ef85eadd0ad6cf1958743f5772abfd097d26e3d352" + }, + "phase9/doc_notes/en/api-ko/backend.html": { + "bytes": 209744, + "sha256": "6baa29f34b2857baf82a6cd59168ecb32a90c45ef28e16172b21e33c96b34883" + }, + "phase9/doc_notes/en/api-ko/etapi.json": { + "bytes": 52824, + "sha256": "021ea29d5c1b41d44cf3ef013d0e54affc08c6d39cda38dbb06bf9720fc09378" + }, + "phase9/doc_notes/en/api-ko/fnote.html": { + "bytes": 194278, + "sha256": "1c33101df41ac318b6e91a49b30cab41d6288cc5788f1741499058b15c8ac2cc" + }, + "phase9/doc_notes/en/api-ko/frontend.html": { + "bytes": 192150, + "sha256": "785d9b5e797dd3533ef976bd42872b127c297ed95eb73156fc0df7955f3ab3e5" + }, + "phase9/doc_notes/en/api-ko/internal.json": { + "bytes": 76005, + "sha256": "6539b5936651f8e560bcb4a8658110d610b66462fa5f0ad7fc22fd38e17fb727" + }, + "phase9/doc_notes/en/api-ko/swagger/LICENSE": { + "bytes": 11358, + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + }, + "phase9/doc_notes/en/api-ko/swagger/NOTICE": { + "bytes": 55, + "sha256": "0d20d1adef18aee3f40dd258172155521ce702ac445cb5f7b7d60ed32dad2fb2" + }, + "phase9/doc_notes/en/api-ko/swagger/favicon-16x16.png": { + "bytes": 665, + "sha256": "af24ad604dd7b3bcda8f975ab973075f4a2f70a4087944a12f8ef8b63a3e07c2" + }, + "phase9/doc_notes/en/api-ko/swagger/favicon-32x32.png": { + "bytes": 628, + "sha256": "3ed612f41e050ca5e7000cad6f1cbe7e7da39f65fca99c02e99e6591056e5837" + }, + "phase9/doc_notes/en/api-ko/swagger/oauth2-redirect.html": { + "bytes": 2715, + "sha256": "397fd30a2499cd2c5f3411ade0ca7fbd786d5011639ca78a06824d580b83c122" + }, + "phase9/doc_notes/en/api-ko/swagger/package.json": { + "bytes": 559, + "sha256": "d9264a38e9af25561480d49a8f987fe31f14aecc5f6427d73a8f40a699905e5f" + }, + "phase9/doc_notes/en/api-ko/swagger/swagger-ui-bundle.js": { + "bytes": 1468326, + "sha256": "f557db538d8969dc0f35d6b441b3c7cc0be845d9dc0fcfbf66ea67053ae8933b" + }, + "phase9/doc_notes/en/api-ko/swagger/swagger-ui-standalone-preset.js": { + "bytes": 229223, + "sha256": "8710b6d90ece7113dd467500fa14ed33b5848b68b8695ad075f8d5c6c9af3b01" + }, + "phase9/doc_notes/en/api-ko/swagger/swagger-ui.css": { + "bytes": 154986, + "sha256": "29e7a850fea3b1a1e641bff2ff9b3302f8c0063d435971246b592e189b808989" + }, + "phase9/korean-phase9-pending.json": { + "bytes": 854, + "sha256": "ea9f4602a1508d9ec8474a85b4e5c274a791c20255d1fc3e49aa061b7e4b3217" + }, + "phase9/main.cjs": { + "bytes": 9031127, + "sha256": "5209c39355837fb21714c1b61d8569d3eee71f620a8e8c1a3755ccc38aa92616" + }, + "phase9/manifest.json": { + "bytes": 2301, + "sha256": "57e9fb68c6fcc71c47ce3cabb4463dc358cda36914a8b6d0ace03c35d3a0b2b3" + }, + "phase9/script-audit.json": { + "bytes": 245, + "sha256": "1304484d070dbfa76b599ba42ca8efbc27a8acece13f680092ae91975b49ffd1" + }, + "phase9/swagger-ko.js": { + "bytes": 3417, + "sha256": "4fbbaf68d0b6be052561a2f7e5dac5bd0fb08940258cdbf7c176a8509d6104fa" + }, "verify-snapshot.mjs": { "bytes": 1050, "sha256": "944aa1e3c8f8fd835dc0121071bf25b93de03cb29f0c0b3bd41febd209acb764" @@ -2399,10 +2483,118 @@ "bytes": 94177, "sha256": "7ae942d705f547ea08fbcde83473c8378f8499b33467ea6d71d1a1594315dc95" }, + "work/trilium/api-etapi-ko.txt": { + "bytes": 7883, + "sha256": "18d78f1dfad82dc101f0e395ab9d5ce07e7b490d254116240f44f9785499767a" + }, + "work/trilium/api-internal-ko.txt": { + "bytes": 7236, + "sha256": "627a37826f4d47863c3b94cb1318ce78403c8d12e15e5f6baa01f64f455b2e58" + }, + "work/trilium/api-script-extra.json": { + "bytes": 5677, + "sha256": "47d51e50d4e773c6c8ae40a884a8be7a4c0cfd63a06fe9816f13b3c8f2a17610" + }, + "work/trilium/api-script-ko.txt": { + "bytes": 13346, + "sha256": "6c1944c50aba33a017866157e95a6bd6b762973d7dc1ce8f0bdf781b88b0b6a0" + }, + "work/trilium/api-source/backend.html": { + "bytes": 213397, + "sha256": "e24937b4783131d0feaded1caecbf43e567bcab6316c9162719996a230aec3ab" + }, + "work/trilium/api-source/etapi-strings.json": { + "bytes": 7352, + "sha256": "61db2f4bbccab009affadb8e45b963616c6f5c14f8dc4bdcbc5c38c294689e93" + }, + "work/trilium/api-source/etapi.json": { + "bytes": 30938, + "sha256": "377a9a65a5c3adc9de476acccef7567c65d5ce15ef6b1f2611ca0ccaab3c67c3" + }, + "work/trilium/api-source/fnote.html": { + "bytes": 211698, + "sha256": "dd48ea85de50ba2dd59b9bc43b72c67e9e1c01bb2e3e17f5a979fcf3f94fce6a" + }, + "work/trilium/api-source/frontend.html": { + "bytes": 205285, + "sha256": "239f3efe31ec3cf0b502c82e4fabe3920763d570b5bab32ecaefc882c4c22cec" + }, + "work/trilium/api-source/internal-strings.json": { + "bytes": 7139, + "sha256": "8e39530053f050823aa3d5ad84967c5f9c7e01a96301e43637afa19b608a98a9" + }, + "work/trilium/api-source/phase9-main-before-final.cjs": { + "bytes": 9029867, + "sha256": "4c89e24c0c1be1e02570f5af4e650d540951b1d4cf8e5da0a11b8c3eb969d578" + }, + "work/trilium/api-source/phase9-main-before-swagger.cjs": { + "bytes": 9029852, + "sha256": "e59d7fa0bb270054310470e205d8e5731696fad212e983d88596d8ea5f90ea79" + }, + "work/trilium/api-source/script-strings.json": { + "bytes": 12351, + "sha256": "933172eb3d2b26e3d66a5643fa329d6d7a1b9197ab519ef79cf7c2f4d89c8638" + }, + "work/trilium/api-source/swagger-package-metadata.json": { + "bytes": 1950, + "sha256": "bcfa931f1a40fc5c0b83c4636d671aeb59116914c948a7e8ae8f537a41778303" + }, + "work/trilium/api-source/swagger-package/package/LICENSE": { + "bytes": 11358, + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + }, + "work/trilium/api-source/swagger-package/package/NOTICE": { + "bytes": 55, + "sha256": "0d20d1adef18aee3f40dd258172155521ce702ac445cb5f7b7d60ed32dad2fb2" + }, + "work/trilium/api-source/swagger-package/package/favicon-16x16.png": { + "bytes": 665, + "sha256": "af24ad604dd7b3bcda8f975ab973075f4a2f70a4087944a12f8ef8b63a3e07c2" + }, + "work/trilium/api-source/swagger-package/package/favicon-32x32.png": { + "bytes": 628, + "sha256": "3ed612f41e050ca5e7000cad6f1cbe7e7da39f65fca99c02e99e6591056e5837" + }, + "work/trilium/api-source/swagger-package/package/oauth2-redirect.html": { + "bytes": 2715, + "sha256": "397fd30a2499cd2c5f3411ade0ca7fbd786d5011639ca78a06824d580b83c122" + }, + "work/trilium/api-source/swagger-package/package/package.json": { + "bytes": 559, + "sha256": "d9264a38e9af25561480d49a8f987fe31f14aecc5f6427d73a8f40a699905e5f" + }, + "work/trilium/api-source/swagger-package/package/swagger-ui-bundle.js": { + "bytes": 1468326, + "sha256": "f557db538d8969dc0f35d6b441b3c7cc0be845d9dc0fcfbf66ea67053ae8933b" + }, + "work/trilium/api-source/swagger-package/package/swagger-ui-standalone-preset.js": { + "bytes": 229223, + "sha256": "8710b6d90ece7113dd467500fa14ed33b5848b68b8695ad075f8d5c6c9af3b01" + }, + "work/trilium/api-source/swagger-package/package/swagger-ui.css": { + "bytes": 154986, + "sha256": "29e7a850fea3b1a1e641bff2ff9b3302f8c0063d435971246b592e189b808989" + }, + "work/trilium/api-source/swagger-ui-dist-5.21.0.tgz": { + "bytes": 3144963, + "sha256": "01192724129bdb72bcb53b3b14f6facd61f8c6f6cc02555e074d67b5f9ebcab2" + }, + "work/trilium/api-source/trilium-etapi.openapi.yaml": { + "bytes": 47383, + "sha256": "ecc24beb2272de002b03a877c2fb3bb0fef743b0e61b90e897c7672b86d612d9" + }, + "work/trilium/api-source/trilium-openapi.json": { + "bytes": 34419, + "sha256": "3c10265da58f9ee6c355426925f27673e25b1e535a4f45e07a03b99ef3dccf61" + }, "work/trilium/apply-cache-fix.py": { "bytes": 1442, "sha256": "0d510437287befabffb6489b34e7bbf38f9f73f4971096b39528a1ffcd8cb51a" }, + "work/trilium/build-api-pages.py": { + "bytes": 5069, + "sha256": "9329f22a40ae671a7d50d1396f4fe344dda898cf254f315d9d9f6724377ce7bb" + }, "work/trilium/build-demo-pdf.py": { "bytes": 2453, "sha256": "677d540668585420d8951d7f6a3c3551abb0ff266724a09648bd16d4c3864ef7" @@ -2443,6 +2635,10 @@ "bytes": 11511, "sha256": "db3e968ef70b1c3add7bf715dd0e93756f79748b1849290ec75c6694b9f5e4d6" }, + "work/trilium/build-phase9.mjs": { + "bytes": 10386, + "sha256": "a3d05c529c4fa46776c7a33c9f29bffe261aca4cc8da7f19884db0bf1e0ccf3d" + }, "work/trilium/build-server.mjs": { "bytes": 2786, "sha256": "2c64311599b7465c6435c14929d756ba011afd828bff69bd8fd88017e69f5f60" @@ -2507,6 +2703,10 @@ "bytes": 1859, "sha256": "a9ee042f54d8ee8a2eadbf9e4bddccde094e02646c9eaf4168f66350309fbca8" }, + "work/trilium/deploy-phase9.py": { + "bytes": 3232, + "sha256": "da478a277371a872f8164e16fa99e06e083223faaecd5929b421f7081d1b44c6" + }, "work/trilium/deploy-ui-phase2.py": { "bytes": 3049, "sha256": "db296e39897e1a6758435e44077466087b58233333b1541c3e3e3f4ade67e60d" @@ -2675,10 +2875,26 @@ "bytes": 2, "sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945" }, + "work/trilium/extract-api-prose.py": { + "bytes": 1115, + "sha256": "1c0c04cdd8fffc7d134786f915bc84746664518cd8bcebc94bd0bf5e9d89b5ec" + }, + "work/trilium/finalize-api.py": { + "bytes": 1835, + "sha256": "b674d005ab781e8ab279d4bbf0fd1074ed4adab5e175a0225be1ce1c35421da2" + }, + "work/trilium/fix-api-swagger.py": { + "bytes": 1315, + "sha256": "4ba6ea036cecf8662c4df090387e3dc1ed3e6bc5d13cf1bfc10676b26a4b9689" + }, "work/trilium/help-image-ocr.json": { "bytes": 129349, "sha256": "8a66a134484a3f4f9c3d08ff7b41c506f721b4d518086092ada86f53e68b05e5" }, + "work/trilium/inspect-api-attributes.py": { + "bytes": 425, + "sha256": "62745c112367ae84e4cdfdf7e29d0664fd51ff36940997b49b419b0a22756f9a" + }, "work/trilium/inspect-phase4.py": { "bytes": 1842, "sha256": "3d50c3ff9728040ddb11d6147d14447c3a525bbd7b8c4d64af149c872ec05e41" @@ -5334,5 +5550,13 @@ "work/trilium/validate-demo.mjs": { "bytes": 1668, "sha256": "c33a2f015bbd5476d4697b366c9d0e3ececdb80f822cbd7ee1fbfd832326597c" + }, + "work/trilium/verify-api-server.py": { + "bytes": 1713, + "sha256": "96f185f6c76b890fc2ec9e94f8ea0303a66d8263d6129df67c48ba12932854c5" + }, + "work/trilium/verify-api.mjs": { + "bytes": 1091, + "sha256": "844803d1b32d69a6bd24f7676a26c94a534709e96634853e8e5e5547e7f2211e" } } diff --git a/updates/2026-09-05/deployed/main.cjs b/updates/2026-09-05/deployed/main.cjs index 10f1e16..51f3519 100644 --- a/updates/2026-09-05/deployed/main.cjs +++ b/updates/2026-09-05/deployed/main.cjs @@ -1,4 +1,6 @@ +function triliumApplyKoreanApiLinks(){const fs=require('fs'),file='/home/node/trilium-data/korean-phase9-pending.json';if(!fs.existsSync(file))return;const rows=JSON.parse(fs.readFileSync(file,'utf8'));if(rows.length!==3)throw Error('Invalid API link plan');de.transactional(()=>{for(const r of rows){if(!['_help_Q2z6av6JZVWm','_help_habiZ3HU8Kw8','_help_MEtfsqa5VwNi'].includes(r.noteId))throw Error('API note outside scope');const a=J.getAttributeOrThrow(r.attributeId);if(a.isDeleted||a.noteId!==r.noteId||a.name!=='webViewSrc'||(a.value!==r.oldValue&&a.value!==r.value))throw Error('API link conflict');}for(const r of rows){const a=J.getAttributeOrThrow(r.attributeId);if(a.value!==r.value){a.value=r.value;a.save();}}});fs.renameSync(file,file+'.applied-'+Date.now());console.log('KOREAN_API_LINKS 3');} + function triliumApplyKoreanPdf(){ const fs=require('fs'),crypto=require('crypto'),file='/home/node/trilium-data/korean-demo-pdf.pending'; if(!fs.existsSync(file))return; @@ -1527,7 +1529,7 @@ return fn.apply(this, arguments) `).map(function(t){return t.trim()}).join(" ")};nm.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,Jce.inspect(e,this.inspectOpts)};function g$i(e){var t=this.namespace,r=this.useColors;if(r){var n=this.color,s=" \x1B[3"+n+";1m"+t+" \x1B[0m";e[0]=s+e[0].split(` `).join(` `+s),e.push("\x1B[3"+n+"m+"+nm.humanize(this.diff)+"\x1B[0m")}else e[0]=new Date().toUTCString()+" "+t+" "+e[0]}function A$i(){return p$i.write(Jce.format.apply(Jce,arguments)+` -`)}function y$i(e){e==null?delete process.env.DEBUG:process.env.DEBUG=e}function X3r(){return process.env.DEBUG}function E$i(e){var t,r=process.binding("tty_wrap");switch(r.guessHandleType(e)){case"TTY":t=new K3r.WriteStream(e),t._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":var n=require("fs");t=new n.SyncWriteStream(e,{autoClose:!1}),t._type="fs";break;case"PIPE":case"TCP":var s=require("net");t=new s.Socket({fd:e,readable:!1,writable:!0}),t.readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}function x$i(e){e.inspectOpts={};for(var t=Object.keys(nm.inspectOpts),r=0;r{"use strict";typeof process<"u"&&process.type==="renderer"?kat.exports=Y3r():kat.exports=J3r()});var $Ce=A((UVo,Z3r)=>{"use strict";Z3r.exports=v$i;function b$i(e,t){var r=!1;return function(s){var i=_$i.apply(this,arguments);return r||(r=!0,t.call(this),typeof i[0]=="number"&&this.statusCode!==i[0]&&(i[0]=this.statusCode,i.length=1)),e.apply(this,i)}}function v$i(e,t){if(!e)throw new TypeError("argument res is required");if(typeof t!="function")throw new TypeError("argument listener must be a function");e.writeHead=b$i(e.writeHead,t)}function w$i(e,t){for(var r=0;r1&&typeof arguments[1]=="string"?2:1,n=t>=r+1?arguments[r]:void 0;this.statusCode=e,Array.isArray(n)?w$i(this,n):n&&T$i(this,n);for(var s=new Array(Math.min(t,r)),i=0;i{"use strict";var S$i=H3r(),WCe=oK().Buffer,C$i=Rce(),I$i=Q3r(),Mat=Lat()("compression"),D$i=$Ce(),N$i=gat(),Zce=require("zlib");Pat.exports=M$i;Pat.exports.filter=n4r;var Fat="createBrotliCompress"in Zce,R$i=/(?:^|,)\s*?no-transform\s*?(?:,|$)/,B$i=Fat?["br","gzip","deflate","identity"]:["gzip","deflate","identity"],k$i=Fat?["br","gzip"]:["gzip"],L$i=["gzip","deflate","identity","br"];function M$i(e){var t=e||{},r={};if(Fat){Object.assign(r,t.brotli);var n={};n[Zce.constants.BROTLI_PARAM_QUALITY]=4,r.params=Object.assign(n,r.params)}var s=t.filter||n4r,i=C$i.parse(t.threshold),o=t.enforceEncoding||"identity";return i==null&&(i=1024),function(u,c,l){var f=!1,d,h=[],p,m=c.end,g=c.on,y=c.write;c.flush=function(){p&&p.flush()},c.write=function(v,b){return f?!1:(r4r(c)||this.writeHead(this.statusCode),p?p.write(t4r(v,b)):y.call(this,v,b))},c.end=function(v,b){return f?!1:(r4r(c)||(this.getHeader("Content-Length")||(d=F$i(v,b)),this.writeHead(this.statusCode)),p?(f=!0,v?p.end(t4r(v,b)):p.end()):m.call(this,v,b))},c.on=function(v,b){return!h||v!=="drain"?g.call(this,v,b):p?p.on(v,b):(h.push([v,b]),this)};function E(x){Mat("no compression: %s",x),e4r(c,g,h),h=null}D$i(c,function(){if(!s(u,c)){E("filtered");return}if(!P$i(u,c)){E("no transform");return}if(N$i(c,"Accept-Encoding"),Number(c.getHeader("Content-Length")){"use strict";ere();zr();jg=`assets/v${CR.version}-ko-20260913-r7`,O$i=nd?`http://localhost:4200/${jg}`:jg,jl=O$i});var Oat=A((VVo,s4r)=>{"use strict";function q$i(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=a,r.humanize=rre(),Object.keys(e).forEach(function(c){r[c]=e[c]}),r.instances=[],r.names=[],r.skips=[],r.formatters={};function t(c){for(var l=0,f=0;f"u"?":":l)+c)}function i(c){r.save(c),r.names=[],r.skips=[];var l,f=(typeof c=="string"?c:"").split(/[\s,]+/),d=f.length;for(l=0;l{"use strict";function VCe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?VCe=function(r){return typeof r}:VCe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},VCe(e)}Hw.log=Q$i;Hw.formatArgs=U$i;Hw.save=G$i;Hw.load=$$i;Hw.useColors=H$i;Hw.storage=W$i();Hw.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 H$i(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function U$i(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+zCe.exports.humanize(this.diff),!!this.useColors){var t="color: "+this.color;e.splice(1,0,t,"color: inherit");var r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}}function Q$i(){var e;return(typeof console>"u"?"undefined":VCe(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function G$i(e){try{e?Hw.storage.setItem("debug",e):Hw.storage.removeItem("debug")}catch{}}function $$i(){var e;try{e=Hw.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function W$i(){try{return localStorage}catch{}}zCe.exports=Oat()(Hw);var V$i=zCe.exports.formatters;V$i.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var u4r=A((Jg,XCe)=>{"use strict";var z$i=require("tty"),KCe=require("util");Jg.init=eWi;Jg.log=j$i;Jg.formatArgs=K$i;Jg.save=J$i;Jg.load=Z$i;Jg.useColors=Y$i;Jg.colors=[6,2,3,4,5,1];try{YCe=_Me(),YCe&&(YCe.stderr||YCe).level>=2&&(Jg.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{}var YCe;Jg.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(s,i){return i.toUpperCase()}),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Y$i(){return"colors"in Jg.inspectOpts?!!Jg.inspectOpts.colors:z$i.isatty(process.stderr.fd)}function K$i(e){var t=this.namespace,r=this.useColors;if(r){var n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=" ".concat(s,";1m").concat(t," \x1B[0m");e[0]=i+e[0].split(` +`)}function y$i(e){e==null?delete process.env.DEBUG:process.env.DEBUG=e}function X3r(){return process.env.DEBUG}function E$i(e){var t,r=process.binding("tty_wrap");switch(r.guessHandleType(e)){case"TTY":t=new K3r.WriteStream(e),t._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":var n=require("fs");t=new n.SyncWriteStream(e,{autoClose:!1}),t._type="fs";break;case"PIPE":case"TCP":var s=require("net");t=new s.Socket({fd:e,readable:!1,writable:!0}),t.readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}function x$i(e){e.inspectOpts={};for(var t=Object.keys(nm.inspectOpts),r=0;r{"use strict";typeof process<"u"&&process.type==="renderer"?kat.exports=Y3r():kat.exports=J3r()});var $Ce=A((UVo,Z3r)=>{"use strict";Z3r.exports=v$i;function b$i(e,t){var r=!1;return function(s){var i=_$i.apply(this,arguments);return r||(r=!0,t.call(this),typeof i[0]=="number"&&this.statusCode!==i[0]&&(i[0]=this.statusCode,i.length=1)),e.apply(this,i)}}function v$i(e,t){if(!e)throw new TypeError("argument res is required");if(typeof t!="function")throw new TypeError("argument listener must be a function");e.writeHead=b$i(e.writeHead,t)}function w$i(e,t){for(var r=0;r1&&typeof arguments[1]=="string"?2:1,n=t>=r+1?arguments[r]:void 0;this.statusCode=e,Array.isArray(n)?w$i(this,n):n&&T$i(this,n);for(var s=new Array(Math.min(t,r)),i=0;i{"use strict";var S$i=H3r(),WCe=oK().Buffer,C$i=Rce(),I$i=Q3r(),Mat=Lat()("compression"),D$i=$Ce(),N$i=gat(),Zce=require("zlib");Pat.exports=M$i;Pat.exports.filter=n4r;var Fat="createBrotliCompress"in Zce,R$i=/(?:^|,)\s*?no-transform\s*?(?:,|$)/,B$i=Fat?["br","gzip","deflate","identity"]:["gzip","deflate","identity"],k$i=Fat?["br","gzip"]:["gzip"],L$i=["gzip","deflate","identity","br"];function M$i(e){var t=e||{},r={};if(Fat){Object.assign(r,t.brotli);var n={};n[Zce.constants.BROTLI_PARAM_QUALITY]=4,r.params=Object.assign(n,r.params)}var s=t.filter||n4r,i=C$i.parse(t.threshold),o=t.enforceEncoding||"identity";return i==null&&(i=1024),function(u,c,l){var f=!1,d,h=[],p,m=c.end,g=c.on,y=c.write;c.flush=function(){p&&p.flush()},c.write=function(v,b){return f?!1:(r4r(c)||this.writeHead(this.statusCode),p?p.write(t4r(v,b)):y.call(this,v,b))},c.end=function(v,b){return f?!1:(r4r(c)||(this.getHeader("Content-Length")||(d=F$i(v,b)),this.writeHead(this.statusCode)),p?(f=!0,v?p.end(t4r(v,b)):p.end()):m.call(this,v,b))},c.on=function(v,b){return!h||v!=="drain"?g.call(this,v,b):p?p.on(v,b):(h.push([v,b]),this)};function E(x){Mat("no compression: %s",x),e4r(c,g,h),h=null}D$i(c,function(){if(!s(u,c)){E("filtered");return}if(!P$i(u,c)){E("no transform");return}if(N$i(c,"Accept-Encoding"),Number(c.getHeader("Content-Length")){"use strict";ere();zr();jg=`assets/v${CR.version}-ko-20260913-r8`,O$i=nd?`http://localhost:4200/${jg}`:jg,jl=O$i});var Oat=A((VVo,s4r)=>{"use strict";function q$i(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=a,r.humanize=rre(),Object.keys(e).forEach(function(c){r[c]=e[c]}),r.instances=[],r.names=[],r.skips=[],r.formatters={};function t(c){for(var l=0,f=0;f"u"?":":l)+c)}function i(c){r.save(c),r.names=[],r.skips=[];var l,f=(typeof c=="string"?c:"").split(/[\s,]+/),d=f.length;for(l=0;l{"use strict";function VCe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?VCe=function(r){return typeof r}:VCe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},VCe(e)}Hw.log=Q$i;Hw.formatArgs=U$i;Hw.save=G$i;Hw.load=$$i;Hw.useColors=H$i;Hw.storage=W$i();Hw.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 H$i(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function U$i(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+zCe.exports.humanize(this.diff),!!this.useColors){var t="color: "+this.color;e.splice(1,0,t,"color: inherit");var r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}}function Q$i(){var e;return(typeof console>"u"?"undefined":VCe(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function G$i(e){try{e?Hw.storage.setItem("debug",e):Hw.storage.removeItem("debug")}catch{}}function $$i(){var e;try{e=Hw.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function W$i(){try{return localStorage}catch{}}zCe.exports=Oat()(Hw);var V$i=zCe.exports.formatters;V$i.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var u4r=A((Jg,XCe)=>{"use strict";var z$i=require("tty"),KCe=require("util");Jg.init=eWi;Jg.log=j$i;Jg.formatArgs=K$i;Jg.save=J$i;Jg.load=Z$i;Jg.useColors=Y$i;Jg.colors=[6,2,3,4,5,1];try{YCe=_Me(),YCe&&(YCe.stderr||YCe).level>=2&&(Jg.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{}var YCe;Jg.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(s,i){return i.toUpperCase()}),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Y$i(){return"colors"in Jg.inspectOpts?!!Jg.inspectOpts.colors:z$i.isatty(process.stderr.fd)}function K$i(e){var t=this.namespace,r=this.useColors;if(r){var n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=" ".concat(s,";1m").concat(t," \x1B[0m");e[0]=i+e[0].split(` `).join(` `+i),e.push(s+"m+"+XCe.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=X$i()+t+" "+e[0]}function X$i(){return Jg.inspectOpts.hideDate?"":new Date().toISOString()+" "}function j$i(){return process.stderr.write(KCe.format.apply(KCe,arguments)+` `)}function J$i(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Z$i(){return process.env.DEBUG}function eWi(e){e.inspectOpts={};for(var t=Object.keys(Jg.inspectOpts),r=0;r(_0(),q0e))).default;a.sendMessageToAllClients({type:"llm-stream",chatNoteId:e,thinking:n?"Initializing streaming LLM response...":void 0});try{if(!(await Promise.resolve().then(()=>(Ki(),gvr))).default.getOptionBool("aiEnabled"))throw new Error("AI features are disabled. Please enable them in the settings.");await(await Promise.resolve().then(()=>(Kg(),Vk))).default.getOrCreateAnyService();let{ChatPipeline:f}=await Promise.resolve().then(()=>(gEt(),gon)),d=new f({enableStreaming:!0,enableMetrics:!0,maxToolCallIterations:5}),{getSelectedModelConfig:h}=await Promise.resolve().then(()=>(ij(),Yit)),p=await h();if(!p)throw new Error("No valid AI model configuration found");let m={messages:i.messages.map(g=>({role:g.role,content:g.content})),query:o,noteId:void 0,showThinking:n,options:{useAdvancedContext:r===!0,model:p.model,stream:!0,chatNoteId:e},streamCallback:(g,y,E)=>{let x={type:"llm-stream",chatNoteId:e,done:y};if(g&&(x.content=g),E&&"thinking"in E&&E.thinking&&(x.thinking=E.thinking),E&&"toolExecution"in E&&E.toolExecution){let v=E.toolExecution;x.toolExecution={tool:typeof v.tool=="string"?v.tool:v.tool?.name,result:v.result,args:"arguments"in v?typeof v.arguments=="object"?v.arguments:{}:{},action:"action"in v?v.action:void 0,toolCallId:"toolCallId"in v?v.toolCallId:void 0,error:"error"in v?v.error:void 0}}a.sendMessageToAllClients(x),y&&g&&(i.messages.push({role:"assistant",content:g}),vh.updateChat(i.id,i.messages,i.title).catch(v=>{D.error(`Error saving streamed response: ${v}`)}))}};await d.execute(m)}catch(u){D.error(`Error in direct streaming: ${u.message}`),a.sendMessageToAllClients({type:"llm-stream",chatNoteId:e,error:`Error during streaming: ${u.message}`,done:!0})}}var SP,von=q(()=>{"use strict";Vt();bon();_8e();SP={createSession:a7s,getSession:u7s,updateSession:c7s,listSessions:l7s,deleteSession:f7s,sendMessage:d7s,streamMessage:h7s}});function m7s(){return{isCpuArchMismatch:g7s()}}var won,I8e,g7s,Ton,_on=q(()=>{"use strict";won=require("child_process");zr();I8e=require("os");g7s=()=>{if(T0)try{return(0,won.execSync)("sysctl -n sysctl.proc_translated 2>/dev/null",{encoding:"utf8",timeout:1e3}).trim()==="1"}catch{return!1}else return bR&&(0,I8e.arch)()==="x64"?(0,I8e.cpus)().some(e=>e.model.includes("Microsoft SQ")||e.model.includes("Snapdragon")):!1},Ton={systemChecks:m7s}});function A7s(e,t){hr.NOT_AUTHENTICATED_ROUTE(e,"post","/etapi/auth/login",t,(r,n,s)=>{let{password:i,tokenName:o}=r.body;if(!vb.verifyPassword(i))throw new hr.EtapiError(401,"WRONG_PASSWORD","Wrong password.");let{authToken:a}=b2.createToken(o||"ETAPI login");n.status(201).json({authToken:a})}),hr.route(e,"post","/etapi/auth/logout",(r,n,s)=>{let i=b2.parseAuthToken(r.headers.authorization);if(!i||!i.etapiTokenId)throw new hr.EtapiError(400,hr.GENERIC_CODE,"Cannot logout this token.");let o=J.getEtapiToken(i.etapiTokenId);if(!o)throw new Error(`Cannot find the token '${i.etapiTokenId}'.`);o.markAsDeletedSimple(),n.sendStatus(204)})}var Son,Con=q(()=>{"use strict";Dr();ND();Aue();Fj();Son={register:A7s}});function y7s(e){hr.route(e,"get","/etapi/app-info",(t,r,n)=>{r.status(200).json(Fs)})}var Ion,Don=q(()=>{"use strict";Nx();ND();Ion={register:y7s}});function E7s(e){return{noteId:e.noteId,isProtected:e.isProtected,title:e.title,type:e.type,mime:e.mime,blobId:e.blobId,dateCreated:e.dateCreated,dateModified:e.dateModified,utcDateCreated:e.utcDateCreated,utcDateModified:e.utcDateModified,parentNoteIds:e.getParentNotes().map(t=>t.noteId),childNoteIds:e.getChildNotes().map(t=>t.noteId),parentBranchIds:e.getParentBranches().map(t=>t.branchId),childBranchIds:e.getChildBranches().map(t=>t.branchId),attributes:e.getAttributes().map(t=>Non(t))}}function x7s(e){return{branchId:e.branchId,noteId:e.noteId,parentNoteId:e.parentNoteId,prefix:e.prefix,notePosition:e.notePosition,isExpanded:e.isExpanded,utcDateModified:e.utcDateModified}}function Non(e){return{attributeId:e.attributeId,noteId:e.noteId,type:e.type,name:e.name,value:e.value,position:e.position,isInheritable:e.isInheritable,utcDateModified:e.utcDateModified}}function b7s(e){return{attachmentId:e.attachmentId,ownerId:e.ownerId,role:e.role,mime:e.mime,title:e.title,position:e.position,blobId:e.blobId,dateModified:e.dateModified,utcDateModified:e.utcDateModified,utcDateScheduledForErasureSince:e.utcDateScheduledForErasureSince,contentLength:e.contentLength}}var $u,nee=q(()=>{"use strict";$u={mapNoteToPojo:E7s,mapBranchToPojo:x7s,mapAttributeToPojo:Non,mapAttachmentToPojo:b7s}});function v7s(e){if(e===void 0)return"mandatory, but not set"}function w7s(e){if(e===null)return"cannot be null"}function T7s(e){if(e!=null&&typeof e!="string")return`'${e}' is not a string`}function _7s(e){if(typeof e=="string")return kr.validateLocalDateTime(e)}function S7s(e){if(typeof e=="string")return kr.validateUtcDateTime(e)}function C7s(e){if(e!=null&&typeof e!="boolean")return`'${e}' is not a boolean`}function I7s(e){if(e!=null&&!Number.isInteger(e))return`'${e}' is not an integer`}function D7s(e){if(e!=null){if(typeof e!="string")return`'${e}' is not a valid noteId`;if(!(e in J.notes))return`Note '${e}' does not exist`}}function N7s(e){if(e==null)return;let t=kW.getNoteTypeNames();if(typeof e!="string"||!t.includes(e))return`'${e}' is not a valid note type, allowed types are: ${t.join(", ")}`}function R7s(e){if(e!=null&&(typeof e!="string"||!["label","relation"].includes(e)))return`'${e}' is not a valid attribute type, allowed types are: label, relation`}function B7s(e){if(e!=null&&(typeof e!="string"||!/^[A-Za-z0-9_]{4,128}$/.test(e)))return`'${e}' is not a valid entityId. Only alphanumeric characters are allowed of length 4 to 32.`}var mr,she=q(()=>{"use strict";Fme();Jc();Dr();mr={mandatory:v7s,notNull:w7s,isString:T7s,isBoolean:C7s,isInteger:I7s,isNoteId:D7s,isNoteType:N7s,isAttributeType:R7s,isValidEntityId:B7s,isLocalDateTime:_7s,isUtcDateTime:S7s}});function k7s(e){let t={ownerId:[mr.notNull,mr.isNoteId],role:[mr.notNull,mr.isString],mime:[mr.notNull,mr.isString],title:[mr.notNull,mr.isString],position:[mr.notNull,mr.isInteger],content:[mr.isString]};hr.route(e,"post","/etapi/attachments",(n,s,i)=>{let o={};hr.validateAndPatch(o,n.body,t);let a=o;try{if(!a.ownerId)throw new Error("Missing owner ID.");let c=J.getNoteOrThrow(a.ownerId).saveAttachment(a);s.status(201).json($u.mapAttachmentToPojo(c))}catch(u){throw new hr.EtapiError(500,hr.GENERIC_CODE,u.message)}}),hr.route(e,"get","/etapi/attachments/:attachmentId",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);s.json($u.mapAttachmentToPojo(o))});let r={role:[mr.notNull,mr.isString],mime:[mr.notNull,mr.isString],title:[mr.notNull,mr.isString],position:[mr.notNull,mr.isInteger]};hr.route(e,"patch","/etapi/attachments/:attachmentId",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);if(o.isProtected)throw new hr.EtapiError(400,"ATTACHMENT_IS_PROTECTED",`Attachment '${n.params.attachmentId}' is protected and cannot be modified through ETAPI.`);hr.validateAndPatch(o,n.body,r),o.save(),s.json($u.mapAttachmentToPojo(o))}),hr.route(e,"get","/etapi/attachments/:attachmentId/content",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);if(o.isProtected)throw new hr.EtapiError(400,"ATTACHMENT_IS_PROTECTED",`Attachment '${n.params.attachmentId}' is protected and content cannot be read through ETAPI.`);let a=Xr.formatDownloadTitle(o.title,o.role,o.mime);s.setHeader("Content-Disposition",Xr.getContentDisposition(a)),s.setHeader("Cache-Control","no-cache, no-store, must-revalidate"),s.setHeader("Content-Type",o.mime),s.send(o.getContent())}),hr.route(e,"put","/etapi/attachments/:attachmentId/content",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);if(o.isProtected)throw new hr.EtapiError(400,"ATTACHMENT_IS_PROTECTED",`Attachment '${n.params.attachmentId}' is protected and cannot be modified through ETAPI.`);return o.setContent(n.body),s.sendStatus(204)}),hr.route(e,"delete","/etapi/attachments/:attachmentId",(n,s,i)=>{let o=J.getAttachment(n.params.attachmentId);if(!o)return s.sendStatus(204);o.markAsDeleted(),s.sendStatus(204)})}var Ron,Bon=q(()=>{"use strict";Dr();ND();nee();she();zr();Ron={register:k7s}});function L7s(e){hr.route(e,"get","/etapi/attributes/:attributeId",(s,i,o)=>{let a=hr.getAndCheckAttribute(s.params.attributeId);i.json($u.mapAttributeToPojo(a))});let t={attributeId:[mr.mandatory,mr.notNull,mr.isValidEntityId],noteId:[mr.mandatory,mr.notNull,mr.isNoteId],type:[mr.mandatory,mr.notNull,mr.isAttributeType],name:[mr.mandatory,mr.notNull,mr.isString],value:[mr.notNull,mr.isString],isInheritable:[mr.notNull,mr.isBoolean],position:[mr.notNull,mr.isInteger]};hr.route(e,"post","/etapi/attributes",(s,i,o)=>{s.body.type==="relation"&&hr.getAndCheckNote(s.body.value);let a={};hr.validateAndPatch(a,s.body,t);let u=a;try{let c=Bn.createAttribute(u);i.status(201).json($u.mapAttributeToPojo(c))}catch(c){throw new hr.EtapiError(500,hr.GENERIC_CODE,c.message)}});let r={value:[mr.notNull,mr.isString],position:[mr.notNull,mr.isInteger]},n={position:[mr.notNull,mr.isInteger]};hr.route(e,"patch","/etapi/attributes/:attributeId",(s,i,o)=>{let a=hr.getAndCheckAttribute(s.params.attributeId);a.type==="label"?hr.validateAndPatch(a,s.body,r):a.type==="relation"&&(hr.getAndCheckNote(s.body.value),hr.validateAndPatch(a,s.body,n)),a.save(),i.json($u.mapAttributeToPojo(a))}),hr.route(e,"delete","/etapi/attributes/:attributeId",(s,i,o)=>{let a=J.getAttribute(s.params.attributeId);if(!a)return i.sendStatus(204);a.markAsDeleted(),i.sendStatus(204)})}var kon,Lon=q(()=>{"use strict";Dr();ND();nee();O0();she();kon={register:L7s}});function M7s(e){hr.route(e,"get","/etapi/branches/:branchId",(n,s,i)=>{let o=hr.getAndCheckBranch(n.params.branchId);s.json($u.mapBranchToPojo(o))});let t={noteId:[mr.mandatory,mr.notNull,mr.isNoteId],parentNoteId:[mr.mandatory,mr.notNull,mr.isNoteId],notePosition:[mr.notNull,mr.isInteger],prefix:[mr.isString],isExpanded:[mr.notNull,mr.isBoolean]};hr.route(e,"post","/etapi/branches",(n,s,i)=>{let o={};hr.validateAndPatch(o,n.body,t);let a=o,u=J.getBranchFromChildAndParent(a.noteId,a.parentNoteId);if(u)return u.notePosition=a.notePosition,u.prefix=a.prefix,u.isExpanded=a.isExpanded,u.save(),s.status(200).json($u.mapBranchToPojo(u));try{let c=new al(a).save();s.status(201).json($u.mapBranchToPojo(c))}catch(c){throw new hr.EtapiError(400,hr.GENERIC_CODE,c.message)}});let r={notePosition:[mr.notNull,mr.isInteger],prefix:[mr.isString],isExpanded:[mr.notNull,mr.isBoolean]};hr.route(e,"patch","/etapi/branches/:branchId",(n,s,i)=>{let o=hr.getAndCheckBranch(n.params.branchId);hr.validateAndPatch(o,n.body,r),o.save(),s.json($u.mapBranchToPojo(o))}),hr.route(e,"delete","/etapi/branches/:branchId",(n,s,i)=>{let o=J.getBranch(n.params.branchId);if(!o)return s.sendStatus(204);o.deleteBranch(),s.sendStatus(204)}),hr.route(e,"post","/etapi/refresh-note-ordering/:parentNoteId",(n,s,i)=>{hr.getAndCheckNote(n.params.parentNoteId),_a.putNoteReorderingEntityChange(n.params.parentNoteId,"etapi"),s.sendStatus(204)})}var Mon,Fon=q(()=>{"use strict";Dr();ND();nee();r4();CE();she();Mon={register:M7s}});function F7s(e){hr.route(e,"get","/etapi/notes",(n,s,i)=>{let{search:o}=n.query;if(typeof o!="string"||!o?.trim())throw new hr.EtapiError(400,"SEARCH_QUERY_PARAM_MANDATORY","'search' query parameter is mandatory.");let a=P7s(n),u=new Vl(a),f={results:no.findResultsWithQuery(o,u).map(d=>J.notes[d.noteId]).map(d=>$u.mapNoteToPojo(d))};u.debugInfo&&(f.debugInfo=u.debugInfo),s.json(f)}),hr.route(e,"get","/etapi/notes/:noteId",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);s.json($u.mapNoteToPojo(o))});let t={parentNoteId:[mr.mandatory,mr.notNull,mr.isNoteId],title:[mr.mandatory,mr.notNull,mr.isString],type:[mr.mandatory,mr.notNull,mr.isNoteType],mime:[mr.notNull,mr.isString],content:[mr.notNull,mr.isString],notePosition:[mr.notNull,mr.isInteger],prefix:[mr.notNull,mr.isString],isExpanded:[mr.notNull,mr.isBoolean],noteId:[mr.notNull,mr.isValidEntityId],dateCreated:[mr.notNull,mr.isString,mr.isLocalDateTime],utcDateCreated:[mr.notNull,mr.isString,mr.isUtcDateTime]};hr.route(e,"post","/etapi/create-note",(n,s,i)=>{let o={};hr.validateAndPatch(o,n.body,t);let a=o;try{let u=Zr.createNewNote(a);s.status(201).json({note:$u.mapNoteToPojo(u.note),branch:$u.mapBranchToPojo(u.branch)})}catch(u){return hr.sendError(s,500,hr.GENERIC_CODE,u.message)}});let r={title:[mr.notNull,mr.isString],type:[mr.notNull,mr.isString],mime:[mr.notNull,mr.isString],dateCreated:[mr.notNull,mr.isString,mr.isLocalDateTime],utcDateCreated:[mr.notNull,mr.isString,mr.isUtcDateTime]};hr.route(e,"patch","/etapi/notes/:noteId",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);if(o.isProtected)throw new hr.EtapiError(400,"NOTE_IS_PROTECTED",`Note '${n.params.noteId}' is protected and cannot be modified through ETAPI.`);hr.validateAndPatch(o,n.body,r),o.save(),s.json($u.mapNoteToPojo(o))}),hr.route(e,"delete","/etapi/notes/:noteId",(n,s,i)=>{let{noteId:o}=n.params,a=J.getNote(o);if(!a)return s.sendStatus(204);a.deleteNote(null,new Ef("no-progress-reporting")),s.sendStatus(204)}),hr.route(e,"get","/etapi/notes/:noteId/content",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);if(o.isProtected)throw new hr.EtapiError(400,"NOTE_IS_PROTECTED",`Note '${n.params.noteId}' is protected and content cannot be read through ETAPI.`);let a=Xr.formatDownloadTitle(o.title,o.type,o.mime);s.setHeader("Content-Disposition",Xr.getContentDisposition(a)),s.setHeader("Cache-Control","no-cache, no-store, must-revalidate"),s.setHeader("Content-Type",o.mime),s.send(o.getContent())}),hr.route(e,"put","/etapi/notes/:noteId/content",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);if(o.isProtected)throw new hr.EtapiError(400,"NOTE_IS_PROTECTED",`Note '${n.params.noteId}' is protected and cannot be modified through ETAPI.`);return o.setContent(n.body),Zr.asyncPostProcessContent(o,n.body),s.sendStatus(204)}),hr.route(e,"get","/etapi/notes/:noteId/export",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId),a=n.query.format||"html";if(typeof a!="string"||!["html","markdown"].includes(a))throw new hr.EtapiError(400,"UNRECOGNIZED_EXPORT_FORMAT",`Unrecognized export format '${a}', supported values are 'html' (default) or 'markdown'.`);let u=new Ef("no-progress-reporting"),c=o.getParentBranches()[0];MK.exportToZip(u,c,a,s)}),hr.route(e,"post","/etapi/notes/:noteId/import",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId),a=new Ef("no-progress-reporting");HK.importZip(a,n.body,o).then(u=>{s.status(201).json({note:$u.mapNoteToPojo(u),branch:$u.mapBranchToPojo(u.getParentBranches()[0])})})}),hr.route(e,"post","/etapi/notes/:noteId/revision",(n,s,i)=>(hr.getAndCheckNote(n.params.noteId).saveRevision(),s.sendStatus(204))),hr.route(e,"get","/etapi/notes/:noteId/attachments",(n,s,i)=>{let a=hr.getAndCheckNote(n.params.noteId).getAttachments({includeContentLength:!0});s.json(a.map(u=>$u.mapAttachmentToPojo(u)))})}function P7s(e){let t={fastSearch:EEt(e.query,"fastSearch"),includeArchivedNotes:EEt(e.query,"includeArchivedNotes"),ancestorNoteId:yEt(e.query.ancestorNoteId),ancestorDepth:yEt(e.query.ancestorDepth),orderBy:yEt(e.query.orderBy),orderDirection:O7s(e.query,"orderDirection"),limit:q7s(e.query,"limit"),debug:EEt(e.query,"debug")},r={};for(let n of Object.keys(t))t[n]!==void 0&&(r[n]=t[n]);return r}function yEt(e){if(typeof e=="string")return e}function EEt(e,t){if(t in e){if(!["true","false"].includes(e[t]))throw new hr.EtapiError(400,xEt,`Cannot parse boolean '${t}' value '${e[t]}, allowed values are 'true' and 'false'.`);return e[t]==="true"}}function O7s(e,t){if(!(t in e))return;let r=parseInt(e[t]);if(!["asc","desc"].includes(e[t]))throw new hr.EtapiError(400,xEt,`Cannot parse order direction value '${e[t]}, allowed values are 'asc' and 'desc'.`);return r}function q7s(e,t){if(!(t in e))return;let r=parseInt(e[t]);if(Number.isNaN(r))throw new hr.EtapiError(400,xEt,`Cannot parse integer '${t}' value '${e[t]}'.`);return r}var xEt,Pon,Oon=q(()=>{"use strict";Dr();zr();ND();nee();sd();E3();she();XE();RB();iTe();_Te();xEt="SEARCH_PARAM_VALIDATION_ERROR";Pon={register:F7s}});function vEt(e){return/[0-9]{4}-[0-9]{2}-[0-9]{2}/.test(e)&&!!Date.parse(e)}function $7s(e){hr.route(e,"get","/etapi/inbox/:date",(t,r,n)=>{let{date:s}=t.params;if(!vEt(s))throw bEt(s);let i=Og.getInboxNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/days/:date",(t,r,n)=>{let{date:s}=t.params;if(!vEt(s))throw bEt(s);let i=io.getDayNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/week-first-day/:date",(t,r,n)=>{let{date:s}=t.params;if(!vEt(s))throw bEt(s);let i=io.getWeekFirstDayNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/weeks/:week",(t,r,n)=>{let{week:s}=t.params;if(!/[0-9]{4}-W[0-9]{2}/.test(s))throw H7s(s);let i=io.getWeekNote(s);if(!i)throw U7s(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/months/:month",(t,r,n)=>{let{month:s}=t.params;if(!/[0-9]{4}-[0-9]{2}/.test(s))throw Q7s(s);let i=io.getMonthNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/years/:year",(t,r,n)=>{let{year:s}=t.params;if(!/[0-9]{4}/.test(s))throw G7s(s);let i=io.getYearNote(s);r.json($u.mapNoteToPojo(i))})}var bEt,H7s,U7s,Q7s,G7s,qon,Hon=q(()=>{"use strict";Soe();kB();ND();nee();bEt=e=>new hr.EtapiError(400,"DATE_INVALID",`Date "${e}" is not valid.`),H7s=e=>new hr.EtapiError(400,"WEEK_INVALID",`Week "${e}" is not valid.`),U7s=e=>new hr.EtapiError(404,"WEEK_NOT_FOUND",`Week "${e}" not found. Check if week note is enabled.`),Q7s=e=>new hr.EtapiError(400,"MONTH_INVALID",`Month "${e}" is not valid.`),G7s=e=>new hr.EtapiError(400,"YEAR_INVALID",`Year "${e}" is not valid.`);qon={register:$7s}});function V7s(e){e.get("/etapi/etapi.openapi.yaml",(t,r)=>{wEt||(wEt=Uon.default.readFileSync(W7s,"utf8")),r.header("Content-Type","text/plain"),r.status(200).send(wEt)})}var Uon,Qon,W7s,wEt,Gon,$on=q(()=>{"use strict";Uon=Xe(require("fs")),Qon=Xe(require("path"));A3();W7s=Qon.default.join(wp,"etapi.openapi.yaml"),wEt=null;Gon={register:V7s}});function z7s(e){hr.route(e,"put","/etapi/backup/:backupName",(t,r,n)=>{Dx.backupNow(t.params.backupName).then(()=>r.sendStatus(204)).catch(()=>r.sendStatus(500))})}var Won,Von=q(()=>{"use strict";ND();TO();Won={register:z7s}});var zon=A((RAa,D8e)=>{"use strict";var Y7s=function(){if(typeof D8e<"u"&&D8e.exports)return require("path").resolve(__dirname);throw new Error("getAbsoluteFSPath can only be called within a Nodejs environment")};D8e.exports=Y7s});var jon=A((BAa,Xon)=>{"use strict";var K7s=Nj(),X7s=zon(),j7s='',Yon="";function N8e(e){return e&&e.split("?")[0]}var _Et=` +`)}`,D.info(`Enhanced content with ${c.length} note references`))}let a=(await Promise.resolve().then(()=>(_0(),q0e))).default;a.sendMessageToAllClients({type:"llm-stream",chatNoteId:e,thinking:n?"Initializing streaming LLM response...":void 0});try{if(!(await Promise.resolve().then(()=>(Ki(),gvr))).default.getOptionBool("aiEnabled"))throw new Error("AI features are disabled. Please enable them in the settings.");await(await Promise.resolve().then(()=>(Kg(),Vk))).default.getOrCreateAnyService();let{ChatPipeline:f}=await Promise.resolve().then(()=>(gEt(),gon)),d=new f({enableStreaming:!0,enableMetrics:!0,maxToolCallIterations:5}),{getSelectedModelConfig:h}=await Promise.resolve().then(()=>(ij(),Yit)),p=await h();if(!p)throw new Error("No valid AI model configuration found");let m={messages:i.messages.map(g=>({role:g.role,content:g.content})),query:o,noteId:void 0,showThinking:n,options:{useAdvancedContext:r===!0,model:p.model,stream:!0,chatNoteId:e},streamCallback:(g,y,E)=>{let x={type:"llm-stream",chatNoteId:e,done:y};if(g&&(x.content=g),E&&"thinking"in E&&E.thinking&&(x.thinking=E.thinking),E&&"toolExecution"in E&&E.toolExecution){let v=E.toolExecution;x.toolExecution={tool:typeof v.tool=="string"?v.tool:v.tool?.name,result:v.result,args:"arguments"in v?typeof v.arguments=="object"?v.arguments:{}:{},action:"action"in v?v.action:void 0,toolCallId:"toolCallId"in v?v.toolCallId:void 0,error:"error"in v?v.error:void 0}}a.sendMessageToAllClients(x),y&&g&&(i.messages.push({role:"assistant",content:g}),vh.updateChat(i.id,i.messages,i.title).catch(v=>{D.error(`Error saving streamed response: ${v}`)}))}};await d.execute(m)}catch(u){D.error(`Error in direct streaming: ${u.message}`),a.sendMessageToAllClients({type:"llm-stream",chatNoteId:e,error:`Error during streaming: ${u.message}`,done:!0})}}var SP,von=q(()=>{"use strict";Vt();bon();_8e();SP={createSession:a7s,getSession:u7s,updateSession:c7s,listSessions:l7s,deleteSession:f7s,sendMessage:d7s,streamMessage:h7s}});function m7s(){return{isCpuArchMismatch:g7s()}}var won,I8e,g7s,Ton,_on=q(()=>{"use strict";won=require("child_process");zr();I8e=require("os");g7s=()=>{if(T0)try{return(0,won.execSync)("sysctl -n sysctl.proc_translated 2>/dev/null",{encoding:"utf8",timeout:1e3}).trim()==="1"}catch{return!1}else return bR&&(0,I8e.arch)()==="x64"?(0,I8e.cpus)().some(e=>e.model.includes("Microsoft SQ")||e.model.includes("Snapdragon")):!1},Ton={systemChecks:m7s}});function A7s(e,t){hr.NOT_AUTHENTICATED_ROUTE(e,"post","/etapi/auth/login",t,(r,n,s)=>{let{password:i,tokenName:o}=r.body;if(!vb.verifyPassword(i))throw new hr.EtapiError(401,"WRONG_PASSWORD","Wrong password.");let{authToken:a}=b2.createToken(o||"ETAPI login");n.status(201).json({authToken:a})}),hr.route(e,"post","/etapi/auth/logout",(r,n,s)=>{let i=b2.parseAuthToken(r.headers.authorization);if(!i||!i.etapiTokenId)throw new hr.EtapiError(400,hr.GENERIC_CODE,"Cannot logout this token.");let o=J.getEtapiToken(i.etapiTokenId);if(!o)throw new Error(`Cannot find the token '${i.etapiTokenId}'.`);o.markAsDeletedSimple(),n.sendStatus(204)})}var Son,Con=q(()=>{"use strict";Dr();ND();Aue();Fj();Son={register:A7s}});function y7s(e){hr.route(e,"get","/etapi/app-info",(t,r,n)=>{r.status(200).json(Fs)})}var Ion,Don=q(()=>{"use strict";Nx();ND();Ion={register:y7s}});function E7s(e){return{noteId:e.noteId,isProtected:e.isProtected,title:e.title,type:e.type,mime:e.mime,blobId:e.blobId,dateCreated:e.dateCreated,dateModified:e.dateModified,utcDateCreated:e.utcDateCreated,utcDateModified:e.utcDateModified,parentNoteIds:e.getParentNotes().map(t=>t.noteId),childNoteIds:e.getChildNotes().map(t=>t.noteId),parentBranchIds:e.getParentBranches().map(t=>t.branchId),childBranchIds:e.getChildBranches().map(t=>t.branchId),attributes:e.getAttributes().map(t=>Non(t))}}function x7s(e){return{branchId:e.branchId,noteId:e.noteId,parentNoteId:e.parentNoteId,prefix:e.prefix,notePosition:e.notePosition,isExpanded:e.isExpanded,utcDateModified:e.utcDateModified}}function Non(e){return{attributeId:e.attributeId,noteId:e.noteId,type:e.type,name:e.name,value:e.value,position:e.position,isInheritable:e.isInheritable,utcDateModified:e.utcDateModified}}function b7s(e){return{attachmentId:e.attachmentId,ownerId:e.ownerId,role:e.role,mime:e.mime,title:e.title,position:e.position,blobId:e.blobId,dateModified:e.dateModified,utcDateModified:e.utcDateModified,utcDateScheduledForErasureSince:e.utcDateScheduledForErasureSince,contentLength:e.contentLength}}var $u,nee=q(()=>{"use strict";$u={mapNoteToPojo:E7s,mapBranchToPojo:x7s,mapAttributeToPojo:Non,mapAttachmentToPojo:b7s}});function v7s(e){if(e===void 0)return"mandatory, but not set"}function w7s(e){if(e===null)return"cannot be null"}function T7s(e){if(e!=null&&typeof e!="string")return`'${e}' is not a string`}function _7s(e){if(typeof e=="string")return kr.validateLocalDateTime(e)}function S7s(e){if(typeof e=="string")return kr.validateUtcDateTime(e)}function C7s(e){if(e!=null&&typeof e!="boolean")return`'${e}' is not a boolean`}function I7s(e){if(e!=null&&!Number.isInteger(e))return`'${e}' is not an integer`}function D7s(e){if(e!=null){if(typeof e!="string")return`'${e}' is not a valid noteId`;if(!(e in J.notes))return`Note '${e}' does not exist`}}function N7s(e){if(e==null)return;let t=kW.getNoteTypeNames();if(typeof e!="string"||!t.includes(e))return`'${e}' is not a valid note type, allowed types are: ${t.join(", ")}`}function R7s(e){if(e!=null&&(typeof e!="string"||!["label","relation"].includes(e)))return`'${e}' is not a valid attribute type, allowed types are: label, relation`}function B7s(e){if(e!=null&&(typeof e!="string"||!/^[A-Za-z0-9_]{4,128}$/.test(e)))return`'${e}' is not a valid entityId. Only alphanumeric characters are allowed of length 4 to 32.`}var mr,she=q(()=>{"use strict";Fme();Jc();Dr();mr={mandatory:v7s,notNull:w7s,isString:T7s,isBoolean:C7s,isInteger:I7s,isNoteId:D7s,isNoteType:N7s,isAttributeType:R7s,isValidEntityId:B7s,isLocalDateTime:_7s,isUtcDateTime:S7s}});function k7s(e){let t={ownerId:[mr.notNull,mr.isNoteId],role:[mr.notNull,mr.isString],mime:[mr.notNull,mr.isString],title:[mr.notNull,mr.isString],position:[mr.notNull,mr.isInteger],content:[mr.isString]};hr.route(e,"post","/etapi/attachments",(n,s,i)=>{let o={};hr.validateAndPatch(o,n.body,t);let a=o;try{if(!a.ownerId)throw new Error("Missing owner ID.");let c=J.getNoteOrThrow(a.ownerId).saveAttachment(a);s.status(201).json($u.mapAttachmentToPojo(c))}catch(u){throw new hr.EtapiError(500,hr.GENERIC_CODE,u.message)}}),hr.route(e,"get","/etapi/attachments/:attachmentId",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);s.json($u.mapAttachmentToPojo(o))});let r={role:[mr.notNull,mr.isString],mime:[mr.notNull,mr.isString],title:[mr.notNull,mr.isString],position:[mr.notNull,mr.isInteger]};hr.route(e,"patch","/etapi/attachments/:attachmentId",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);if(o.isProtected)throw new hr.EtapiError(400,"ATTACHMENT_IS_PROTECTED",`Attachment '${n.params.attachmentId}' is protected and cannot be modified through ETAPI.`);hr.validateAndPatch(o,n.body,r),o.save(),s.json($u.mapAttachmentToPojo(o))}),hr.route(e,"get","/etapi/attachments/:attachmentId/content",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);if(o.isProtected)throw new hr.EtapiError(400,"ATTACHMENT_IS_PROTECTED",`Attachment '${n.params.attachmentId}' is protected and content cannot be read through ETAPI.`);let a=Xr.formatDownloadTitle(o.title,o.role,o.mime);s.setHeader("Content-Disposition",Xr.getContentDisposition(a)),s.setHeader("Cache-Control","no-cache, no-store, must-revalidate"),s.setHeader("Content-Type",o.mime),s.send(o.getContent())}),hr.route(e,"put","/etapi/attachments/:attachmentId/content",(n,s,i)=>{let o=hr.getAndCheckAttachment(n.params.attachmentId);if(o.isProtected)throw new hr.EtapiError(400,"ATTACHMENT_IS_PROTECTED",`Attachment '${n.params.attachmentId}' is protected and cannot be modified through ETAPI.`);return o.setContent(n.body),s.sendStatus(204)}),hr.route(e,"delete","/etapi/attachments/:attachmentId",(n,s,i)=>{let o=J.getAttachment(n.params.attachmentId);if(!o)return s.sendStatus(204);o.markAsDeleted(),s.sendStatus(204)})}var Ron,Bon=q(()=>{"use strict";Dr();ND();nee();she();zr();Ron={register:k7s}});function L7s(e){hr.route(e,"get","/etapi/attributes/:attributeId",(s,i,o)=>{let a=hr.getAndCheckAttribute(s.params.attributeId);i.json($u.mapAttributeToPojo(a))});let t={attributeId:[mr.mandatory,mr.notNull,mr.isValidEntityId],noteId:[mr.mandatory,mr.notNull,mr.isNoteId],type:[mr.mandatory,mr.notNull,mr.isAttributeType],name:[mr.mandatory,mr.notNull,mr.isString],value:[mr.notNull,mr.isString],isInheritable:[mr.notNull,mr.isBoolean],position:[mr.notNull,mr.isInteger]};hr.route(e,"post","/etapi/attributes",(s,i,o)=>{s.body.type==="relation"&&hr.getAndCheckNote(s.body.value);let a={};hr.validateAndPatch(a,s.body,t);let u=a;try{let c=Bn.createAttribute(u);i.status(201).json($u.mapAttributeToPojo(c))}catch(c){throw new hr.EtapiError(500,hr.GENERIC_CODE,c.message)}});let r={value:[mr.notNull,mr.isString],position:[mr.notNull,mr.isInteger]},n={position:[mr.notNull,mr.isInteger]};hr.route(e,"patch","/etapi/attributes/:attributeId",(s,i,o)=>{let a=hr.getAndCheckAttribute(s.params.attributeId);a.type==="label"?hr.validateAndPatch(a,s.body,r):a.type==="relation"&&(hr.getAndCheckNote(s.body.value),hr.validateAndPatch(a,s.body,n)),a.save(),i.json($u.mapAttributeToPojo(a))}),hr.route(e,"delete","/etapi/attributes/:attributeId",(s,i,o)=>{let a=J.getAttribute(s.params.attributeId);if(!a)return i.sendStatus(204);a.markAsDeleted(),i.sendStatus(204)})}var kon,Lon=q(()=>{"use strict";Dr();ND();nee();O0();she();kon={register:L7s}});function M7s(e){hr.route(e,"get","/etapi/branches/:branchId",(n,s,i)=>{let o=hr.getAndCheckBranch(n.params.branchId);s.json($u.mapBranchToPojo(o))});let t={noteId:[mr.mandatory,mr.notNull,mr.isNoteId],parentNoteId:[mr.mandatory,mr.notNull,mr.isNoteId],notePosition:[mr.notNull,mr.isInteger],prefix:[mr.isString],isExpanded:[mr.notNull,mr.isBoolean]};hr.route(e,"post","/etapi/branches",(n,s,i)=>{let o={};hr.validateAndPatch(o,n.body,t);let a=o,u=J.getBranchFromChildAndParent(a.noteId,a.parentNoteId);if(u)return u.notePosition=a.notePosition,u.prefix=a.prefix,u.isExpanded=a.isExpanded,u.save(),s.status(200).json($u.mapBranchToPojo(u));try{let c=new al(a).save();s.status(201).json($u.mapBranchToPojo(c))}catch(c){throw new hr.EtapiError(400,hr.GENERIC_CODE,c.message)}});let r={notePosition:[mr.notNull,mr.isInteger],prefix:[mr.isString],isExpanded:[mr.notNull,mr.isBoolean]};hr.route(e,"patch","/etapi/branches/:branchId",(n,s,i)=>{let o=hr.getAndCheckBranch(n.params.branchId);hr.validateAndPatch(o,n.body,r),o.save(),s.json($u.mapBranchToPojo(o))}),hr.route(e,"delete","/etapi/branches/:branchId",(n,s,i)=>{let o=J.getBranch(n.params.branchId);if(!o)return s.sendStatus(204);o.deleteBranch(),s.sendStatus(204)}),hr.route(e,"post","/etapi/refresh-note-ordering/:parentNoteId",(n,s,i)=>{hr.getAndCheckNote(n.params.parentNoteId),_a.putNoteReorderingEntityChange(n.params.parentNoteId,"etapi"),s.sendStatus(204)})}var Mon,Fon=q(()=>{"use strict";Dr();ND();nee();r4();CE();she();Mon={register:M7s}});function F7s(e){hr.route(e,"get","/etapi/notes",(n,s,i)=>{let{search:o}=n.query;if(typeof o!="string"||!o?.trim())throw new hr.EtapiError(400,"SEARCH_QUERY_PARAM_MANDATORY","'search' query parameter is mandatory.");let a=P7s(n),u=new Vl(a),f={results:no.findResultsWithQuery(o,u).map(d=>J.notes[d.noteId]).map(d=>$u.mapNoteToPojo(d))};u.debugInfo&&(f.debugInfo=u.debugInfo),s.json(f)}),hr.route(e,"get","/etapi/notes/:noteId",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);s.json($u.mapNoteToPojo(o))});let t={parentNoteId:[mr.mandatory,mr.notNull,mr.isNoteId],title:[mr.mandatory,mr.notNull,mr.isString],type:[mr.mandatory,mr.notNull,mr.isNoteType],mime:[mr.notNull,mr.isString],content:[mr.notNull,mr.isString],notePosition:[mr.notNull,mr.isInteger],prefix:[mr.notNull,mr.isString],isExpanded:[mr.notNull,mr.isBoolean],noteId:[mr.notNull,mr.isValidEntityId],dateCreated:[mr.notNull,mr.isString,mr.isLocalDateTime],utcDateCreated:[mr.notNull,mr.isString,mr.isUtcDateTime]};hr.route(e,"post","/etapi/create-note",(n,s,i)=>{let o={};hr.validateAndPatch(o,n.body,t);let a=o;try{let u=Zr.createNewNote(a);s.status(201).json({note:$u.mapNoteToPojo(u.note),branch:$u.mapBranchToPojo(u.branch)})}catch(u){return hr.sendError(s,500,hr.GENERIC_CODE,u.message)}});let r={title:[mr.notNull,mr.isString],type:[mr.notNull,mr.isString],mime:[mr.notNull,mr.isString],dateCreated:[mr.notNull,mr.isString,mr.isLocalDateTime],utcDateCreated:[mr.notNull,mr.isString,mr.isUtcDateTime]};hr.route(e,"patch","/etapi/notes/:noteId",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);if(o.isProtected)throw new hr.EtapiError(400,"NOTE_IS_PROTECTED",`Note '${n.params.noteId}' is protected and cannot be modified through ETAPI.`);hr.validateAndPatch(o,n.body,r),o.save(),s.json($u.mapNoteToPojo(o))}),hr.route(e,"delete","/etapi/notes/:noteId",(n,s,i)=>{let{noteId:o}=n.params,a=J.getNote(o);if(!a)return s.sendStatus(204);a.deleteNote(null,new Ef("no-progress-reporting")),s.sendStatus(204)}),hr.route(e,"get","/etapi/notes/:noteId/content",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);if(o.isProtected)throw new hr.EtapiError(400,"NOTE_IS_PROTECTED",`Note '${n.params.noteId}' is protected and content cannot be read through ETAPI.`);let a=Xr.formatDownloadTitle(o.title,o.type,o.mime);s.setHeader("Content-Disposition",Xr.getContentDisposition(a)),s.setHeader("Cache-Control","no-cache, no-store, must-revalidate"),s.setHeader("Content-Type",o.mime),s.send(o.getContent())}),hr.route(e,"put","/etapi/notes/:noteId/content",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId);if(o.isProtected)throw new hr.EtapiError(400,"NOTE_IS_PROTECTED",`Note '${n.params.noteId}' is protected and cannot be modified through ETAPI.`);return o.setContent(n.body),Zr.asyncPostProcessContent(o,n.body),s.sendStatus(204)}),hr.route(e,"get","/etapi/notes/:noteId/export",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId),a=n.query.format||"html";if(typeof a!="string"||!["html","markdown"].includes(a))throw new hr.EtapiError(400,"UNRECOGNIZED_EXPORT_FORMAT",`Unrecognized export format '${a}', supported values are 'html' (default) or 'markdown'.`);let u=new Ef("no-progress-reporting"),c=o.getParentBranches()[0];MK.exportToZip(u,c,a,s)}),hr.route(e,"post","/etapi/notes/:noteId/import",(n,s,i)=>{let o=hr.getAndCheckNote(n.params.noteId),a=new Ef("no-progress-reporting");HK.importZip(a,n.body,o).then(u=>{s.status(201).json({note:$u.mapNoteToPojo(u),branch:$u.mapBranchToPojo(u.getParentBranches()[0])})})}),hr.route(e,"post","/etapi/notes/:noteId/revision",(n,s,i)=>(hr.getAndCheckNote(n.params.noteId).saveRevision(),s.sendStatus(204))),hr.route(e,"get","/etapi/notes/:noteId/attachments",(n,s,i)=>{let a=hr.getAndCheckNote(n.params.noteId).getAttachments({includeContentLength:!0});s.json(a.map(u=>$u.mapAttachmentToPojo(u)))})}function P7s(e){let t={fastSearch:EEt(e.query,"fastSearch"),includeArchivedNotes:EEt(e.query,"includeArchivedNotes"),ancestorNoteId:yEt(e.query.ancestorNoteId),ancestorDepth:yEt(e.query.ancestorDepth),orderBy:yEt(e.query.orderBy),orderDirection:O7s(e.query,"orderDirection"),limit:q7s(e.query,"limit"),debug:EEt(e.query,"debug")},r={};for(let n of Object.keys(t))t[n]!==void 0&&(r[n]=t[n]);return r}function yEt(e){if(typeof e=="string")return e}function EEt(e,t){if(t in e){if(!["true","false"].includes(e[t]))throw new hr.EtapiError(400,xEt,`Cannot parse boolean '${t}' value '${e[t]}, allowed values are 'true' and 'false'.`);return e[t]==="true"}}function O7s(e,t){if(!(t in e))return;let r=parseInt(e[t]);if(!["asc","desc"].includes(e[t]))throw new hr.EtapiError(400,xEt,`Cannot parse order direction value '${e[t]}, allowed values are 'asc' and 'desc'.`);return r}function q7s(e,t){if(!(t in e))return;let r=parseInt(e[t]);if(Number.isNaN(r))throw new hr.EtapiError(400,xEt,`Cannot parse integer '${t}' value '${e[t]}'.`);return r}var xEt,Pon,Oon=q(()=>{"use strict";Dr();zr();ND();nee();sd();E3();she();XE();RB();iTe();_Te();xEt="SEARCH_PARAM_VALIDATION_ERROR";Pon={register:F7s}});function vEt(e){return/[0-9]{4}-[0-9]{2}-[0-9]{2}/.test(e)&&!!Date.parse(e)}function $7s(e){hr.route(e,"get","/etapi/inbox/:date",(t,r,n)=>{let{date:s}=t.params;if(!vEt(s))throw bEt(s);let i=Og.getInboxNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/days/:date",(t,r,n)=>{let{date:s}=t.params;if(!vEt(s))throw bEt(s);let i=io.getDayNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/week-first-day/:date",(t,r,n)=>{let{date:s}=t.params;if(!vEt(s))throw bEt(s);let i=io.getWeekFirstDayNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/weeks/:week",(t,r,n)=>{let{week:s}=t.params;if(!/[0-9]{4}-W[0-9]{2}/.test(s))throw H7s(s);let i=io.getWeekNote(s);if(!i)throw U7s(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/months/:month",(t,r,n)=>{let{month:s}=t.params;if(!/[0-9]{4}-[0-9]{2}/.test(s))throw Q7s(s);let i=io.getMonthNote(s);r.json($u.mapNoteToPojo(i))}),hr.route(e,"get","/etapi/calendar/years/:year",(t,r,n)=>{let{year:s}=t.params;if(!/[0-9]{4}/.test(s))throw G7s(s);let i=io.getYearNote(s);r.json($u.mapNoteToPojo(i))})}var bEt,H7s,U7s,Q7s,G7s,qon,Hon=q(()=>{"use strict";Soe();kB();ND();nee();bEt=e=>new hr.EtapiError(400,"DATE_INVALID",`Date "${e}" is not valid.`),H7s=e=>new hr.EtapiError(400,"WEEK_INVALID",`Week "${e}" is not valid.`),U7s=e=>new hr.EtapiError(404,"WEEK_NOT_FOUND",`Week "${e}" not found. Check if week note is enabled.`),Q7s=e=>new hr.EtapiError(400,"MONTH_INVALID",`Month "${e}" is not valid.`),G7s=e=>new hr.EtapiError(400,"YEAR_INVALID",`Year "${e}" is not valid.`);qon={register:$7s}});function V7s(e){e.get("/etapi/etapi.openapi.yaml",(t,r)=>{wEt||(wEt=Uon.default.readFileSync(W7s,"utf8")),r.header("Content-Type","text/plain"),r.status(200).send(wEt)})}var Uon,Qon,W7s,wEt,Gon,$on=q(()=>{"use strict";Uon=Xe(require("fs")),Qon=Xe(require("path"));A3();W7s=Qon.default.join(wp,"doc_notes/en/api-ko/etapi.json"),wEt=null;Gon={register:V7s}});function z7s(e){hr.route(e,"put","/etapi/backup/:backupName",(t,r,n)=>{Dx.backupNow(t.params.backupName).then(()=>r.sendStatus(204)).catch(()=>r.sendStatus(500))})}var Won,Von=q(()=>{"use strict";ND();TO();Won={register:z7s}});var zon=A((RAa,D8e)=>{"use strict";var Y7s=function(){if(typeof D8e<"u"&&D8e.exports)return "/usr/src/app/assets/doc_notes/en/api-ko/swagger";throw new Error("getAbsoluteFSPath can only be called within a Nodejs environment")};D8e.exports=Y7s});var jon=A((BAa,Xon)=>{"use strict";var K7s=Nj(),X7s=zon(),j7s='',Yon="";function N8e(e){return e&&e.split("?")[0]}var _Et=` @@ -2991,7 +2993,7 @@ window.onload = function() { `,e.length-s>t&&o>s?u+=e.slice(s,o)+` `+e.slice(o+1):u+=e.slice(s),u.slice(1)}function nOs(e){for(var t="",r=0,n,s=0;s=65536?s+=2:s++)r=ahe(e,s),n=UA[r],!n&&fhe(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=n||YPs(r);return t}function iOs(e,t,r){var n="",s=e.tag,i,o,a;for(i=0,o=r.length;i"u"&&G9(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=s,e.dump="["+n+"]"}function fan(e,t,r,n){var s="",i=e.tag,o,a,u;for(o=0,a=r.length;o"u"&&G9(e,t+1,null,!0,!0,!1,!0))&&((!n||s!=="")&&(s+=LEt(e,t)),e.dump&&che===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=i,e.dump=s||"[]"}function sOs(e,t,r){var n="",s=e.tag,i=Object.keys(r),o,a,u,c,l;for(o=0,a=i.length;o1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),G9(e,t,c,!1,!1)&&(l+=e.dump,n+=l));e.tag=s,e.dump="{"+n+"}"}function oOs(e,t,r,n){var s="",i=e.tag,o=Object.keys(r),a,u,c,l,f,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new hE("sortKeys must be a boolean or a function");for(a=0,u=o.length;a1024,f&&(e.dump&&che===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,f&&(d+=LEt(e,t)),G9(e,t+1,l,!0,f)&&(e.dump&&che===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,s+=d));e.tag=i,e.dump=s||"{}"}function dan(e,t,r){var n,s,i,o,a,u;for(s=r?e.explicitTypes:e.implicitTypes,i=0,o=s.length;i tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function G9(e,t,r,n,s,i,o){e.tag=null,e.dump=r,dan(e,r,!1)||dan(e,r,!0);var a=Gan.call(e.dump),u=n,c;n&&(n=e.flowLevel<0||e.flowLevel>t);var l=a==="[object Object]"||a==="[object Array]",f,d;if(l&&(f=e.duplicates.indexOf(r),d=f!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(s=!1),d&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(l&&d&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(oOs(e,t,e.dump,s),d&&(e.dump="&ref_"+f+e.dump)):(sOs(e,t,e.dump),d&&(e.dump="&ref_"+f+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?fan(e,t-1,e.dump,s):fan(e,t,e.dump,s),d&&(e.dump="&ref_"+f+e.dump)):(iOs(e,t,e.dump),d&&(e.dump="&ref_"+f+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&tOs(e,e.dump,t,i,u);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new hE("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function aOs(e,t){var r=[],n=[],s,i;for(FEt(e,r,n),s=0,i=n.length;s{"use strict";fFs=han,dFs=oFs,hFs=aFs,pFs=cFs,mFs=lFs,gFs=uFs,m0={isNothing:fFs,isObject:dFs,toArray:hFs,repeat:pFs,isNegativeZero:mFs,extend:gFs};uhe.prototype=Object.create(Error.prototype);uhe.prototype.constructor=uhe;uhe.prototype.toString=function(t){return this.name+": "+pan(this,t)};hE=uhe;yFs=AFs,EFs=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xFs=["scalar","sequence","mapping"];mg=vFs;BEt.prototype.extend=function(t){var r=[],n=[];if(t instanceof mg)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new hE("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof mg))throw new hE("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new hE("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new hE("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof mg))throw new hE("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(BEt.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=Jon(s,"implicit"),s.compiledExplicit=Jon(s,"explicit"),s.compiledTypeMap=wFs(s.compiledImplicit,s.compiledExplicit),s};man=BEt,gan=new mg("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Aan=new mg("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),yan=new mg("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Ean=new man({explicit:[gan,Aan,yan]});xan=new mg("tag:yaml.org,2002:null",{kind:"scalar",resolve:TFs,construct:_Fs,predicate:SFs,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});ban=new mg("tag:yaml.org,2002:bool",{kind:"scalar",resolve:CFs,construct:IFs,predicate:DFs,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});van=new mg("tag:yaml.org,2002:int",{kind:"scalar",resolve:kFs,construct:LFs,predicate:MFs,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),FFs=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");qFs=/^[-+]?[0-9]+e/;wan=new mg("tag:yaml.org,2002:float",{kind:"scalar",resolve:PFs,construct:OFs,predicate:UFs,represent:HFs,defaultStyle:"lowercase"}),Tan=Ean.extend({implicit:[xan,ban,van,wan]}),_an=Tan,San=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Can=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]))?))?$");Ian=new mg("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:QFs,construct:GFs,instanceOf:Date,represent:$Fs});Dan=new mg("tag:yaml.org,2002:merge",{kind:"scalar",resolve:WFs}),PEt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;Nan=new mg("tag:yaml.org,2002:binary",{kind:"scalar",resolve:VFs,construct:zFs,predicate:KFs,represent:YFs}),XFs=Object.prototype.hasOwnProperty,jFs=Object.prototype.toString;Ran=new mg("tag:yaml.org,2002:omap",{kind:"sequence",resolve:JFs,construct:ZFs}),ePs=Object.prototype.toString;Ban=new mg("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:tPs,construct:rPs}),nPs=Object.prototype.hasOwnProperty;kan=new mg("tag:yaml.org,2002:set",{kind:"mapping",resolve:iPs,construct:sPs}),OEt=_an.extend({implicit:[Ian,Dan],explicit:[Nan,Ran,Ban,kan]}),IP=Object.prototype.hasOwnProperty,R8e=1,Lan=2,Man=3,B8e=4,REt=1,oPs=2,Zon=3,aPs=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uPs=/[\x85\u2028\u2029]/,cPs=/[,\[\]\{\}]/,Fan=/^(?:!|!!|![a-z\-]+!)$/i,Pan=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;Oan=new Array(256),qan=new Array(256);for(VG=0;VG<256;VG++)Oan[VG]=tan(VG)?1:0,qan[VG]=tan(VG);ran={YAML:function(t,r,n){var s,i,o;t.version!==null&&ni(t,"duplication of %YAML directive"),n.length!==1&&ni(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),s===null&&ni(t,"ill-formed argument of the YAML directive"),i=parseInt(s[1],10),o=parseInt(s[2],10),i!==1&&ni(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&k8e(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var s,i;n.length!==2&&ni(t,"TAG directive accepts exactly two arguments"),s=n[0],i=n[1],Fan.test(s)||ni(t,"ill-formed tag handle (first argument) of the TAG directive"),IP.call(t.tagMap,s)&&ni(t,'there is a previously declared suffix for "'+s+'" tag handle'),Pan.test(i)||ni(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{ni(t,"tag prefix is malformed: "+i)}t.tagMap[s]=i}};CPs=_Ps,IPs=SPs,Qan={loadAll:CPs,load:IPs},Gan=Object.prototype.toString,$an=Object.prototype.hasOwnProperty,UEt=65279,DPs=9,che=10,NPs=13,RPs=32,BPs=33,kPs=34,kEt=35,LPs=37,MPs=38,FPs=39,PPs=42,Wan=44,OPs=45,L8e=58,qPs=61,HPs=62,UPs=63,QPs=64,Van=91,zan=93,GPs=96,Yan=123,$Ps=124,Kan=125,UA={};UA[0]="\\0";UA[7]="\\a";UA[8]="\\b";UA[9]="\\t";UA[10]="\\n";UA[11]="\\v";UA[12]="\\f";UA[13]="\\r";UA[27]="\\e";UA[34]='\\"';UA[92]="\\\\";UA[133]="\\N";UA[160]="\\_";UA[8232]="\\L";UA[8233]="\\P";WPs=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],VPs=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;KPs=1,lhe=2;jan=1,MEt=2,Jan=3,Zan=4,iee=5;cOs=uOs,lOs={dump:cOs};fOs=mg,dOs=man,hOs=Ean,pOs=Tan,mOs=_an,gOs=OEt,AOs=Qan.load,yOs=Qan.loadAll,EOs=lOs.dump,xOs=hE,bOs={binary:Nan,float:wan,map:yan,null:xan,pairs:Ban,set:kan,timestamp:Ian,bool:ban,int:van,merge:Dan,omap:Ran,seq:Aan,str:gan},vOs=QEt("safeLoad","load"),wOs=QEt("safeLoadAll","loadAll"),TOs=QEt("safeDump","dump"),_Os={Type:fOs,Schema:dOs,FAILSAFE_SCHEMA:hOs,JSON_SCHEMA:pOs,CORE_SCHEMA:mOs,DEFAULT_SCHEMA:gOs,load:AOs,loadAll:yOs,dump:EOs,YAMLException:xOs,types:bOs,safeLoad:vOs,safeLoadAll:wOs,safeDump:TOs},eun=_Os});function WEt(e){let t=eun.load((0,$Et.readFileSync)((0,GEt.join)(wp,"etapi.openapi.yaml"),"utf8")),r=JSON.parse((0,$Et.readFileSync)((0,GEt.join)(wp,"openapi.json"),"utf-8"));e.use("/etapi/docs/",dhe.default.serveFiles(t),dhe.default.setup(t,{explorer:!0,customSiteTitle:"TriliumNext ETAPI Documentation"})),e.use("/api/docs/",dhe.default.serveFiles(r),dhe.default.setup(r,{explorer:!0,customSiteTitle:"TriliumNext Internal API Documentation"}))}var dhe,GEt,$Et,run=q(()=>{"use strict";dhe=Xe(jon()),GEt=require("path");tun();$Et=require("fs");A3()});var oun=A(VEt=>{"use strict";var nun=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,SOs=/^[\u0020-\u007e\u0080-\u00ff]+$/,sun=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,COs=/\\([\u0000-\u007f])/g,IOs=/([\\"])/g,DOs=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,iun=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,NOs=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;VEt.format=ROs;VEt.parse=BOs;function ROs(e){if(!e||typeof e!="object")throw new TypeError("argument obj is required");var t=e.parameters,r=e.subtype,n=e.suffix,s=e.type;if(!s||!iun.test(s))throw new TypeError("invalid type");if(!r||!DOs.test(r))throw new TypeError("invalid subtype");var i=s+"/"+r;if(n){if(!iun.test(n))throw new TypeError("invalid suffix");i+="+"+n}if(t&&typeof t=="object")for(var o,a=Object.keys(t).sort(),u=0;u0&&!SOs.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(IOs,"\\$1")+'"'}function MOs(e){var t=NOs.exec(e.toLowerCase());if(!t)throw new TypeError("invalid media type");var r=t[1],n=t[2],s,i=n.lastIndexOf("+");i!==-1&&(s=n.substr(i+1),n=n.substr(0,i));var o={type:r,subtype:n,suffix:s};return o}});var dun=A((OAa,uee)=>{"use strict";var aun=oun(),FOs=VUe();uee.exports=POs;uee.exports.is=uun;uee.exports.hasBody=cun;uee.exports.normalize=lun;uee.exports.match=fun;function uun(e,t){var r,n=t,s=qOs(e);if(!s)return!1;if(n&&!Array.isArray(n))for(n=new Array(arguments.length-1),r=0;r2){r=new Array(arguments.length-1);for(var n=0;n{"use strict";function HOs(e){if(e.length===0)return;let t=Object.create(null),r=0;for(;r=128?l=2:l===0&&(l=1);continue}return}break}}if(o+=e.slice(a,t),o=mun(o,u,l),o===void 0)return}else{if(++t,t===e.length)return;if(e.charCodeAt(t)===34){a=++t;let c=!1;for(;t{if(e.length===0)return"";if(typeof e=="string"){if(t<2)return e;e=Buffer.from(e,"latin1")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>e.length===0?"":typeof e=="string"?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,"latin1")),e.ucs2Slice(0,e.length)),base64:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,"latin1")),e.base64Slice(0,e.length)),other:(e,t)=>{if(e.length===0)return"";typeof e=="string"&&(e=Buffer.from(e,"latin1"));try{return new TextDecoder(Aun).decode(e)}catch{}}};function mun(e,t,r){let n=pun(t);if(n)return n(e,r)}function $Os(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return e=e.slice(t+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e}var YG=[0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],gun=[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,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],WOs=[0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],VOs=[0,0,0,0,0,0,0,0,0,0,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,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],hun=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];yun.exports={basename:$Os,convertToUTF8:mun,getDecoder:pun,parseContentType:HOs,parseDisposition:QOs}});var vun=A((qAa,bun)=>{"use strict";function Eun(e,t,r,n,s){for(let i=0;i1)for(let s=0;s-e._lookbehindSize?e._cb(!0,l,0,e._lookbehindSize+i,!1):e._cb(!0,void 0,0,0,!0),e._bufPos=i+s;i+=c[h]}for(;i<0&&!xun(e,t,i,r-i);)++i;if(i<0){let d=e._lookbehindSize+i;return d>0&&e._cb(!1,l,0,d,!1),e._lookbehindSize-=d,l.copy(l,0,d,e._lookbehindSize),l.set(t,e._lookbehindSize),e._lookbehindSize+=r,e._bufPos=r,r}e._cb(!1,l,0,e._lookbehindSize,!1),e._lookbehindSize=0}i+=e._bufPos;let f=n[0];for(;i<=u;){let d=t[i+o];if(d===a&&t[i]===f&&Eun(n,0,t,i,o))return++e.matches,i>0?e._cb(!0,t,e._bufPos,i,!0):e._cb(!0,void 0,0,0,!0),e._bufPos=i+s;i+=c[d]}for(;i0&&e._cb(!1,t,e._bufPos,i{"use strict";var{Readable:YOs,Writable:KOs}=require("stream"),XOs=vun(),{basename:jOs,convertToUTF8:wun,getDecoder:JOs,parseContentType:ZOs,parseDisposition:eqs}=P8e(),tqs=Buffer.from(`\r +\r`;Nan=new mg("tag:yaml.org,2002:binary",{kind:"scalar",resolve:VFs,construct:zFs,predicate:KFs,represent:YFs}),XFs=Object.prototype.hasOwnProperty,jFs=Object.prototype.toString;Ran=new mg("tag:yaml.org,2002:omap",{kind:"sequence",resolve:JFs,construct:ZFs}),ePs=Object.prototype.toString;Ban=new mg("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:tPs,construct:rPs}),nPs=Object.prototype.hasOwnProperty;kan=new mg("tag:yaml.org,2002:set",{kind:"mapping",resolve:iPs,construct:sPs}),OEt=_an.extend({implicit:[Ian,Dan],explicit:[Nan,Ran,Ban,kan]}),IP=Object.prototype.hasOwnProperty,R8e=1,Lan=2,Man=3,B8e=4,REt=1,oPs=2,Zon=3,aPs=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uPs=/[\x85\u2028\u2029]/,cPs=/[,\[\]\{\}]/,Fan=/^(?:!|!!|![a-z\-]+!)$/i,Pan=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;Oan=new Array(256),qan=new Array(256);for(VG=0;VG<256;VG++)Oan[VG]=tan(VG)?1:0,qan[VG]=tan(VG);ran={YAML:function(t,r,n){var s,i,o;t.version!==null&&ni(t,"duplication of %YAML directive"),n.length!==1&&ni(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),s===null&&ni(t,"ill-formed argument of the YAML directive"),i=parseInt(s[1],10),o=parseInt(s[2],10),i!==1&&ni(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&k8e(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var s,i;n.length!==2&&ni(t,"TAG directive accepts exactly two arguments"),s=n[0],i=n[1],Fan.test(s)||ni(t,"ill-formed tag handle (first argument) of the TAG directive"),IP.call(t.tagMap,s)&&ni(t,'there is a previously declared suffix for "'+s+'" tag handle'),Pan.test(i)||ni(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{ni(t,"tag prefix is malformed: "+i)}t.tagMap[s]=i}};CPs=_Ps,IPs=SPs,Qan={loadAll:CPs,load:IPs},Gan=Object.prototype.toString,$an=Object.prototype.hasOwnProperty,UEt=65279,DPs=9,che=10,NPs=13,RPs=32,BPs=33,kPs=34,kEt=35,LPs=37,MPs=38,FPs=39,PPs=42,Wan=44,OPs=45,L8e=58,qPs=61,HPs=62,UPs=63,QPs=64,Van=91,zan=93,GPs=96,Yan=123,$Ps=124,Kan=125,UA={};UA[0]="\\0";UA[7]="\\a";UA[8]="\\b";UA[9]="\\t";UA[10]="\\n";UA[11]="\\v";UA[12]="\\f";UA[13]="\\r";UA[27]="\\e";UA[34]='\\"';UA[92]="\\\\";UA[133]="\\N";UA[160]="\\_";UA[8232]="\\L";UA[8233]="\\P";WPs=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],VPs=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;KPs=1,lhe=2;jan=1,MEt=2,Jan=3,Zan=4,iee=5;cOs=uOs,lOs={dump:cOs};fOs=mg,dOs=man,hOs=Ean,pOs=Tan,mOs=_an,gOs=OEt,AOs=Qan.load,yOs=Qan.loadAll,EOs=lOs.dump,xOs=hE,bOs={binary:Nan,float:wan,map:yan,null:xan,pairs:Ban,set:kan,timestamp:Ian,bool:ban,int:van,merge:Dan,omap:Ran,seq:Aan,str:gan},vOs=QEt("safeLoad","load"),wOs=QEt("safeLoadAll","loadAll"),TOs=QEt("safeDump","dump"),_Os={Type:fOs,Schema:dOs,FAILSAFE_SCHEMA:hOs,JSON_SCHEMA:pOs,CORE_SCHEMA:mOs,DEFAULT_SCHEMA:gOs,load:AOs,loadAll:yOs,dump:EOs,YAMLException:xOs,types:bOs,safeLoad:vOs,safeLoadAll:wOs,safeDump:TOs},eun=_Os});function WEt(e){let t=JSON.parse(require("fs").readFileSync("/usr/src/app/assets/doc_notes/en/api-ko/etapi.json","utf8")),r=JSON.parse(require("fs").readFileSync("/usr/src/app/assets/doc_notes/en/api-ko/internal.json","utf8"));e.use("/etapi/docs/",dhe.default.serveFiles(t),dhe.default.setup(t,{explorer:!0,customSiteTitle:"TriliumNext 외부 API 참고 자료",customJsStr:"(()=>{const dict={\"Authorize\":\"인증 설정\",\"Authorized\":\"인증됨\",\"Authorization\":\"인증\",\"Logout\":\"인증 해제\",\"Close\":\"닫기\",\"Cancel\":\"취소\",\"Execute\":\"실행\",\"Clear\":\"지우기\",\"Try it out\":\"직접 실행\",\"Parameters\":\"매개변수\",\"No parameters\":\"매개변수 없음\",\"Request body\":\"요청 본문\",\"Responses\":\"응답\",\"Server response\":\"서버 응답\",\"Response body\":\"응답 본문\",\"Response headers\":\"응답 헤더\",\"Request URL\":\"요청 주소\",\"Response content type\":\"응답 콘텐츠 유형\",\"Example Value\":\"예시 값\",\"Schema\":\"스키마\",\"Schemas\":\"스키마 목록\",\"Models\":\"모델 목록\",\"Model\":\"모델\",\"Servers\":\"서버\",\"Available authorizations\":\"사용 가능한 인증 방식\",\"Name\":\"이름\",\"Description\":\"설명\",\"Code\":\"상태 코드\",\"Details\":\"상세 정보\",\"Links\":\"링크\",\"No links\":\"링크 없음\",\"Value\":\"값\",\"required\":\"필수\",\"Required\":\"필수\",\"Optional\":\"선택 사항\",\"Example\":\"예시\",\"Examples\":\"예시 목록\",\"Download\":\"내려받기\",\"Download file\":\"파일 내려받기\",\"Explore\":\"열기\",\"Filter by tag\":\"태그로 필터링\",\"Select a definition\":\"명세 선택\",\"Select a spec\":\"명세 선택\",\"Username:\":\"사용자 이름:\",\"Password:\":\"비밀번호:\",\"Value:\":\"값:\",\"Name:\":\"이름:\",\"In:\":\"전달 위치:\",\"Username\":\"사용자 이름\",\"Password\":\"비밀번호\",\"Default\":\"기본값\",\"default\":\"기본값\",\"No content\":\"내용 없음\",\"Loading...\":\"불러오는 중…\",\"Loading\":\"불러오는 중\",\"Errors\":\"오류\",\"Hide\":\"숨기기\",\"Show\":\"표시\",\"Expand operation\":\"항목 펼치기\",\"Collapse operation\":\"항목 접기\",\"Copy to clipboard\":\"클립보드에 복사\",\"Copy\":\"복사\",\"Copied\":\"복사됨\",\"Send empty value\":\"빈 값 보내기\",\"Edit Value\":\"값 편집\",\"Reset\":\"초기화\",\"Available values\":\"사용 가능한 값\",\"No results found\":\"결과 없음\",\"Failed to fetch\":\"요청 실패\",\"Undocumented\":\"명세에 없는 응답\",\"Examples:\":\"예시:\",\"Default value\":\"기본값\",\"Media type\":\"콘텐츠 유형\",\"Media Type\":\"콘텐츠 유형\",\"Controls\":\"설정할 대상:\",\"header.\":\"헤더\",\"* required\":\"* 필수\",\"authorization button unlocked\":\"인증 설정 안 됨\",\"authorization button locked\":\"인증 설정됨\",\"List\":\"목록\",\"Download API definition\":\"API 명세 내려받기\"};function tr(s){let k=s.trim();if(k.endsWith(' - Website'))return s.replace(' - Website',' 웹사이트');if(k.startsWith('Send email to '))return s.replace('Send email to ','이메일 보내기: ');return Object.hasOwn(dict,k)?s.replace(k,dict[k]):s;}function update(){const root=document.querySelector('#swagger-ui');if(!root)return;const w=document.createTreeWalker(root,NodeFilter.SHOW_TEXT);for(let n;n=w.nextNode();){if(n.parentElement.closest('pre,code,textarea,script,style,.parameter__name,.model-title,.opblock-summary-path')&&!['required','* required'].includes(n.nodeValue.trim()))continue;const s=tr(n.nodeValue);if(s!==n.nodeValue)n.nodeValue=s;}for(const el of root.querySelectorAll('[title],[aria-label],[placeholder]'))for(const a of ['title','aria-label','placeholder'])if(el.hasAttribute(a)){const s=el.getAttribute(a),v=tr(s);if(v!==s)el.setAttribute(a,v);}}let queued=false;new MutationObserver(()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;update();});}).observe(document.body,{childList:true,subtree:true,characterData:true});update();document.documentElement.lang='ko';})();"})),e.use("/api/docs/",dhe.default.serveFiles(r),dhe.default.setup(r,{explorer:!0,customSiteTitle:"TriliumNext 내부 API 참고 자료",customJsStr:"(()=>{const dict={\"Authorize\":\"인증 설정\",\"Authorized\":\"인증됨\",\"Authorization\":\"인증\",\"Logout\":\"인증 해제\",\"Close\":\"닫기\",\"Cancel\":\"취소\",\"Execute\":\"실행\",\"Clear\":\"지우기\",\"Try it out\":\"직접 실행\",\"Parameters\":\"매개변수\",\"No parameters\":\"매개변수 없음\",\"Request body\":\"요청 본문\",\"Responses\":\"응답\",\"Server response\":\"서버 응답\",\"Response body\":\"응답 본문\",\"Response headers\":\"응답 헤더\",\"Request URL\":\"요청 주소\",\"Response content type\":\"응답 콘텐츠 유형\",\"Example Value\":\"예시 값\",\"Schema\":\"스키마\",\"Schemas\":\"스키마 목록\",\"Models\":\"모델 목록\",\"Model\":\"모델\",\"Servers\":\"서버\",\"Available authorizations\":\"사용 가능한 인증 방식\",\"Name\":\"이름\",\"Description\":\"설명\",\"Code\":\"상태 코드\",\"Details\":\"상세 정보\",\"Links\":\"링크\",\"No links\":\"링크 없음\",\"Value\":\"값\",\"required\":\"필수\",\"Required\":\"필수\",\"Optional\":\"선택 사항\",\"Example\":\"예시\",\"Examples\":\"예시 목록\",\"Download\":\"내려받기\",\"Download file\":\"파일 내려받기\",\"Explore\":\"열기\",\"Filter by tag\":\"태그로 필터링\",\"Select a definition\":\"명세 선택\",\"Select a spec\":\"명세 선택\",\"Username:\":\"사용자 이름:\",\"Password:\":\"비밀번호:\",\"Value:\":\"값:\",\"Name:\":\"이름:\",\"In:\":\"전달 위치:\",\"Username\":\"사용자 이름\",\"Password\":\"비밀번호\",\"Default\":\"기본값\",\"default\":\"기본값\",\"No content\":\"내용 없음\",\"Loading...\":\"불러오는 중…\",\"Loading\":\"불러오는 중\",\"Errors\":\"오류\",\"Hide\":\"숨기기\",\"Show\":\"표시\",\"Expand operation\":\"항목 펼치기\",\"Collapse operation\":\"항목 접기\",\"Copy to clipboard\":\"클립보드에 복사\",\"Copy\":\"복사\",\"Copied\":\"복사됨\",\"Send empty value\":\"빈 값 보내기\",\"Edit Value\":\"값 편집\",\"Reset\":\"초기화\",\"Available values\":\"사용 가능한 값\",\"No results found\":\"결과 없음\",\"Failed to fetch\":\"요청 실패\",\"Undocumented\":\"명세에 없는 응답\",\"Examples:\":\"예시:\",\"Default value\":\"기본값\",\"Media type\":\"콘텐츠 유형\",\"Media Type\":\"콘텐츠 유형\",\"Controls\":\"설정할 대상:\",\"header.\":\"헤더\",\"* required\":\"* 필수\",\"authorization button unlocked\":\"인증 설정 안 됨\",\"authorization button locked\":\"인증 설정됨\",\"List\":\"목록\",\"Download API definition\":\"API 명세 내려받기\"};function tr(s){let k=s.trim();if(k.endsWith(' - Website'))return s.replace(' - Website',' 웹사이트');if(k.startsWith('Send email to '))return s.replace('Send email to ','이메일 보내기: ');return Object.hasOwn(dict,k)?s.replace(k,dict[k]):s;}function update(){const root=document.querySelector('#swagger-ui');if(!root)return;const w=document.createTreeWalker(root,NodeFilter.SHOW_TEXT);for(let n;n=w.nextNode();){if(n.parentElement.closest('pre,code,textarea,script,style,.parameter__name,.model-title,.opblock-summary-path')&&!['required','* required'].includes(n.nodeValue.trim()))continue;const s=tr(n.nodeValue);if(s!==n.nodeValue)n.nodeValue=s;}for(const el of root.querySelectorAll('[title],[aria-label],[placeholder]'))for(const a of ['title','aria-label','placeholder'])if(el.hasAttribute(a)){const s=el.getAttribute(a),v=tr(s);if(v!==s)el.setAttribute(a,v);}}let queued=false;new MutationObserver(()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;update();});}).observe(document.body,{childList:true,subtree:true,characterData:true});update();document.documentElement.lang='ko';})();"}))}var dhe,GEt,$Et,run=q(()=>{"use strict";dhe=Xe(jon()),GEt=require("path");tun();$Et=require("fs");A3()});var oun=A(VEt=>{"use strict";var nun=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,SOs=/^[\u0020-\u007e\u0080-\u00ff]+$/,sun=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,COs=/\\([\u0000-\u007f])/g,IOs=/([\\"])/g,DOs=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,iun=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,NOs=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;VEt.format=ROs;VEt.parse=BOs;function ROs(e){if(!e||typeof e!="object")throw new TypeError("argument obj is required");var t=e.parameters,r=e.subtype,n=e.suffix,s=e.type;if(!s||!iun.test(s))throw new TypeError("invalid type");if(!r||!DOs.test(r))throw new TypeError("invalid subtype");var i=s+"/"+r;if(n){if(!iun.test(n))throw new TypeError("invalid suffix");i+="+"+n}if(t&&typeof t=="object")for(var o,a=Object.keys(t).sort(),u=0;u0&&!SOs.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(IOs,"\\$1")+'"'}function MOs(e){var t=NOs.exec(e.toLowerCase());if(!t)throw new TypeError("invalid media type");var r=t[1],n=t[2],s,i=n.lastIndexOf("+");i!==-1&&(s=n.substr(i+1),n=n.substr(0,i));var o={type:r,subtype:n,suffix:s};return o}});var dun=A((OAa,uee)=>{"use strict";var aun=oun(),FOs=VUe();uee.exports=POs;uee.exports.is=uun;uee.exports.hasBody=cun;uee.exports.normalize=lun;uee.exports.match=fun;function uun(e,t){var r,n=t,s=qOs(e);if(!s)return!1;if(n&&!Array.isArray(n))for(n=new Array(arguments.length-1),r=0;r2){r=new Array(arguments.length-1);for(var n=0;n{"use strict";function HOs(e){if(e.length===0)return;let t=Object.create(null),r=0;for(;r=128?l=2:l===0&&(l=1);continue}return}break}}if(o+=e.slice(a,t),o=mun(o,u,l),o===void 0)return}else{if(++t,t===e.length)return;if(e.charCodeAt(t)===34){a=++t;let c=!1;for(;t{if(e.length===0)return"";if(typeof e=="string"){if(t<2)return e;e=Buffer.from(e,"latin1")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>e.length===0?"":typeof e=="string"?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,"latin1")),e.ucs2Slice(0,e.length)),base64:(e,t)=>e.length===0?"":(typeof e=="string"&&(e=Buffer.from(e,"latin1")),e.base64Slice(0,e.length)),other:(e,t)=>{if(e.length===0)return"";typeof e=="string"&&(e=Buffer.from(e,"latin1"));try{return new TextDecoder(Aun).decode(e)}catch{}}};function mun(e,t,r){let n=pun(t);if(n)return n(e,r)}function $Os(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return e=e.slice(t+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e}var YG=[0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],gun=[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,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],WOs=[0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],VOs=[0,0,0,0,0,0,0,0,0,0,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,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],hun=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];yun.exports={basename:$Os,convertToUTF8:mun,getDecoder:pun,parseContentType:HOs,parseDisposition:QOs}});var vun=A((qAa,bun)=>{"use strict";function Eun(e,t,r,n,s){for(let i=0;i1)for(let s=0;s-e._lookbehindSize?e._cb(!0,l,0,e._lookbehindSize+i,!1):e._cb(!0,void 0,0,0,!0),e._bufPos=i+s;i+=c[h]}for(;i<0&&!xun(e,t,i,r-i);)++i;if(i<0){let d=e._lookbehindSize+i;return d>0&&e._cb(!1,l,0,d,!1),e._lookbehindSize-=d,l.copy(l,0,d,e._lookbehindSize),l.set(t,e._lookbehindSize),e._lookbehindSize+=r,e._bufPos=r,r}e._cb(!1,l,0,e._lookbehindSize,!1),e._lookbehindSize=0}i+=e._bufPos;let f=n[0];for(;i<=u;){let d=t[i+o];if(d===a&&t[i]===f&&Eun(n,0,t,i,o))return++e.matches,i>0?e._cb(!0,t,e._bufPos,i,!0):e._cb(!0,void 0,0,0,!0),e._bufPos=i+s;i+=c[d]}for(;i0&&e._cb(!1,t,e._bufPos,i{"use strict";var{Readable:YOs,Writable:KOs}=require("stream"),XOs=vun(),{basename:jOs,convertToUTF8:wun,getDecoder:JOs,parseContentType:ZOs,parseDisposition:eqs}=P8e(),tqs=Buffer.from(`\r `),rqs=Buffer.from("\r"),nqs=Buffer.from("-");function Tun(){}var iqs=2e3,cee=16*1024,O8e=0,_un=1,Sun=2,YEt=class{constructor(t){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=O8e,this.name="",this.value="",this.crlf=0,this.cb=t}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=O8e,this.name="",this.value="",this.crlf=0}push(t,r,n){let s=r;for(;r{if(this._read(),--r._fileEndsLeft===0&&r._finalcb){let n=r._finalcb;r._finalcb=null,process.nextTick(n)}})}_read(t){let r=this._readcb;r&&(this._readcb=null,r())}},Cun={push:(e,t)=>{},destroy:()=>{}};function sqs(e,t){let r=e._writecb;e._writecb=null,t?e.destroy(t):r&&r()}function oqs(e,t){return e}var XEt=class extends KOs{constructor(t){let r={autoDestroy:!0,emitClose:!0,highWaterMark:typeof t.highWaterMark=="number"?t.highWaterMark:void 0};if(super(r),!t.conType.params||typeof t.conType.params.boundary!="string")throw new Error("Multipart: Boundary not found");let n=t.conType.params.boundary,s=typeof t.defParamCharset=="string"&&t.defParamCharset?JOs(t.defParamCharset):oqs,i=t.defCharset||"utf8",o=t.preservePath,a={autoDestroy:!0,emitClose:!0,highWaterMark:typeof t.fileHwm=="number"?t.fileHwm:void 0},u=t.limits,c=u&&typeof u.fieldSize=="number"?u.fieldSize:1*1024*1024,l=u&&typeof u.fileSize=="number"?u.fileSize:1/0,f=u&&typeof u.files=="number"?u.files:1/0,d=u&&typeof u.fields=="number"?u.fields:1/0,h=u&&typeof u.parts=="number"?u.parts:1/0,p=-1,m=0,g=0,y=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let E=0,x,v=0,b,T,w,S,I=!1,R=!1,C=!1;this._hparser=null;let N=new YEt(L=>{this._hparser=null,y=!1,w="text/plain",b=i,T="7bit",S=void 0,I=!1;let F;if(!L["content-disposition"]){y=!0;return}let P=eqs(L["content-disposition"][0],s);if(!P||P.type!=="form-data"){y=!0;return}if(P.params&&(P.params.name&&(S=P.params.name),P.params["filename*"]?F=P.params["filename*"]:P.params.filename&&(F=P.params.filename),F!==void 0&&!o&&(F=jOs(F))),L["content-type"]){let O=ZOs(L["content-type"][0]);O&&(w=`${O.type}/${O.subtype}`,O.params&&typeof O.params.charset=="string"&&(b=O.params.charset.toLowerCase()))}if(L["content-transfer-encoding"]&&(T=L["content-transfer-encoding"][0].toLowerCase()),w==="application/octet-stream"||F!==void 0){if(g===f){R||(R=!0,this.emit("filesLimit")),y=!0;return}if(++g,this.listenerCount("file")===0){y=!0;return}E=0,this._fileStream=new KEt(a,this),++this._fileEndsLeft,this.emit("file",S,this._fileStream,{filename:F,encoding:T,mimeType:w})}else{if(m===d){C||(C=!0,this.emit("fieldsLimit")),y=!0;return}if(++m,this.listenerCount("field")===0){y=!0;return}x=[],v=0}}),k=0,B=(L,F,P,O,Y)=>{e:for(;F;){if(this._hparser!==null){let re=this._hparser.push(F,P,O);if(re===-1){this._hparser=null,N.reset(),this.emit("error",new Error("Malformed part header"));break}P=re}if(P===O)break;if(k!==0){if(k===1){switch(F[P]){case 45:k=2,++P;break;case 13:k=3,++P;break;default:k=0}if(P===O)return}if(k===2){if(k=0,F[P]===45){this._complete=!0,this._bparser=Cun;return}let re=this._writecb;this._writecb=Tun,B(!1,nqs,0,1,!1),this._writecb=re}else if(k===3)if(k=0,F[P]===10){if(++P,p>=h||(this._hparser=N,P===O))break;continue e}else{let re=this._writecb;this._writecb=Tun,B(!1,rqs,0,1,!1),this._writecb=re}}if(!y){if(this._fileStream){let re,me=Math.min(O-P,l-E);Y?re=F.slice(P,P+me):(re=Buffer.allocUnsafe(me),F.copy(re,0,P,P+me)),E+=re.length,E===l?(re.length>0&&this._fileStream.push(re),this._fileStream.emit("limit"),this._fileStream.truncated=!0,y=!0):this._fileStream.push(re)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(x!==void 0){let re,me=Math.min(O-P,c-v);Y?re=F.slice(P,P+me):(re=Buffer.allocUnsafe(me),F.copy(re,0,P,P+me)),v+=me,x.push(re),v===c&&(y=!0,I=!0)}}break}if(L){if(k=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(x!==void 0){let re;switch(x.length){case 0:re="";break;case 1:re=wun(x[0],b,0);break;default:re=wun(Buffer.concat(x,v),b,0)}x=void 0,v=0,this.emit("field",S,re,{nameTruncated:!1,valueTruncated:I,encoding:T,mimeType:w})}++p===h&&this.emit("partsLimit")}};this._bparser=new XOs(`\r --${n}`,B),this._writecb=null,this._finalcb=null,this.write(tqs)}static detect(t){return t.type==="multipart"&&t.subtype==="form-data"}_write(t,r,n){this._writecb=n,this._bparser.push(t,0),this._writecb&&sqs(this)}_destroy(t,r){this._hparser=null,this._bparser=Cun,t||(t=Dun(this));let n=this._fileStream;n&&(this._fileStream=null,n.destroy(t)),r(t)}_final(t){if(this._bparser.destroy(),!this._complete)return t(new Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=Iun.bind(null,this,t):Iun(this,t)}};function Iun(e,t,r){if(r)return t(r);r=Dun(e),t(r)}function Dun(e){if(e._hparser)return new Error("Malformed part header");let t=e._fileStream;if(t&&(e._fileStream=null,t.destroy(new Error("Unexpected end of file"))),!e._complete)return new Error("Unexpected end of form")}var aqs=[0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],uqs=[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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];Nun.exports=XEt});var Lun=A((UAa,kun)=>{"use strict";var{Writable:cqs}=require("stream"),{getDecoder:lqs}=P8e(),t2t=class extends cqs{constructor(t){let r={autoDestroy:!0,emitClose:!0,highWaterMark:typeof t.highWaterMark=="number"?t.highWaterMark:void 0};super(r);let n=t.defCharset||"utf8";t.conType.params&&typeof t.conType.params.charset=="string"&&(n=t.conType.params.charset),this.charset=n;let s=t.limits;this.fieldSizeLimit=s&&typeof s.fieldSize=="number"?s.fieldSize:1*1024*1024,this.fieldsLimit=s&&typeof s.fields=="number"?s.fields:1/0,this.fieldNameSizeLimit=s&&typeof s.fieldNameSize=="number"?s.fieldNameSize:100,this._inKey=!0,this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,this._fields=0,this._key="",this._val="",this._byte=-2,this._lastPos=0,this._encode=0,this._decoder=lqs(n)}static detect(t){return t.type==="application"&&t.subtype==="x-www-form-urlencoded"}_write(t,r,n){if(this._fields>=this.fieldsLimit)return n();let s=0,i=t.length;if(this._lastPos=0,this._byte!==-2){if(s=jEt(this,t,s,i),s===-1)return n(new Error("Malformed urlencoded form"));if(s>=i)return n();this._inKey?++this._bytesKey:++this._bytesVal}e:for(;s0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),n();continue;case 43:this._lastPos=i)return n();++this._bytesKey,s=JEt(this,t,s,i);continue}++s,++this._bytesKey,s=JEt(this,t,s,i)}this._lastPos0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),n();continue e;case 43:this._lastPos=i)return n();++this._bytesVal,s=ZEt(this,t,s,i);continue}++s,++this._bytesVal,s=ZEt(this,t,s,i)}this._lastPos0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),t()}};function jEt(e,t,r,n){if(r>=n)return n;if(e._byte===-1){let s=e2t[t[r++]];if(s===-1)return-1;if(s>=8&&(e._encode=2),re.fieldNameSizeLimit){for(e._keyTrunc||e._lastPose.fieldSizeLimit){for(e._valTrunc||e._lastPos{"use strict";var{parseContentType:fqs}=P8e();function dqs(e){let t=e.headers,r=fqs(t["content-type"]);if(!r)throw new Error("Malformed content type");for(let n of hqs){if(!n.detect(r))continue;let i={limits:e.limits,headers:t,conType:r,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return e.highWaterMark&&(i.highWaterMark=e.highWaterMark),e.fileHwm&&(i.fileHwm=e.fileHwm),i.defCharset=e.defCharset,i.defParamCharset=e.defParamCharset,i.preservePath=e.preservePath,new n(i)}throw new Error(`Unsupported content type: ${t["content-type"]}`)}var hqs=[Run(),Lun()].filter(function(e){return typeof e.detect=="function"});Mun.exports=e=>{if((typeof e!="object"||e===null)&&(e={}),typeof e.headers!="object"||e.headers===null||typeof e.headers["content-type"]!="string")throw new Error("Missing Content-Type");return dqs(e)}});var Oun=A((GAa,Pun)=>{"use strict";Pun.exports=mqs;var pqs=Object.prototype.hasOwnProperty;function mqs(){for(var e={},t=0;t{"use strict";var gqs=/^[^\[]*/,Aqs=/^\[(\d+)\]/,yqs=/^\[([^\]]+)\]/;function Eqs(e){function t(){return[{type:"object",key:e,last:!0}]}var r=gqs.exec(e)[0];if(!r)return t();for(var n=e.length,s=r.length,i={type:"object",key:r},o=[i];s{"use strict";function Uun(e){return e===void 0?"undefined":Array.isArray(e)?"array":typeof e=="object"?"object":"scalar"}function Qun(e,t,r,n){switch(Uun(r)){case"undefined":t.append?e[t.key]=[n]:e[t.key]=n;break;case"array":e[t.key].push(n);break;case"object":return Qun(r,{type:"object",key:"",last:!0},r[""],n);case"scalar":e[t.key]=[e[t.key],n];break}return e}function xqs(e,t,r,n){if(t.last)return Qun(e,t,r,n);var s;switch(Uun(r)){case"undefined":return t.nextType==="array"?e[t.key]=[]:e[t.key]=Object.create(null),e[t.key];case"object":return e[t.key];case"array":return t.nextType==="array"?r:(s=Object.create(null),e[t.key]=s,r.forEach(function(i,o){i!==void 0&&(s[""+o]=i)}),s);case"scalar":return s=Object.create(null),s[""]=r,e[t.key]=s,s}}Gun.exports=xqs});var Vun=A((VAa,Wun)=>{"use strict";var bqs=Hun(),vqs=$un();function wqs(e,t,r){var n=bqs(t);n.reduce(function(s,i){return vqs(s,i,s[i.key],r)},e)}Wun.exports=wqs});var Kun=A((zAa,Yun)=>{"use strict";var zun=require("events").EventEmitter;function lee(){zun.call(this),this.value=0}lee.prototype=Object.create(zun.prototype);lee.prototype.increment=function(){this.value++};lee.prototype.decrement=function(){--this.value===0&&this.emit("zero")};lee.prototype.isZero=function(){return this.value===0};lee.prototype.onceZero=function(t){if(this.isZero())return t();this.once("zero",t)};Yun.exports=lee});var r2t=A((YAa,jun)=>{"use strict";var Tqs=require("util"),_qs={LIMIT_PART_COUNT:"Too many parts",LIMIT_FILE_SIZE:"File too large",LIMIT_FILE_COUNT:"Too many files",LIMIT_FIELD_KEY:"Field name too long",LIMIT_FIELD_VALUE:"Field value too long",LIMIT_FIELD_COUNT:"Too many fields",LIMIT_UNEXPECTED_FILE:"Unexpected field",MISSING_FIELD_NAME:"Field name missing"};function Xun(e,t){Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=_qs[e],this.code=e,t&&(this.field=t)}Tqs.inherits(Xun,Error);jun.exports=Xun});var ecn=A((KAa,Zun)=>{"use strict";var Jun=Object.getOwnPropertySymbols,Sqs=Object.prototype.hasOwnProperty,Cqs=Object.prototype.propertyIsEnumerable;function Iqs(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Dqs(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(n.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(i){s[i]=i}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Zun.exports=Dqs()?Object.assign:function(e,t){for(var r,n=Iqs(e),s,i=1;i{"use strict";var Nqs=ecn();function tcn(e,t){var r=e.indexOf(t);~r&&e.splice(r,1)}function q8e(e,t){switch(this.strategy=e,this.req=t,e){case"NONE":break;case"VALUE":break;case"ARRAY":t.files=[];break;case"OBJECT":t.files=Object.create(null);break;default:throw new Error("Unknown file strategy: "+e)}}q8e.prototype.insertPlaceholder=function(e){var t={fieldname:e.fieldname};switch(this.strategy){case"NONE":break;case"VALUE":break;case"ARRAY":this.req.files.push(t);break;case"OBJECT":this.req.files[e.fieldname]?this.req.files[e.fieldname].push(t):this.req.files[e.fieldname]=[t];break}return t};q8e.prototype.removePlaceholder=function(e){switch(this.strategy){case"NONE":break;case"VALUE":break;case"ARRAY":tcn(this.req.files,e);break;case"OBJECT":this.req.files[e.fieldname].length===1?delete this.req.files[e.fieldname]:tcn(this.req.files[e.fieldname],e);break}};q8e.prototype.replacePlaceholder=function(e,t){if(this.strategy==="VALUE"){this.req.file=t;return}delete e.fieldname,Nqs(e,t)};rcn.exports=q8e});var scn=A((jAa,icn)=>{"use strict";function Rqs(e,t,r){var n=e.length,s=[];if(n===0)return r(null,s);function i(o){var a=e[o];t(a,function(u){u&&(u.file=a,u.field=a.fieldname,s.push(u)),o{"use strict";var Bqs=dun(),kqs=Fun(),ocn=Oun(),Lqs=Vun(),Mqs=Kun(),Fqs=r2t(),Pqs=ncn(),Oqs=scn();function qqs(e){e.on("readable",()=>{for(;e.read()!==null;);})}function Hqs(e){return function(r,n,s){if(!Bqs(r,["multipart"]))return s();var i=e(),o=i.limits,a=i.storage,u=i.fileFilter,c=i.fileStrategy,l=i.preservePath;r.body=Object.create(null),r.on("error",function(T){v(T)});var f;try{f=kqs({headers:r.headers,limits:o,preservePath:l})}catch(T){return s(T)}var d=new Pqs(c,r),h=!1,p=!1,m=!1,g=new Mqs,y=[];function E(T){h||(h=!0,r.unpipe(f),qqs(r),r.resume(),setImmediate(()=>{f.removeAllListeners()}),s(T))}function x(){p&&g.isZero()&&!m&&E()}function v(T){m||(m=!0,g.onceZero(function(){function w(S,I){a._removeFile(r,S,I)}Oqs(y,w,function(S,I){if(S)return E(S);T.storageErrors=I,E(T)})}))}function b(T,w){v(new Fqs(T,w))}f.on("field",function(T,w,{nameTruncated:S,valueTruncated:I}){if(T==null)return b("MISSING_FIELD_NAME");if(S)return b("LIMIT_FIELD_KEY");if(I)return b("LIMIT_FIELD_VALUE",T);if(o&&Object.prototype.hasOwnProperty.call(o,"fieldNameSize")&&T.length>o.fieldNameSize)return b("LIMIT_FIELD_KEY");Lqs(r.body,T,w)}),f.on("file",function(T,w,{filename:S,encoding:I,mimeType:R}){if(T==null)return b("MISSING_FIELD_NAME");if(!S)return w.resume();if(o&&Object.prototype.hasOwnProperty.call(o,"fieldNameSize")&&T.length>o.fieldNameSize)return b("LIMIT_FIELD_KEY");var C={fieldname:T,originalname:S,encoding:I,mimetype:R},N=d.insertPlaceholder(C);u(r,C,function(k,B){if(k)return d.removePlaceholder(N),v(k);if(!B)return d.removePlaceholder(N),w.resume();var L=!1;g.increment(),Object.defineProperty(C,"stream",{configurable:!0,enumerable:!1,value:w}),w.on("error",function(F){g.decrement(),v(F)}),w.on("limit",function(){L=!0,b("LIMIT_FILE_SIZE",T)}),a._handleFile(r,C,function(F,P){if(L)return d.removePlaceholder(N),y.push(ocn(C,P)),g.decrement();if(F)return d.removePlaceholder(N),g.decrement(),v(F);var O=ocn(C,P);d.replacePlaceholder(N,O),y.push(O),g.decrement(),x()})})}),f.on("error",function(T){v(T)}),f.on("partsLimit",function(){b("LIMIT_PART_COUNT")}),f.on("filesLimit",function(){b("LIMIT_FILE_COUNT")}),f.on("fieldsLimit",function(){b("LIMIT_FIELD_COUNT")}),f.on("close",function(){p=!0,x()}),r.pipe(f)}}acn.exports=Hqs});var fcn=A((ZAa,lcn)=>{"use strict";var ccn=require("fs"),Uqs=require("os"),Qqs=require("path"),Gqs=require("crypto"),$qs=Out();function Wqs(e,t,r){Gqs.randomBytes(16,function(n,s){r(n,n?void 0:s.toString("hex"))})}function Vqs(e,t,r){r(null,Uqs.tmpdir())}function n2t(e){this.getFilename=e.filename||Wqs,typeof e.destination=="string"?($qs.sync(e.destination),this.getDestination=function(t,r,n){n(null,e.destination)}):this.getDestination=e.destination||Vqs}n2t.prototype._handleFile=function(t,r,n){var s=this;s.getDestination(t,r,function(i,o){if(i)return n(i);s.getFilename(t,r,function(a,u){if(a)return n(a);var c=Qqs.join(o,u),l=ccn.createWriteStream(c);r.stream.pipe(l),l.on("error",n),l.on("finish",function(){n(null,{destination:o,filename:u,path:c,size:l.bytesWritten})})})})};n2t.prototype._removeFile=function(t,r,n){var s=r.path;delete r.destination,delete r.filename,delete r.path,ccn.unlink(s,n)};lcn.exports=function(e){return new n2t(e)}});var i2t=A((eya,dcn)=>{"use strict";dcn.exports=require("stream")});var ycn=A((tya,Acn)=>{"use strict";function hcn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function pcn(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++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 n=this.head,s=""+n.data;n=n.next;)s+=r+n.data;return s}},{key:"concat",value:function(r){if(this.length===0)return H8e.alloc(0);for(var n=H8e.allocUnsafe(r>>>0),s=this.head,i=0;s;)eHs(s.data,n,i),i+=s.data.length,s=s.next;return n}},{key:"consume",value:function(r,n){var s;return ro.length?o.length:r;if(a===o.length?i+=o:i+=o.slice(0,r),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:"_getBuffer",value:function(r){var n=H8e.allocUnsafe(r),s=this.head,i=1;for(s.data.copy(n),r-=s.data.length;s=s.next;){var o=s.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){a===o.length?(++i,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=o.slice(a));break}++i}return this.length-=i,n}},{key:Zqs,value:function(r,n){return s2t(this,pcn(pcn({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var a2t=A((rya,xcn)=>{"use strict";function tHs(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return n||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o2t,this,e)):process.nextTick(o2t,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(U8e,r):(r._writableState.errorEmitted=!0,process.nextTick(Ecn,r,i)):process.nextTick(Ecn,r,i):t?(process.nextTick(U8e,r),t(i)):process.nextTick(U8e,r)}),this)}function Ecn(e,t){o2t(e,t),U8e(e)}function U8e(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function rHs(){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 o2t(e,t){e.emit("error",t)}function nHs(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}xcn.exports={destroy:tHs,undestroy:rHs,errorOrDestroy:nHs}});var DP=A((nya,wcn)=>{"use strict";var vcn={};function ZT(e,t,r){r||(r=Error);function n(i,o,a){return typeof t=="string"?t:t(i,o,a)}class s extends r{constructor(o,a,u){super(n(o,a,u))}}s.prototype.name=r.name,s.prototype.code=e,vcn[e]=s}function bcn(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function iHs(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function sHs(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function oHs(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}ZT("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);ZT("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&iHs(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let s;if(sHs(e," argument"))s=`The ${e} ${n} ${bcn(t,"type")}`;else{let i=oHs(e,".")?"property":"argument";s=`The "${e}" ${i} ${n} ${bcn(t,"type")}`}return s+=`. Received type ${typeof r}`,s},TypeError);ZT("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ZT("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});ZT("ERR_STREAM_PREMATURE_CLOSE","Premature close");ZT("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});ZT("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ZT("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ZT("ERR_STREAM_WRITE_AFTER_END","write after end");ZT("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ZT("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);ZT("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");wcn.exports.codes=vcn});var u2t=A((iya,Tcn)=>{"use strict";var aHs=DP().codes.ERR_INVALID_OPT_VALUE;function uHs(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function cHs(e,t,r,n){var s=uHs(t,n,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var i=n?r:"highWaterMark";throw new aHs(i,s)}return Math.floor(s)}return e.objectMode?16:16*1024}Tcn.exports={getHighWaterMark:cHs}});var f2t=A((sya,Ncn)=>{"use strict";Ncn.exports=Md;function Scn(e){var t=this;this.next=null,this.entry=null,this.finish=function(){FHs(t,e)}}var fee;Md.WritableState=mhe;var lHs={deprecate:Dje()},Ccn=i2t(),G8e=require("buffer").Buffer,fHs=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function dHs(e){return G8e.from(e)}function hHs(e){return G8e.isBuffer(e)||e instanceof fHs}var l2t=a2t(),pHs=u2t(),mHs=pHs.getHighWaterMark,NP=DP().codes,gHs=NP.ERR_INVALID_ARG_TYPE,AHs=NP.ERR_METHOD_NOT_IMPLEMENTED,yHs=NP.ERR_MULTIPLE_CALLBACK,EHs=NP.ERR_STREAM_CANNOT_PIPE,xHs=NP.ERR_STREAM_DESTROYED,bHs=NP.ERR_STREAM_NULL_VALUES,vHs=NP.ERR_STREAM_WRITE_AFTER_END,wHs=NP.ERR_UNKNOWN_ENCODING,dee=l2t.errorOrDestroy;p2()(Md,Ccn);function THs(){}function mhe(e,t,r){fee=fee||KG(),e=e||{},typeof r!="boolean"&&(r=t instanceof fee),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=mHs(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){RHs(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Scn(this)}mhe.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(mhe.prototype,"buffer",{get:lHs.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Q8e;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q8e=Function.prototype[Symbol.hasInstance],Object.defineProperty(Md,Symbol.hasInstance,{value:function(t){return Q8e.call(this,t)?!0:this!==Md?!1:t&&t._writableState instanceof mhe}})):Q8e=function(t){return t instanceof this};function Md(e){fee=fee||KG();var t=this instanceof fee;if(!t&&!Q8e.call(Md,this))return new Md(e);this._writableState=new mhe(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ccn.call(this)}Md.prototype.pipe=function(){dee(this,new EHs)};function _Hs(e,t){var r=new vHs;dee(e,r),process.nextTick(t,r)}function SHs(e,t,r,n){var s;return r===null?s=new bHs:typeof r!="string"&&!t.objectMode&&(s=new gHs("chunk",["string","Buffer"],r)),s?(dee(e,s),process.nextTick(n,s),!1):!0}Md.prototype.write=function(e,t,r){var n=this._writableState,s=!1,i=!n.objectMode&&hHs(e);return i&&!G8e.isBuffer(e)&&(e=dHs(e)),typeof t=="function"&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=THs),n.ending?_Hs(this,r):(i||SHs(this,n,e,r))&&(n.pendingcb++,s=IHs(this,n,i,e,t,r)),s};Md.prototype.cork=function(){this._writableState.corked++};Md.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Icn(this,e))};Md.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new wHs(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Md.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function CHs(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=G8e.from(t,r)),t}Object.defineProperty(Md.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function IHs(e,t,r,n,s,i){if(!r){var o=CHs(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length{"use strict";var PHs=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Bcn.exports=LD;var Rcn=p2t(),h2t=f2t();p2()(LD,Rcn);for(d2t=PHs(h2t.prototype),$8e=0;$8e{"use strict";var kcn=DP().codes.ERR_STREAM_PREMATURE_CLOSE;function HHs(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s{"use strict";var z8e;function RP(e,t,r){return t=GHs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GHs(e){var t=$Hs(e,"string");return typeof t=="symbol"?t:String(t)}function $Hs(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WHs=V8e(),BP=Symbol("lastResolve"),XG=Symbol("lastReject"),ghe=Symbol("error"),Y8e=Symbol("ended"),jG=Symbol("lastPromise"),m2t=Symbol("handlePromise"),JG=Symbol("stream");function kP(e,t){return{value:e,done:t}}function VHs(e){var t=e[BP];if(t!==null){var r=e[JG].read();r!==null&&(e[jG]=null,e[BP]=null,e[XG]=null,t(kP(r,!1)))}}function zHs(e){process.nextTick(VHs,e)}function YHs(e,t){return function(r,n){e.then(function(){if(t[Y8e]){r(kP(void 0,!0));return}t[m2t](r,n)},n)}}var KHs=Object.getPrototypeOf(function(){}),XHs=Object.setPrototypeOf((z8e={get stream(){return this[JG]},next:function(){var t=this,r=this[ghe];if(r!==null)return Promise.reject(r);if(this[Y8e])return Promise.resolve(kP(void 0,!0));if(this[JG].destroyed)return new Promise(function(o,a){process.nextTick(function(){t[ghe]?a(t[ghe]):o(kP(void 0,!0))})});var n=this[jG],s;if(n)s=new Promise(YHs(n,this));else{var i=this[JG].read();if(i!==null)return Promise.resolve(kP(i,!1));s=new Promise(this[m2t])}return this[jG]=s,s}},RP(z8e,Symbol.asyncIterator,function(){return this}),RP(z8e,"return",function(){var t=this;return new Promise(function(r,n){t[JG].destroy(null,function(s){if(s){n(s);return}r(kP(void 0,!0))})})}),z8e),KHs),jHs=function(t){var r,n=Object.create(XHs,(r={},RP(r,JG,{value:t,writable:!0}),RP(r,BP,{value:null,writable:!0}),RP(r,XG,{value:null,writable:!0}),RP(r,ghe,{value:null,writable:!0}),RP(r,Y8e,{value:t._readableState.endEmitted,writable:!0}),RP(r,m2t,{value:function(i,o){var a=n[JG].read();a?(n[jG]=null,n[BP]=null,n[XG]=null,i(kP(a,!1))):(n[BP]=i,n[XG]=o)},writable:!0}),r));return n[jG]=null,WHs(t,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=n[XG];i!==null&&(n[jG]=null,n[BP]=null,n[XG]=null,i(s)),n[ghe]=s;return}var o=n[BP];o!==null&&(n[jG]=null,n[BP]=null,n[XG]=null,o(kP(void 0,!0))),n[Y8e]=!0}),t.on("readable",zHs.bind(null,n)),n};Fcn.exports=jHs});var Ucn=A((cya,Hcn)=>{"use strict";function Ocn(e,t,r,n,s,i,o){try{var a=e[i](o),u=a.value}catch(c){r(c);return}a.done?t(u):Promise.resolve(u).then(n,s)}function JHs(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var i=e.apply(t,r);function o(u){Ocn(i,n,s,o,a,"next",u)}function a(u){Ocn(i,n,s,o,a,"throw",u)}o(void 0)})}}function qcn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ZHs(e){for(var t=1;t{"use strict";jcn.exports=xa;var hee;xa.ReadableState=Wcn;var lya=require("events").EventEmitter,$cn=function(t,r){return t.listeners(r).length},yhe=i2t(),K8e=require("buffer").Buffer,sUs=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function oUs(e){return K8e.from(e)}function aUs(e){return K8e.isBuffer(e)||e instanceof sUs}var g2t=require("util"),ao;g2t&&g2t.debuglog?ao=g2t.debuglog("stream"):ao=function(){};var uUs=ycn(),w2t=a2t(),cUs=u2t(),lUs=cUs.getHighWaterMark,X8e=DP().codes,fUs=X8e.ERR_INVALID_ARG_TYPE,dUs=X8e.ERR_STREAM_PUSH_AFTER_EOF,hUs=X8e.ERR_METHOD_NOT_IMPLEMENTED,pUs=X8e.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pee,A2t,y2t;p2()(xa,yhe);var Ahe=w2t.errorOrDestroy,E2t=["error","close","destroy","pause","resume"];function mUs(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Wcn(e,t,r){hee=hee||KG(),e=e||{},typeof r!="boolean"&&(r=t instanceof hee),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=lUs(this,e,"readableHighWaterMark",r),this.buffer=new uUs,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(pee||(pee=Qve().StringDecoder),this.decoder=new pee(e.encoding),this.encoding=e.encoding)}function xa(e){if(hee=hee||KG(),!(this instanceof xa))return new xa(e);var t=this instanceof hee;this._readableState=new Wcn(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),yhe.call(this)}Object.defineProperty(xa.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});xa.prototype.destroy=w2t.destroy;xa.prototype._undestroy=w2t.undestroy;xa.prototype._destroy=function(e,t){t(e)};xa.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=K8e.from(e,t),t=""),n=!0),Vcn(this,e,t,!1,n)};xa.prototype.unshift=function(e){return Vcn(this,e,null,!0,!1)};function Vcn(e,t,r,n,s){ao("readableAddChunk",t);var i=e._readableState;if(t===null)i.reading=!1,yUs(e,i);else{var o;if(s||(o=gUs(i,t)),o)Ahe(e,o);else if(i.objectMode||t&&t.length>0)if(typeof t!="string"&&!i.objectMode&&Object.getPrototypeOf(t)!==K8e.prototype&&(t=oUs(t)),n)i.endEmitted?Ahe(e,new pUs):x2t(e,i,t,!0);else if(i.ended)Ahe(e,new dUs);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||t.length!==0?x2t(e,i,t,!1):v2t(e,i)):x2t(e,i,t,!1)}else n||(i.reading=!1,v2t(e,i))}return!i.ended&&(i.length=Qcn?e=Qcn:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Gcn(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=AUs(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}xa.prototype.read=function(e){ao("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ao("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?b2t(this):j8e(this),null;if(e=Gcn(e,t),e===0&&t.ended)return t.length===0&&b2t(this),null;var n=t.needReadable;ao("need readable",n),(t.length===0||t.length-e0?s=Kcn(e,t):s=null,s===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&b2t(this)),s!==null&&this.emit("data",s),s};function yUs(e,t){if(ao("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j8e(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,zcn(e)))}}function j8e(e){var t=e._readableState;ao("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ao("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(zcn,e))}function zcn(e){var t=e._readableState;ao("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,T2t(e)}function v2t(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(EUs,e,t))}function EUs(e,t){for(;!t.reading&&!t.ended&&(t.length1&&Xcn(n.pipes,e)!==-1)&&!c&&(ao("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(g){ao("onerror",g),m(),e.removeListener("error",d),$cn(e,"error")===0&&Ahe(e,g)}mUs(e,"error",d);function h(){e.removeListener("finish",p),m()}e.once("close",h);function p(){ao("onfinish"),e.removeListener("close",h),m()}e.once("finish",p);function m(){ao("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(ao("pipe resume"),r.resume()),e};function xUs(e){return function(){var r=e._readableState;ao("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&$cn(e,"data")&&(r.flowing=!0,T2t(e))}}xa.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ao("on readable",n.length,n.reading),n.length?j8e(this):n.reading||process.nextTick(bUs,this)),r};xa.prototype.addListener=xa.prototype.on;xa.prototype.removeListener=function(e,t){var r=yhe.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(Ycn,this),r};xa.prototype.removeAllListeners=function(e){var t=yhe.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(Ycn,this),t};function Ycn(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function bUs(e){ao("readable nexttick read 0"),e.read(0)}xa.prototype.resume=function(){var e=this._readableState;return e.flowing||(ao("resume"),e.flowing=!e.readableListening,vUs(this,e)),e.paused=!1,this};function vUs(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(wUs,e,t))}function wUs(e,t){ao("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),T2t(e),t.flowing&&!t.reading&&e.read(0)}xa.prototype.pause=function(){return ao("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ao("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function T2t(e){var t=e._readableState;for(ao("flow",t.flowing);t.flowing&&e.read()!==null;);}xa.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(ao("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(ao("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=t.push(o);a||(n=!0,e.pause())}});for(var s in e)this[s]===void 0&&typeof e[s]=="function"&&(this[s]=function(a){return function(){return e[a].apply(e,arguments)}}(s));for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function b2t(e){var t=e._readableState;ao("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(TUs,t,e))}function TUs(e,t){if(ao("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(xa.from=function(e,t){return y2t===void 0&&(y2t=Ucn()),y2t(xa,e,t)});function Xcn(e,t){for(var r=0,n=e.length;r{"use strict";Zcn.exports=$9;var J8e=DP().codes,_Us=J8e.ERR_METHOD_NOT_IMPLEMENTED,SUs=J8e.ERR_MULTIPLE_CALLBACK,CUs=J8e.ERR_TRANSFORM_ALREADY_TRANSFORMING,IUs=J8e.ERR_TRANSFORM_WITH_LENGTH_0,Z8e=KG();p2()($9,Z8e);function DUs(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new SUs);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length{"use strict";tln.exports=Ehe;var eln=_2t();p2()(Ehe,eln);function Ehe(e){if(!(this instanceof Ehe))return new Ehe(e);eln.call(this,e)}Ehe.prototype._transform=function(e,t,r){r(null,e)}});var aln=A((pya,oln)=>{"use strict";var S2t;function RUs(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var sln=DP().codes,BUs=sln.ERR_MISSING_ARGS,kUs=sln.ERR_STREAM_DESTROYED;function nln(e){if(e)throw e}function LUs(e){return e.setHeader&&typeof e.abort=="function"}function MUs(e,t,r,n){n=RUs(n);var s=!1;e.on("close",function(){s=!0}),S2t===void 0&&(S2t=V8e()),S2t(e,{readable:t,writable:r},function(o){if(o)return n(o);s=!0,n()});var i=!1;return function(o){if(!s&&!i){if(i=!0,LUs(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new kUs("pipe"))}}}function iln(e){e()}function FUs(e,t){return e.pipe(t)}function PUs(e){return!e.length||typeof e[e.length-1]!="function"?nln:e.pop()}function OUs(){for(var e=arguments.length,t=new Array(e),r=0;r0;return MUs(o,u,c,function(l){s||(s=l),l&&i.forEach(iln),!u&&(i.forEach(iln),n(s))})});return t.reduce(FUs)}oln.exports=OUs});var uln=A((e_,bhe)=>{"use strict";var xhe=require("stream");process.env.READABLE_STREAM==="disable"&&xhe?(bhe.exports=xhe.Readable,Object.assign(bhe.exports,xhe),bhe.exports.Stream=xhe):(e_=bhe.exports=p2t(),e_.Stream=xhe||e_,e_.Readable=e_,e_.Writable=f2t(),e_.Duplex=KG(),e_.Transform=_2t(),e_.PassThrough=rln(),e_.finished=V8e(),e_.pipeline=aln())});var lln=A((mya,cln)=>{"use strict";var qUs=Object.prototype.toString,C2t=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function HUs(e){return qUs.call(e).slice(8,-1)==="ArrayBuffer"}function UUs(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return C2t?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}function QUs(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return C2t?Buffer.from(e,t):new Buffer(e,t)}function GUs(e,t,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return HUs(e)?UUs(e,t,r):typeof e=="string"?QUs(e,t):C2t?Buffer.from(e):new Buffer(e)}cln.exports=GUs});var gln=A(Yi=>{"use strict";var fln=void 0,$Us=1e5,pf=function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;return{Class:function(r){return e.call(r).replace(/^\[object *|\]$/g,"")},HasProperty:function(r,n){return n in r},HasOwnProperty:function(r,n){return t.call(r,n)},IsCallable:function(r){return typeof r=="function"},ToInt32:function(r){return r>>0},ToUint32:function(r){return r>>>0}}}(),WUs=Math.LN2,VUs=Math.abs,e9e=Math.floor,zUs=Math.log,YUs=Math.min,jI=Math.pow,KUs=Math.round;function I2t(e){if(dln&&mee){var t=dln(e),r;for(r=0;r$Us)throw new RangeError("Array too large for polyfill");function t(n){mee(e,n,{get:function(){return e._getter(n)},set:function(s){e._setter(n,s)},enumerable:!0,configurable:!1})}var r;for(r=0;r>r}function N2t(e,t){var r=32-t;return e<>>r}function jUs(e){return[e&255]}function JUs(e){return D2t(e[0],8)}function ZUs(e){return[e&255]}function hln(e){return N2t(e[0],8)}function eQs(e){return e=KUs(Number(e)),[e<0?0:e>255?255:e&255]}function tQs(e){return[e>>8&255,e&255]}function rQs(e){return D2t(e[0]<<8|e[1],16)}function nQs(e){return[e>>8&255,e&255]}function iQs(e){return N2t(e[0]<<8|e[1],16)}function sQs(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function oQs(e){return D2t(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function aQs(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function uQs(e){return N2t(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function pln(e,t,r){var n=(1<.5||p%2?p+1:p}for(e!==e?(i=(1<=jI(2,1-n)?(i=YUs(e9e(zUs(e)/WUs),1023),o=d(e/jI(2,i)*jI(2,r)),o/jI(2,r)>=2&&(i=i+1,o=1),i>n?(i=(1<>1;return n.reverse(),a=n.join(""),u=(1<0?c*jI(2,l-u)*(1+f/jI(2,r)):f!==0?c*jI(2,-(u-1))*(f/jI(2,r)):c<0?-0:0}function cQs(e){return mln(e,11,52)}function lQs(e){return pln(e,11,52)}function fQs(e){return mln(e,8,23)}function dQs(e){return pln(e,8,23)}(function(){var e=function(h){if(h=pf.ToInt32(h),h<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=h,this._bytes=[],this._bytes.length=h;var p;for(p=0;pthis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=pf.ToUint32(E),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else throw new TypeError("Unexpected argument type(s)");this.constructor=m,I2t(this),XUs(this)},m.prototype=new t,m.prototype.BYTES_PER_ELEMENT=d,m.prototype._pack=h,m.prototype._unpack=p,m.BYTES_PER_ELEMENT=d,m.prototype._getter=function(g){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(g=pf.ToUint32(g),g>=this.length)return fln;var y=[],E,x;for(E=0,x=this.byteOffset+g*this.BYTES_PER_ELEMENT;E=this.length)return fln;var E=this._pack(y),x,v;for(x=0,v=this.byteOffset+g*this.BYTES_PER_ELEMENT;xthis.length)throw new RangeError("Offset plus length of array is out of range");if(I=this.byteOffset+v*this.BYTES_PER_ELEMENT,R=E.length*this.BYTES_PER_ELEMENT,E.buffer===this.buffer){for(C=[],T=0,w=E.byteOffset;Tthis.length)throw new RangeError("Offset plus length of array is out of range");for(T=0;TT?T:v}g=pf.ToInt32(g),y=pf.ToInt32(y),arguments.length<1&&(g=0),arguments.length<2&&(y=this.length),g<0&&(g=this.length+g),y<0&&(y=this.length+y),g=E(g,0,this.length),y=E(y,0,this.length);var x=y-g;return x<0&&(x=0),new this.constructor(this.buffer,this.byteOffset+g*this.BYTES_PER_ELEMENT,x)},m}var n=r(1,jUs,JUs),s=r(1,ZUs,hln),i=r(1,eQs,hln),o=r(2,tQs,rQs),a=r(2,nQs,iQs),u=r(4,sQs,oQs),c=r(4,aQs,uQs),l=r(4,dQs,fQs),f=r(8,lQs,cQs);Yi.Int8Array=Yi.Int8Array||n,Yi.Uint8Array=Yi.Uint8Array||s,Yi.Uint8ClampedArray=Yi.Uint8ClampedArray||i,Yi.Int16Array=Yi.Int16Array||o,Yi.Uint16Array=Yi.Uint16Array||a,Yi.Int32Array=Yi.Int32Array||u,Yi.Uint32Array=Yi.Uint32Array||c,Yi.Float32Array=Yi.Float32Array||l,Yi.Float64Array=Yi.Float64Array||f})();(function(){function e(i,o){return pf.IsCallable(i.get)?i.get(o):i[o]}var t=function(){var i=new Yi.Uint16Array([4660]),o=new Yi.Uint8Array(i.buffer);return e(o,0)===18}(),r=function(o,a,u){if(arguments.length===0)o=new Yi.ArrayBuffer(0);else if(!(o instanceof Yi.ArrayBuffer||pf.Class(o)==="ArrayBuffer"))throw new TypeError("TypeError");if(this.buffer=o||new Yi.ArrayBuffer(0),this.byteOffset=pf.ToUint32(a),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=pf.ToUint32(u),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");I2t(this)};function n(i){return function(o,a){if(o=pf.ToUint32(o),o+i.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");o+=this.byteOffset;var u=new Yi.Uint8Array(this.buffer,o,i.BYTES_PER_ELEMENT),c=[],l;for(l=0;lthis.byteLength)throw new RangeError("Array index out of range");var c=new i([a]),l=new Yi.Uint8Array(c.buffer),f=[],d,h;for(d=0;d{"use strict";var Aln=uln().Writable,hQs=p2(),vhe=lln();typeof Uint8Array>"u"?t9e=gln().Uint8Array:t9e=Uint8Array;var t9e;function ZG(e,t){if(!(this instanceof ZG))return new ZG(e,t);typeof e=="function"&&(t=e,e={}),e||(e={});var r=e.encoding,n=!1;r?(r=String(r).toLowerCase(),(r==="u8"||r==="uint8")&&(r="uint8array")):n=!0,Aln.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=n,t&&this.on("finish",function(){t(this.getBody())}),this.body=[]}Eln.exports=ZG;hQs(ZG,Aln);ZG.prototype._write=function(e,t,r){this.body.push(e),r()};ZG.prototype.inferEncoding=function(e){var t=e===void 0?this.body[0]:e;return Buffer.isBuffer(t)?"buffer":typeof Uint8Array<"u"&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":typeof t=="string"?"string":Object.prototype.toString.call(t)==="[object Object]"?"object":"buffer"};ZG.prototype.getBody=function(){return!this.encoding&&this.body.length===0?[]:(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),this.encoding==="array"?AQs(this.body):this.encoding==="string"?mQs(this.body):this.encoding==="buffer"?gQs(this.body):this.encoding==="uint8array"?yQs(this.body):this.body)};var Aya=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"};function pQs(e){return/Array\]$/.test(Object.prototype.toString.call(e))}function yln(e){return typeof e=="string"||pQs(e)||e&&typeof e.subarray=="function"}function mQs(e){for(var t=[],r=!1,n=0;n{"use strict";var EQs=xln();function R2t(e){}R2t.prototype._handleFile=function(t,r,n){r.stream.pipe(EQs({encoding:"buffer"},function(s){n(null,{buffer:s,size:s.length})}))};R2t.prototype._removeFile=function(t,r,n){delete r.buffer,n(null)};bln.exports=function(e){return new R2t(e)}});var Cln=A((xya,whe)=>{"use strict";var wln=ucn(),Tln=fcn(),_ln=vln(),Sln=r2t();function xQs(e,t,r){r(null,!0)}function LP(e){e.storage?this.storage=e.storage:e.dest?this.storage=Tln({destination:e.dest}):this.storage=_ln(),this.limits=e.limits,this.preservePath=e.preservePath,this.fileFilter=e.fileFilter||xQs}LP.prototype._makeMiddleware=function(e,t){function r(){var n=this.fileFilter,s=Object.create(null);e.forEach(function(o){typeof o.maxCount=="number"?s[o.name]=o.maxCount:s[o.name]=1/0});function i(o,a,u){if((s[a.fieldname]||0)<=0)return u(new Sln("LIMIT_UNEXPECTED_FILE",a.fieldname));s[a.fieldname]-=1,n(o,a,u)}return{limits:this.limits,preservePath:this.preservePath,storage:this.storage,fileFilter:i,fileStrategy:t}}return wln(r.bind(this))};LP.prototype.single=function(e){return this._makeMiddleware([{name:e,maxCount:1}],"VALUE")};LP.prototype.array=function(e,t){return this._makeMiddleware([{name:e,maxCount:t}],"ARRAY")};LP.prototype.fields=function(e){return this._makeMiddleware(e,"OBJECT")};LP.prototype.none=function(){return this._makeMiddleware([],"NONE")};LP.prototype.any=function(){function e(){return{limits:this.limits,preservePath:this.preservePath,storage:this.storage,fileFilter:this.fileFilter,fileStrategy:"ARRAY"}}return wln(e.bind(this))};function bQs(e){if(e===void 0)return new LP({});if(typeof e=="object"&&e!==null)return new LP(e);throw new TypeError("Expected object for argument options")}whe.exports=bQs;whe.exports.diskStorage=Tln;whe.exports.memoryStorage=_ln;whe.exports.MulterError=Sln});function kln(e){if(e instanceof Zc)e=e.getPojo();else if(Array.isArray(e))for(let t in e)e[t]instanceof Zc&&(e[t]=e[t].getPojo());else e&&typeof e=="object"&&("note"in e&&e.note instanceof Zc&&(e.note=e.note.getPojo()),"branch"in e&&e.branch instanceof Zc&&(e.branch=e.branch.getPojo()));return e&&typeof e=="object"&&"executionResult"in e&&(e.executionResult=kln(e.executionResult)),e}function uo(e,t,r){if(t.setHeader("trilium-max-entity-change-id",_a.getMaxEntityChangeId()),r=kln(r),Array.isArray(r)&&r.length>0&&Number.isInteger(r[0])){let[n,s]=r;return n!==200&&n!==201&&n!==204&&D.info(`${e.method} ${e.originalUrl} returned ${n} with response ${JSON.stringify(s)}`),B2t(t,n,s)}else return r===void 0?B2t(t,204,""):B2t(t,200,r)}function B2t(e,t,r){if(typeof r=="string")return t>=400&&e.setHeader("Content-Type","text/plain"),e.status(t).send(r),r.length;{let n=JSON.stringify(r);return e.setHeader("Content-Type","application/json"),e.status(t).send(n),n.length}}function qt(e,t,r){ks(e,t,[bi.checkApiAuth,p1],r,uo)}function Jf(e,t,r){g0(e,t,[bi.checkApiAuth,p1],r,uo)}function ks(e,t,r,n,s=null){Lln(e,t,r,n,s,!0)}function g0(e,t,r,n,s=null){Lln(e,t,r,n,s,!1)}function Lln(e,t,r,n,s=null,i){xx[e](t,...r,(o,a,u)=>{let c=Date.now();try{vr.namespace.bindEmitter(o),vr.namespace.bindEmitter(a);let l=vr.init(()=>{vr.set("componentId",o.headers["trilium-component-id"]),vr.set("localNowDateTime",o.headers["trilium-local-now-datetime"]),vr.set("hoistedNoteId",o.headers["trilium-hoisted-note-id"]||"root");let f=()=>n(o,a,u);return i?de.transactional(f):f()});if(!s)return;l?.then?l.then(f=>Iln(s,o,a,f,c)).catch(f=>Dln(f,e,t,a)):Iln(s,o,a,l,c)}catch(l){Dln(l,e,t,a)}})}function Iln(e,t,r,n,s){if(r.triliumResponseHandled){D.request(t,r,Date.now()-s,0);return}let i=e(t,r,n);D.request(t,r,Date.now()-s,i)}function Dln(e,t,r,n){let[s,i]=vp(e);if(D.error(`${t} ${r} threw exception: '${s}', stack: ${i}`),n.triliumResponseHandled||n.headersSent)return;let o=e instanceof jn||e instanceof Hm?e.statusCode:500;n.status(o).json({message:s})}function vQs(){let e={fileFilter:(t,r,n)=>{r.originalname=Buffer.from(r.originalname,"latin1").toString("utf-8"),n(null,!0)}};return process.env.TRILIUM_NO_UPLOAD_LIMIT||(e.limits={fileSize:Bln*1024*1024}),(0,Rln.default)(e).single("upload")}var Nln,Rln,Bln,xx,wQs,MP,Mln=q(()=>{"use strict";Nln=Xe(Nj()),Rln=Xe(Cln());Vt();Za();Un();CE();Lv();vO();Nh();_ut();AIe();zr();Bln=250,xx=Nln.default.Router();wQs=vQs(),MP=function(e,t,r){wQs(e,t,function(n){n?.code==="LIMIT_FILE_SIZE"?t.setHeader("Content-Type","text/plain").status(400).send(`Cannot upload file because it excceeded max allowed file size of ${Bln} MiB`):r()})}});function TQs(e){ks(Cr,"/",[bi.checkAuth,p1],x5r.index),ks(Cr,"/login",[bi.checkAppInitialized,bi.checkPasswordSet],$j.loginPage),ks(Cr,"/set-password",[bi.checkAppInitialized,bi.checkPasswordNotSet],$j.setPasswordPage);let t=BDr({windowMs:15*60*1e3,max:10,skipSuccessfulRequests:!0});ks(Jr,"/login",[t],$j.login),ks(Jr,"/logout",[p1,bi.checkAuth],$j.logout),ks(Jr,"/set-password",[bi.checkAppInitialized,bi.checkPasswordNotSet],$j.setPassword),ks(Cr,"/setup",[],g5r.setupPage),qt(Cr,"/api/totp/generate",hIe.generateSecret),qt(Cr,"/api/totp/status",hIe.getTOTPStatus),qt(Cr,"/api/totp/get",hIe.getSecret),qt(Cr,"/api/oauth/status",Zg.getOAuthStatus),Jf(Cr,"/api/oauth/validate",Zg.isTokenValid),qt(Jr,"/api/totp_recovery/set",qj.setRecoveryCodes),qt(Jr,"/api/totp_recovery/verify",qj.verifyRecoveryCode),qt(Cr,"/api/totp_recovery/generate",qj.generateRecoveryCodes),qt(Cr,"/api/totp_recovery/enabled",qj.checkForRecoveryKeys),qt(Cr,"/api/totp_recovery/used",qj.getUsedRecoveryCodes),qt(Cr,"/api/tree",Uut.getTree),qt(Jr,"/api/tree/load",Uut.load),qt(Cr,"/api/notes/:noteId",im.getNote),qt(Cr,"/api/notes/:noteId/blob",im.getNoteBlob),qt(Cr,"/api/notes/:noteId/metadata",im.getNoteMetadata),qt(gc,"/api/notes/:noteId/data",im.updateNoteData),qt(W9,"/api/notes/:noteId",im.deleteNote),qt(gc,"/api/notes/:noteId/undelete",im.undeleteNote),qt(Jr,"/api/notes/:noteId/revision",im.forceSaveRevision),qt(Jr,"/api/notes/:parentNoteId/children",im.createNote),qt(gc,"/api/notes/:noteId/sort-children",im.sortChildNotes),qt(gc,"/api/notes/:noteId/protect/:isProtected",im.protectNote),qt(gc,"/api/notes/:noteId/type",im.setNoteTypeMime),qt(gc,"/api/notes/:noteId/title",im.changeTitle),qt(Jr,"/api/notes/:noteId/duplicate/:parentNoteId",im.duplicateSubtree),qt(gc,"/api/notes/:noteId/clone-to-branch/:parentBranchId",yle.cloneNoteToBranch),qt(gc,"/api/notes/:noteId/toggle-in-parent/:parentNoteId/:present",yle.toggleNoteInParent),qt(gc,"/api/notes/:noteId/clone-to-note/:parentNoteId",yle.cloneNoteToParentNote),qt(gc,"/api/notes/:noteId/clone-after/:afterBranchId",yle.cloneNoteAfter),ks(gc,"/api/notes/:noteId/file",[bi.checkApiAuthOrElectron,MP,p1],m1.updateFile,uo),ks(Cr,"/api/notes/:noteId/open",[bi.checkApiAuthOrElectron],m1.openFile),g0(Cr,"/api/notes/:noteId/open-partial",[bi.checkApiAuthOrElectron],Nut(m1.fileContentProvider,{debug:(n,s)=>{console.log(n,s)}})),ks(Cr,"/api/notes/:noteId/download",[bi.checkApiAuthOrElectron],m1.downloadFile),ks(Cr,"/api/notes/download/:noteId",[bi.checkApiAuthOrElectron],m1.downloadFile),qt(Jr,"/api/notes/:noteId/save-to-tmp-dir",m1.saveNoteToTmpDir),qt(Jr,"/api/notes/:noteId/upload-modified-file",m1.uploadModifiedFileToNote),qt(Jr,"/api/notes/:noteId/convert-to-attachment",im.convertNoteToAttachment),qt(gc,"/api/branches/:branchId/move-to/:parentBranchId",vL.moveBranchToParent),qt(gc,"/api/branches/:branchId/move-before/:beforeBranchId",vL.moveBranchBeforeNote),qt(gc,"/api/branches/:branchId/move-after/:afterBranchId",vL.moveBranchAfterNote),qt(gc,"/api/branches/:branchId/expanded/:expanded",vL.setExpanded),qt(gc,"/api/branches/:branchId/expanded-subtree/:expanded",vL.setExpandedForSubtree),qt(W9,"/api/branches/:branchId",vL.deleteBranch),qt(gc,"/api/branches/:branchId/set-prefix",vL.setPrefix),qt(Cr,"/api/notes/:noteId/attachments",w6.getAttachments),qt(Jr,"/api/notes/:noteId/attachments",w6.saveAttachment),ks(Jr,"/api/notes/:noteId/attachments/upload",[bi.checkApiAuthOrElectron,MP,p1],w6.uploadAttachment,uo),qt(Cr,"/api/attachments/:attachmentId",w6.getAttachment),qt(Cr,"/api/attachments/:attachmentId/all",w6.getAllAttachments),qt(Jr,"/api/attachments/:attachmentId/convert-to-note",w6.convertAttachmentToNote),qt(W9,"/api/attachments/:attachmentId",w6.deleteAttachment),qt(gc,"/api/attachments/:attachmentId/rename",w6.renameAttachment),qt(Cr,"/api/attachments/:attachmentId/blob",w6.getAttachmentBlob),ks(Cr,"/api/attachments/:attachmentId/image/:filename",[bi.checkApiAuthOrElectron],ble.returnAttachedImage),ks(Cr,"/api/attachments/:attachmentId/open",[bi.checkApiAuthOrElectron],m1.openAttachment),g0(Cr,"/api/attachments/:attachmentId/open-partial",[bi.checkApiAuthOrElectron],Nut(m1.attachmentContentProvider,{debug:(n,s)=>{console.log(n,s)}})),ks(Cr,"/api/attachments/:attachmentId/download",[bi.checkApiAuthOrElectron],m1.downloadAttachment),ks(Cr,"/api/attachments/download/:attachmentId",[bi.checkApiAuthOrElectron],m1.downloadAttachment),qt(Jr,"/api/attachments/:attachmentId/save-to-tmp-dir",m1.saveAttachmentToTmpDir),qt(Jr,"/api/attachments/:attachmentId/upload-modified-file",m1.uploadModifiedFileToAttachment),ks(gc,"/api/attachments/:attachmentId/file",[bi.checkApiAuthOrElectron,MP,p1],m1.updateAttachment,uo),qt(Cr,"/api/notes/:noteId/revisions",T6.getRevisions),qt(W9,"/api/notes/:noteId/revisions",T6.eraseAllRevisions),qt(Jr,"/api/revisions/erase-all-excess-revisions",T6.eraseAllExcessRevisions),qt(Cr,"/api/revisions/:revisionId",T6.getRevision),qt(Cr,"/api/revisions/:revisionId/blob",T6.getRevisionBlob),qt(W9,"/api/revisions/:revisionId",T6.eraseRevision),qt(Jr,"/api/revisions/:revisionId/restore",T6.restoreRevision),ks(Cr,"/api/revisions/:revisionId/image/:filename",[bi.checkApiAuthOrElectron],ble.returnImageFromRevision),ks(Cr,"/api/revisions/:revisionId/download",[bi.checkApiAuthOrElectron],T6.downloadRevision),ks(Cr,"/api/branches/:branchId/export/:type/:format/:version/:taskId",[bi.checkApiAuthOrElectron],K5r.exportBranch),g0(Jr,"/api/notes/:parentNoteId/notes-import",[bi.checkApiAuthOrElectron,MP,p1],Yut.importNotesToBranch,uo),ks(Jr,"/api/notes/:parentNoteId/attachments-import",[bi.checkApiAuthOrElectron,MP,p1],Yut.importAttachmentsToNote,uo),qt(Cr,"/api/notes/:noteId/attributes",IS.getEffectiveNoteAttributes),qt(Jr,"/api/notes/:noteId/attributes",IS.addNoteAttribute),qt(gc,"/api/notes/:noteId/attributes",IS.updateNoteAttributes),qt(gc,"/api/notes/:noteId/attribute",IS.updateNoteAttribute),qt(gc,"/api/notes/:noteId/set-attribute",IS.setNoteAttribute),qt(gc,"/api/notes/:noteId/relations/:name/to/:targetNoteId",IS.createRelation),qt(W9,"/api/notes/:noteId/relations/:name/to/:targetNoteId",IS.deleteRelation),qt(W9,"/api/notes/:noteId/attributes/:attributeId",IS.deleteNoteAttribute),qt(Cr,"/api/attribute-names",IS.getAttributeNames),qt(Cr,"/api/attribute-values/:attributeName",IS.getValuesForAttribute),ks(Cr,"/api/images/:noteId/:filename",[bi.checkApiAuthOrElectron],ble.returnImageFromNote),ks(gc,"/api/images/:noteId",[bi.checkApiAuthOrElectron,MP,p1],ble.updateImage,uo),qt(Cr,"/api/options",Wj.getOptions),qt(gc,"/api/options/:name/:value",Wj.updateOption),qt(gc,"/api/options",Wj.updateOptions),qt(Cr,"/api/options/user-themes",Wj.getUserThemes),qt(Cr,"/api/options/locales",Wj.getSupportedLocales),qt(Jr,"/api/password/change",Gut.changePassword),qt(Jr,"/api/password/reset",Gut.resetPassword),Jf(Jr,"/api/sync/test",Vw.testSync),Jf(Jr,"/api/sync/now",Vw.syncNow),qt(Jr,"/api/sync/fill-entity-changes",Vw.fillEntityChanges),qt(Jr,"/api/sync/force-full-sync",Vw.forceFullSync),ks(Cr,"/api/sync/check",[bi.checkApiAuth],Vw.checkSync,uo),ks(Cr,"/api/sync/changed",[bi.checkApiAuth],Vw.getChanged,uo),ks(gc,"/api/sync/update",[bi.checkApiAuth],Vw.update,uo),ks(Jr,"/api/sync/finished",[bi.checkApiAuth],Vw.syncFinished,uo),ks(Jr,"/api/sync/check-entity-changes",[bi.checkApiAuth],Vw.checkEntityChanges,uo),ks(Jr,"/api/sync/queue-sector/:entityName/:sector",[bi.checkApiAuth],Vw.queueSector,uo),ks(Cr,"/api/sync/stats",[],Vw.getStats,uo),qt(Jr,"/api/recent-notes",q5r.addRecentNote),qt(Cr,"/api/app-info",U5r.getAppInfo),qt(Cr,"/api/metrics",csn.getMetrics),qt(Cr,"/api/system-checks",Ton.systemChecks),ks(Cr,"/api/health-check",[],()=>({status:"ok"}),uo),ks(Cr,"/api/setup/status",[],Vj.getStatus,uo),g0(Jr,"/api/setup/new-document",[bi.checkAppNotInitialized],Vj.setupNewDocument,uo),g0(Jr,"/api/setup/sync-from-server",[bi.checkAppNotInitialized],Vj.setupSyncFromServer,uo),ks(Cr,"/api/setup/sync-seed",[bi.checkCredentials],Vj.getSyncSeed,uo),g0(Jr,"/api/setup/sync-seed",[bi.checkAppNotInitialized],Vj.saveSyncSeed,uo),qt(Cr,"/api/autocomplete",Qut.getAutocomplete),qt(Cr,"/api/autocomplete/notesCount",Qut.getNotesCount),qt(Cr,"/api/quick-search/:searchString",kQ.quickSearch),qt(Cr,"/api/search-note/:noteId",kQ.searchFromNote),qt(Jr,"/api/search-and-execute-note/:noteId",kQ.searchAndExecute),qt(Jr,"/api/search-related",kQ.getRelatedNotes),qt(Cr,"/api/search/:searchString",kQ.search),qt(Cr,"/api/search-templates",kQ.searchTemplates),qt(Jr,"/api/bulk-action/execute",mct.execute),qt(Jr,"/api/bulk-action/affected-notes",mct.getAffectedNoteCount),ks(Jr,"/api/login/sync",[],DQ.loginSync,uo),qt(Jr,"/api/login/protected",DQ.loginToProtectedSession),qt(Jr,"/api/login/protected/touch",DQ.touchProtectedSession),qt(Jr,"/api/logout/protected",DQ.logoutFromProtectedSession),ks(Jr,"/api/login/token",[t],DQ.token,uo),qt(Cr,"/api/etapi-tokens",Xde.getTokens),qt(Jr,"/api/etapi-tokens",Xde.createToken),qt(Fln,"/api/etapi-tokens/:etapiTokenId",Xde.patchToken),qt(W9,"/api/etapi-tokens/:etapiTokenId",Xde.deleteToken);let r=Ms?[]:[bi.checkEtapiToken];ks(Cr,"/api/clipper/handshake",r,ZZ.handshake,uo),g0(Jr,"/api/clipper/clippings",r,ZZ.addClipping,uo),g0(Jr,"/api/clipper/notes",r,ZZ.createNote,uo),ks(Jr,"/api/clipper/open/:noteId",r,ZZ.openNote,uo),g0(Cr,"/api/clipper/notes-by-url/:noteUrl",r,ZZ.findNotesByUrl,uo),Jf(Cr,"/api/special-notes/inbox/:date",eA.getInboxNote),Jf(Cr,"/api/special-notes/days/:date",eA.getDayNote),Jf(Cr,"/api/special-notes/week-first-day/:date",eA.getWeekFirstDayNote),Jf(Cr,"/api/special-notes/weeks/:week",eA.getWeekNote),Jf(Cr,"/api/special-notes/months/:month",eA.getMonthNote),Jf(Cr,"/api/special-notes/quarters/:quarter",eA.getQuarterNote),qt(Cr,"/api/special-notes/years/:year",eA.getYearNote),qt(Cr,"/api/special-notes/notes-for-month/:month",eA.getDayNotesForMonth),qt(Jr,"/api/special-notes/sql-console",eA.createSqlConsole),Jf(Jr,"/api/special-notes/save-sql-console",eA.saveSqlConsole),qt(Jr,"/api/special-notes/search-note",eA.createSearchNote),qt(Jr,"/api/special-notes/save-search-note",eA.saveSearchNote),qt(Jr,"/api/special-notes/launchers/:noteId/reset",eA.resetLauncher),qt(Jr,"/api/special-notes/launchers/:parentNoteId/:launcherType",eA.createLauncher),qt(gc,"/api/special-notes/api-script-launcher",eA.createOrUpdateScriptLauncherFromApi),qt(Cr,"/api/sql/schema",Kut.getSchema),qt(Jr,"/api/sql/execute/:noteId",Kut.execute),g0(Jr,"/api/database/anonymize/:type",[bi.checkApiAuthOrElectron,p1],I8.anonymize,uo),qt(Cr,"/api/database/anonymized-databases",I8.getExistingAnonymizedDatabases),process.env.TRILIUM_INTEGRATION_TEST==="memory"&&g0(Jr,"/api/database/rebuild/",[bi.checkApiAuthOrElectron],I8.rebuildIntegrationTestDatabase,uo),g0(Jr,"/api/database/backup-database",[bi.checkApiAuthOrElectron,p1],I8.backupDatabase,uo),qt(Cr,"/api/database/backups",I8.getExistingBackups),g0(Jr,"/api/database/vacuum-database",[bi.checkApiAuthOrElectron,p1],I8.vacuumDatabase,uo),g0(Jr,"/api/database/find-and-fix-consistency-issues",[bi.checkApiAuthOrElectron,p1],I8.findAndFixConsistencyIssues,uo),qt(Cr,"/api/database/check-integrity",I8.checkIntegrity),g0(Jr,"/api/script/exec",[bi.checkApiAuth,p1],NQ.exec,uo),qt(Jr,"/api/script/run/:noteId",NQ.run),qt(Cr,"/api/script/startup",NQ.getStartupBundles),qt(Cr,"/api/script/widgets",NQ.getWidgetBundles),qt(Jr,"/api/script/bundle/:noteId",NQ.getBundle),qt(Cr,"/api/script/relation/:noteId/:relationName",NQ.getRelationBundles),ks(Jr,"/api/sender/login",[t],DQ.token,uo),g0(Jr,"/api/sender/image",[bi.checkEtapiToken,MP],ect.uploadImage,uo),g0(Jr,"/api/sender/note",[bi.checkEtapiToken],ect.saveNote,uo),qt(Cr,"/api/keyboard-actions",Yyt.getKeyboardActions),qt(Cr,"/api/keyboard-shortcuts-for-notes",Yyt.getShortcutsForNotes),qt(Jr,"/api/relation-map",rsn.getRelationMap),qt(Jr,"/api/notes/erase-deleted-notes-now",im.eraseDeletedNotesNow),qt(Jr,"/api/notes/erase-unused-attachments-now",im.eraseUnusedAttachmentsNow),Jf(Cr,"/api/similar-notes/:noteId",Win.getSimilarNotes),Jf(Cr,"/api/backend-log",Xin.getBackendLog),qt(Cr,"/api/stats/note-size/:noteId",Kyt.getNoteSize),qt(Cr,"/api/stats/subtree-size/:noteId",Kyt.getSubtreeSize),qt(Jr,"/api/delete-notes-preview",im.getDeleteNotesPreview),ks(Cr,"/api/fonts",[bi.checkApiAuthOrElectron],Zin.getFontCss),qt(Cr,"/api/other/icon-usage",jyt.getIconUsage),qt(Jr,"/api/other/render-markdown",jyt.renderMarkdown),qt(Cr,"/api/recent-changes/:ancestorNoteId",R5r.getRecentChanges),qt(Cr,"/api/edited-notes/:date",T6.getEditedNotesOnDate),qt(Jr,"/api/note-map/:noteId/tree",Kde.getTreeMap),qt(Jr,"/api/note-map/:noteId/link",Kde.getLinkMap),qt(Cr,"/api/note-map/:noteId/backlink-count",Kde.getBacklinkCount),qt(Cr,"/api/note-map/:noteId/backlinks",Kde.getBacklinks),Zsn.register(xx),Son.register(xx,[t]),Ion.register(xx),Ron.register(xx),kon.register(xx),Mon.register(xx),Pon.register(xx),qon.register(xx),Gon.register(xx),Won.register(xx),eee.register(xx),Jf(Jr,"/api/llm/chat",SP.createSession),Jf(Cr,"/api/llm/chat",SP.listSessions),Jf(Cr,"/api/llm/chat/:sessionId",SP.getSession),Jf(Fln,"/api/llm/chat/:sessionId",SP.updateSession),Jf(W9,"/api/llm/chat/:chatNoteId",SP.deleteSession),Jf(Jr,"/api/llm/chat/:chatNoteId/messages",SP.sendMessage),Jf(Jr,"/api/llm/chat/:chatNoteId/messages/stream",SP.streamMessage),Jf(Cr,"/api/llm/providers/ollama/models",ton.listModels),Jf(Cr,"/api/llm/providers/openai/models",non.listModels),Jf(Cr,"/api/llm/providers/anthropic/models",son.listModels),WEt(e),e.use("",xx)}var Cr,Jr,gc,Fln,W9,Pln,Oln=q(()=>{"use strict";zr();_ut();ole();dDr();gDr();AIe();_Dr();kDr();A5r();E5r();b5r();w5r();T5r();_5r();S5r();C5r();I5r();N5r();B5r();M5r();F5r();P5r();O5r();H5r();Q5r();X5r();vNr();wNr();TNr();DNr();RNr();BNr();kNr();LNr();hct();d8r();p8r();m8r();Nin();Lin();Vin();zin();jin();Jin();esn();tsn();nsn();isn();lsn();eon();ron();ion();oon();von();_on();Con();Don();Bon();Lon();Fon();Oon();Hon();$on();Von();Jyt();run();Mln();Cr="get",Jr="post",gc="put",Fln="patch",W9="delete";Pln={register:TQs}});function _Qs(e,t){let n=e.params.path.join("/"),i=de.getColumn("SELECT attributeId FROM attributes WHERE isDeleted = 0 AND type = 'label' AND name IN ('customRequestHandler', 'customResourceProvider')").map(a=>J.getAttribute(a));for(let a of i){if(!a?.value.trim())continue;let u=new RegExp(`^${a.value}$`),c;try{c=n.match(u)}catch(l){let[f,d]=vp(l);D.error(`Testing path for label '${a.attributeId}', regex '${a.value}' failed with error: ${f}, stack: ${d}`);continue}if(c){if(a.name==="customRequestHandler"){let l=a.getNote();D.info(`Handling custom request '${n}' with note '${l.noteId}'`);try{jE.executeNote(l,{pathParams:c.slice(1),req:e,res:t})}catch(f){let[d,h]=vp(f);D.error(`Custom handler '${l.noteId}' failed with: ${d}, ${h}`),t.setHeader("Content-Type","text/plain").status(500).send(d)}}else if(a.name==="customResourceProvider")m1.downloadNoteInt(a.noteId,t);else throw new Error(`Unrecognized attribute name '${a.name}'`);return}}let o=`No handler matched for custom '${n}' request.`;D.info(o),t.setHeader("Content-Type","text/plain").status(404).send(o)}function SQs(e){e.all("/custom/*path",(t,r,n)=>{vr.namespace.bindEmitter(t),vr.namespace.bindEmitter(r),vr.init(()=>_Qs(t,r))})}var qln,Hln=q(()=>{"use strict";Vt();hct();rz();Za();Un();Dr();zr();qln={register:SQs}});var k2t,Uln,Qln=q(()=>{"use strict";Jte();k2t=class extends wR{constructor(t){super(t,403),this.name="ForbiddenError"}},Uln=k2t});function CQs(e){e.use((t,r,n,s)=>typeof t=="object"&&t&&"code"in t&&t.code==="EBADCSRFTOKEN"?(D.error(`Invalid CSRF token: ${r.headers["x-csrf-token"]}, secret: ${r.cookies._csrf}`),s(new Uln("Invalid CSRF token"))):s(t)),e.use((t,r,n)=>{let s=new Hm(`Router not found for request ${t.method} ${t.url}`);n(s)}),e.use((t,r,n,s)=>{let i=t instanceof wR?t.statusCode:500,o=t instanceof Error&&i!==404?t:`${i} ${r.method} ${r.url}`;D.info(o),n.status(i).send({message:t instanceof Error?t.message:"Unknown Error"})})}var Gln,$ln=q(()=>{"use strict";Vt();vO();Qln();Jte();Gln={register:CQs}});var FP=A((a2a,Wln)=>{"use strict";Wln.exports=e=>I0()("express-openid-connect").extend(e)});var zln=A((u2a,Vln)=>{"use strict";Vln.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var L2t=A((Yln,Kln)=>{"use strict";var IQs=zln();Kln.exports=class extends Error{constructor(e){let t=e.filter(r=>r!=="").map(r=>typeof r=="string"?r:r instanceof Error?r.message:IQs(r));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Yln.assert)}}});var za=A((l2a,Xln)=>{"use strict";var DQs=L2t();Xln.exports=function(e,...t){if(!e)throw t.length===1&&t[0]instanceof Error?t[0]:new DQs(t)}});var e$=A((f2a,Jln)=>{"use strict";var M2t=za(),jln={};Jln.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let n=Array.isArray(t);M2t(!n||!r.separator,"Separator option is not valid for array-based chain");let s=n?t:t.split(r.separator||"."),i=e;for(let o=0;o{"use strict";var Zln={};pE=efn.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};Zln.typeMap=new Map([["[object Error]",pE.error],["[object Map]",pE.map],["[object Promise]",pE.promise],["[object Set]",pE.set],["[object WeakMap]",pE.weakMap],["[object WeakSet]",pE.weakSet]]);pE.getInternalProto=function(e){if(Array.isArray(e))return pE.array;if(Buffer&&e instanceof Buffer)return pE.buffer;if(e instanceof Date)return pE.date;if(e instanceof RegExp)return pE.regex;if(e instanceof Error)return pE.error;let t=Object.prototype.toString.call(e);return Zln.typeMap.get(t)||pE.generic}});var P2t=A(tfn=>{"use strict";tfn.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var mE=A((h2a,rfn)=>{"use strict";var NQs=e$(),gv=F2t(),RQs=P2t(),V9={needsProtoHack:new Set([gv.set,gv.map,gv.weakSet,gv.weakMap])};rfn.exports=V9.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let n=V9.clone,s=r;if(t.shallow){if(t.shallow!==!0)return V9.cloneWithShallow(e,t);n=u=>u}else if(s){let u=s.get(e);if(u)return u}else s=new Map;let i=gv.getInternalProto(e);if(i===gv.buffer)return Buffer&&Buffer.from(e);if(i===gv.date)return new Date(e.getTime());if(i===gv.regex)return new RegExp(e);let o=V9.base(e,i,t);if(o===e)return e;if(s&&s.set(e,o),i===gv.set)for(let u of e)o.add(n(u,t,s));else if(i===gv.map)for(let[u,c]of e)o.set(u,n(c,t,s));let a=RQs.keys(e,t);for(let u of a){if(u==="__proto__")continue;if(i===gv.array&&u==="length"){o.length=e.length;continue}let c=Object.getOwnPropertyDescriptor(e,u);c?c.get||c.set?Object.defineProperty(o,u,c):c.enumerable?o[u]=n(e[u],t,s):Object.defineProperty(o,u,{enumerable:!1,writable:!0,configurable:!0,value:n(e[u],t,s)}):Object.defineProperty(o,u,{enumerable:!0,writable:!0,configurable:!0,value:n(e[u],t,s)})}return o};V9.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let n=new Map;for(let s of r){let i=NQs(e,s);(typeof i=="object"||typeof i=="function")&&n.set(i,i)}return V9.clone(e,t,n)};V9.base=function(e,t,r){if(r.prototype===!1)return V9.needsProtoHack.has(t)?new t.constructor:t===gv.array?[]:{};let n=Object.getPrototypeOf(e);if(n&&n.isImmutable)return e;if(t===gv.array){let s=[];return n!==t&&Object.setPrototypeOf(s,n),s}if(V9.needsProtoHack.has(t)){let s=new n.constructor;return n!==t&&Object.setPrototypeOf(s,n),s}return Object.create(n)}});var nfn=A((p2a,BQs)=>{BQs.exports={name:"joi",description:"Object schema validation",version:"17.13.3",repository:"git://github.com/hapijs/joi",main:"lib/index.js",types:"lib/index.d.ts",browser:"dist/joi-browser.min.js",files:["lib/**/*","dist/*"],keywords:["schema","validation"],dependencies:{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},devDependencies:{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63",typescript:"4.3.x"},scripts:{prepublishOnly:"cd browser && npm install && npm run build",test:"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},license:"BSD-3-Clause"}});var r9e=A(The=>{"use strict";var At=O2t(),hs={};hs.wrap=At.string().min(1).max(2).allow(!1);The.preferences=At.object({allowUnknown:At.boolean(),abortEarly:At.boolean(),artifacts:At.boolean(),cache:At.boolean(),context:At.object(),convert:At.boolean(),dateFormat:At.valid("date","iso","string","time","utc"),debug:At.boolean(),errors:{escapeHtml:At.boolean(),label:At.valid("path","key",!1),language:[At.string(),At.object().ref()],render:At.boolean(),stack:At.boolean(),wrap:{label:hs.wrap,array:hs.wrap,string:hs.wrap}},externals:At.boolean(),messages:At.object(),noDefaults:At.boolean(),nonEnumerables:At.boolean(),presence:At.valid("required","optional","forbidden"),skipFunctions:At.boolean(),stripUnknown:At.object({arrays:At.boolean(),objects:At.boolean()}).or("arrays","objects").allow(!0,!1),warnings:At.boolean()}).strict();hs.nameRx=/^[a-zA-Z0-9]\w*$/;hs.rule=At.object({alias:At.array().items(At.string().pattern(hs.nameRx)).single(),args:At.array().items(At.string(),At.object({name:At.string().pattern(hs.nameRx).required(),ref:At.boolean(),assert:At.alternatives([At.function(),At.object().schema()]).conditional("ref",{is:!0,then:At.required()}),normalize:At.function(),message:At.string().when("assert",{is:At.function(),then:At.required()})})),convert:At.boolean(),manifest:At.boolean(),method:At.function().allow(!1),multi:At.boolean(),validate:At.function()});The.extension=At.object({type:At.alternatives([At.string(),At.object().regex()]).required(),args:At.function(),cast:At.object().pattern(hs.nameRx,At.object({from:At.function().maxArity(1).required(),to:At.function().minArity(1).maxArity(2).required()})),base:At.object().schema().when("type",{is:At.object().regex(),then:At.forbidden()}),coerce:[At.function().maxArity(3),At.object({method:At.function().maxArity(3).required(),from:At.array().items(At.string()).single()})],flags:At.object().pattern(hs.nameRx,At.object({setter:At.string(),default:At.any()})),manifest:{build:At.function().arity(2)},messages:[At.object(),At.string()],modifiers:At.object().pattern(hs.nameRx,At.function().minArity(1).maxArity(2)),overrides:At.object().pattern(hs.nameRx,At.function()),prepare:At.function().maxArity(3),rebuild:At.function().arity(1),rules:At.object().pattern(hs.nameRx,hs.rule),terms:At.object().pattern(hs.nameRx,At.object({init:At.array().allow(null).required(),manifest:At.object().pattern(/.+/,[At.valid("schema","single"),At.object({mapped:At.object({from:At.string().required(),to:At.string().required()}).required()})])})),validate:At.function().maxArity(3)}).strict();The.extensions=At.array().items(At.object(),At.function().arity(1)).strict();hs.desc={buffer:At.object({buffer:At.string()}),func:At.object({function:At.function().required(),options:{literal:!0}}),override:At.object({override:!0}),ref:At.object({ref:At.object({type:At.valid("value","global","local"),path:At.array().required(),separator:At.string().length(1).allow(!1),ancestor:At.number().min(0).integer().allow("root"),map:At.array().items(At.array().length(2)).min(1),adjust:At.function(),iterables:At.boolean(),in:At.boolean(),render:At.boolean()}).required()}),regex:At.object({regex:At.string().min(3)}),special:At.object({special:At.valid("deep").required()}),template:At.object({template:At.string().required(),options:At.object()}),value:At.object({value:At.alternatives([At.object(),At.array()]).required()})};hs.desc.entity=At.alternatives([At.array().items(At.link("...")),At.boolean(),At.function(),At.number(),At.string(),hs.desc.buffer,hs.desc.func,hs.desc.ref,hs.desc.regex,hs.desc.special,hs.desc.template,hs.desc.value,At.link("/")]);hs.desc.values=At.array().items(null,At.boolean(),At.function(),At.number().allow(1/0,-1/0),At.string().allow(""),At.symbol(),hs.desc.buffer,hs.desc.func,hs.desc.override,hs.desc.ref,hs.desc.regex,hs.desc.template,hs.desc.value);hs.desc.messages=At.object().pattern(/.+/,[At.string(),hs.desc.template,At.object().pattern(/.+/,[At.string(),hs.desc.template])]);The.description=At.object({type:At.string().required(),flags:At.object({cast:At.string(),default:At.any(),description:At.string(),empty:At.link("/"),failover:hs.desc.entity,id:At.string(),label:At.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:At.boolean(),unit:At.string()}).unknown(),preferences:{allowUnknown:At.boolean(),abortEarly:At.boolean(),artifacts:At.boolean(),cache:At.boolean(),convert:At.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:At.boolean(),label:["path","key"],language:[At.string(),hs.desc.ref],wrap:{label:hs.wrap,array:hs.wrap}},externals:At.boolean(),messages:hs.desc.messages,noDefaults:At.boolean(),nonEnumerables:At.boolean(),presence:["required","optional","forbidden"],skipFunctions:At.boolean(),stripUnknown:At.object({arrays:At.boolean(),objects:At.boolean()}).or("arrays","objects").allow(!0,!1),warnings:At.boolean()},allow:hs.desc.values,invalid:hs.desc.values,rules:At.array().min(1).items({name:At.string().required(),args:At.object().min(1),keep:At.boolean(),message:[At.string(),hs.desc.messages],warn:At.boolean()}),keys:At.object().pattern(/.*/,At.link("/")),link:hs.desc.ref}).pattern(/^[a-z]\w*$/,At.any())});var sfn=A((g2a,ifn)=>{"use strict";var PP={};ifn.exports=function(e){if(!e)return"";let t="";for(let r=0;r=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};PP.isSafe=function(e){return PP.safeCharCodes.has(e)};PP.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);PP.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var ofn=A(_he=>{"use strict";var ba={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};_he.Parser=class{constructor(e,t={}){if(!t[ba.settings]&&t.constants)for(let r in t.constants){let n=t.constants[r];if(n!==null&&!["boolean","number","string"].includes(typeof n))throw new Error(`Formula constant ${r} contains invalid ${typeof n} value type`)}this.settings=t[ba.settings]?t:Object.assign({[ba.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let t=[],r="",n=0,s=!1,i=a=>{if(n)throw new Error("Formula missing closing parenthesis");let u=t.length?t[t.length-1]:null;if(!(!s&&!r&&!a)){if(u&&u.type==="reference"&&a===")"){u.type="function",u.value=this._subFormula(r,u.value),r="";return}if(a===")"){let c=new _he.Parser(r,this.settings);t.push({type:"segment",value:c})}else if(s){if(s==="]"){t.push({type:"reference",value:r}),r="";return}t.push({type:"literal",value:r})}else if(ba.operatorCharacters.includes(r))u&&u.type==="operator"&&ba.operators.includes(u.value+r)?u.value+=r:t.push({type:"operator",value:r});else if(r.match(ba.numberRx))t.push({type:"constant",value:parseFloat(r)});else if(this.settings.constants[r]!==void 0)t.push({type:"constant",value:this.settings.constants[r]});else{if(!r.match(ba.tokenRx))throw new Error(`Formula contains invalid token: ${r}`);t.push({type:"reference",value:r})}r=""}};for(let a of e)s?a===s?(i(),s=!1):r+=a:n?a==="("?(r+=a,++n):a===")"?(--n,n?r+=a:i(a)):r+=a:a in ba.literals?s=ba.literals[a]:a==="("?(i(),++n):ba.operatorCharacters.includes(a)?(i(),r=a,i()):a!==" "?r+=a:i();i(),t=t.map((a,u)=>a.type!=="operator"||a.value!=="-"||u&&t[u-1].type!=="operator"?a:{type:"operator",value:"n"});let o=!1;for(let a of t){if(a.type==="operator"){if(ba.operatorsPrefix.includes(a.value))continue;if(!o)throw new Error("Formula contains an operator in invalid position");if(!ba.operators.includes(a.value))throw new Error(`Formula contains an unknown operator ${a.value}`)}else if(o)throw new Error("Formula missing expected operator");o=!o}if(!o)throw new Error("Formula contains invalid trailing operator");t.length===1&&["reference","literal","constant"].includes(t[0].type)&&(this.single={type:t[0].type==="reference"?"reference":"value",value:t[0].value}),this._parts=t.map(a=>{if(a.type==="operator")return ba.operatorsPrefix.includes(a.value)?a:a.value;if(a.type!=="reference")return a.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(a.value))throw new Error(`Formula contains invalid reference ${a.value}`);return this.settings.reference?this.settings.reference(a.value):ba.reference(a.value)})}_subFormula(e,t){let r=this.settings.functions[t];if(typeof r!="function")throw new Error(`Formula contains unknown function ${t}`);let n=[];if(e){let s="",i=0,o=!1,a=()=>{if(!s)throw new Error(`Formula contains function ${t} with invalid arguments ${e}`);n.push(s),s=""};for(let u=0;unew _he.Parser(s,this.settings)),function(s){let i=[];for(let o of n)i.push(o.evaluate(s));return r.call(s,...i)}}evaluate(e){let t=this._parts.slice();for(let r=t.length-2;r>=0;--r){let n=t[r];if(n&&n.type==="operator"){let s=t[r+1];t.splice(r+1,1);let i=ba.evaluate(s,e);t[r]=ba.single(n.value,i)}}return ba.operatorsOrder.forEach(r=>{for(let n=1;n":return t>r;case">=":return t>=r;case"==":return t===r;case"!=":return t!==r;case"&&":return t&&r;case"||":return t||r}return null};ba.exists=function(e){return e!=null}});var ufn=A(afn=>{"use strict";var kQs=mE(),LQs=Nl(),t$={annotations:Symbol("annotations")};afn.error=function(e){if(!this._original||typeof this._original!="object")return this.details[0].message;let t=e?"":"\x1B[31m",r=e?"":"\x1B[41m",n=e?"":"\x1B[0m",s=kQs(this._original);for(let a=this.details.length-1;a>=0;--a){let u=a+1,c=this.details[a],l=c.path,f=s;for(let d=0;;++d){let h=l[d];if(LQs.isSchema(f)&&(f=f.clone()),d+1`" ${t}[${u}]${n}`).replace(i.missing,(a,u,c)=>`${r}"${u}"${n}${t} [${c}]: -- missing --${n}`).replace(i.arrayIndex,(a,u,c)=>` ${c} ${t}[${u}]${n}`).replace(i.specials,(a,u)=>u);o=`${o} @@ -3031,7 +3033,7 @@ Please report this to https://github.com/szmarczak/http2-wrapper/`);p(m)}return} `).filter(o=>!o.startsWith(" at")).join(` `)}`,i}[ZEn.custom](){return`${this.constructor.name} ${ZEn(this.metadata,{depth:1/0,colors:process.stdout.isTTY,compact:!1,sorted:!0})}`}};o2n.exports=Ywt});var c2n=A((ITa,u2n)=>{"use strict";u2n.exports=e=>JSON.parse(JSON.stringify(e))});var m2n=A((DTa,p2n)=>{"use strict";var l2n=require("url"),{format:keo}=require("util"),f2n=c2n(),{RPError:d2n,OPError:Leo}=y$(),{BaseClient:Meo}=Vwt(),{random:Kwt,codeChallenge:Feo}=ppe(),Peo=Lwt(),{resolveResponseType:Oeo,resolveRedirectUri:qeo}=iBe();function Heo(e,t,r={}){e?this.error(e):t?this.success(t,r):this.fail(r)}function h2n({client:e,params:t={},passReqToCallback:r=!1,sessionKey:n,usePKCE:s=!0,extras:i={}}={},o){if(!(e instanceof Meo))throw new TypeError("client must be an instance of openid-client Client");if(typeof o!="function")throw new TypeError("verify callback must be a function");if(!e.issuer||!e.issuer.issuer)throw new TypeError("client must have an issuer with an identifier");if(this._client=e,this._issuer=e.issuer,this._verify=o,this._passReqToCallback=r,this._usePKCE=s,this._key=n||`oidc:${l2n.parse(this._issuer.issuer).hostname}`,this._params=f2n(t),this._extras=f2n(i),this._params.response_type||(this._params.response_type=Oeo.call(e)),this._params.redirect_uri||(this._params.redirect_uri=qeo.call(e)),this._params.scope||(this._params.scope="openid"),this._usePKCE===!0){let a=Array.isArray(this._issuer.code_challenge_methods_supported)?this._issuer.code_challenge_methods_supported:!1;if(a&&a.includes("S256"))this._usePKCE="S256";else if(a&&a.includes("plain"))this._usePKCE="plain";else{if(a)throw new TypeError("neither code_challenge_method supported by the client is supported by the issuer");this._usePKCE="S256"}}else if(typeof this._usePKCE=="string"&&!["plain","S256"].includes(this._usePKCE))throw new TypeError(`${this._usePKCE} is not valid/implemented PKCE code_challenge_method`);this.name=l2n.parse(e.issuer.issuer).hostname}h2n.prototype.authenticate=function(t,r){(async()=>{let n=this._client;if(!t.session)throw new TypeError("authentication requires session support");let s=n.callbackParams(t),i=this._key;if(Object.keys(s).length===0){let E={state:Kwt(),...this._params,...r};if(!E.nonce&&E.response_type.includes("id_token")&&(E.nonce=Kwt()),t.session[i]=Peo(E,"nonce","state","max_age","response_type"),this._usePKCE&&E.response_type.includes("code")){let x=Kwt();switch(t.session[i].code_verifier=x,this._usePKCE){case"S256":E.code_challenge=Feo(x),E.code_challenge_method="S256";break;case"plain":E.code_challenge=x;break}}this.redirect(n.authorizationUrl(E));return}let o=t.session[i];if(Object.keys(o||{}).length===0)throw new Error(keo('did not find expected authorization request details in session, req.session["%s"] is %j',i,o));let{state:a,nonce:u,max_age:c,code_verifier:l,response_type:f}=o;try{delete t.session[i]}catch{}let d={redirect_uri:this._params.redirect_uri,...r},h={state:a,nonce:u,max_age:c,code_verifier:l,response_type:f},p=await n.callback(d.redirect_uri,s,h,this._extras),m=this._passReqToCallback,g=this._verify.length>(m?3:2)&&n.issuer.userinfo_endpoint,y=[p,Heo.bind(this)];if(g){if(!p.access_token)throw new d2n({message:"expected access_token to be returned when asking for userinfo in verify callback",tokenset:p});let E=await n.userinfo(p);y.splice(1,0,E)}m&&y.unshift(t),this._verify(...y)})().catch(n=>{n instanceof Leo&&n.error!=="server_error"&&!n.error.startsWith("invalid")||n instanceof d2n?this.fail(n):this.error(n)})};p2n.exports=h2n});var mBe=A((NTa,g2n)=>{"use strict";var Ueo=a2n(),{OPError:Qeo,RPError:Geo}=y$(),$eo=nBe(),Weo=m2n(),Veo=eBe(),{CLOCK_TOLERANCE:zeo,HTTP_OPTIONS:Yeo}=gpe(),Keo=ppe(),{setDefaults:Xeo}=Ape();g2n.exports={Issuer:Ueo,Registry:$eo,Strategy:Weo,TokenSet:Veo,errors:{OPError:Qeo,RPError:Geo},custom:{setHttpOptionsDefaults:Xeo,http_options:Yeo,clock_tolerance:zeo},generators:Keo}});var T2n=A((RTa,w2n)=>{"use strict";var{Buffer:v$}=require("buffer"),{createHash:jeo,createHmac:y2n}=require("crypto"),A2n={},E2n=e=>{switch(e){case"sha256":return 32;case"sha512":return 64;case"sha224":return 28;case"sha384":return 48;case"sha3-256":return 32;case"sha3-512":return 64;case"sha3-224":return 28;case"sha3-384":return 48;case"blake2s256":return 32;case"blake2b512":return 64;case"sha1":return 20;case"md5":return 16;default:{let t=A2n[e];return t===void 0&&(t=jeo(e).digest().length,A2n[e]=t),t}}},x2n=(e,t,r,n)=>{let s=v$.isBuffer(r)?r:v$.from(r),i=n&&n.length?v$.from(n):v$.alloc(t,0);return y2n(e,i).update(s).digest()},b2n=(e,t,r,n,s)=>{let i=v$.isBuffer(s)?s:v$.from(s||""),o=i.length,a=Math.ceil(n/t);if(a>255)throw new Error(`OKM length ${n} is too long for ${e} hash`);let u=v$.alloc(t*a+o+1);for(let c=1,l=0,f=0;c<=a;++c)i.copy(u,f),u[f+o]=c,y2n(e,r).update(u.slice(l,f+o+1)).digest().copy(u,f),l=f,f+=t;return u.slice(0,n)};function v2n(e,t,{salt:r="",info:n="",hash:s="SHA-256"}={}){s=s.toLowerCase().replace("-","");let i=E2n(s),o=x2n(s,i,e,r);return b2n(s,i,o,t,n)}Object.defineProperties(v2n,{hash_length:{configurable:!1,enumerable:!1,writable:!1,value:E2n},extract:{configurable:!1,enumerable:!1,writable:!1,value:x2n},expand:{configurable:!1,enumerable:!1,writable:!1,value:b2n}});w2n.exports=v2n});var jwt=A((BTa,jee)=>{"use strict";var Xwt=require("crypto"),{JWKS:Jeo,JWK:Zeo,JWS:C2n}=zP(),gBe=32,_2n="JWE CEK",S2n="JWS Cookie Signing",ABe="sha256",I2n="HS256",D2n=["b64"],yBe,EBe;if(Xwt.hkdfSync)yBe=e=>Buffer.from(Xwt.hkdfSync(ABe,e,Buffer.alloc(0),_2n,gBe)),EBe=e=>Buffer.from(Xwt.hkdfSync(ABe,e,Buffer.alloc(0),S2n,gBe));else{let e=T2n();yBe=t=>e(t,gBe,{info:_2n,hash:ABe}),EBe=t=>e(t,gBe,{info:S2n,hash:ABe})}var eto=(e,t)=>{let r,n=Array.isArray(e)?e:[e],s=new Jeo.KeyStore;return n.forEach((i,o)=>{let a=Zeo.asKey(t?yBe(i):EBe(i));o===0&&(r=a),s.add(a)}),[r,s]},N2n={alg:I2n,b64:!1,crit:D2n},R2n=(e,t)=>Buffer.from(`${e}=${t}`),tto=(e,t,r)=>({protected:Buffer.from(JSON.stringify(N2n)).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),payload:R2n(e,t),signature:r}),rto=(e,t,r)=>{let n=R2n(e,t);return C2n.sign.flattened(n,r,N2n).signature},nto=(e,t,r,n)=>{try{return!!C2n.verify(tto(e,t,r),n,{algorithms:[I2n],crit:D2n})}catch{return!1}},ito=(e,t,r)=>{if(!t)return;let n;if([t,n]=t.split("."),nto(e,t,n,r))return t},sto=(e,t,r)=>{let n=rto(e,t,r);return`${t}.${n}`};jee.exports.signCookie=sto;jee.exports.verifyCookie=ito;jee.exports.getKeyStore=eto;jee.exports.encryption=yBe;jee.exports.signing=EBe});var M2n=A((kTa,L2n)=>{"use strict";var{generators:Jwt}=mBe(),{signCookie:B2n,verifyCookie:k2n,getKeyStore:oto}=jwt(),Zwt=C9e(),eTt=class{constructor({secret:t,session:r,legacySameSiteCookie:n}){let[s,i]=oto(t);i.size===1&&(i=s),this.currentKey=s,this.keyStore=i,this.sessionCookieConfig=r&&r.cookie||{},this.legacySameSiteCookie=n}store(t,r,n,{sameSite:s="None",value:i=this.generateNonce()}={}){let o=s==="None",{domain:a,path:u,secure:c}=this.sessionCookieConfig,l={httpOnly:!0,secure:c,domain:a,path:u};{let f=B2n(t,i,this.currentKey);n.cookie(t,f,{...l,sameSite:s,secure:o?!0:l.secure})}if(o&&this.legacySameSiteCookie){let f=B2n(`_${t}`,i,this.currentKey);n.cookie(`_${t}`,f,l)}return i}getOnce(t,r,n){if(!r[Zwt])return;let{secure:s,sameSite:i}=this.sessionCookieConfig,o=k2n(t,r[Zwt][t],this.keyStore);if(this.deleteCookie(t,n,{secure:s,sameSite:i}),this.legacySameSiteCookie){let a=`_${t}`;o||(o=k2n(a,r[Zwt][a],this.keyStore)),this.deleteCookie(a,n)}return o}generateNonce(){return Jwt.nonce()}generateCodeVerifier(){return Jwt.codeVerifier()}calculateCodeChallenge(t){return Jwt.codeChallenge(t)}deleteCookie(t,r,n={}){let{domain:s,path:i}=this.sessionCookieConfig,{sameSite:o,secure:a}=n;r.clearCookie(t,{domain:s,path:i,sameSite:o,secure:a})}};L2n.exports=eTt});var tTt=A((F2n,xBe)=>{"use strict";(function(e,t,r){typeof xBe<"u"&&xBe.exports?xBe.exports=r():typeof define=="function"&&define.amd?define(r):t[e]=r()})("urljoin",F2n,function(){function e(t){var r=[];if(t.length===0)return"";if(typeof t[0]!="string")throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var s=0;s0&&(i=i.replace(/^[\/]+/,"")),s0?"?":"")+a.join("&"),o}return function(){var t;return typeof arguments[0]=="object"?t=arguments[0]:t=[].slice.call(arguments),e(t)}})});var P2n=A((LTa,bBe)=>{"use strict";var ato=function(){"use strict";function e(l,f){return f!=null&&l instanceof f}var t;try{t=Map}catch{t=function(){}}var r;try{r=Set}catch{r=function(){}}var n;try{n=Promise}catch{n=function(){}}function s(l,f,d,h,p){typeof f=="object"&&(d=f.depth,h=f.prototype,p=f.includeNonEnumerable,f=f.circular);var m=[],g=[],y=typeof Buffer<"u";typeof f>"u"&&(f=!0),typeof d>"u"&&(d=1/0);function E(x,v){if(x===null)return null;if(v===0)return x;var b,T;if(typeof x!="object")return x;if(e(x,t))b=new t;else if(e(x,r))b=new r;else if(e(x,n))b=new n(function(L,F){x.then(function(P){L(E(P,v-1))},function(P){F(E(P,v-1))})});else if(s.__isArray(x))b=[];else if(s.__isRegExp(x))b=new RegExp(x.source,c(x)),x.lastIndex&&(b.lastIndex=x.lastIndex);else if(s.__isDate(x))b=new Date(x.getTime());else{if(y&&Buffer.isBuffer(x))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(x.length):b=new Buffer(x.length),x.copy(b),b;e(x,Error)?b=Object.create(x):typeof h>"u"?(T=Object.getPrototypeOf(x),b=Object.create(T)):(b=Object.create(h),T=h)}if(f){var w=m.indexOf(x);if(w!=-1)return g[w];m.push(x),g.push(b)}e(x,t)&&x.forEach(function(L,F){var P=E(F,v-1),O=E(L,v-1);b.set(P,O)}),e(x,r)&&x.forEach(function(L){var F=E(L,v-1);b.add(F)});for(var S in x){var I;T&&(I=Object.getOwnPropertyDescriptor(T,S)),!(I&&I.set==null)&&(b[S]=E(x[S],v-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(x),S=0;S{"use strict";function uto(e){let t=!1,r;return(...n)=>(t||(r=e(...n)),t=!0,r)}O2n.exports={once:uto}});var H2n=A((FTa,cto)=>{cto.exports={name:"express-openid-connect",version:"2.18.1",description:"Express middleware to protect web applications using OpenID Connect.",repository:"auth0/express-openid-connect",homepage:"https://github.com/auth0/express-openid-connect",license:"MIT",author:"Auth0 ",main:"index.js",files:["lib","middleware","index.d.ts"],scripts:{lint:"eslint .","start:example":"node ./examples/run_example.js",test:"mocha --max-http-header-size=16384","test:ci":"nyc --reporter=lcov npm test","test:types":"tsd .",docs:"typedoc --options typedoc.js index.d.ts","test:end-to-end":"mocha end-to-end"},mocha:{exit:!0,file:"./test/setup.js",timeout:1e4},dependencies:{base64url:"^3.0.1",clone:"^2.1.2",cookie:"^0.7.1",debug:"^4.3.4","futoin-hkdf":"^1.5.1","http-errors":"^1.8.1",joi:"^17.7.0",jose:"^2.0.7","on-headers":"^1.0.2","openid-client":"^4.9.1","url-join":"^4.0.1"},devDependencies:{"@types/express":"^4.17.6","@types/node":"^18.0.6",chai:"^4.2.0","chai-as-promised":"^7.1.1","connect-redis":"^5.1.0",dotenv:"^8.2.0",eslint:"^5.16.0",express:"^4.21.2","express-oauth2-jwt-bearer":"^1.5.0",husky:"^4.2.5",lodash:"^4.17.15",memorystore:"^1.6.4",mocha:"^10.7.3",nock:"^11.9.1",nyc:"^15.1.0","oidc-provider":"^6.27.0",prettier:"^2.0.5","pretty-quick":"^2.0.1",puppeteer:"^21.1.0","redis-mock":"^0.56.3",request:"^2.88.2","request-promise-native":"^1.0.8",sinon:"^7.5.0",tsd:"^0.30.0",typedoc:"^0.25.1",typescript:"^4.8.4"},peerDependencies:{express:">= 4.17.0"},engines:{node:"^10.19.0 || >=12.0.0 < 13 || >=13.7.0 < 14 || >= 14.2.0"},husky:{hooks:{"pre-commit":"pretty-quick --staged"}}}});var TBe=A(W2n=>{"use strict";var{Issuer:U2n,custom:Q2n}=mBe(),rTt=require("url"),lto=tTt(),nTt=H2n(),vBe=FP()("client"),{JWK:fto}=zP(),dto={name:"express-oidc",version:nTt.version,env:{node:process.version}};function G2n(e){return e.split(" ").sort().join(" ")}async function hto(e){let t=f=>(f.headers={...f.headers,"User-Agent":e.httpUserAgent||`${nTt.name}/${nTt.version}`,...e.enableTelemetry?{"Auth0-Client":Buffer.from(JSON.stringify(dto)).toString("base64")}:void 0},f.timeout=e.httpTimeout,f.agent=e.httpAgent,f),r=f=>f[Q2n.http_options]=t;r(U2n);let n=await U2n.discover(e.issuerBaseURL);r(n);let s=Array.isArray(n.id_token_signing_alg_values_supported)?n.id_token_signing_alg_values_supported:[];s.includes(e.idTokenSigningAlg)||vBe("ID token algorithm %o is not supported by the issuer. Supported ID token algorithms are: %o.",e.idTokenSigningAlg,s);let i=G2n(e.authorizationParams.response_type),o=Array.isArray(n.response_types_supported)?n.response_types_supported:[];o.map(G2n),o.includes(i)||vBe("Response type %o is not supported by the issuer. Supported response types are: %o.",i,o);let a=e.authorizationParams.response_mode,u=Array.isArray(n.response_modes_supported)?n.response_modes_supported:[];if(a&&!u.includes(a)&&vBe("Response mode %o is not supported by the issuer. Supported response modes are %o.",a,u),e.pushedAuthorizationRequests&&!n.pushed_authorization_request_endpoint)throw new TypeError("pushed_authorization_request_endpoint must be configured on the issuer to use pushedAuthorizationRequests");let c;e.clientAssertionSigningKey&&(c={keys:[fto.asKey(e.clientAssertionSigningKey).toJWK(!0)]});let l=new n.Client({client_id:e.clientID,client_secret:e.clientSecret,id_token_signed_response_alg:e.idTokenSigningAlg,token_endpoint_auth_method:e.clientAuthMethod,...e.clientAssertionSigningAlg&&{token_endpoint_auth_signing_alg:e.clientAssertionSigningAlg}},c);return r(l),l[Q2n.clock_tolerance]=e.clockTolerance,e.idpLogout&&(e.auth0Logout||rTt.parse(n.issuer).hostname.match("\\.auth0\\.com$")&&e.auth0Logout!==!1?Object.defineProperty(l,"endSessionUrl",{value(f){let{id_token_hint:d,post_logout_redirect_uri:h,...p}=f,m=rTt.parse(lto(n.issuer,"/v2/logout"));return m.query={...p,returnTo:h,client_id:l.client_id},Object.entries(m.query).forEach(([g,y])=>{y==null&&delete m.query[g]}),rTt.format(m)}}):n.end_session_endpoint||vBe("the issuer does not support RP-Initiated Logout")),{client:l,issuer:n}}var wBe=new Map,$2n=0;W2n.get=e=>{let{discoveryCacheMaxAge:t}=e,r=Date.now();if(wBe.has(e)&&r<$2n+t)return wBe.get(e);$2n=r;let n=hto(e).catch(s=>{throw wBe.delete(e),s});return wBe.set(e,n),n}});var z2n=A((OTa,V2n)=>{"use strict";var{promisify:pto}=require("util"),{get:mto}=TBe();V2n.exports=async(e,t)=>{let{issuer:{issuer:r}}=await mto(t),{session:n,backchannelLogout:s}=t,i=s&&s.store||n.store,o=pto(i.destroy).bind(i),{sub:a,sid:u}=e.oidc.idTokenClaims;await Promise.all([o(`${r}|${a}`),u&&o(`${r}|${u}`)])}});var K2n=A((qTa,Y2n)=>{"use strict";var{promisify:gto}=require("util");Y2n.exports=async(e,t)=>{let{session:{absoluteDuration:r,rolling:n,rollingDuration:s,store:i},backchannelLogout:o}=t,a=o&&o.store||i,u=(n?Math.min(r,s):r)*1e3,c={cookie:{expires:Date.now()+u,maxAge:u}},l=gto(a.set).bind(a),{iss:f,sid:d,sub:h}=e;if(!d&&!h)throw new Error("The Logout Token must have a 'sid' or a 'sub'");await Promise.all([d&&l(`${f}|${d}`,c),h&&l(`${f}|${h}`,c)])}});var oTt=A((HTa,SBe)=>{"use strict";var{strict:iTt,AssertionError:Ato}=require("assert"),{JWE:X2n,errors:{JOSEError:yto}}=zP(),{promisify:sTt}=require("util"),j2n=Dj(),J2n=$Ce(),o3=C9e(),{getKeyStore:Z2n,verifyCookie:Eto,signCookie:xto}=jwt(),a3=FP()("appSession"),Jee=()=>Date.now()/1e3|0,bto=4096,txn=Symbol("reassign"),_Be=Symbol("regenerated_session_id");function exn(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get(){return r},set(n){if(n==null||n[txn])r=n;else throw new TypeError("session object cannot be reassigned")}})}async function vto(e,t){t.session.store&&(e[_Be]=await t.session.genid(e))}function wto(e,t,r){t[txn]=!0,e[r.session.name]=t}SBe.exports=e=>{let t="dir",r="A256GCM",n=e.session.name,s=e.session.cookie,{genid:i,absoluteDuration:o,rolling:a,rollingDuration:u,signSessionStoreCookie:c,requireSignedSessionStoreCookie:l}=e.session,{transient:f,...d}=s;d.expires=f?0:new Date,d.path=d.path||"/";let h=j2n.serialize(`${n}.0`,"",d),p=bto-h.length,[m,g]=Z2n(e.secret,!0);g.size===1&&(g=m);function y(R,C){return X2n.encrypt(R,m,{alg:t,enc:r,...C})}function E(R){return X2n.decrypt(R,g,{complete:!0,contentEncryptionAlgorithms:[r],keyManagementAlgorithms:[t]})}function x(R,C){return a?Math.min(...[C+u,R+o].filter(Boolean)):R+o}function v(R,C,{uat:N=Jee(),iat:k=N,exp:B=x(k,N)}){let L=R[o3],{transient:F,...P}=s;if(P.expires=F?0:new Date(B*1e3),!R[n]||!Object.keys(R[n]).length){a3("session was deleted or is empty, clearing all matching session cookies");for(let O of Object.keys(L))O.match(`^${n}(?:\\.\\d)?$`)&&b(O,C)}else{a3("found session, creating signed session cookie(s) with name %o(.i)",n);let O=y(JSON.stringify(R[n]),{iat:k,uat:N,exp:B}),Y=Math.ceil(O.length/p);if(Y>1){a3("cookie size greater than %d, chunking",p);for(let re=0;re{if(R.hasOwnProperty(n))return a3("request object (req) already has %o property, this is indicative of a middleware setup problem",n),N(new Error(`req[${n}] is already set, did you run this middleware twice?`));R[o3]=j2n.parse(R.get("cookie")||"");let k,B,L,F;try{if(R[o3].hasOwnProperty(n)?(a3("reading session from %s cookie",n),F=I.getCookie(R)):R[o3].hasOwnProperty(`${n}.0`)&&(F=Object.entries(R[o3]).map(([P,O])=>{let Y=P.match(`^${n}\\.(\\d+)$`);if(Y)return[Y[1],O]}).filter(Boolean).sort(([P],[O])=>parseInt(P,10)-parseInt(O,10)).map(([P,O])=>(a3("reading session chunk from %s.%d cookie",n,P),O)).join("")),F){let{header:P,data:O}=await I.get(F);({iat:k,uat:B,exp:L}=P),iTt(L>Jee(),"it is expired based on options when it was established"),u&&iTt(B+u>Jee(),"it is expired based on current rollingDuration rules"),o&&iTt(k+o>Jee(),"it is expired based on current absoluteDuration rules"),exn(R,n,O)}}catch(P){P instanceof Ato?a3("existing session was rejected because",P.message):P instanceof yto?a3("existing session was rejected because it could not be decrypted",P):a3("unexpected error handling session",P)}if((!R.hasOwnProperty(n)||!R[n])&&exn(R,n,{}),S){let P=F||await i(R);J2n(C,()=>I.setCookie(R[_Be]||P,R,C,{iat:k}));let{end:O}=C;C.end=async function(...re){try{await I.set(P,R,C,{iat:k}),O.call(C,...re)}catch(me){C.end=O,process.nextTick(()=>N(me))}}}else J2n(C,()=>I.setCookie(R,C,{iat:k}));return N()}};SBe.exports.regenerateSessionStoreId=vto;SBe.exports.replaceSession=wto});var axn=A((UTa,oxn)=>{"use strict";var Tto=require("url"),rxn=tTt(),{JWT:_to}=zP(),{TokenSet:Sto}=mBe(),nxn=P2n(),{strict:ixn}=require("assert"),Cto=_xt(),fR=FP()("context"),{once:aTt}=q2n(),{get:Zee}=TBe(),{encodeState:Ito,decodeState:Dto}=xxt(),Nto=z2n(),Rto=K2n(),{cancelSilentLogin:Bto,resumeSilentLogin:kto}=D9e(),TE=Ixt(),{regenerateSessionStoreId:sxn,replaceSession:Lto}=oTt();function Mto(){return w$.call(this).expired()}async function Fto({tokenEndpointParams:e}={}){let{config:t,req:r}=TE(this),{client:n,issuer:s}=await Zee(t),i=w$.call(this),o;(t.tokenEndpointParams||e)&&(o={exchangeBody:{...t.tokenEndpointParams,...e}});let a=await n.refresh(i,{...o,clientAssertionPayload:{aud:s.issuer}}),u=r[t.session.name];Object.assign(u,{id_token:a.id_token,access_token:a.access_token,refresh_token:a.refresh_token||i.refresh_token,token_type:a.token_type,expires_at:a.expires_at});let c=TE(u);return delete c.value,this.accessToken}function w$(){let e=TE(this),t=e.req[e.config.session.name];if(!t||!("id_token"in t))return;let r=TE(t);if(!("value"in r)){let{id_token:n,access_token:s,refresh_token:i,token_type:o,expires_at:a}=t;r.value=new Sto({id_token:n,access_token:s,refresh_token:i,token_type:o,expires_at:a})}return r.value}var uTt=class{constructor(t,r,n,s){Object.assign(TE(this),{config:t,req:r,res:n,next:s})}isAuthenticated(){return!!this.idTokenClaims}get idToken(){try{return w$.call(this).id_token}catch{return}}get refreshToken(){try{return w$.call(this).refresh_token}catch{return}}get accessToken(){try{let{access_token:t,token_type:r,expires_in:n}=w$.call(this);return!t||!r||typeof n!="number"?void 0:{access_token:t,token_type:r,expires_in:n,isExpired:Mto.bind(this),refresh:Fto.bind(this)}}catch{return}}get idTokenClaims(){try{let{config:{session:t},req:r}=TE(this),{sid:n}=r[t.name];return{sid:n,...nxn(w$.call(this).claims())}}catch{return}}get user(){try{let{config:{identityClaimFilter:t}}=TE(this),{idTokenClaims:r}=this,n=nxn(r);return t.forEach(s=>{delete n[s]}),n}catch{return}}async fetchUserInfo(){let{config:t}=TE(this),{client:r}=await Zee(t);return r.userinfo(w$.call(this))}},cTt=class{constructor(t,r,n,s,i){Object.assign(TE(this),{config:t,req:r,res:n,next:s,transient:i})}get errorOnRequiredAuth(){return TE(this).config.errorOnRequiredAuth}getRedirectUri(){let{config:t}=TE(this);if(t.routes.callback)return rxn(t.baseURL,t.routes.callback)}silentLogin(t={}){return this.login({...t,silent:!0,authorizationParams:{...t.authorizationParams,prompt:"none"}})}async login(t={}){let{config:r,req:n,res:s,next:i,transient:o}=TE(this);i=aTt(i);try{let{client:a,issuer:u}=await Zee(r),c=r.baseURL;t.returnTo?(c=t.returnTo,fR("req.oidc.login() called with returnTo: %s",c)):n.method==="GET"&&n.originalUrl&&(c=n.originalUrl.replace(/^\/+/,"/"),fR("req.oidc.login() without returnTo, using: %s",c)),t={authorizationParams:{},returnTo:c,...t},t.authorizationParams={redirect_uri:this.getRedirectUri(),...r.authorizationParams,...t.authorizationParams};let l=await r.getLoginState(n,t);typeof l!="object"&&i(new Error("Custom state value must be an object.")),t.silent&&(l.attemptingSilentLogin=!0);let f=["id_token","code id_token","code"];ixn(f.includes(t.authorizationParams.response_type),`response_type should be one of ${f.join(", ")}`),ixn(/\bopenid\b/.test(t.authorizationParams.scope),'scope should contain "openid"');let d={nonce:o.generateNonce(),state:Ito(l),...t.authorizationParams.max_age?{max_age:t.authorizationParams.max_age}:void 0},h={...t.authorizationParams,...d};if(t.authorizationParams.response_type.includes("code")&&(fR("response_type includes code, the authorization request will use PKCE"),d.code_verifier=o.generateCodeVerifier(),h.code_challenge_method="S256",h.code_challenge=o.calculateCodeChallenge(d.code_verifier)),r.pushedAuthorizationRequests){let{request_uri:g}=await a.pushedAuthorizationRequest(h,{clientAssertionPayload:{aud:u.issuer}});h={request_uri:g}}o.store(r.transactionCookie.name,n,s,{sameSite:t.authorizationParams.response_mode==="form_post"?"None":r.transactionCookie.sameSite,value:JSON.stringify(d)});let m=a.authorizationUrl(h);fR("redirecting to %s",m),s.redirect(m)}catch(a){i(a)}}async logout(t={}){let{config:r,req:n,res:s,next:i}=TE(this);i=aTt(i);let o=t.returnTo||r.routes.postLogoutRedirect;fR("req.oidc.logout() with return url: %s",o);try{let{client:a}=await Zee(r);if(Tto.parse(o).host===null&&(o=rxn(r.baseURL,o)),Bto(n,s),!n.oidc.isAuthenticated())return fR("end-user already logged out, redirecting to %s",o),s.redirect(o);let{idToken:u}=n.oidc;if(n[r.session.name]=void 0,!r.idpLogout)return fR("performing a local only logout, redirecting to %s",o),s.redirect(o);o=a.endSessionUrl({...r.logoutParams,id_token_hint:u,post_logout_redirect_uri:o,...t.logoutParams})}catch(a){return i(a)}fR("logging out of identity provider, redirecting to %s",o),s.redirect(o)}async callback(t={}){let{config:r,req:n,res:s,transient:i,next:o}=TE(this);o=aTt(o);try{let{client:a,issuer:u}=await Zee(r),c=t.redirectUri||this.getRedirectUri(),l;try{let h=a.callbackParams(n),p=i.getOnce(r.transactionCookie.name,n,s),m=p?JSON.parse(p):{};n.openidState=Dto(m.state),l=await a.callback(c,h,m,{exchangeBody:{...r&&r.tokenEndpointParams,...t.tokenEndpointParams},clientAssertionPayload:{aud:u.issuer}})}catch(h){throw Cto(400,h.message,{error:h.error,error_description:h.error_description})}let f=Object.assign({},l),d=l.claims();f.sid=d.sid,r.afterCallback&&(f=await r.afterCallback(n,s,f,n.openidState)),n.oidc.isAuthenticated()?n.oidc.user.sub===d.sub?Object.assign(n[r.session.name],f):(Lto(n,f,r),await sxn(n,r)):(Object.assign(n[r.session.name],f),await sxn(n,r)),kto(n,s),n.oidc.isAuthenticated()&&r.backchannelLogout&&r.backchannelLogout.onLogin!==!1&&await(r.backchannelLogout.onLogin||Nto)(n,r)}catch(a){if(!n.openidState||!n.openidState.attemptingSilentLogin)return o(a)}s.redirect(n.openidState.returnTo||r.baseURL)}async backchannelLogout(){let{config:t,req:r,res:n}=TE(this);n.setHeader("cache-control","no-store");let s=r.body.logout_token;if(!s){n.status(400).json({error:"invalid_request",error_description:"Missing logout_token"});return}let i=t.backchannelLogout&&t.backchannelLogout.onLogoutToken||Rto,o;try{let{issuer:a}=await Zee(t),u=await a.keystore();o=await _to.LogoutToken.verify(s,u,{issuer:a.issuer,audience:t.clientID,algorithms:[t.idTokenSigningAlg]})}catch(a){n.status(400).json({error:"invalid_request",error_description:a.message});return}try{await i(o,t)}catch(a){fR("req.oidc.backchannelLogout() failed with: %s",a.message),n.status(400).json({error:"application_error",error_description:"The application failed to invalidate the session."});return}n.status(204).send()}};oxn.exports={RequestContext:uTt,ResponseContext:cTt}});var cxn=A((QTa,uxn)=>{"use strict";var{promisify:Pto}=require("util"),{get:Oto}=TBe();uxn.exports=async(e,t)=>{let r=t.backchannelLogout&&t.backchannelLogout.store||t.session.store,n=Pto(r.get).bind(r),{issuer:{issuer:s}}=await Oto(t),{sid:i,sub:o}=e.oidc.idTokenClaims;if(!i&&!o)throw new Error("The session must have a 'sid' or a 'sub'");let[a,u]=await Promise.all([i&&n(`${s}|${i}`),o&&n(`${s}|${o}`)]);return!!(a||u)}});var dxn=A((GTa,fxn)=>{"use strict";var CBe=Nj(),g_=FP()("auth"),{get:qto}=Zdn(),{requiresAuth:Hto}=Sxt(),Uto=D9e(),Qto=M2n(),{RequestContext:Gto,ResponseContext:$to}=axn(),Wto=oTt(),Vto=cxn(),IBe=e=>e.split("")[0]==="/"?e:"/"+e,lxn=function(e){let t=qto(e);g_("configuration object processed, resulting configuration: %O",t);let r=new CBe.Router,n=new Qto(t);if(r.use(Wto(t)),r.use(async(s,i,o)=>{s.oidc=new Gto(t,s,i,o),i.oidc=new $to(t,s,i,o,n),o()}),t.routes.login){let s=IBe(t.routes.login);g_("adding GET %s route",s),r.get(s,CBe.urlencoded({extended:!1}),(i,o)=>o.oidc.login({returnTo:t.baseURL}))}else g_("login handling route not applied");if(t.routes.logout){let s=IBe(t.routes.logout);g_("adding GET %s route",s),r.get(s,(i,o)=>o.oidc.logout())}else g_("logout handling route not applied");if(t.routes.callback){let s=IBe(t.routes.callback);g_("adding GET %s route",s),r.get(s,(i,o)=>o.oidc.callback()),g_("adding POST %s route",s),r.post(s,CBe.urlencoded({extended:!1}),(i,o)=>o.oidc.callback())}else g_("callback handling route not applied");if(t.backchannelLogout){let s=IBe(t.routes.backchannelLogout);if(g_("adding POST %s route",s),r.post(s,CBe.urlencoded({extended:!1}),(i,o)=>o.oidc.backchannelLogout()),t.backchannelLogout.isLoggedOut!==!1){let i=t.backchannelLogout.isLoggedOut||Vto;r.use(async(o,a,u)=>{if(!o.oidc.isAuthenticated()){u();return}try{await i(o,t)&&(o[t.session.name]=void 0),u()}catch(c){u(c)}})}}return t.authRequired?(g_("authentication is required for all routes this middleware is applied to"),r.use(Hto())):g_("authentication is not required for any of the routes this middleware is applied to see and apply `requiresAuth` middlewares to your protected resources"),t.attemptSilentLogin&&(g_("silent login will be attempted on end-user's initial HTML request"),r.use(Uto())),r};lxn.Store=function(){};fxn.exports=lxn});var pxn=A(($Ta,hxn)=>{"use strict";var zto=dxn(),Yto=Sxt(),Kto=D9e();hxn.exports={auth:zto,...Yto,attemptSilentLogin:Kto}});var Axn=A(DBe=>{"use strict";var gxn=require("crypto");DBe.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(t==null)throw new TypeError("Secret key must be provided.");return e+"."+gxn.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};DBe.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(t==null)throw new TypeError("Secret key must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=DBe.sign(r,t);return mxn(n)==mxn(e)?r:!1};function mxn(e){return gxn.createHash("sha1").update(e).digest("hex")}});var yxn=A((VTa,dTt)=>{"use strict";var NBe=require("crypto"),lTt=NBe.randomBytes===NBe.pseudoRandomBytes?1:3;dTt.exports=Xto;dTt.exports.sync=jto;function Xto(e,t){if(t!==void 0&&typeof t!="function")throw new TypeError("argument callback must be a function");if(!t&&!global.Promise)throw new TypeError("argument callback is required");return t?fTt(e,lTt,t):new Promise(function(n,s){fTt(e,lTt,function(o,a){if(o)return s(o);n(a)})})}function jto(e){for(var t=null,r=0;r{"use strict";var xxn=yxn(),Jto=/=+$/,Zto=/\+/g,ero=/\//g;hTt.exports=tro;hTt.exports.sync=rro;function tro(e,t){if(t!==void 0&&typeof t!="function")throw new TypeError("argument callback must be a function");if(!t&&!global.Promise)throw new TypeError("argument callback is required");return t?Exn(e,t):new Promise(function(n,s){Exn(e,function(o,a){if(o)return s(o);n(a)})})}function rro(e){return bxn(xxn.sync(e))}function Exn(e,t){xxn(e,function(r,n){if(r)return t(r);t(null,bxn(n))})}function bxn(e){return e.toString("base64").replace(Jto,"").replace(Zto,"-").replace(ero,"_")}});var pTt=A((YTa,wxn)=>{"use strict";var nro=Dj(),iro=xj()("express-session"),sro=wxn.exports=function(t){if(this.path="/",this.maxAge=null,this.httpOnly=!0,t){if(typeof t!="object")throw new TypeError("argument options must be a object");for(var r in t)r!=="data"&&(this[r]=t[r])}(this.originalMaxAge===void 0||this.originalMaxAge===null)&&(this.originalMaxAge=this.maxAge)};sro.prototype={set expires(e){this._expires=e,this.originalMaxAge=this.maxAge},get expires(){return this._expires},set maxAge(e){if(e&&typeof e!="number"&&!(e instanceof Date))throw new TypeError("maxAge must be a number or Date");e instanceof Date&&iro("maxAge as Date; pass number of milliseconds instead"),this.expires=typeof e=="number"?new Date(Date.now()+e):e},get maxAge(){return this.expires instanceof Date?this.expires.valueOf()-Date.now():this.expires},get data(){return{originalMaxAge:this.originalMaxAge,partitioned:this.partitioned,priority:this.priority,expires:this._expires,secure:this.secure,httpOnly:this.httpOnly,domain:this.domain,path:this.path,sameSite:this.sameSite}},serialize:function(e,t){return nro.serialize(e,t,this.data)},toJSON:function(){return this.data}}});var mTt=A((KTa,Txn)=>{"use strict";Txn.exports=T$;function T$(e,t){if(Object.defineProperty(this,"req",{value:e}),Object.defineProperty(this,"id",{value:e.sessionID}),typeof t=="object"&&t!==null)for(var r in t)r in this||(this[r]=t[r])}ete(T$.prototype,"touch",function(){return this.resetMaxAge()});ete(T$.prototype,"resetMaxAge",function(){return this.cookie.maxAge=this.cookie.originalMaxAge,this});ete(T$.prototype,"save",function(t){return this.req.sessionStore.set(this.id,this,t||function(){}),this});ete(T$.prototype,"reload",function(t){var r=this.req,n=this.req.sessionStore;return n.get(this.id,function(s,i){if(s)return t(s);if(!i)return t(new Error("failed to load session"));n.createSession(r,i),t()}),this});ete(T$.prototype,"destroy",function(t){return delete this.req.session,this.req.sessionStore.destroy(this.id,t),this});ete(T$.prototype,"regenerate",function(t){return this.req.sessionStore.regenerate(this.req,t),this});function ete(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0})}});var gTt=A((XTa,Sxn)=>{"use strict";var oro=pTt(),_xn=require("events").EventEmitter,aro=mTt(),uro=require("util");Sxn.exports=bpe;function bpe(){_xn.call(this)}uro.inherits(bpe,_xn);bpe.prototype.regenerate=function(e,t){var r=this;this.destroy(e.sessionID,function(n){r.generate(e),t(n)})};bpe.prototype.load=function(e,t){var r=this;this.get(e,function(n,s){if(n)return t(n);if(!s)return t();var i={sessionID:e,sessionStore:r};t(null,r.createSession(i,s))})};bpe.prototype.createSession=function(e,t){var r=t.cookie.expires,n=t.cookie.originalMaxAge;return t.cookie=new oro(t.cookie),typeof r=="string"&&(t.cookie.expires=new Date(r)),t.cookie.originalMaxAge=n,e.session=new aro(e,t),e.session}});var Dxn=A((jTa,Ixn)=>{"use strict";var Cxn=gTt(),cro=require("util"),tte=typeof setImmediate=="function"?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};Ixn.exports=dR;function dR(){Cxn.call(this),this.sessions=Object.create(null)}cro.inherits(dR,Cxn);dR.prototype.all=function(t){for(var r=Object.keys(this.sessions),n=Object.create(null),s=0;s{"use strict";var Nxn=oK().Buffer,kxn=Dj(),lro=require("crypto"),mf=Lat()("express-session"),wpe=xj()("express-session"),fro=$Ce(),dro=xQ(),Lxn=Axn(),hro=vxn().sync,Mxn=pTt(),yTt=Dxn(),Fxn=mTt(),pro=gTt(),mro=process.env.NODE_ENV;rte=Pxn.exports=Aro;rte.Store=pro;rte.Cookie=Mxn;rte.Session=Fxn;rte.MemoryStore=yTt;var gro=`Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak -memory, and will not scale past a single process.`,RBe=typeof setImmediate=="function"?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function Aro(e){var t=e||{},r=t.cookie||{},n=t.genid||yro,s=t.name||t.key||"connect.sid",i=t.store||new yTt,o=t.proxy,a=t.resave,u=!!t.rolling,c=t.saveUninitialized,l=t.secret;if(typeof n!="function")throw new TypeError("genid option must be a function");if(a===void 0&&(wpe("undefined resave option; provide resave option"),a=!0),c===void 0&&(wpe("undefined saveUninitialized option; provide saveUninitialized option"),c=!0),t.unset&&t.unset!=="destroy"&&t.unset!=="keep")throw new TypeError('unset option must be "destroy" or "keep"');var f=t.unset==="destroy";if(Array.isArray(l)&&l.length===0)throw new TypeError("secret option array must contain one or more strings");l&&!Array.isArray(l)&&(l=[l]),l||wpe("req.secret; provide secret option"),mro==="production"&&i instanceof yTt&&console.warn(gro),i.generate=function(p){p.sessionID=n(p),p.session=new Fxn(p),p.session.cookie=new Mxn(r),r.secure==="auto"&&(p.session.cookie.secure=Rxn(p,o))};var d=typeof i.touch=="function",h=!0;return i.on("disconnect",function(){h=!1}),i.on("connect",function(){h=!0}),function(m,g,y){if(m.session){y();return}if(!h){mf("store is disconnected"),y();return}var E=dro.original(m).pathname||"/";if(E.indexOf(r.path||"/")!==0){mf("pathname mismatch"),y();return}if(!l&&!m.secret){y(new Error("secret option required for sessions"));return}var x=l||[m.secret],v,b,T,w=!1;m.sessionStore=i;var S=m.sessionID=Ero(m,s,x);fro(g,function(){if(!m.session){mf("no session");return}if(me(m)){if(m.session.cookie.secure&&!Rxn(m,o)){mf("not secured");return}w||(m.session.touch(),w=!0);try{xro(g,s,m.sessionID,x[0],m.session.cookie.data)}catch(xe){RBe(y,xe)}}});var I=g.end,R=g.write,C=!1;g.end=function(ue,V){if(C)return!1;C=!0;var ie,G=!0;function H(){if(G){ie=I.call(g,ue,V),G=!1;return}I.call(g)}function ce(){if(!G)return ie;if(g._header||g._implicitHeader(),ue==null)return ie=!0,ie;var ne=Number(g.getHeader("Content-Length"));return!isNaN(ne)&&ne>0&&(ue=Nxn.isBuffer(ue)?ue:Nxn.from(ue,V),V=void 0,ue.length!==0)?(mf("split response"),ie=R.call(g,ue.slice(0,ue.length-1)),ue=ue.slice(ue.length-1,ue.length),ie):(ie=R.call(g,ue,V),G=!1,ie)}return O(m)?(mf("destroying"),i.destroy(m.sessionID,function(_e){_e&&RBe(y,_e),mf("destroyed"),H()}),ce()):m.session?(w||(m.session.touch(),w=!0),Y(m)?(m.session.save(function(_e){_e&&RBe(y,_e),H()}),ce()):d&&re(m)?(mf("touching"),i.touch(m.sessionID,m.session,function(_e){_e&&RBe(y,_e),mf("touched"),H()}),ce()):I.call(g,ue,V)):(mf("no session"),I.call(g,ue,V))};function N(){i.generate(m),b=m.sessionID,v=vpe(m.session),L(m.session)}function k(xe,ue){i.createSession(xe,ue),b=xe.sessionID,v=vpe(ue),a||(T=v),L(xe.session)}function B(xe,ue){return function(){m.session!==xe&&L(m.session),ue.apply(this,arguments)}}function L(xe){var ue=xe.reload,V=xe.save;function ie(H){mf("reloading %s",this.id),ue.call(this,B(this,H))}function G(){mf("saving %s",this.id),T=vpe(this),V.apply(this,arguments)}Object.defineProperty(xe,"reload",{configurable:!0,enumerable:!1,value:ie,writable:!0}),Object.defineProperty(xe,"save",{configurable:!0,enumerable:!1,value:G,writable:!0})}function F(xe){return b!==xe.id||v!==vpe(xe)}function P(xe){return b===xe.id&&T===vpe(xe)}function O(xe){return xe.sessionID&&f&&xe.session==null}function Y(xe){return typeof xe.sessionID!="string"?(mf("session ignored because of bogus req.sessionID %o",xe.sessionID),!1):!c&&!T&&S!==xe.sessionID?F(xe.session):!P(xe.session)}function re(xe){return typeof xe.sessionID!="string"?(mf("session ignored because of bogus req.sessionID %o",xe.sessionID),!1):S===xe.sessionID&&!Y(xe)}function me(xe){return typeof xe.sessionID!="string"?!1:S!==xe.sessionID?c||F(xe.session):u||xe.session.cookie.expires!=null&&F(xe.session)}if(!m.sessionID){mf("no SID sent, generating session"),N(),y();return}mf("fetching %s",m.sessionID),i.get(m.sessionID,function(xe,ue){if(xe&&xe.code!=="ENOENT"){mf("error %j",xe),y(xe);return}try{xe||!ue?(mf("no session found"),N()):(mf("session found"),k(m,ue))}catch(V){y(V);return}y()})}}function yro(e){return hro(24)}function Ero(e,t,r){var n=e.headers.cookie,s,i;if(n){var o=kxn.parse(n);s=o[t],s&&(s.substr(0,2)==="s:"?(i=Bxn(s.slice(2),r),i===!1&&(mf("cookie signature invalid"),i=void 0)):mf("cookie unsigned"))}return!i&&e.signedCookies&&(i=e.signedCookies[t],i&&wpe("cookie should be available in req.headers.cookie")),!i&&e.cookies&&(s=e.cookies[t],s&&(s.substr(0,2)==="s:"?(i=Bxn(s.slice(2),r),i&&wpe("cookie should be available in req.headers.cookie"),i===!1&&(mf("cookie signature invalid"),i=void 0)):mf("cookie unsigned"))),i}function vpe(e){var t=JSON.stringify(e,function(r,n){if(!(this===e&&r==="cookie"))return n});return lro.createHash("sha1").update(t,"utf8").digest("hex")}function Rxn(e,t){if(e.connection&&e.connection.encrypted)return!0;if(t===!1)return!1;if(t!==!0)return e.secure===!0;var r=e.headers["x-forwarded-proto"]||"",n=r.indexOf(","),s=n!==-1?r.substr(0,n).toLowerCase().trim():r.toLowerCase().trim();return s==="https"}function xro(e,t,r,n,s){var i="s:"+Lxn.sign(r,n),o=kxn.serialize(t,i,s);mf("set-cookie %s",o);var a=e.getHeader("Set-Cookie")||[],u=Array.isArray(a)?a.concat(o):[a,o];e.setHeader("Set-Cookie",u)}function Bxn(e,t){for(var r=0;rqxn,SESSION_COOKIE_EXPIRY:()=>ETt,SQLiteSessionStore:()=>BBe,default:()=>vro,sessionStore:()=>Hxn});var kBe,qxn,ETt,BBe,Hxn,bro,vro,bTt=q(()=>{"use strict";Un();kBe=Xe(Oxn());Dut();qm();Vt();qxn=60*60*1e3,ETt=24*60*60*1e3,BBe=class extends kBe.Store{get(t,r){try{let n=de.getValue("SELECT data FROM sessions WHERE id = ?",t),s=null;return n&&(s=JSON.parse(n)),r(null,s)}catch(n){return D.error(n),r(n)}}set(t,r,n){try{let s=r.cookie?.expires?new Date(r.cookie.expires).getTime():Date.now()+ETt,i=JSON.stringify(r);de.upsert("sessions","id",{id:t,expires:s,data:i}),n?.()}catch(s){return D.error(s),n?.(s)}}destroy(t,r){try{de.execute("DELETE FROM sessions WHERE id = ?",t),r?.()}catch(n){D.error(n),r?.(n)}}touch(t,r,n){if(r.cookie?.expires){n?.();return}try{let s=Date.now()+ETt;de.execute("UPDATE sessions SET expires = ? WHERE id = ?",[s,t]),n?.()}catch(s){D.error(s),n?.(s)}}getSessionExpiry(t){try{let r=de.getValue("SELECT expires FROM sessions WHERE id = ?",t);return r!==void 0?new Date(r):null}catch(r){return D.error(r),null}}},Hxn=new BBe,bro=(0,kBe.default)({secret:gIe,resave:!1,saveUninitialized:!1,rolling:!0,cookie:{path:"/",httpOnly:!0,maxAge:wn.Session.cookieMaxAge*1e3},name:"trilium.sid",store:Hxn});setInterval(()=>{let e=Date.now(),t=de.execute("DELETE FROM sessions WHERE expires < ?",e);console.log("Cleaning up expired sessions: ",t.changes)},qxn);vro=bro});var Tro={};function wro(e){try{return e.getLabelValues("runAtHour").map(t=>parseInt(t))}catch(t){return D.error(`Could not parse runAtHour for note ${e.noteId}: ${t.message}`),[]}}function vTt(e){let t=wn.General.instanceName,r=new Date().getHours(),n=Bn.getNotesWithLabel("run",e);for(let s of n){let i=s.getLabelValues("runOnInstance"),o=wro(s);(i.length===0||i.includes(t))&&(o.length===0||o.includes(r))&&jE.executeNoteNoException(s,{originEntity:s})}}var Uxn=q(()=>{"use strict";rz();Za();j0();qm();Vt();O0();id();_oe();os.dbReady.then(()=>{vr.init(()=>{LN.checkHiddenSubtree();triliumApplyKoreanNotes();triliumApplyKoreanPhase4();triliumApplyKoreanPdf()}),process.env.TRILIUM_SAFE_MODE||(setTimeout(vr.wrap(()=>vTt("backendStartup")),10*1e3),setInterval(vr.wrap(()=>vTt("hourly")),3600*1e3),setInterval(vr.wrap(()=>vTt("daily")),24*3600*1e3),setInterval(vr.wrap(()=>LN.checkHiddenSubtree()),7*3600*1e3)),setInterval(()=>mn.checkProtectedSessionExpiration(),3e4)})});async function wTt(){let e=(0,YD.default)();if(os.initializeDb(),Nr.subscribe(Nr.DB_INITIALIZED,async()=>{try{D.info("Database initialized, LLM features available"),D.info("LLM features ready")}catch(i){console.error("Error initializing LLM features:",i)}}),os.isDbInitialized())try{D.info("LLM features ready")}catch(i){console.error("Error initializing LLM features:",i)}else console.log("Database not initialized yet. LLM features will be initialized after setup.");let t=nd?KD.default.join(Sx(),"../dist/public"):KD.default.join(Sx(),"public"),r=KD.default.join(t,"assets"),n=wp;e.set("views",KD.default.join(n,"views")),e.engine("ejs",(await Promise.resolve().then(()=>Xe(uEt()))).renderFile),e.set("view engine","ejs"),e.use((i,o,a)=>(wn.Network.corsAllowOrigin&&o.header("Access-Control-Allow-Origin",wn.Network.corsAllowOrigin),wn.Network.corsAllowMethods&&o.header("Access-Control-Allow-Methods",wn.Network.corsAllowMethods),wn.Network.corsAllowHeaders&&o.header("Access-Control-Allow-Headers",wn.Network.corsAllowHeaders),o.locals.t=Ye,a())),Xr.isElectron||e.use((0,$xn.default)()),e.use(E3r({hidePoweredBy:!1,contentSecurityPolicy:!1,crossOriginEmbedderPolicy:!1})),e.use(YD.default.text({limit:"500mb"})),e.use(YD.default.json({limit:"500mb"})),e.use(YD.default.raw({limit:"500mb"})),e.use(YD.default.urlencoded({extended:!1})),e.use((0,Gxn.default)()),e.use(YD.default.static(KD.default.join(t,"root"))),e.use("/manifest.webmanifest",YD.default.static(KD.default.join(r,"manifest.webmanifest"))),e.use("/robots.txt",YD.default.static(KD.default.join(r,"robots.txt"))),e.use("/icon.png",YD.default.static(KD.default.join(r,"icon.png")));let s=(await Promise.resolve().then(()=>(bTt(),xTt))).default;return e.use(s),e.use((0,Qxn.default)(KD.default.join(n,"icon.ico"))),Zg.isOpenIDEnabled()&&e.use((0,Wxn.auth)(Zg.generateOAuthConfig())),await V6r.register(e),Pln.register(e),qln.register(e),Gln.register(e),await Promise.resolve().then(()=>(dle(),$Dr)),await Promise.resolve().then(()=>(TO(),LIt)),await Promise.resolve().then(()=>(fle(),ODr)),await Promise.resolve().then(()=>(Uxn(),Tro)),qEr(),Xr.isElectron&&(await import("@electron/remote/main/index.js")).initialize(),e}var YD,KD,Qxn,Gxn,$xn,Wxn,Vxn=q(()=>{"use strict";YD=Xe(Nj()),KD=Xe(require("path")),Qxn=Xe(a3r()),Gxn=Xe(p3r());x3r();$xn=Xe(i4r());qm();zr();z6r();Oln();Hln();$ln();V4();j0();Wxn=Xe(pxn());ole();x0();Ix();Vt();aTe();d5();A3()});var Kxn={};fo(Kxn,{default:()=>Sro});function _ro(e){zxn.default.ipcMain.on("server-request",(t,r)=>{let n=new TTt(r),s=new _Tt(t,r);return e.router(n,s,()=>{})})}var zxn,Yxn,STt,_$,TTt,_Tt,Sro,Xxn=q(()=>{"use strict";zxn=Xe(require("electron")),Yxn=Xe(pCe()),STt=Xe(require("events"));_$={id:"session-id",cookie:{originalMaxAge:36e5},loggedIn:!0,regenerate(e){return e?.(null),_$},destroy(e){return e?.(null),_$},reload(e){return e?.(null),_$},save(e){return e?.(null),_$},resetMaxAge:()=>_$,touch:()=>_$},TTt=class extends STt.default{constructor(t){super(),this.url=t.url,this.method=t.method,this.body=t.data,this.headers=t.headers,this.session=_$,this.query=(0,Yxn.parse)(t.url.split("?")[1]||"",{ignoreQueryPrefix:!0})}},_Tt=class extends STt.default{constructor(r,n){super();this.respHeaders={};this.statusCode=200;this.headers={};this.locals={};this.event=r,this.arg=n}getHeader(r){return this.respHeaders[r]}setHeader(r,n){return this.respHeaders[r]=n.toString(),this}header(r,n){return this.respHeaders[r]=n??"",this}status(r){return this.statusCode=r,this}send(r){return this.event.sender.send("server-response",{url:this.arg.url,method:this.arg.method,requestId:this.arg.requestId,statusCode:this.statusCode,headers:this.respHeaders,body:r}),this}json(r){return this.send(JSON.stringify(r)),this}},Sro=_ro});var tbn={};fo(tbn,{default:()=>ebn});async function ebn(){process.on("unhandledRejection",i=>{console.log(i),D.info(i)});function e(){console.log("Caught interrupt/termination signal. Exiting."),process.exit(0)}process.on("SIGINT",e),process.on("SIGTERM",e),Xr.compareVersions(process.versions.node,CTt)<0&&(console.error(),console.error(`The Trilium server requires Node.js ${CTt} and later in order to start. +memory, and will not scale past a single process.`,RBe=typeof setImmediate=="function"?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function Aro(e){var t=e||{},r=t.cookie||{},n=t.genid||yro,s=t.name||t.key||"connect.sid",i=t.store||new yTt,o=t.proxy,a=t.resave,u=!!t.rolling,c=t.saveUninitialized,l=t.secret;if(typeof n!="function")throw new TypeError("genid option must be a function");if(a===void 0&&(wpe("undefined resave option; provide resave option"),a=!0),c===void 0&&(wpe("undefined saveUninitialized option; provide saveUninitialized option"),c=!0),t.unset&&t.unset!=="destroy"&&t.unset!=="keep")throw new TypeError('unset option must be "destroy" or "keep"');var f=t.unset==="destroy";if(Array.isArray(l)&&l.length===0)throw new TypeError("secret option array must contain one or more strings");l&&!Array.isArray(l)&&(l=[l]),l||wpe("req.secret; provide secret option"),mro==="production"&&i instanceof yTt&&console.warn(gro),i.generate=function(p){p.sessionID=n(p),p.session=new Fxn(p),p.session.cookie=new Mxn(r),r.secure==="auto"&&(p.session.cookie.secure=Rxn(p,o))};var d=typeof i.touch=="function",h=!0;return i.on("disconnect",function(){h=!1}),i.on("connect",function(){h=!0}),function(m,g,y){if(m.session){y();return}if(!h){mf("store is disconnected"),y();return}var E=dro.original(m).pathname||"/";if(E.indexOf(r.path||"/")!==0){mf("pathname mismatch"),y();return}if(!l&&!m.secret){y(new Error("secret option required for sessions"));return}var x=l||[m.secret],v,b,T,w=!1;m.sessionStore=i;var S=m.sessionID=Ero(m,s,x);fro(g,function(){if(!m.session){mf("no session");return}if(me(m)){if(m.session.cookie.secure&&!Rxn(m,o)){mf("not secured");return}w||(m.session.touch(),w=!0);try{xro(g,s,m.sessionID,x[0],m.session.cookie.data)}catch(xe){RBe(y,xe)}}});var I=g.end,R=g.write,C=!1;g.end=function(ue,V){if(C)return!1;C=!0;var ie,G=!0;function H(){if(G){ie=I.call(g,ue,V),G=!1;return}I.call(g)}function ce(){if(!G)return ie;if(g._header||g._implicitHeader(),ue==null)return ie=!0,ie;var ne=Number(g.getHeader("Content-Length"));return!isNaN(ne)&&ne>0&&(ue=Nxn.isBuffer(ue)?ue:Nxn.from(ue,V),V=void 0,ue.length!==0)?(mf("split response"),ie=R.call(g,ue.slice(0,ue.length-1)),ue=ue.slice(ue.length-1,ue.length),ie):(ie=R.call(g,ue,V),G=!1,ie)}return O(m)?(mf("destroying"),i.destroy(m.sessionID,function(_e){_e&&RBe(y,_e),mf("destroyed"),H()}),ce()):m.session?(w||(m.session.touch(),w=!0),Y(m)?(m.session.save(function(_e){_e&&RBe(y,_e),H()}),ce()):d&&re(m)?(mf("touching"),i.touch(m.sessionID,m.session,function(_e){_e&&RBe(y,_e),mf("touched"),H()}),ce()):I.call(g,ue,V)):(mf("no session"),I.call(g,ue,V))};function N(){i.generate(m),b=m.sessionID,v=vpe(m.session),L(m.session)}function k(xe,ue){i.createSession(xe,ue),b=xe.sessionID,v=vpe(ue),a||(T=v),L(xe.session)}function B(xe,ue){return function(){m.session!==xe&&L(m.session),ue.apply(this,arguments)}}function L(xe){var ue=xe.reload,V=xe.save;function ie(H){mf("reloading %s",this.id),ue.call(this,B(this,H))}function G(){mf("saving %s",this.id),T=vpe(this),V.apply(this,arguments)}Object.defineProperty(xe,"reload",{configurable:!0,enumerable:!1,value:ie,writable:!0}),Object.defineProperty(xe,"save",{configurable:!0,enumerable:!1,value:G,writable:!0})}function F(xe){return b!==xe.id||v!==vpe(xe)}function P(xe){return b===xe.id&&T===vpe(xe)}function O(xe){return xe.sessionID&&f&&xe.session==null}function Y(xe){return typeof xe.sessionID!="string"?(mf("session ignored because of bogus req.sessionID %o",xe.sessionID),!1):!c&&!T&&S!==xe.sessionID?F(xe.session):!P(xe.session)}function re(xe){return typeof xe.sessionID!="string"?(mf("session ignored because of bogus req.sessionID %o",xe.sessionID),!1):S===xe.sessionID&&!Y(xe)}function me(xe){return typeof xe.sessionID!="string"?!1:S!==xe.sessionID?c||F(xe.session):u||xe.session.cookie.expires!=null&&F(xe.session)}if(!m.sessionID){mf("no SID sent, generating session"),N(),y();return}mf("fetching %s",m.sessionID),i.get(m.sessionID,function(xe,ue){if(xe&&xe.code!=="ENOENT"){mf("error %j",xe),y(xe);return}try{xe||!ue?(mf("no session found"),N()):(mf("session found"),k(m,ue))}catch(V){y(V);return}y()})}}function yro(e){return hro(24)}function Ero(e,t,r){var n=e.headers.cookie,s,i;if(n){var o=kxn.parse(n);s=o[t],s&&(s.substr(0,2)==="s:"?(i=Bxn(s.slice(2),r),i===!1&&(mf("cookie signature invalid"),i=void 0)):mf("cookie unsigned"))}return!i&&e.signedCookies&&(i=e.signedCookies[t],i&&wpe("cookie should be available in req.headers.cookie")),!i&&e.cookies&&(s=e.cookies[t],s&&(s.substr(0,2)==="s:"?(i=Bxn(s.slice(2),r),i&&wpe("cookie should be available in req.headers.cookie"),i===!1&&(mf("cookie signature invalid"),i=void 0)):mf("cookie unsigned"))),i}function vpe(e){var t=JSON.stringify(e,function(r,n){if(!(this===e&&r==="cookie"))return n});return lro.createHash("sha1").update(t,"utf8").digest("hex")}function Rxn(e,t){if(e.connection&&e.connection.encrypted)return!0;if(t===!1)return!1;if(t!==!0)return e.secure===!0;var r=e.headers["x-forwarded-proto"]||"",n=r.indexOf(","),s=n!==-1?r.substr(0,n).toLowerCase().trim():r.toLowerCase().trim();return s==="https"}function xro(e,t,r,n,s){var i="s:"+Lxn.sign(r,n),o=kxn.serialize(t,i,s);mf("set-cookie %s",o);var a=e.getHeader("Set-Cookie")||[],u=Array.isArray(a)?a.concat(o):[a,o];e.setHeader("Set-Cookie",u)}function Bxn(e,t){for(var r=0;rqxn,SESSION_COOKIE_EXPIRY:()=>ETt,SQLiteSessionStore:()=>BBe,default:()=>vro,sessionStore:()=>Hxn});var kBe,qxn,ETt,BBe,Hxn,bro,vro,bTt=q(()=>{"use strict";Un();kBe=Xe(Oxn());Dut();qm();Vt();qxn=60*60*1e3,ETt=24*60*60*1e3,BBe=class extends kBe.Store{get(t,r){try{let n=de.getValue("SELECT data FROM sessions WHERE id = ?",t),s=null;return n&&(s=JSON.parse(n)),r(null,s)}catch(n){return D.error(n),r(n)}}set(t,r,n){try{let s=r.cookie?.expires?new Date(r.cookie.expires).getTime():Date.now()+ETt,i=JSON.stringify(r);de.upsert("sessions","id",{id:t,expires:s,data:i}),n?.()}catch(s){return D.error(s),n?.(s)}}destroy(t,r){try{de.execute("DELETE FROM sessions WHERE id = ?",t),r?.()}catch(n){D.error(n),r?.(n)}}touch(t,r,n){if(r.cookie?.expires){n?.();return}try{let s=Date.now()+ETt;de.execute("UPDATE sessions SET expires = ? WHERE id = ?",[s,t]),n?.()}catch(s){D.error(s),n?.(s)}}getSessionExpiry(t){try{let r=de.getValue("SELECT expires FROM sessions WHERE id = ?",t);return r!==void 0?new Date(r):null}catch(r){return D.error(r),null}}},Hxn=new BBe,bro=(0,kBe.default)({secret:gIe,resave:!1,saveUninitialized:!1,rolling:!0,cookie:{path:"/",httpOnly:!0,maxAge:wn.Session.cookieMaxAge*1e3},name:"trilium.sid",store:Hxn});setInterval(()=>{let e=Date.now(),t=de.execute("DELETE FROM sessions WHERE expires < ?",e);console.log("Cleaning up expired sessions: ",t.changes)},qxn);vro=bro});var Tro={};function wro(e){try{return e.getLabelValues("runAtHour").map(t=>parseInt(t))}catch(t){return D.error(`Could not parse runAtHour for note ${e.noteId}: ${t.message}`),[]}}function vTt(e){let t=wn.General.instanceName,r=new Date().getHours(),n=Bn.getNotesWithLabel("run",e);for(let s of n){let i=s.getLabelValues("runOnInstance"),o=wro(s);(i.length===0||i.includes(t))&&(o.length===0||o.includes(r))&&jE.executeNoteNoException(s,{originEntity:s})}}var Uxn=q(()=>{"use strict";rz();Za();j0();qm();Vt();O0();id();_oe();os.dbReady.then(()=>{vr.init(()=>{LN.checkHiddenSubtree();triliumApplyKoreanNotes();triliumApplyKoreanPhase4();triliumApplyKoreanPdf();triliumApplyKoreanApiLinks()}),process.env.TRILIUM_SAFE_MODE||(setTimeout(vr.wrap(()=>vTt("backendStartup")),10*1e3),setInterval(vr.wrap(()=>vTt("hourly")),3600*1e3),setInterval(vr.wrap(()=>vTt("daily")),24*3600*1e3),setInterval(vr.wrap(()=>LN.checkHiddenSubtree()),7*3600*1e3)),setInterval(()=>mn.checkProtectedSessionExpiration(),3e4)})});async function wTt(){let e=(0,YD.default)();if(os.initializeDb(),Nr.subscribe(Nr.DB_INITIALIZED,async()=>{try{D.info("Database initialized, LLM features available"),D.info("LLM features ready")}catch(i){console.error("Error initializing LLM features:",i)}}),os.isDbInitialized())try{D.info("LLM features ready")}catch(i){console.error("Error initializing LLM features:",i)}else console.log("Database not initialized yet. LLM features will be initialized after setup.");let t=nd?KD.default.join(Sx(),"../dist/public"):KD.default.join(Sx(),"public"),r=KD.default.join(t,"assets"),n=wp;e.set("views",KD.default.join(n,"views")),e.engine("ejs",(await Promise.resolve().then(()=>Xe(uEt()))).renderFile),e.set("view engine","ejs"),e.use((i,o,a)=>(wn.Network.corsAllowOrigin&&o.header("Access-Control-Allow-Origin",wn.Network.corsAllowOrigin),wn.Network.corsAllowMethods&&o.header("Access-Control-Allow-Methods",wn.Network.corsAllowMethods),wn.Network.corsAllowHeaders&&o.header("Access-Control-Allow-Headers",wn.Network.corsAllowHeaders),o.locals.t=Ye,a())),Xr.isElectron||e.use((0,$xn.default)()),e.use(E3r({hidePoweredBy:!1,contentSecurityPolicy:!1,crossOriginEmbedderPolicy:!1})),e.use(YD.default.text({limit:"500mb"})),e.use(YD.default.json({limit:"500mb"})),e.use(YD.default.raw({limit:"500mb"})),e.use(YD.default.urlencoded({extended:!1})),e.use((0,Gxn.default)()),e.use(YD.default.static(KD.default.join(t,"root"))),e.use("/manifest.webmanifest",YD.default.static(KD.default.join(r,"manifest.webmanifest"))),e.use("/robots.txt",YD.default.static(KD.default.join(r,"robots.txt"))),e.use("/icon.png",YD.default.static(KD.default.join(r,"icon.png")));let s=(await Promise.resolve().then(()=>(bTt(),xTt))).default;return e.use(s),e.use((0,Qxn.default)(KD.default.join(n,"icon.ico"))),Zg.isOpenIDEnabled()&&e.use((0,Wxn.auth)(Zg.generateOAuthConfig())),await V6r.register(e),Pln.register(e),qln.register(e),Gln.register(e),await Promise.resolve().then(()=>(dle(),$Dr)),await Promise.resolve().then(()=>(TO(),LIt)),await Promise.resolve().then(()=>(fle(),ODr)),await Promise.resolve().then(()=>(Uxn(),Tro)),qEr(),Xr.isElectron&&(await import("@electron/remote/main/index.js")).initialize(),e}var YD,KD,Qxn,Gxn,$xn,Wxn,Vxn=q(()=>{"use strict";YD=Xe(Nj()),KD=Xe(require("path")),Qxn=Xe(a3r()),Gxn=Xe(p3r());x3r();$xn=Xe(i4r());qm();zr();z6r();Oln();Hln();$ln();V4();j0();Wxn=Xe(pxn());ole();x0();Ix();Vt();aTe();d5();A3()});var Kxn={};fo(Kxn,{default:()=>Sro});function _ro(e){zxn.default.ipcMain.on("server-request",(t,r)=>{let n=new TTt(r),s=new _Tt(t,r);return e.router(n,s,()=>{})})}var zxn,Yxn,STt,_$,TTt,_Tt,Sro,Xxn=q(()=>{"use strict";zxn=Xe(require("electron")),Yxn=Xe(pCe()),STt=Xe(require("events"));_$={id:"session-id",cookie:{originalMaxAge:36e5},loggedIn:!0,regenerate(e){return e?.(null),_$},destroy(e){return e?.(null),_$},reload(e){return e?.(null),_$},save(e){return e?.(null),_$},resetMaxAge:()=>_$,touch:()=>_$},TTt=class extends STt.default{constructor(t){super(),this.url=t.url,this.method=t.method,this.body=t.data,this.headers=t.headers,this.session=_$,this.query=(0,Yxn.parse)(t.url.split("?")[1]||"",{ignoreQueryPrefix:!0})}},_Tt=class extends STt.default{constructor(r,n){super();this.respHeaders={};this.statusCode=200;this.headers={};this.locals={};this.event=r,this.arg=n}getHeader(r){return this.respHeaders[r]}setHeader(r,n){return this.respHeaders[r]=n.toString(),this}header(r,n){return this.respHeaders[r]=n??"",this}status(r){return this.statusCode=r,this}send(r){return this.event.sender.send("server-response",{url:this.arg.url,method:this.arg.method,requestId:this.arg.requestId,statusCode:this.statusCode,headers:this.respHeaders,body:r}),this}json(r){return this.send(JSON.stringify(r)),this}},Sro=_ro});var tbn={};fo(tbn,{default:()=>ebn});async function ebn(){process.on("unhandledRejection",i=>{console.log(i),D.info(i)});function e(){console.log("Caught interrupt/termination signal. Exiting."),process.exit(0)}process.on("SIGINT",e),process.on("SIGTERM",e),Xr.compareVersions(process.versions.node,CTt)<0&&(console.error(),console.error(`The Trilium server requires Node.js ${CTt} and later in order to start. `),console.error(` Current version: ${process.versions.node}`),console.error(` Expected version: ${CTt}`),console.error(),process.exit(1)),Zxn.default.setGracefulCleanup();let t=await wTt();Xr.isElectron&&(await import("electron")).app.requestSingleInstanceLock(),D.info(JSON.stringify(Fs,null,2));let r=(await import("os")).cpus();if(r&&r[0]!==void 0){let i=(r[0].model||"").trimEnd();D.info(`CPU model: ${i}, logical cores: ${r.length}, freq: ${r[0].speed} Mhz`)}let n=Cro(t),s=(await Promise.resolve().then(()=>(bTt(),xTt))).default;Zs.init(n,s),Xr.isElectron&&(await Promise.resolve().then(()=>(Xxn(),Kxn))).default(t)}function Cro(e){e.set("port",KA),e.set("host",yj),wn.Network.trustedReverseProxy&&(wn.Network.trustedReverseProxy===!0||wn.Network.trustedReverseProxy.trim().length)&&e.set("trust proxy",wn.Network.trustedReverseProxy),D.info(`Trusted reverse proxy: ${e.get("trust proxy")}`);let t;if(wn.Network.https){if(!wn.Network.keyPath||!wn.Network.keyPath.trim().length)throw new Error("keyPath in config.ini is required when https=true, but it's empty");if(!wn.Network.certPath||!wn.Network.certPath.trim().length)throw new Error("certPath in config.ini is required when https=true, but it's empty");let n={key:ITt.default.readFileSync(wn.Network.keyPath),cert:ITt.default.readFileSync(wn.Network.certPath)};t=Jxn.default.createServer(n,e),D.info(`App HTTPS server starting up at port ${KA}`)}else t=jxn.default.createServer(e),D.info(`App HTTP server starting up at port ${KA}`);t.keepAliveTimeout=12e4*5;let r=KA!==0;return r?t.listen(KA,yj):t.listen(yj),t.on("error",n=>{let s=n.stack||"An unexpected error has occurred.";if("code"in n)switch(n.code){case"EACCES":s=`Port ${KA} requires elevated privileges. It's recommended to use port above 1024.`;break;case"EADDRINUSE":s=`Port ${KA} is already in use. Most likely, another Trilium process is already running. You might try to find it, kill it, and try again.`;break;case"EADDRNOTAVAIL":s=`Unable to start the server on host '${yj}'. Make sure the host (defined in 'config.ini' or via the 'TRILIUM_HOST' environment variable) is an IP address that can be listened on.`;break}Xr.isElectron?import("electron").then(({app:i,dialog:o})=>{"code"in n&&n.code=="EADDRINUSE"&&(process.argv.includes("--new-window")||!i.requestSingleInstanceLock())&&(console.error(s),process.exit(1)),o.showErrorBox("Error while initializing the server",s),process.exit(1)}):(console.error(s),process.exit(1))}),t.on("listening",()=>{r?D.info(`Listening on port ${KA}`):D.info(`Listening on unix socket ${yj}`)}),t}var ITt,jxn,Jxn,Zxn,CTt,rbn=q(()=>{"use strict";ITt=Xe(require("fs")),jxn=Xe(require("http")),Jxn=Xe(require("https")),Zxn=Xe(aot());qm();Vt();Nx();_0();zr();U0e();HTr();Vxn();CTt="20.0.0"});hye();async function Iro(){await vTr();let e=(await Promise.resolve().then(()=>(rbn(),tbn))).default;await e()}Iro(); /*! Bundled license information: diff --git a/updates/2026-09-05/phase9/api-audit.json b/updates/2026-09-05/phase9/api-audit.json new file mode 100644 index 0000000..92ae31b --- /dev/null +++ b/updates/2026-09-05/phase9/api-audit.json @@ -0,0 +1,12 @@ +{ + "internal": { + "fields": 198, + "unique": 166, + "paths": 37 + }, + "etapi": { + "fields": 154, + "unique": 118, + "paths": 24 + } +} \ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/User Guide/!!!meta.json b/updates/2026-09-05/phase9/doc_notes/en/User Guide/!!!meta.json new file mode 100644 index 0000000..21ec97a --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/User Guide/!!!meta.json @@ -0,0 +1,3087 @@ +[ + { + "id": "_help_Otzi9La2YAUX", + "title": "설치와 설정", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-cog", + "type": "label" + } + ], + "children": [ + { + "id": "_help_poXkQfguuA0U", + "title": "데스크톱 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Desktop Installation" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_WOcw2SLH6tbX", + "title": "서버 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_Dgg7bR3b6K9j", + "title": "1. 서버 설치", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-folder", + "type": "label" + } + ], + "children": [ + { + "id": "_help_3tW6mORuTHnB", + "title": "Linux 패키지 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Packaged version for Linux" + }, + { + "name": "iconClass", + "value": "bx bxl-tux", + "type": "label" + } + ] + }, + { + "id": "_help_rWX5eY045zbE", + "title": "Docker로 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker" + }, + { + "name": "iconClass", + "value": "bx bxl-docker", + "type": "label" + } + ] + }, + { + "id": "_help_moVgBcoxE3EK", + "title": "NixOS에 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/On NixOS" + }, + { + "name": "iconClass", + "value": "bx bxl-tux", + "type": "label" + } + ] + }, + { + "id": "_help_J1Bb6lVlwU5T", + "title": "직접 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Manually" + }, + { + "name": "iconClass", + "value": "bx bx-code-alt", + "type": "label" + } + ] + }, + { + "id": "_help_DCmT6e7clMoP", + "title": "Kubernetes로 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Kubernetes" + }, + { + "name": "iconClass", + "value": "bx bxl-kubernetes", + "type": "label" + } + ] + }, + { + "id": "_help_klCWNks3ReaQ", + "title": "여러 서버 인스턴스", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Multiple server instances" + }, + { + "name": "iconClass", + "value": "bx bxs-user-account", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_vcjrb3VVYPZI", + "title": "2. 리버스 프록시", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-folder", + "type": "label" + } + ], + "children": [ + { + "id": "_help_ud6MShXL4WpO", + "title": "Nginx 설정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Nginx" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_fDLvzOx29Pfg", + "title": "Apache 설정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Apache" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_l2VkvOwUNfZj", + "title": "TLS 설정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/TLS Configuration" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_0hzsNCP31IAB", + "title": "인증", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/Authentication" + }, + { + "name": "iconClass", + "value": "bx bx-lock-alt", + "type": "label" + } + ] + }, + { + "id": "_help_7DAiwaf8Z7Rz", + "title": "다중 인증", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication" + }, + { + "name": "iconClass", + "value": "bx bx-stopwatch", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_cbkrhQjrkKrh", + "title": "동기화", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Synchronization" + }, + { + "name": "iconClass", + "value": "bx bx-sync", + "type": "label" + } + ] + }, + { + "id": "_help_RDslemsQ6gCp", + "title": "모바일 화면", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Mobile Frontend" + }, + { + "name": "iconClass", + "value": "bx bx-mobile-alt", + "type": "label" + } + ] + }, + { + "id": "_help_MtPxeAWVAzMg", + "title": "웹 클리퍼", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Web Clipper" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_n1lujUxCwipy", + "title": "TriliumNext 업데이트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Upgrading TriliumNext" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_ODY7qQn5m2FT", + "title": "백업", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Backup" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_tAassRL4RSQL", + "title": "데이터 폴더", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Installation & Setup/Data directory" + }, + { + "name": "iconClass", + "value": "bx bx-folder-open", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_gh7bpGYxajRS", + "title": "기본 개념과 기능", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-help-circle", + "type": "label" + } + ], + "children": [ + { + "id": "_help_Vc8PjrjAGuOp", + "title": "화면 구성 요소", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-window-alt", + "type": "label" + } + ], + "children": [ + { + "id": "_help_x0JgW8UqGXvq", + "title": "세로 배치와 가로 배치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Vertical and horizontal layout" + }, + { + "name": "iconClass", + "value": "bx bxs-layout", + "type": "label" + } + ] + }, + { + "id": "_help_x3i7MxGccDuM", + "title": "전체 메뉴", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Global menu" + }, + { + "name": "iconClass", + "value": "bx bx-menu", + "type": "label" + } + ] + }, + { + "id": "_help_oPVyFC7WL2Lp", + "title": "노트 트리", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree" + }, + { + "name": "iconClass", + "value": "bx bxs-tree-alt", + "type": "label" + } + ], + "children": [ + { + "id": "_help_YtSN43OrfzaA", + "title": "노트 트리 메뉴", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree/Note tree contextual menu" + }, + { + "name": "iconClass", + "value": "bx bx-menu", + "type": "label" + } + ] + }, + { + "id": "_help_yTjUdsOi4CIE", + "title": "여러 노트 선택", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree/Multiple selection" + }, + { + "name": "iconClass", + "value": "bx bx-list-plus", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_BlN9DFI679QC", + "title": "상단 리본", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon" + }, + { + "name": "iconClass", + "value": "bx bx-dots-horizontal", + "type": "label" + } + ] + }, + { + "id": "_help_3seOhtN8uLIY", + "title": "탭", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Tabs" + }, + { + "name": "iconClass", + "value": "bx bx-dock-top", + "type": "label" + } + ] + }, + { + "id": "_help_xYmIYSP6wE3F", + "title": "실행 도구 모음", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar" + }, + { + "name": "iconClass", + "value": "bx bx-sidebar", + "type": "label" + } + ] + }, + { + "id": "_help_8YBEPzcpUgxw", + "title": "노트 버튼", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Note buttons" + }, + { + "name": "iconClass", + "value": "bx bx-dots-vertical-rounded", + "type": "label" + } + ] + }, + { + "id": "_help_4TIF1oA4VQRO", + "title": "설정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Options" + }, + { + "name": "iconClass", + "value": "bx bx-cog", + "type": "label" + } + ] + }, + { + "id": "_help_luNhaphA37EO", + "title": "분할 보기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Split View" + }, + { + "name": "iconClass", + "value": "bx bx-dock-right", + "type": "label" + } + ] + }, + { + "id": "_help_XpOYSgsLkTJy", + "title": "떠 있는 버튼", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Floating buttons" + }, + { + "name": "iconClass", + "value": "bx bx-rectangle", + "type": "label" + } + ] + }, + { + "id": "_help_RnaPdbciOfeq", + "title": "오른쪽 사이드바", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar" + }, + { + "name": "iconClass", + "value": "bx bxs-dock-right", + "type": "label" + } + ] + }, + { + "id": "_help_r5JGHN99bVKn", + "title": "최근 변경 사항", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Recent Changes" + }, + { + "name": "iconClass", + "value": "bx bx-history", + "type": "label" + } + ] + }, + { + "id": "_help_ny318J39E5Z0", + "title": "화면 확대와 축소", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/UI Elements/Zoom" + }, + { + "name": "iconClass", + "value": "bx bx-zoom-in", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_BFs8mudNFgCS", + "title": "노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes" + }, + { + "name": "iconClass", + "value": "bx bx-notepad", + "type": "label" + } + ], + "children": [ + { + "id": "_help_p9kXRFAkwN4o", + "title": "노트 아이콘", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Note Icons" + }, + { + "name": "iconClass", + "value": "bx bxs-grid", + "type": "label" + } + ] + }, + { + "id": "_help_0vhv7lsOLy82", + "title": "첨부 파일", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Attachments" + }, + { + "name": "iconClass", + "value": "bx bx-paperclip", + "type": "label" + } + ] + }, + { + "id": "_help_IakOLONlIfGI", + "title": "노트 복제", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Cloning Notes" + }, + { + "name": "iconClass", + "value": "bx bx-duplicate", + "type": "label" + } + ], + "children": [ + { + "id": "_help_TBwsyfadTA18", + "title": "가지 접두사", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Cloning Notes/Branch prefix" + }, + { + "name": "iconClass", + "value": "bx bx-rename", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_bwg0e8ewQMak", + "title": "보호된 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Protected Notes" + }, + { + "name": "iconClass", + "value": "bx bx-lock-alt", + "type": "label" + } + ] + }, + { + "id": "_help_MKmLg5x6xkor", + "title": "보관된 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Archived Notes" + }, + { + "name": "iconClass", + "value": "bx bx-box", + "type": "label" + } + ] + }, + { + "id": "_help_vZWERwf8U3nx", + "title": "노트 수정 이력", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Note Revisions" + }, + { + "name": "iconClass", + "value": "bx bx-history", + "type": "label" + } + ] + }, + { + "id": "_help_aGlEvb9hyDhS", + "title": "노트 정렬", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes" + }, + { + "name": "iconClass", + "value": "bx bx-sort-up", + "type": "label" + } + ] + }, + { + "id": "_help_NRnIZmSMc5sj", + "title": "PDF로 내보내기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Export as PDF" + }, + { + "name": "iconClass", + "value": "bx bxs-file-pdf", + "type": "label" + } + ] + }, + { + "id": "_help_CoFPLs3dRlXc", + "title": "읽기 전용 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Read-Only Notes" + }, + { + "name": "iconClass", + "value": "bx bx-edit-alt", + "type": "label" + } + ] + }, + { + "id": "_help_0ESUbbAxVnoK", + "title": "노트 목록", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Note List" + }, + { + "name": "iconClass", + "value": "bx bxs-grid", + "type": "label" + } + ], + "children": [ + { + "id": "_help_xWbu3jpNWapp", + "title": "달력 보기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Calendar View" + }, + { + "name": "iconClass", + "value": "bx bx-calendar", + "type": "label" + } + ] + } + ] + } + ] + }, + { + "id": "_help_wArbEsdSae6g", + "title": "노트 탐색", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-navigation", + "type": "label" + } + ], + "children": [ + { + "id": "_help_kBrnXNG3Hplm", + "title": "트리의 개념", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Tree Concepts" + }, + { + "name": "iconClass", + "value": "bx bx-pyramid", + "type": "label" + } + ] + }, + { + "id": "_help_MMiBEQljMQh2", + "title": "노트 이동", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Note Navigation" + }, + { + "name": "iconClass", + "value": "bx bxs-navigation", + "type": "label" + } + ] + }, + { + "id": "_help_Ms1nauBra7gq", + "title": "빠른 검색", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Quick search" + }, + { + "name": "iconClass", + "value": "bx bx-search-alt-2", + "type": "label" + } + ] + }, + { + "id": "_help_F1r9QtzQLZqm", + "title": "노트로 이동", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Jump to Note" + }, + { + "name": "iconClass", + "value": "bx bx-send", + "type": "label" + } + ] + }, + { + "id": "_help_eIg8jdvaoNNd", + "title": "검색", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Search" + }, + { + "name": "iconClass", + "value": "bx bx-search-alt-2", + "type": "label" + } + ] + }, + { + "id": "_help_u3YFHC9tQlpm", + "title": "북마크", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Bookmarks" + }, + { + "name": "iconClass", + "value": "bx bx-bookmarks", + "type": "label" + } + ] + }, + { + "id": "_help_OR8WJ7Iz9K4U", + "title": "노트 확대 보기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting" + }, + { + "name": "iconClass", + "value": "bx bxs-chevrons-up", + "type": "label" + } + ] + }, + { + "id": "_help_9sRHySam5fXb", + "title": "작업 공간", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Workspaces" + }, + { + "name": "iconClass", + "value": "bx bx-door-open", + "type": "label" + } + ] + }, + { + "id": "_help_xWtq5NUHOwql", + "title": "비슷한 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Similar Notes" + }, + { + "name": "iconClass", + "value": "bx bx-bar-chart", + "type": "label" + } + ] + }, + { + "id": "_help_McngOG2jbUWX", + "title": "노트 안에서 찾기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Navigation/Search in note" + }, + { + "name": "iconClass", + "value": "bx bx-search-alt-2", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_A9Oc6YKKc65v", + "title": "키보드 단축키", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Keyboard Shortcuts" + }, + { + "name": "iconClass", + "value": "bx bxs-keyboard", + "type": "label" + } + ] + }, + { + "id": "_help_Wy267RK4M69c", + "title": "테마", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Themes" + }, + { + "name": "iconClass", + "value": "bx bx-palette", + "type": "label" + } + ], + "children": [ + { + "id": "_help_VbjZvtUek0Ln", + "title": "테마 모음", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Themes/Theme Gallery" + }, + { + "name": "iconClass", + "value": "bx bx-book-reader", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_mHbBMPDPkVV5", + "title": "가져오기와 내보내기", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-import", + "type": "label" + } + ], + "children": [ + { + "id": "_help_Oau6X9rCuegd", + "title": "Markdown", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown" + }, + { + "name": "iconClass", + "value": "bx bxl-markdown", + "type": "label" + } + ] + }, + { + "id": "_help_syuSEKf2rUGr", + "title": "Evernote", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Import & Export/Evernote" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_GnhlmrATVqcH", + "title": "OneNote", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Import & Export/OneNote" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_rC3pL2aptaRE", + "title": "집중 모드", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Basic Concepts and Features/Zen mode" + }, + { + "name": "iconClass", + "value": "bx bxs-yin-yang", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_s3YCWHBfmYuM", + "title": "빠른 시작", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Quick Start" + }, + { + "name": "iconClass", + "value": "bx bx-run", + "type": "label" + } + ] + }, + { + "id": "_help_i6dbnitykE5D", + "title": "자주 묻는 질문", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/FAQ" + }, + { + "name": "iconClass", + "value": "bx bx-question-mark", + "type": "label" + } + ] + }, + { + "id": "_help_KSZ04uQ2D1St", + "title": "노트 유형", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types" + }, + { + "name": "iconClass", + "value": "bx bx-edit", + "type": "label" + } + ], + "children": [ + { + "id": "_help_iPIMuisry3hd", + "title": "텍스트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text" + }, + { + "name": "iconClass", + "value": "bx bx-note", + "type": "label" + } + ], + "children": [ + { + "id": "_help_NwBbFdNZ9h7O", + "title": "인용문과 안내 상자", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Block quotes & admonitions" + }, + { + "name": "iconClass", + "value": "bx bx-info-circle", + "type": "label" + } + ] + }, + { + "id": "_help_oSuaNgyyKnhu", + "title": "북마크", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Bookmarks" + }, + { + "name": "iconClass", + "value": "bx bx-bookmark", + "type": "label" + } + ] + }, + { + "id": "_help_veGu4faJErEM", + "title": "본문 언어와 오른쪽에서 왼쪽으로 쓰기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Content language & Right-to-le" + }, + { + "name": "iconClass", + "value": "bx bx-align-right", + "type": "label" + } + ] + }, + { + "id": "_help_2x0ZAX9ePtzV", + "title": "하위 노트로 잘라내기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Cut to subnote" + }, + { + "name": "iconClass", + "value": "bx bx-cut", + "type": "label" + } + ] + }, + { + "id": "_help_UYuUB1ZekNQU", + "title": "개발자용 서식", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Developer-specific formatting" + }, + { + "name": "iconClass", + "value": "bx bx-code-alt", + "type": "label" + } + ], + "children": [ + { + "id": "_help_QxEyIjRBizuC", + "title": "코드 블록", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks" + }, + { + "name": "iconClass", + "value": "bx bx-code", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_AgjCISero73a", + "title": "각주", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Footnotes" + }, + { + "name": "iconClass", + "value": "bx bx-bracket", + "type": "label" + } + ] + }, + { + "id": "_help_nRhnJkTT8cPs", + "title": "서식 도구 모음", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Formatting toolbar" + }, + { + "name": "iconClass", + "value": "bx bx-text", + "type": "label" + } + ] + }, + { + "id": "_help_Gr6xFaF6ioJ5", + "title": "일반 서식", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/General formatting" + }, + { + "name": "iconClass", + "value": "bx bx-bold", + "type": "label" + } + ] + }, + { + "id": "_help_AxshuNRegLAv", + "title": "강조 표시 목록", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Highlights list" + }, + { + "name": "iconClass", + "value": "bx bx-highlight", + "type": "label" + } + ] + }, + { + "id": "_help_mT0HEkOsz6i1", + "title": "이미지", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Images" + }, + { + "name": "iconClass", + "value": "bx bx-image-alt", + "type": "label" + } + ], + "children": [ + { + "id": "_help_0Ofbk1aSuVRu", + "title": "이미지 참조", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Images/Image references" + }, + { + "name": "iconClass", + "value": "bx bxs-file-image", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_nBAXQFj20hS1", + "title": "노트 포함", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Include Note" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_CohkqWQC1iBv", + "title": "삽입 메뉴", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Insert buttons" + }, + { + "name": "iconClass", + "value": "bx bx-plus", + "type": "label" + } + ] + }, + { + "id": "_help_oiVPnW8QfnvS", + "title": "편집 단축키", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Keyboard shortcuts" + }, + { + "name": "iconClass", + "value": "bx bxs-keyboard", + "type": "label" + } + ] + }, + { + "id": "_help_QEAPj01N5f7w", + "title": "링크", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Links" + }, + { + "name": "iconClass", + "value": "bx bx-link-alt", + "type": "label" + } + ] + }, + { + "id": "_help_S6Xx8QIWTV66", + "title": "목록", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Lists" + }, + { + "name": "iconClass", + "value": "bx bx-list-ul", + "type": "label" + } + ] + }, + { + "id": "_help_QrtTYPmdd1qq", + "title": "Markdown식 자동 서식", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Markdown-like formatting" + }, + { + "name": "iconClass", + "value": "bx bxl-markdown", + "type": "label" + } + ] + }, + { + "id": "_help_YfYAtQBcfo5V", + "title": "수식", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Math Equations" + }, + { + "name": "iconClass", + "value": "bx bx-math", + "type": "label" + } + ] + }, + { + "id": "_help_dEHYtoWWi8ct", + "title": "기타 기능", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Other features" + }, + { + "name": "iconClass", + "value": "bx bxs-grid", + "type": "label" + } + ] + }, + { + "id": "_help_BFvAtE74rbP6", + "title": "목차", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Table of contents" + }, + { + "name": "iconClass", + "value": "bx bx-heading", + "type": "label" + } + ] + }, + { + "id": "_help_NdowYOC1GFKS", + "title": "표", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Text/Tables" + }, + { + "name": "iconClass", + "value": "bx bx-table", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_6f9hih2hXXZk", + "title": "코드", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Code" + }, + { + "name": "iconClass", + "value": "bx bx-code", + "type": "label" + } + ] + }, + { + "id": "_help_m523cpzocqaD", + "title": "저장된 검색", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Saved Search" + }, + { + "name": "iconClass", + "value": "bx bx-file-find", + "type": "label" + } + ] + }, + { + "id": "_help_iRwzGnHPzonm", + "title": "관계도", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Relation Map" + }, + { + "name": "iconClass", + "value": "bx bxs-network-chart", + "type": "label" + } + ] + }, + { + "id": "_help_bdUJEHsAPYQR", + "title": "노트 지도", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Note Map" + }, + { + "name": "iconClass", + "value": "bx bxs-network-chart", + "type": "label" + } + ] + }, + { + "id": "_help_HcABDtFCkbFN", + "title": "렌더링 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Render Note" + }, + { + "name": "iconClass", + "value": "bx bx-extension", + "type": "label" + } + ] + }, + { + "id": "_help_GTwFsgaA0lCt", + "title": "책", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Book" + }, + { + "name": "iconClass", + "value": "bx bx-book", + "type": "label" + } + ] + }, + { + "id": "_help_s1aBHPd79XYj", + "title": "Mermaid 도표", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Mermaid Diagrams" + }, + { + "name": "iconClass", + "value": "bx bx-selection", + "type": "label" + } + ], + "children": [ + { + "id": "_help_RH6yLjjWJHof", + "title": "ELK 배치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Mermaid Diagrams/ELK layout" + }, + { + "name": "iconClass", + "value": "bx bxs-network-chart", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_grjYqerjn243", + "title": "캔버스", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Canvas" + }, + { + "name": "iconClass", + "value": "bx bx-pen", + "type": "label" + } + ] + }, + { + "id": "_help_1vHRoWCEjj0L", + "title": "웹 보기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Web View" + }, + { + "name": "iconClass", + "value": "bx bx-globe-alt", + "type": "label" + } + ] + }, + { + "id": "_help_gBbsAeiuUxI5", + "title": "마인드맵", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Mind Map" + }, + { + "name": "iconClass", + "value": "bx bx-sitemap", + "type": "label" + } + ] + }, + { + "id": "_help_81SGnPGMk7Xc", + "title": "지리 지도", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/Geo Map" + }, + { + "name": "iconClass", + "value": "bx bx-map-alt", + "type": "label" + } + ] + }, + { + "id": "_help_W8vYD3Q1zjCR", + "title": "파일", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Note Types/File" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_BgmBlOIl72jZ", + "title": "문제 해결", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Troubleshooting" + }, + { + "name": "iconClass", + "value": "bx bx-bug", + "type": "label" + } + ], + "children": [ + { + "id": "_help_wy8So3yZZlH9", + "title": "문제 제보", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Troubleshooting/Reporting issues" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_x59R8J8KV5Bp", + "title": "익명화한 데이터베이스", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Troubleshooting/Anonymized Database" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_qzNzp9LYQyPT", + "title": "오류 로그", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Troubleshooting/Error logs" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_vdlYGAcpXAgc", + "title": "504 오류로 동기화가 실패할 때", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Troubleshooting/Synchronization fails with 504" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_s8alTXmpFR61", + "title": "앱 새로고침", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Troubleshooting/Refreshing the application" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_pKK96zzmvBGf", + "title": "테마 개발", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-palette", + "type": "label" + } + ], + "children": [ + { + "id": "_help_7NfNr5pZpVKV", + "title": "사용자 테마 만들기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Theme development/Creating a custom theme" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_WFGzWeUK6arS", + "title": "Next 테마 수정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Theme development/Customize the Next theme" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_WN5z4M8ASACJ", + "title": "테마 개발 참고 자료", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Theme development/Reference" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_AlhDUqhENtH7", + "title": "앱 전체 사용자 CSS", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Theme development/Custom app-wide CSS" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_tC7s2alapj8V", + "title": "고급 사용법", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-rocket", + "type": "label" + } + ], + "children": [ + { + "id": "_help_zEY4DaJG4YT5", + "title": "속성", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Attributes" + }, + { + "name": "iconClass", + "value": "bx bx-list-check", + "type": "label" + } + ], + "children": [ + { + "id": "_help_HI6GBBIduIgv", + "title": "라벨", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Attributes/Labels" + }, + { + "name": "iconClass", + "value": "bx bx-hash", + "type": "label" + } + ] + }, + { + "id": "_help_Cq5X6iKQop6R", + "title": "관계", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Attributes/Relations" + }, + { + "name": "iconClass", + "value": "bx bx-transfer", + "type": "label" + } + ] + }, + { + "id": "_help_bwZpz2ajCEwO", + "title": "속성 상속", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance" + }, + { + "name": "iconClass", + "value": "bx bx-list-plus", + "type": "label" + } + ] + }, + { + "id": "_help_OFXdgB2nNk1F", + "title": "주요 속성", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes" + }, + { + "name": "iconClass", + "value": "bx bx-table", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_KC1HB96bqqHX", + "title": "템플릿", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Templates" + }, + { + "name": "iconClass", + "value": "bx bx-copy", + "type": "label" + } + ] + }, + { + "id": "_help_BCkXAVs63Ttv", + "title": "노트 지도와 연결 지도 및 트리 지도", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Note Map (Link map, Tree map)" + }, + { + "name": "iconClass", + "value": "bx bxs-network-chart", + "type": "label" + } + ] + }, + { + "id": "_help_R9pX4DGra2Vt", + "title": "공개 공유", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Sharing" + }, + { + "name": "iconClass", + "value": "bx bx-share-alt", + "type": "label" + } + ], + "children": [ + { + "id": "_help_Qjt68inQ2bRj", + "title": "노트 원문 제공", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_5668rwcirq1t", + "title": "고급 활용 예제", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Advanced Showcases" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_l0tKav7yLHGF", + "title": "일일 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes" + }, + { + "name": "iconClass", + "value": "bx bx-calendar", + "type": "label" + } + ] + }, + { + "id": "_help_R7abl2fc6Mxi", + "title": "체중 기록", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_xYjQUYhpbUEW", + "title": "할 일 관리자", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager" + }, + { + "name": "iconClass", + "value": "bx bx-calendar-check", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_J5Ex1ZrMbyJ6", + "title": "사용자 요청 처리기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Custom Request Handler" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_d3fAXQ2diepH", + "title": "사용자 리소스 제공자", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Custom Resource Providers" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_pgxEVkzLl1OP", + "title": "ETAPI와 REST API", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/ETAPI (REST API)" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_9qPsTWBorUhQ", + "title": "API 참고 자료", + "type": "webView", + "attributes": [ + { + "type": "label", + "name": "webViewSrc", + "value": "/etapi/docs" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_47ZrP6FNuoG8", + "title": "기본 노트 제목", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Default Note Title" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_wX4HbRucYSDD", + "title": "데이터베이스", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Database" + }, + { + "name": "iconClass", + "value": "bx bx-data", + "type": "label" + } + ], + "children": [ + { + "id": "_help_oyIAJ9PvvwHX", + "title": "데이터베이스 직접 수정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Database/Manually altering the database" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_YKWqdJhzi2VY", + "title": "SQL 콘솔", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console" + }, + { + "name": "iconClass", + "value": "bx bx-data", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_6tZeKvSHEUiB", + "title": "기본 예제 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Database/Demo Notes" + }, + { + "name": "iconClass", + "value": "bx bx-package", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_Gzjqa934BdH4", + "title": "설정 파일과 환경 변수", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Configuration (config.ini or e" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_c5xB8m4g2IY6", + "title": "Trilium 인스턴스", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_LWtBjFej3wX3", + "title": "교차 출처 리소스 공유와 CORS", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Cross-Origin Resource Sharing " + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_ivYnonVFBxbQ", + "title": "일괄 작업", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Bulk Actions" + }, + { + "name": "iconClass", + "value": "bx bx-list-plus", + "type": "label" + } + ] + }, + { + "id": "_help_4FahAwuGTAwC", + "title": "노트 소스", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Note source" + }, + { + "name": "iconClass", + "value": "bx bx-code", + "type": "label" + } + ] + }, + { + "id": "_help_1YeN2MzFUluU", + "title": "사용 기술", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Technologies used" + }, + { + "name": "iconClass", + "value": "bx bxs-component", + "type": "label" + } + ], + "children": [ + { + "id": "_help_MI26XDLSAlCD", + "title": "CKEditor", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Technologies used/CKEditor" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_N4IDkixaDG9C", + "title": "MindElixir", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Technologies used/MindElixir" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_H0mM1lTxF9JI", + "title": "Excalidraw", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Technologies used/Excalidraw" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_MQHyy2dIFgxS", + "title": "Leaflet", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Technologies used/Leaflet" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_m1lbrzyKDaRB", + "title": "노트 ID", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Note ID" + }, + { + "name": "iconClass", + "value": "bx bx-hash", + "type": "label" + } + ] + }, + { + "id": "_help_0vTSyvhPTAOz", + "title": "내부 API", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-folder", + "type": "label" + } + ], + "children": [ + { + "id": "_help_z8O2VG4ZZJD7", + "title": "API 참고 자료", + "type": "webView", + "attributes": [ + { + "type": "label", + "name": "webViewSrc", + "value": "/api/docs" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_2mUhVmZK8RF3", + "title": "숨겨진 노트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Hidden Notes" + }, + { + "name": "iconClass", + "value": "bx bx-hide", + "type": "label" + } + ] + }, + { + "id": "_help_uYF7pmepw27K", + "title": "운영 지표", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Advanced Usage/Metrics" + }, + { + "name": "iconClass", + "value": "bx bxs-data", + "type": "label" + } + ], + "children": [ + { + "id": "_help_bOP3TB56fL1V", + "title": "Grafana 대시보드 예제 (grafana-dashboard.json)", + "type": "doc", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + } + ] + }, + { + "id": "_help_LMAv4Uy3Wk6J", + "title": "AI", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-bot", + "type": "label" + } + ], + "children": [ + { + "id": "_help_GBBMSlVSOIGP", + "title": "AI 기능 소개", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/AI/Introduction" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_WkM7gsEUyCXs", + "title": "AI 제공자 안내", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/AI/AI Provider Information" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_7EdTxPADv95W", + "title": "Ollama", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-folder", + "type": "label" + } + ], + "children": [ + { + "id": "_help_vvUCN7FDkq7G", + "title": "Ollama 설치", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/AI/AI Provider Information/Ollama/Installing Ollama" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_ZavFigBX9AwP", + "title": "OpenAI", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/AI/AI Provider Information/OpenAI" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_e0lkirXEiSNc", + "title": "Anthropic", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/AI/AI Provider Information/Anthropic" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + } + ] + }, + { + "id": "_help_CdNpE2pqjmI6", + "title": "스크립트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting" + }, + { + "name": "iconClass", + "value": "bx bxs-file-js", + "type": "label" + } + ], + "children": [ + { + "id": "_help_yIhgI5H7A2Sm", + "title": "프런트엔드 기초", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Frontend Basics" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_es8OU2GuguFU", + "title": "예제", + "type": "book", + "attributes": [ + { + "name": "iconClass", + "value": "bx bx-folder", + "type": "label" + } + ], + "children": [ + { + "id": "_help_TjLYAo3JMO8X", + "title": "새 할 일 실행 버튼", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Examples/New Task launcher button" + }, + { + "name": "iconClass", + "value": "bx bx-task", + "type": "label" + } + ] + }, + { + "id": "_help_7kZPMD0uFwkH", + "title": "Google 설문지 응답 내려받기", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Examples/Downloading responses from Goo" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_DL92EjAaXT26", + "title": "주요 속성으로 스크립트 설정", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Examples/Using promoted attributes to c" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_GPERMystNGTB", + "title": "이벤트", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Events" + }, + { + "name": "iconClass", + "value": "bx bx-rss", + "type": "label" + } + ] + }, + { + "id": "_help_MgibgPcfeuGz", + "title": "사용자 위젯", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Custom Widgets" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_YNxAqkI5Kg1M", + "title": "단어 수 위젯", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Custom Widgets/Word count widget" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + }, + { + "id": "_help_SynTBQiBsdYJ", + "title": "위젯 기초", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Custom Widgets/Widget Basics" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_GLks18SNjxmC", + "title": "스크립트 API", + "type": "doc", + "attributes": [ + { + "type": "label", + "name": "docName", + "value": "User Guide/User Guide/Scripting/Script API" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ], + "children": [ + { + "id": "_help_Q2z6av6JZVWm", + "title": "프런트엔드 API", + "type": "webView", + "attributes": [ + { + "type": "label", + "name": "webViewSrc", + "value": "/assets/v0.95.0-ko-20260913-r8/doc_notes/en/api-ko/frontend.html" + }, + { + "name": "iconClass", + "value": "bx bx-folder", + "type": "label" + } + ], + "children": [ + { + "id": "_help_habiZ3HU8Kw8", + "title": "프런트엔드 노트 객체 (FNote)", + "type": "webView", + "attributes": [ + { + "type": "label", + "name": "webViewSrc", + "value": "/assets/v0.95.0-ko-20260913-r8/doc_notes/en/api-ko/fnote.html" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + }, + { + "id": "_help_MEtfsqa5VwNi", + "title": "백엔드 API", + "type": "webView", + "attributes": [ + { + "type": "label", + "name": "webViewSrc", + "value": "/assets/v0.95.0-ko-20260913-r8/doc_notes/en/api-ko/backend.html" + }, + { + "name": "iconClass", + "value": "bx bx-file", + "type": "label" + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/backend.html b/updates/2026-09-05/phase9/doc_notes/en/api-ko/backend.html new file mode 100644 index 0000000..58b2849 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/backend.html @@ -0,0 +1,150 @@ +백엔드 스크립트 API

백엔드 스크립트 API

연결된 공식 문서의 한국어 사본입니다. 함수 이름과 코드 문법은 원문을 유지했습니다. 외부 문서는 운영 버전과 다를 수 있으므로 지원 여부를 확인하세요. 공식 원문 보기

interface Api {
    __private: { becca: default };
    axios: AxiosStatic;
    cheerio: {
        default: CheerioAPI;
        version: string;
        contains(container: Element, contained: Element): boolean;
        html(options?: CheerioParserOptions): string;
        html(
            dom: string | Element | Cheerio,
            options?: CheerioParserOptions,
        ): string;
        load(
            html: string | Buffer<ArrayBufferLike>,
            options?: CheerioParserOptions,
        ): Root;
        load(element: Element | Element[], options?: CheerioParserOptions): Root;
        parseHTML(
            data: string,
            context?: null | Document,
            keepScripts?: boolean,
        ): Document[];
        root(): Cheerio;
        xml(dom?: string | Element | Cheerio): string;
    };
    currentNote: BNote;
    dayjs: __module;
    logMessages: Record<string, string[]>;
    logSpacedUpdates: Record<string, SpacedUpdate>;
    originEntity?: null | AbstractBeccaEntity<any>;
    sql: any;
    startNote?: null | BNote;
    xml2js: node_modules/@types/xml2js;
    backupNow(backupName: string): Promise<string>;
    createDataNote(
        parentNoteId: string,
        title: string,
        content: {},
    ): NoteAndBranch;
    createNewNote(params: NoteParams): NoteAndBranch;
    createNote(
        parentNoteId: string,
        title: string,
        content: string,
        extraOptions: Omit<
            NoteParams,
            "title"
            | "parentNoteId"
            | "content"
            | "type",
        > & { attributes?: AttributeRow[]; json?: boolean },
    ): NoteAndBranch;
    createOrUpdateLauncher(
        opts: {
            icon: string;
            id: string;
            isVisible: boolean;
            keyboardShortcut: string;
            scriptNoteId: string;
            targetNoteId: string;
            title: string;
            type: "script" | "note" | "customWidget";
            widgetNoteId?: string;
        },
    ): { note: BNote };
    createTextNote(
        parentNoteId: string,
        title: string,
        content: string,
    ): NoteAndBranch;
    ensureNoteIsAbsentFromParent(noteId: string, parentNoteId: string): void;
    ensureNoteIsPresentInParent(
        noteId: string,
        parentNoteId: string,
        prefix: string,
    ): { branch: null | BBranch };
    escapeHtml(string: string): string;
    exportSubtreeToZipFile(
        noteId: string,
        format: "html" | "markdown",
        zipFilePath: string,
    ): Promise<void>;
    getAppInfo(): {
        appVersion: string;
        buildDate: string;
        buildRevision: string;
        clipperProtocolVersion: string;
        dataDirectory: string;
        dbVersion: number;
        nodeVersion: string;
        syncVersion: number;
        utcDateTime: string;
    };
    getAttachment(attachmentId: string): null | BAttachment;
    getAttribute(attachmentId: string): null | BAttribute;
    getAttribute(attributeId: string): null | BAttribute;
    getBranch(branchId: string): null | BBranch;
    getDayNote(date: string, rootNote?: BNote): Promise<null | BNote>;
    getEtapiToken(etapiTokenId: string): null | BEtapiToken;
    getEtapiTokens(): BEtapiToken[];
    getInstanceName(): null | string;
    getMonthNote(date: string, rootNote: BNote): Promise<null | BNote>;
    getNote(noteId: string): null | BNote;
    getNotesWithLabel(name: string, 값?: string): BNote[];
    getNoteWithLabel(name: string, 값?: string): null | BNote;
    getOption(optionName: string): null | BOption;
    getOptions(): BOption[];
    getQuarterNote(date: string, rootNote: BNote): Promise<null | BNote>;
    getRevision(revisionId: string): null | BRevision;
    getRootCalendarNote(): null | BNote;
    getTodayNote(rootNote?: BNote): Promise<null | BNote>;
    getWeekFirstDayNote(date: string, rootNote: BNote): Promise<null | BNote>;
    getWeekNote(date: string, rootNote: BNote): Promise<null | BNote>;
    getYearNote(year: string, rootNote?: BNote): null | BNote;
    log(message: string): void;
    randomString(length: number): string;
    runOnFrontend(script: () => string | void, params: []): void;
    runOutsideOfSync(callback: () => void): Promise<void>;
    searchForNote(query: string, searchParams: SearchParams): null | BNote;
    searchForNotes(query: string, searchParams: SearchParams): BNote[];
    setNoteToParent(
        noteId: string,
        prefix: string,
        parentNoteId: null | string,
    ): void;
    sortNotes(
        parentNoteId: string,
        sortConfig: { foldersFirst?: boolean; reverse?: boolean; sortBy?: string },
    ): void;
    toggleNoteInParent(
        present: true,
        noteId: string,
        parentNoteId: string,
        prefix: string,
    ): void;
    transactional(func: () => void): any;
    unescapeHtml(string: string): string;
}
목차

속성

__private: { becca: default }

이 객체에는 다음 특성을 가진 고급 기능 객체가 들어 있습니다. "사용자가 영향을 판단해야 함" 및 "하위 호환성 보장 없음" 고급 사용 사례를 위한 객체입니다.

+

형식 선언

  • becca: default

    백엔드의 메모리 내 객체 그래프에 접근합니다. 참고: Becca

    +

HTTP 요청을 위한 Axios 라이브러리입니다. 참고: https://axios-http.com 라이브러리 사용 안내

+

대신 브라우저와 호환되는 기본 fetch()를 사용하세요.

+
cheerio: {
    default: CheerioAPI;
    version: string;
    contains(container: Element, contained: Element): boolean;
    html(options?: CheerioParserOptions): string;
    html(
        dom: string | Element | Cheerio,
        options?: CheerioParserOptions,
    ): string;
    load(
        html: string | Buffer<ArrayBufferLike>,
        options?: CheerioParserOptions,
    ): Root;
    load(element: Element | Element[], options?: CheerioParserOptions): Root;
    parseHTML(
        data: string,
        context?: null | Document,
        keepScripts?: boolean,
    ): Document[];
    root(): Cheerio;
    xml(dom?: string | Element | Cheerio): string;
}

HTML 분석과 처리를 위한 cheerio 라이브러리입니다. 참고: https://cheerio.js.org 라이브러리 사용 안내

+
currentNote: BNote

현재 스크립트가 실행 중인 노트입니다. 코드가 여러 노트로 나뉘어 있으면 처음 실행을 시작한 노트는 다음과 같습니다: "startNote"함수 호출을 통해 다른 노트인 currentNote로 실행 위치가 바뀔 수 있습니다. C 언어에서는 다음 개념과 비슷합니다: FILE +현재 화면에서 활성화된 노트와 혼동하지 마세요.

+
dayjs: __module

날짜 처리를 위한 day.js 라이브러리입니다. 참고: https://day.js.org 라이브러리 사용 안내

+
logMessages: Record<string, string[]>
logSpacedUpdates: Record<string, SpacedUpdate>
originEntity?: null | AbstractBeccaEntity<any>

이 실행을 시작하게 한 이벤트의 엔터티

+
sql: any

sql

+
startNote?: null | BNote

스크립트 실행이 시작된 노트입니다. C 언어로 비유하면 현재 프로세스의 main() 함수가 들어 있는 파일에 해당합니다.

+

XML 분석을 위한 xml2js 라이브러리입니다. 참고: https://github.com/Leonidas-from-XIV/node-xml2js 라이브러리 사용 안내

+

메서드

  • 매개변수

    • backupName: string

      예를 들어 backupName에 다음 값을 지정하면: "now"백업은 다음 이름으로 저장됩니다: "backup-now.db" 파일

      +

    반환값 Promise<string>

    백업이 끝나면 완료됩니다.

    +
  • JSON으로 직렬화할 수 있는 객체를 데이터 노트로 만듭니다. 생성되는 노트의 유형은 code이며 MIME 유형은 JSON입니다. 더 많은 옵션은 createNewNote()를 확인하세요.

    +

    매개변수

    • parentNoteId: string
    • title: string
    • content: {}

    반환값 NoteAndBranch

  • 매개변수

    • parentNoteId: string

      이 상위 노트 아래에 새 노트 생성

      +
    • title: string
    • content: string
    • extraOptions: Omit<NoteParams, "title" | "parentNoteId" | "content" | "type"> & {
          attributes?: AttributeRow[];
          json?: boolean;
      }
      • Optionalattributes?: AttributeRow[]
      • Optionaljson?: boolean

        노트에 JSON을 사용할지 여부

        +

    반환값 NoteAndBranch

    새로 생성한 노트와 가지 엔터티가 들어 있는 객체

    +

    간단한 용도에는 비슷한 API인 createTextNote()를 사용하고 복잡한 요구에는 createNewNote()를 사용하세요.

    +
  • 실행 도구 모음에 새 실행 도구를 만듭니다. 같은 ID가 있으면 변경합니다.

    +

    매개변수

    • opts: {
          icon: string;
          id: string;
          isVisible: boolean;
          keyboardShortcut: string;
          scriptNoteId: string;
          targetNoteId: string;
          title: string;
          type: "script" | "note" | "customWidget";
          widgetNoteId?: string;
      }
      • icon: string

        사용할 Boxicons 아이콘 이름. 예: "bx-time")

        +
      • id: string

        영문과 숫자로만 구성된 6자리 이상의 실행 도구 ID

        +
      • isVisible: boolean

        true이면 다음 위치에 생성합니다: "표시할 실행 도구"그 외에는 다음 위치에 생성합니다: "사용 가능한 실행 도구"

        +
      • keyboardShortcut: string

        누르면 대상 노트나 스크립트를 활성화할 단축키. 예: "ctrl+e"

        +
      • scriptNoteId: string

        해당 유형: "script"

        +
      • targetNoteId: string

        해당 유형: "note"

        +
      • title: string
      • type: "script" | "note" | "customWidget"

        다음 중 하나

        +
          +
        • "note" 실행 도구를 누르면 targetNoteId로 지정한 노트로 이동합니다.
        • +
        • "script" 실행 도구를 누르면 scriptNoteId로 지정한 스크립트를 실행합니다.
        • +
        • "customWidget" widgetNoteId로 지정한 사용자 지정 위젯으로 실행 도구를 표시합니다.
        • +
        +
      • OptionalwidgetNoteId?: string

        해당 유형: "customWidget"

        +

    반환값 { note: BNote }

  • 텍스트 노트를 만듭니다. 더 많은 옵션은 createNewNote()를 확인하세요.

    +

    매개변수

    • parentNoteId: string
    • title: string
    • content: string

    반환값 NoteAndBranch

  • 노트와 상위 노트 사이에 가지가 있으면 삭제합니다. 없으면 아무 작업도 하지 않습니다.

    +

    매개변수

    • noteId: string
    • parentNoteId: string

    반환값 void

  • 노트와 상위 노트 사이에 가지가 없으면 만듭니다. 이미 있으면 그대로 둡니다. 새 가지 또는 기존 가지를 반환합니다.

    +

    매개변수

    • noteId: string
    • parentNoteId: string
    • prefix: string

      노트와 상위 노트 사이에 가지를 새로 만들 때 지정할 접두사

      +

    반환값 { branch: null | BBranch }

  • 매개변수

    • noteId: string
    • format: "html" | "markdown"

      html 또는 markdown

      +
    • zipFilePath: string

    반환값 Promise<void>

  • 반환값 {
        appVersion: string;
        buildDate: string;
        buildRevision: string;
        clipperProtocolVersion: string;
        dataDirectory: string;
        dbVersion: number;
        nodeVersion: string;
        syncVersion: number;
        utcDateTime: string;
    }

  • 지정한 날짜의 일별 노트를 반환합니다. 없으면 만듭니다.

    +

    매개변수

    • date: string

      YYYY-MM-DD 형식

      +
    • OptionalrootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 Promise<null | BNote>

  • 인스턴스 이름은 개별 Trilium 실행 환경을 구분합니다. 특정 인스턴스에서만 작업을 실행해야 하는 스크립트에 유용합니다.

    +

    반환값 null | string

  • 지정한 날짜의 월별 노트를 반환합니다. 없으면 만듭니다.

    +

    매개변수

    • date: string

      YYYY-MM 형식

      +
    • rootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 Promise<null | BNote>

  • 지정한 라벨 이름을 가진 노트들을 조회합니다. & 값

    +

    매개변수

    • name: string

      속성 이름

      +
    • Optional값: string

      속성값

      +

    반환값 BNote[]

  • 지정한 라벨 이름을 가진 첫 번째 노트를 조회합니다. & 값

    +

    매개변수

    • name: string

      속성 이름

      +
    • Optional값: string

      속성값

      +

    반환값 null | BNote

  • 지정한 날짜의 분기별 노트를 반환합니다. 없으면 만듭니다.

    +

    매개변수

    • date: string

      YYYY-MM 형식

      +
    • rootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 Promise<null | BNote>

  • 오늘의 일별 노트를 반환합니다. 없으면 만듭니다.

    +

    매개변수

    • OptionalrootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 Promise<null | BNote>

  • 지정한 날짜가 속한 주의 첫날에 해당하는 노트를 반환합니다.

    +

    매개변수

    • date: string

      YYYY-MM-DD 형식

      +
    • rootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 Promise<null | BNote>

  • 지정한 날짜의 주별 노트를 반환합니다. 없으면 만듭니다.

    +

    매개변수

    • date: string

      YYYY-MM-DD 형식

      +
    • rootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 Promise<null | BNote>

  • 지정한 연도의 연도별 노트를 반환합니다. 없으면 만듭니다.

    +

    매개변수

    • year: string

      YYYY 형식

      +
    • OptionalrootNote: BNote

      달력 루트 노트를 지정합니다. 일반적으로 비워 두어 기본 달력을 사용합니다.

      +

    반환값 null | BNote

  • 지정한 메시지를 Trilium 로그와 화면의 로그 창에 기록합니다.

    +

    매개변수

    • message: string

    반환값 void

  • 지정한 길이의 임의 문자열을 반환합니다. 암호학적으로 안전한 난수를 만드는 함수가 아닙니다.

    +

    매개변수

    • length: number

      문자열 기준

      +

    반환값 string

    임의 문자열

    +
  • 지정한 익명 함수를 프런트엔드에서 실행합니다. 내부적으로 함수를 문자열로 직렬화한 뒤 WebSocket으로 전송합니다. 서로 다른 탭 등 여러 프런트엔드가 연결돼 있으면 모든 인스턴스에서 실행합니다.

    +

    매개변수

    • script: () => string | void

      프런트엔드에서 실행할 스크립트

      +
    • params: []

      프런트엔드로 보낼 익명 함수의 매개변수 목록

      +

    반환값 void

    반환값이 없습니다.

    +
  • 동기화 중에는 데이터가 일시적으로 일관되지 않을 수 있습니다. 강한 일관성이 필요한 스크립트는 이 함수로 진행 중인 동기화가 끝나기를 기다리고 실행 중 새 동기화가 시작되지 않게 할 수 있습니다.

    +

    비동기 처리이므로 내부 콜백에는 자동 트랜잭션 처리가 적용되지 않습니다. 데이터베이스를 변경하려면 api.transactional(...)로 호출을 감싸야 합니다.

    +

    매개변수

    • callback: () => void

      동기화가 실행되지 않는 동안 실행할 함수

      +

    반환값 Promise<void>

    콜백이 끝날 때까지 기다린 뒤 완료됩니다.

    +
  • noteId와 접두사로 노트를 찾아 지정한 parentNoteId 아래에 배치합니다. parentNoteId를 지정하지 않으면 가지를 삭제합니다.

    +

    toggleNoteInParent()와 비슷하지만 접두사로 가지를 찾는다는 차이가 있습니다.

    +

    매개변수

    • noteId: string
    • prefix: string
    • parentNoteId: null | string

    반환값 void

    동작을 혼동하기 쉬운 메서드이며 특수한 용도에만 사용합니다.

    +
  • 지정한 노트의 하위 노트를 정렬합니다.

    +

    매개변수

    • parentNoteId: string
    • sortConfig: { foldersFirst?: boolean; reverse?: boolean; sortBy?: string }

    반환값 void

  • 값에 따라 노트와 상위 노트 사이의 가지를 만들거나 삭제합니다.

    +

    매개변수

    • present: true

      가지를 유지하려면 true를 사용하고 없애려면 false를 사용합니다.

      +
    • noteId: string
    • parentNoteId: string
    • prefix: string

      노트와 상위 노트 사이에 가지를 새로 만들 때 지정할 접두사

      +

    반환값 void

  • 트랜잭션 안에서 실행할 코드를 감쌉니다. 이미 트랜잭션이 있으면 해당 트랜잭션을 사용합니다.

    +

    매개변수

    • func: () => void

    반환값 any

    func 콜백의 결과

    +
  • 매개변수

    • string: string

      이스케이프를 해제할 대상

      +

    반환값 string

    이스케이프를 해제한 문자열

    +
\ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/etapi.json b/updates/2026-09-05/phase9/doc_notes/en/api-ko/etapi.json new file mode 100644 index 0000000..1bae1f2 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/etapi.json @@ -0,0 +1,1776 @@ +{ + "openapi": "3.0.3", + "info": { + "version": "1.0.0", + "title": "ETAPI", + "description": "Trilium 외부 API", + "contact": { + "name": "zadam", + "email": "zadam.apps@gmail.com", + "url": "https://github.com/zadam/trilium" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "/etapi", + "description": "현재 Trilium 서버" + } + ], + "security": [ + { + "EtapiTokenAuth": [] + }, + { + "EtapiBasicAuth": [] + } + ], + "paths": { + "/create-note": { + "post": { + "description": "노트를 만들고 노트 트리에 배치합니다.", + "operationId": "createNote", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNoteDef" + } + } + } + }, + "responses": { + "201": { + "description": "노트 생성 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/NoteWithBranch" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/notes": { + "get": { + "description": "노트 검색", + "operationId": "searchNotes", + "parameters": [ + { + "name": "search", + "in": "query", + "required": true, + "description": "https://triliumnext.github.io/Docs/Wiki/search.html 에 설명된 형식의 검색어", + "schema": { + "type": "string" + }, + "examples": { + "fulltext": { + "summary": "검색어로 전체 텍스트 검색. 정확히 일치할 필요는 없습니다.", + "value": "towers tolkien" + }, + "fulltextExactMatch": { + "summary": "정확히 일치하는 전체 텍스트 검색. 큰따옴표를 사용합니다.", + "value": "\"Two Towers\"" + }, + "fulltextWithLabel": { + "summary": "검색어와 라벨 조건을 모두 만족하는 전체 텍스트 검색", + "value": "towers #book" + } + } + }, + { + "name": "fastSearch", + "in": "query", + "required": false, + "description": "빠른 검색 사용. 전체 텍스트 검색에서 본문은 확인하지 않습니다.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "includeArchivedNotes", + "in": "query", + "required": false, + "description": "기본적으로 보관된 노트는 검색하지 않습니다. true로 설정하면 검색 결과에 포함합니다.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "ancestorNoteId", + "in": "query", + "required": false, + "description": "지정한 subtree 노트 ID의 하위 트리만 검색합니다. 기본값은 전체 트리입니다.", + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "name": "ancestorDepth", + "in": "query", + "required": false, + "description": "검색할 노트의 트리 깊이를 지정합니다.", + "schema": { + "type": "string" + }, + "examples": { + "directChildren": { + "summary": "기준 상위 노트에서 정확히 한 단계 아래인 직계 하위 노트. 기준을 지정하지 않으면 루트입니다.", + "value": "eq1" + }, + "grandGrandChildren": { + "summary": "기준 상위 노트에서 정확히 세 단계 아래. 기준을 지정하지 않으면 루트입니다.", + "value": "eq3" + }, + "lessThan4": { + "summary": "기준 상위 노트에서 네 단계 미만인 깊이 1~3. 기준을 지정하지 않으면 루트입니다.", + "value": "lt4" + }, + "greaterThan2": { + "summary": "기준 상위 노트에서 두 단계보다 깊은 위치. 깊이 3부터 해당하며 기준을 지정하지 않으면 루트입니다.", + "value": "gt4" + } + } + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "description": "검색 결과 정렬에 사용할 속성 또는 라벨 이름", + "schema": { + "type": "string" + }, + "example": [ + "title", + "#publicationDate", + "isProtected", + "isArchived", + "dateCreated", + "dateModified", + "utcDateCreated", + "utcDateModified", + "parentCount", + "childrenCount", + "attributeCount", + "labelCount", + "ownedLabelCount", + "relationCount", + "ownedRelationCount", + "relationCountIncludingLinks", + "ownedRelationCountIncludingLinks", + "targetRelationCount", + "targetRelationCountIncludingLinks", + "contentSize", + "contentAndAttachmentsSize", + "contentAndAttachmentsAndRevisionsSize", + "revisionCount" + ] + }, + { + "name": "orderDirection", + "in": "query", + "required": false, + "description": "정렬 방향. 오름차순 또는 내림차순입니다.", + "schema": { + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "반환할 결과 수 제한", + "schema": { + "type": "integer" + }, + "example": 10 + }, + { + "name": "debug", + "in": "query", + "required": false, + "description": "true로 설정하면 검색어 구문 분석에 관한 디버깅 정보를 응답에 포함합니다.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "검색 응답", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/SearchResponse" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/notes/{noteId}": { + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "get": { + "description": "ID로 노트를 조회합니다.", + "operationId": "getNoteById", + "responses": { + "200": { + "description": "노트 응답", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "patch": { + "description": "noteId로 지정한 노트에 요청 본문의 변경 사항을 적용합니다.", + "operationId": "patchNoteById", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "responses": { + "200": { + "description": "노트 변경 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "description": "noteId로 지정한 노트 하나를 삭제합니다.", + "operationId": "deleteNoteById", + "responses": { + "204": { + "description": "노트 삭제 완료" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/notes/{noteId}/content": { + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "get": { + "description": "ID로 노트 본문을 조회합니다.", + "operationId": "getNoteContent", + "responses": { + "200": { + "description": "노트 본문 응답", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "put": { + "description": "ID로 지정한 노트의 본문을 변경합니다.", + "operationId": "putNoteContentById", + "requestBody": { + "description": "노트의 HTML 본문", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "responses": { + "204": { + "description": "노트 본문 변경 완료" + } + } + } + }, + "/notes/{noteId}/export": { + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": [ + "html", + "markdown" + ], + "default": "html" + } + } + ], + "get": { + "description": "지정한 하위 노트 트리를 ZIP 파일로 내보냅니다. 전체 문서를 내보내려면 noteId에 \"root\"를 사용합니다.", + "operationId": "exportNoteSubtree", + "responses": { + "200": { + "description": "내보낸 ZIP 파일", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/notes/{noteId}/import": { + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "post": { + "description": "지정한 노트로 ZIP 파일을 가져옵니다.", + "operationId": "importZip", + "responses": { + "201": { + "description": "노트 생성 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/NoteWithBranch" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/notes/{noteId}/revision": { + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": [ + "html", + "markdown" + ], + "default": "html" + } + } + ], + "post": { + "description": "지정한 노트의 수정 이력을 만듭니다.", + "operationId": "createRevision", + "responses": { + "204": { + "description": "수정 이력 생성 완료" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/branches": { + "post": { + "description": "가지를 만들어 같은 노트를 트리의 다른 위치에도 배치합니다. 상위 노트와 하위 노트 사이에 가지가 이미 있으면 기존 가지의 prefix와 notePosition 및 isExpanded를 변경합니다.", + "operationId": "postBranch", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Branch" + } + } + } + }, + "responses": { + "200": { + "description": "기존 가지 변경 완료. 상위 노트와 하위 노트 사이에 가지가 이미 있었습니다.", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Branch" + } + } + } + }, + "201": { + "description": "가지 생성 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Branch" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/branches/{branchId}": { + "parameters": [ + { + "name": "branchId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "get": { + "description": "ID로 가지를 조회합니다.", + "operationId": "getBranchById", + "responses": { + "200": { + "description": "가지 응답", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Branch" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "patch": { + "description": "branchId로 지정한 가지에 요청 본문의 변경 사항을 적용합니다. prefix와 notePosition만 변경할 수 있습니다. 다른 속성을 바꾸려면 기존 가지를 삭제하고 새로 만들어야 합니다.", + "operationId": "patchBranchById", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Branch" + } + } + } + }, + "responses": { + "200": { + "description": "가지 변경 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Branch" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "description": "branchId로 지정한 가지를 삭제합니다. 해당 하위 노트의 마지막 가지라면 노트도 삭제합니다.", + "operationId": "deleteBranchById", + "responses": { + "204": { + "description": "가지 삭제 완료" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/attachments": { + "post": { + "description": "첨부 파일 생성", + "operationId": "postAttachment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAttachment" + } + } + } + }, + "responses": { + "201": { + "description": "첨부 파일 생성 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/attachments/{attachmentId}": { + "parameters": [ + { + "name": "attachmentId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "get": { + "description": "ID로 첨부 파일을 조회합니다.", + "operationId": "getAttachmentById", + "responses": { + "200": { + "description": "첨부 파일 응답", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "patch": { + "description": "attachmentId로 지정한 첨부 파일에 요청 본문의 변경 사항을 적용합니다. role과 mime 및 title과 position만 변경할 수 있습니다.", + "operationId": "patchAttachmentById", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "responses": { + "200": { + "description": "속성 변경 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "description": "attachmentId로 지정한 첨부 파일을 삭제합니다.", + "operationId": "deleteAttachmentById", + "responses": { + "204": { + "description": "첨부 파일 삭제 완료" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/attachments/{attachmentId}/content": { + "parameters": [ + { + "name": "attachmentId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "get": { + "description": "ID로 첨부 파일 내용을 조회합니다.", + "operationId": "getAttachmentContent", + "responses": { + "200": { + "description": "첨부 파일 내용 응답", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "put": { + "description": "ID로 지정한 첨부 파일의 내용을 변경합니다.", + "operationId": "putAttachmentContentById", + "requestBody": { + "description": "첨부 파일의 HTML 내용", + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "responses": { + "204": { + "description": "첨부 파일 내용 변경 완료" + } + } + } + }, + "/attributes": { + "post": { + "description": "지정한 노트에 속성 생성", + "operationId": "postAttribute", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "responses": { + "201": { + "description": "속성 생성 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/attributes/{attributeId}": { + "parameters": [ + { + "name": "attributeId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "get": { + "description": "ID로 속성을 조회합니다.", + "operationId": "getAttributeById", + "responses": { + "200": { + "description": "속성 응답", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "patch": { + "description": "attributeId로 지정한 속성에 요청 본문의 변경 사항을 적용합니다. 라벨은 value와 position만 변경할 수 있고 관계는 position만 변경할 수 있습니다. 다른 속성을 바꾸려면 기존 속성을 삭제하고 새로 만들어야 합니다.", + "operationId": "patchAttributeById", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "responses": { + "200": { + "description": "속성 변경 완료", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "delete": { + "description": "attributeId로 지정한 속성을 삭제합니다.", + "operationId": "deleteAttributeById", + "responses": { + "204": { + "description": "속성 삭제 완료" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/refresh-note-ordering/{parentNoteId}": { + "parameters": [ + { + "name": "parentNoteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityId" + } + } + ], + "post": { + "description": "가지의 notePosition은 연결된 클라이언트에 자동으로 전달되지 않습니다. 변경한 순서를 즉시 반영하려면 notePosition을 설정한 뒤 이 기능을 호출하세요. 순서가 바뀐 가지의 parentNoteId를 전달해야 합니다.", + "operationId": "postRefreshNoteOrdering", + "responses": { + "204": { + "description": "연결된 모든 클라이언트에서 노트 순서를 비동기로 갱신합니다." + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/inbox/{date}": { + "get": { + "description": "새 노트를 넣을 수집함 노트를 반환합니다. 날짜 사용 여부는 수집함이 #inbox 라벨로 지정된 고정 노트인지 일지의 날짜별 노트인지에 따라 달라집니다.", + "operationId": "getInboxNote", + "parameters": [ + { + "name": "date", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "date" + }, + "example": "2022-02-22" + } + ], + "responses": { + "200": { + "description": "수집함 노트", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/calendar/days/{date}": { + "get": { + "description": "지정한 날짜의 일별 노트를 반환합니다. 없으면 새로 만듭니다.", + "operationId": "getDayNote", + "parameters": [ + { + "name": "date", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "date" + }, + "example": "2022-02-22" + } + ], + "responses": { + "200": { + "description": "일별 노트", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/calendar/weeks/{date}": { + "get": { + "description": "지정한 날짜의 주별 노트를 반환합니다. 없으면 새로 만듭니다.", + "operationId": "getWeekFirstDayNote", + "parameters": [ + { + "name": "date", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "date" + }, + "example": "2022-02-22" + } + ], + "responses": { + "200": { + "description": "주별 노트", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/calendar/months/{month}": { + "get": { + "description": "지정한 날짜의 주별 노트를 반환합니다. 없으면 새로 만듭니다.", + "operationId": "getMonthNote", + "parameters": [ + { + "name": "month", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "[0-9]{4}-[0-9]{2}" + }, + "example": "2022-02" + } + ], + "responses": { + "200": { + "description": "월별 노트", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/calendar/years/{year}": { + "get": { + "description": "지정한 날짜의 주별 노트를 반환합니다. 없으면 새로 만듭니다.", + "operationId": "getYearNote", + "parameters": [ + { + "name": "year", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "[0-9]{4}-[0-9]{2}" + }, + "example": "2022-02" + } + ], + "responses": { + "200": { + "description": "연도별 노트", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/auth/login": { + "post": { + "description": "비밀번호로 ETAPI 토큰을 발급받습니다. 이후 ETAPI 호출에 사용합니다.", + "operationId": "login", + "security": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "password": { + "type": "string", + "description": "Trilium 서버 로그인이나 노트 보호에 사용하는 사용자 비밀번호" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "인증 토큰", + "content": { + "application/json; charset=utf-8": { + "schema": { + "properties": { + "authToken": { + "type": "string", + "example": "Bc4bFn0Ffiok_4NpbVCDnFz7B2WU+pdhW8B5Ne3DiR5wXrEyqdjgRIsk=" + } + } + } + } + } + }, + "429": { + "description": "짧은 시간에 요청이 너무 많아 클라이언트 IP가 차단됐습니다. 인증 실패가 원인일 수 있습니다. 잠시 후 다시 시도하세요." + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/auth/logout": { + "post": { + "description": "ETAPI 토큰을 삭제하거나 비활성화하여 로그아웃합니다.", + "operationId": "logout", + "responses": { + "204": { + "description": "로그아웃 성공" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/app-info": { + "get": { + "description": "실행 중인 Trilium 인스턴스 정보를 반환합니다.", + "operationId": "getAppInfo", + "responses": { + "200": { + "description": "앱 정보", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/AppInfo" + } + } + } + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/backup/{backupName}": { + "parameters": [ + { + "name": "backupName", + "in": "path", + "required": true, + "description": "예를 들어 backupName이 \"now\"이면 \"backup-now.db\" 파일에 백업합니다.", + "schema": { + "$ref": "#/components/schemas/StringId" + } + } + ], + "put": { + "description": "지정한 이름으로 데이터베이스를 백업합니다.", + "operationId": "createBackup", + "responses": { + "204": { + "description": "백업 생성 완료" + }, + "default": { + "description": "예기치 않은 오류", + "content": { + "application/json; charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "EtapiTokenAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + }, + "EtapiBasicAuth": { + "type": "http", + "scheme": "basic", + "description": "HTTP 기본 인증에서 사용자 이름은 임의의 문자열을 사용하며 검사하지 않습니다. 예: trilium. 비밀번호 자리에는 발급받은 ETAPI 토큰을 넣습니다. Trilium 로그인 비밀번호는 사용할 수 없습니다. 설정의 ETAPI 항목에서 생성한 토큰을 사용하세요." + } + }, + "schemas": { + "CreateNoteDef": { + "type": "object", + "required": [ + "parentNoteId", + "title", + "type", + "content" + ], + "properties": { + "parentNoteId": { + "$ref": "#/components/schemas/EntityId", + "description": "트리에서 상위 노트의 ID" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "code", + "file", + "image", + "search", + "book", + "relationMap", + "render" + ] + }, + "mime": { + "type": "string", + "description": "노트 유형이 code 또는 file 또는 image일 때만 지정하면 됩니다.", + "example": "application/json" + }, + "content": { + "type": "string" + }, + "notePosition": { + "type": "integer", + "description": "상위 노트 안에서의 순서입니다. 일반적인 순서는 10 단위로 증가합니다. 맨 앞에 넣으려면 5를 사용할 수 있고 두 번째는 15를 사용할 수 있습니다. 맨 뒤에 넣으려면 1000000처럼 큰 값을 사용하세요." + }, + "prefix": { + "type": "string", + "description": "prefix는 노트가 배치된 가지마다 따로 붙이는 제목 접두사입니다. 같은 노트를 두 곳에 배치하고 한쪽에서만 제목을 조금 다르게 표시하려면 접두사를 사용하세요." + }, + "isExpanded": { + "type": "boolean", + "description": "노트를 폴더처럼 펼쳐 표시하려면 true로 설정합니다." + }, + "noteId": { + "$ref": "#/components/schemas/EntityId", + "description": "특정 noteId를 강제로 지정하려는 경우에만 입력하세요." + }, + "branchId": { + "$ref": "#/components/schemas/EntityId", + "description": "특정 branchId를 강제로 지정하려는 경우에만 입력하세요." + }, + "dateCreated": { + "$ref": "#/components/schemas/LocalDateTime", + "description": "노트 생성 시각의 현지 타임스탬프입니다. 현재 시간대의 현재 시각이라는 기본값을 바꿀 때만 지정하세요." + }, + "utcDateCreated": { + "$ref": "#/components/schemas/UtcDateTime", + "description": "노트 생성 시각의 UTC 타임스탬프입니다. 현재 시각이라는 기본값을 바꿀 때만 지정하세요." + } + } + }, + "Note": { + "type": "object", + "properties": { + "noteId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "code", + "render", + "file", + "image", + "search", + "relationMap", + "book", + "noteMap", + "mermaid", + "webView", + "shortcut", + "doc", + "contentWidget", + "launcher" + ] + }, + "mime": { + "type": "string" + }, + "isProtected": { + "type": "boolean", + "readOnly": true + }, + "blobId": { + "type": "string", + "description": "본문 해시 역할을 하는 데이터 객체의 ID" + }, + "attributes": { + "$ref": "#/components/schemas/AttributeList", + "readOnly": true + }, + "parentNoteIds": { + "$ref": "#/components/schemas/EntityIdList", + "readOnly": true + }, + "childNoteIds": { + "$ref": "#/components/schemas/EntityIdList", + "readOnly": true + }, + "parentBranchIds": { + "$ref": "#/components/schemas/EntityIdList", + "readOnly": true + }, + "childBranchIds": { + "$ref": "#/components/schemas/EntityIdList", + "readOnly": true + }, + "dateCreated": { + "$ref": "#/components/schemas/LocalDateTime" + }, + "dateModified": { + "$ref": "#/components/schemas/LocalDateTime", + "readOnly": true + }, + "utcDateCreated": { + "$ref": "#/components/schemas/UtcDateTime" + }, + "utcDateModified": { + "$ref": "#/components/schemas/UtcDateTime", + "readOnly": true + } + } + }, + "Branch": { + "type": "object", + "description": "가지는 노트를 트리에 배치하며 상위 노트와 하위 노트의 관계를 나타냅니다.", + "properties": { + "branchId": { + "$ref": "#/components/schemas/EntityId" + }, + "noteId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true, + "description": "하위 노트 식별자" + }, + "parentNoteId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true, + "description": "상위 노트 식별자" + }, + "prefix": { + "type": "string" + }, + "notePosition": { + "type": "integer", + "format": "int32" + }, + "isExpanded": { + "type": "boolean" + }, + "utcDateModified": { + "$ref": "#/components/schemas/UtcDateTime", + "readOnly": true + } + } + }, + "NoteWithBranch": { + "type": "object", + "properties": { + "note": { + "$ref": "#/components/schemas/Note" + }, + "branch": { + "$ref": "#/components/schemas/Branch" + } + } + }, + "Attachment": { + "type": "object", + "description": "첨부 파일은 노트에 속하며 제목과 내용을 가집니다.", + "properties": { + "attachmentId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "첨부 파일 소유자의 식별자. noteId 또는 revisionId입니다." + }, + "role": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "title": { + "type": "string" + }, + "position": { + "type": "integer", + "format": "int32" + }, + "blobId": { + "type": "string", + "description": "본문 해시 역할을 하는 데이터 객체의 ID" + }, + "dateModified": { + "$ref": "#/components/schemas/LocalDateTime", + "readOnly": true + }, + "utcDateModified": { + "$ref": "#/components/schemas/UtcDateTime", + "readOnly": true + }, + "utcDateScheduledForErasureSince": { + "$ref": "#/components/schemas/UtcDateTime", + "readOnly": true + }, + "contentLength": { + "type": "integer", + "format": "int32" + } + } + }, + "CreateAttachment": { + "type": "object", + "properties": { + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "첨부 파일 소유자의 식별자. noteId 또는 revisionId입니다." + }, + "role": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "position": { + "type": "integer", + "format": "int32" + } + } + }, + "Attribute": { + "type": "object", + "description": "속성은 노트에 연결된 키와 값의 쌍이며 라벨과 관계로 나뉩니다.", + "properties": { + "attributeId": { + "$ref": "#/components/schemas/EntityId" + }, + "noteId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true, + "description": "하위 노트 식별자" + }, + "type": { + "type": "string", + "enum": [ + "label", + "relation" + ] + }, + "name": { + "type": "string", + "pattern": "^[^\\s]+", + "example": "shareCss" + }, + "value": { + "type": "string" + }, + "position": { + "type": "integer", + "format": "int32" + }, + "isInheritable": { + "type": "boolean" + }, + "utcDateModified": { + "$ref": "#/components/schemas/UtcDateTime", + "readOnly": true + } + } + }, + "AttributeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + }, + "SearchResponse": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Note" + } + }, + "debugInfo": { + "type": "object", + "description": "&debug=true로 활성화한 검색어 구문 분석 디버깅 정보" + } + } + }, + "EntityId": { + "type": "string", + "pattern": "[a-zA-Z0-9_]{4,32}", + "example": "evnnmvHTCgIn" + }, + "StringId": { + "type": "string", + "pattern": "[a-zA-Z0-9_]{1,32}", + "example": "my_ID" + }, + "EntityIdList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + }, + "LocalDateTime": { + "type": "string", + "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}[\\+\\-][0-9]{4}", + "example": "2021-12-31 20:18:11.930+0100" + }, + "UtcDateTime": { + "type": "string", + "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z", + "example": "2021-12-31 19:18:11.930000+00:00" + }, + "AppInfo": { + "type": "object", + "properties": { + "appVersion": { + "type": "string", + "description": "Trilium 버전", + "example": "0.50.2" + }, + "dbVersion": { + "type": "integer", + "format": "int32", + "description": "데이터베이스 버전", + "example": 194 + }, + "syncVersion": { + "type": "integer", + "format": "int32", + "description": "동기화 프로토콜 버전", + "example": 25 + }, + "buildDate": { + "type": "string", + "format": "date-time", + "description": "빌드 날짜", + "example": "2022-02-09 22:52:36+01:00" + }, + "buildRevision": { + "type": "string", + "description": "빌드에 사용한 Git 커밋", + "example": "23daaa2387a0655685377f0a541d154aeec2aae8" + }, + "dataDirectory": { + "type": "string", + "description": "Trilium 파일을 저장하는 데이터 디렉토리", + "example": "/home/user/data" + }, + "clipperProtocolVersion": { + "type": "string", + "description": "지원하는 Trilium 웹 클리퍼 프로토콜 버전", + "example": 1 + }, + "utcDateTime": { + "type": "string", + "description": "현재 UTC 날짜와 시각", + "example": "2022-03-07 21:54:25.277000+00:00" + } + } + }, + "Error": { + "type": "object", + "required": [ + "status", + "code", + "message" + ], + "properties": { + "status": { + "type": "integer", + "format": "int32", + "description": "HTTP 응답에 사용한 것과 같은 HTTP 상태 코드", + "example": 400 + }, + "code": { + "type": "string", + "description": "고정된 문자열 상수", + "example": "NOTE_IS_PROTECTED" + }, + "message": { + "type": "string", + "description": "사람이 읽을 수 있는 오류 설명. 추가 정보가 포함될 수 있습니다.", + "example": "노트 'evnnmvHTCgIn'은 보호되어 있어 ETAPI로 변경할 수 없습니다." + } + } + } + } + } +} \ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/fnote.html b/updates/2026-09-05/phase9/doc_notes/en/api-ko/fnote.html new file mode 100644 index 0000000..8ea0e63 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/fnote.html @@ -0,0 +1,184 @@ +프런트엔드 노트 객체 FNote

프런트엔드 노트 객체 FNote

연결된 공식 문서의 한국어 사본입니다. 함수 이름과 코드 문법은 원문을 유지했습니다. 외부 문서는 운영 버전과 다를 수 있으므로 지원 여부를 확인하세요. 공식 원문 보기

노트는 Trilium의 핵심 데이터 단위입니다.

+
목차

생성자

속성

접근자

메서드

생성자

속성

attachments: null | FAttachment[]
attributes: string[]
blobId: string
children: string[]
childToBranch: Record<string, string>
highlightedTokens?: string[]
isProtected: boolean
mime: string

콘텐츠 유형. 예: "application/json"

+
noteId: string
parents: string[]
parentToBranch: Record<string, string>
searchResultsLoaded?: boolean
targetRelations: string[]
title: string
type: NoteType

접근자

메서드

  • 매개변수

    • childNoteId: string
    • branchId: string
    • sort: boolean = true

    반환값 void

  • 매개변수

    • parentNoteId: string
    • branchId: string
    • sort: boolean = true

    반환값 void

  • 이 FNote를 프런트엔드 또는 백엔드 스크립트로 실행합니다.

    +

    반환값 Promise<any>

    스크립트 실행이 끝나면 완료되는 Promise입니다. 프런트엔드 노트라면 스크립트의 반환값도 포함합니다.

    +

    실행할 수 없는 노트 유형이나 MIME 유형이면 Error가 발생합니다.

    +
  • 이 노트에 도달하는 모든 노트 경로를 반환합니다. 검색 노트가 포함된 경로는 순환이 생길 수 있어 제외합니다.

    +

    반환값 string[][]

    노트 경로 배열입니다. 각 경로는 해당 경로를 이루는 노트 ID 배열로 표현합니다.

    +
  • 매개변수

    • type: AttributeType

      속성 유형. 예: label 또는 relation

      +
    • name: string

      속성 이름

      +

    반환값 null | string

    지정한 유형과 이름의 속성값입니다. 해당 속성이 없으면 null입니다.

    +
  • 가능한 노트 경로 중에서 다음 조건에 맞는 경로를 반환합니다: "가장 적절한 경로"

    +

    매개변수

    • OptionalhoistedNoteId: string = "root"

    반환값 string[]

    해당 노트 경로를 이루는 노트 ID 배열

    +
  • 가능한 노트 경로 중에서 다음 조건에 맞는 경로를 반환합니다: "가장 적절한 경로"

    +

    매개변수

    • OptionalhoistedNoteId: string = "root"

    반환값 string

    직렬화한 노트 경로. 예: root/a1h315/js725h

    +
  • 매개변수

    • name: string

      라벨 이름

      +

    반환값 null | string

    라벨이 있으면 라벨 값을 반환하고 없으면 null을 반환합니다.

    +
  • 매개변수

    • type: AttributeType

      속성 유형. 예: label 또는 relation

      +
    • name: string

      속성 이름

      +

    반환값 undefined | FAttribute

    지정한 유형과 이름의 속성입니다. 여러 개면 첫 번째를 반환합니다. 해당 노트에 이런 속성이 없으면 null입니다.

    +
  • 매개변수

    • type: AttributeType

      속성 유형. 예: label 또는 relation

      +
    • name: string

      속성 이름

      +

    반환값 null | string

    지정한 유형과 이름의 속성값입니다. 해당 속성이 없으면 null입니다.

    +
  • 매개변수

    • name: string

      라벨 이름

      +

    반환값 null | string

    라벨이 있으면 라벨 값을 반환하고 없으면 null을 반환합니다.

    +
  • 매개변수

    • name: string

      관계 이름

      +

    반환값 null | string

    관계가 있으면 관계 값을 반환하고 없으면 null을 반환합니다.

    +
  • 매개변수

    • name: string

    반환값 Promise<null | FNote>

    관계의 대상 노트입니다. 대상이 비어 있거나 노트를 찾지 못하면 null입니다.

    +
  • 매개변수

    • name: string

      관계 이름

      +

    반환값 null | string

    관계가 있으면 관계 값을 반환하고 없으면 null을 반환합니다.

    +
  • 반환값 null | "frontend" | "backend"

    JavaScript 실행 환경. 가능한 값: "frontend" or "backend"

    +
  • 매개변수

    • ancestorNoteId: string
    • followTemplates: boolean = false
    • visitedNoteIds: null | Set<string> = null

    반환값 boolean

  • 매개변수

    • type: AttributeType

      속성 유형. 예: label 또는 relation

      +
    • name: string

      속성 이름

      +

    반환값 boolean

    상속받은 속성을 포함해 지정한 유형과 이름의 속성이 있으면 true입니다.

    +
  • 매개변수

    • name: string

      라벨 이름

      +

    반환값 boolean

    상속받은 라벨을 포함해 해당 라벨이 있으면 true입니다.

    +
  • 매개변수

    • type: AttributeType

      속성 유형. 예: label 또는 relation

      +
    • name: string

      속성 이름

      +

    반환값 boolean

    상속받은 속성을 포함해 지정한 유형과 이름의 속성이 있으면 true입니다.

    +
  • 매개변수

    • name: string

      라벨 이름

      +

    반환값 boolean

    상속받은 라벨을 제외하고 해당 라벨이 있으면 true입니다.

    +
  • 매개변수

    • name: string

      관계 이름

      +

    반환값 boolean

    상속받은 관계를 제외하고 해당 관계가 있으면 true입니다.

    +
  • 매개변수

    • name: string

      관계 이름

      +

    반환값 boolean

    상속받은 관계를 포함해 해당 관계가 있으면 true입니다.

    +
  • 반환값 boolean

    숨겨지지 않은 경로가 없으면 true입니다. 즉 보이는 트리에 노트 복제본이 없다는 뜻입니다.

    +
  • 매개변수

    • name: string

      라벨 이름

      +

    반환값 boolean

    상속받은 라벨을 포함해 라벨이 존재하면서 다음 값이 아니면 true입니다: "false" value.

    +
\ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/frontend.html b/updates/2026-09-05/phase9/doc_notes/en/api-ko/frontend.html new file mode 100644 index 0000000..3341d7c --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/frontend.html @@ -0,0 +1,167 @@ +프런트엔드 스크립트 API

프런트엔드 스크립트 API

연결된 공식 문서의 한국어 사본입니다. 함수 이름과 코드 문법은 원문을 유지했습니다. 외부 문서는 운영 버전과 다를 수 있으므로 지원 여부를 확인하세요. 공식 원문 보기

interface Api {
    $container: null | JQuery<HTMLElement>;
    BasicWidget: typeof BasicWidget;
    bindGlobalShortcut: (
        keyboardShortcut: string,
        handler: null | Handler,
        namespace?: null | string,
    ) => void;
    createLink: (
        notePath: undefined | string,
        options?: CreateLinkOptions,
    ) => Promise<JQuery<HTMLElement>>;
    createNoteLink: (
        notePath: undefined | string,
        options?: CreateLinkOptions,
    ) => Promise<JQuery<HTMLElement>>;
    currentNote: FNote;
    dayjs: __module;
    formatDateISO: (date: Date) => string;
    formatNoteSize: (size: number) => string;
    formatSize: (size: number) => string;
    getDayNote: (date: string) => Promise<null | FNote>;
    getMonthNote: (month: string) => Promise<null | FNote>;
    getQuarterNote: (quarter: string) => Promise<null | FNote>;
    getTodayNote: () => Promise<null | FNote>;
    getWeekFirstDayNote: (date: string) => Promise<null | FNote>;
    getWeekNote: (week: string) => Promise<null | FNote>;
    getYearNote: (year: string) => Promise<null | FNote>;
    logMessages: Record<string, string[]>;
    logSpacedUpdates: Record<string, default>;
    NoteContextAwareWidget: typeof NoteContextAwareWidget;
    originEntity: unknown;
    parseDate: (str: string) => Date;
    protectNote: (
        noteId: string,
        protect: boolean,
        includingSubtree: boolean,
    ) => Promise<void>;
    protectSubTree: (
        noteId: string,
        protect: boolean,
        includingSubtree: boolean,
    ) => Promise<void>;
    randomString: (len: number) => string;
    RightPanelWidget: typeof RightPanelWidget;
    setupElementTooltip: ($el: JQuery<HTMLElement>) => void;
    showConfirmDialog: (message: string) => Promise<unknown>;
    showError: (message: string, delay?: number) => void;
    showInfoDialog: (message: string) => Promise<unknown>;
    showMessage: (message: string, delay?: number) => void;
    showPromptDialog: (props: PromptDialogOptions) => Promise<null | string>;
    startNote: FNote;
    triggerCommand: <K extends keyof CommandMappings>(
        name: K,
        _data?: CommandMappings[K],
    ) => undefined | null | Promise<unknown>;
    triggerEvent: <K extends EventNames>(
        name: K,
        data: EventData<K>,
    ) => undefined | null | Promise<unknown>;
    waitUntilSynced: () => Promise<void>;
    activateNewNote(notePath: string): Promise<void>;
    activateNote(notePath: string): Promise<void>;
    addButtonToToolbar(opts: AddToToolbarOpts): void;
    addTextToActiveContextEditor(text: string): void;
    getActiveContext(): NoteContext;
    getActiveContextCodeEditor(): Promise<unknown>;
    getActiveContextNote(): FNote;
    getActiveContextNotePath(): null | string;
    getActiveContextTextEditor(): Promise<unknown>;
    getActiveMainContext(): NoteContext;
    getActiveNoteDetailWidget(): Promise<default>;
    getComponentByEl(el: HTMLElement): default;
    getInstanceName(): string;
    getMainNoteContexts(): NoteContext[];
    getNote(noteId: string): Promise<null | FNote>;
    getNoteContexts(): NoteContext[];
    getNotes(
        noteIds: string[],
        silentNotFoundError?: boolean,
    ): Promise<FNote[]>;
    log(message: string): void;
    openSplitWithNote(notePath: string, activate: boolean): Promise<void>;
    openTabWithNote(notePath: string, activate: boolean): Promise<void>;
    refreshIncludedNote(includedNoteId: string): void;
    reloadNotes(noteIds: string[]): Promise<void>;
    runAsyncOnBackendWithManualTransactionHandling(
        func: Func,
        params: unknown[],
    ): unknown;
    runOnBackend(func: Func, params: unknown[]): unknown;
    searchForNote(searchString: string): Promise<null | FNote>;
    searchForNotes(searchString: string): Promise<FNote[]>;
    setHoistedNoteId(noteId: string): void;
}
목차

속성

$container: null | JQuery<HTMLElement>

스크립트가 렌더링한 전체 내용을 담는 영역

+
BasicWidget: typeof BasicWidget
bindGlobalShortcut: (
    keyboardShortcut: string,
    handler: null | Handler,
    namespace?: null | string,
) => void

형식 선언

    • (
          keyboardShortcut: string,
          handler: null | Handler,
          namespace?: null | string,
      ): void
    • 매개변수

      • keyboardShortcut: string

        예: "ctrl+shift+a"

        +
      • handler: null | Handler
      • namespace: null | string = null

        같은 바인딩을 여러 번 호출할 수 있다면 처리 함수의 네임스페이스를 지정하세요. 같은 ID의 처리 함수가 있으면 새 함수로 교체합니다.

        +

      반환값 void

createLink: (
    notePath: undefined | string,
    options?: CreateLinkOptions,
) => Promise<JQuery<HTMLElement>>

지정한 노트를 가리키는 jQuery 링크 객체를 만듭니다.

+

형식 선언

    • (
          notePath: undefined | string,
          options?: CreateLinkOptions,
      ): Promise<JQuery<HTMLElement>>
    • 매개변수

      반환값 Promise<JQuery<HTMLElement>>

        +
      • 링크를 담은 jQuery 요소. 감싸는 요소: )
      • +
      +
createNoteLink: (
    notePath: undefined | string,
    options?: CreateLinkOptions,
) => Promise<JQuery<HTMLElement>>
    +
  • 대신 api.createLink()를 사용하세요.
  • +
+
currentNote: FNote

현재 실행 중인 소스 코드가 작성된 노트입니다.

+
dayjs: __module

날짜 처리를 위한 day.js 라이브러리입니다. 참고: https://day.js.org 라이브러리 사용 안내

+
formatDateISO: (date: Date) => string

형식 선언

    • (date: Date): string
    • 이 함수는 현지 시각을 반환합니다.

      +

      매개변수

      • date: Date

      반환값 string

YYYY-MM-DD 형식의 날짜

+
formatNoteSize: (size: number) => string

형식 선언

    • (size: number): string
    • 매개변수

      • size: number

        바이트 단위

        +

      반환값 string

      서식을 적용한 문자열

      +
    +
  • api.formatSize()를 사용하세요.
  • +
+
formatSize: (size: number) => string

형식 선언

    • (size: number): string
    • 매개변수

      • size: number

        바이트 단위

        +

      반환값 string

      서식을 적용한 문자열

      +
getDayNote: (date: string) => Promise<null | FNote>

지정한 날짜의 일별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+

형식 선언

    • (date: string): Promise<null | FNote>
    • 매개변수

      • date: string

        예: "2019-04-29"

        +

      반환값 Promise<null | FNote>

getMonthNote: (month: string) => Promise<null | FNote>

월별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+

형식 선언

    • (month: string): Promise<null | FNote>
    • 매개변수

      • month: string

        예: "2019-04"

        +

      반환값 Promise<null | FNote>

getQuarterNote: (quarter: string) => Promise<null | FNote>

지정한 날짜의 분기별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+
getTodayNote: () => Promise<null | FNote>

오늘의 일별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+
getWeekFirstDayNote: (date: string) => Promise<null | FNote>

지정한 날짜가 속한 주의 첫날에 해당하는 일별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+

형식 선언

    • (date: string): Promise<null | FNote>
    • 매개변수

      • date: string

        예: "2019-04-29"

        +

      반환값 Promise<null | FNote>

getWeekNote: (week: string) => Promise<null | FNote>

지정한 날짜의 주별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+
getYearNote: (year: string) => Promise<null | FNote>

연도별 노트를 반환합니다. 없으면 자동으로 만듭니다.

+

형식 선언

    • (year: string): Promise<null | FNote>
    • 매개변수

      • year: string

        예: "2019"

        +

      반환값 Promise<null | FNote>

logMessages: Record<string, string[]>
logSpacedUpdates: Record<string, default>
NoteContextAwareWidget: typeof NoteContextAwareWidget
originEntity: unknown

이 실행을 시작하게 한 이벤트의 엔터티

+
parseDate: (str: string) => Date
protectNote: (
    noteId: string,
    protect: boolean,
    includingSubtree: boolean,
) => Promise<void>

형식 선언

    • (noteId: string, protect: boolean, includingSubtree: boolean): Promise<void>
    • 매개변수

      • noteId: string
      • protect: boolean

        노트를 보호하려면 true를 사용하고 보호를 해제하려면 false를 사용합니다.

        +
      • includingSubtree: boolean

      반환값 Promise<void>

protectSubTree: (
    noteId: string,
    protect: boolean,
    includingSubtree: boolean,
) => Promise<void>

형식 선언

    • (noteId: string, protect: boolean, includingSubtree: boolean): Promise<void>
    • 매개변수

      • noteId: string
      • protect: boolean

        하위 트리를 보호하려면 true를 사용하고 보호를 해제하려면 false를 사용합니다.

        +
      • includingSubtree: boolean

      반환값 Promise<void>

randomString: (len: number) => string

지정한 길이의 임의 문자열을 반환합니다. 암호학적으로 안전한 난수를 만드는 함수가 아닙니다.

+

형식 선언

    • (len: number): string
    • 매개변수

      • len: number

      반환값 string

      임의 문자열

      +
RightPanelWidget: typeof RightPanelWidget
setupElementTooltip: ($el: JQuery<HTMLElement>) => void

형식 선언

    • ($el: JQuery<HTMLElement>): void
    • 매개변수

      • $el: JQuery<HTMLElement>

        도움말을 표시할 jQuery 객체

        +

      반환값 void

showConfirmDialog: (message: string) => Promise<unknown>

사용자에게 확인 대화상자를 표시합니다.

+

형식 선언

    • (message: string): Promise<unknown>
    • 매개변수

      • message: string

      반환값 Promise<unknown>

      사용자가 확인하면 true로 완료되는 Promise

      +
showError: (message: string, delay?: number) => void

사용자에게 오류 알림을 잠깐 표시합니다.

+
showInfoDialog: (message: string) => Promise<unknown>

사용자에게 정보 대화상자를 표시합니다.

+
showMessage: (message: string, delay?: number) => void

사용자에게 정보 알림을 잠깐 표시합니다.

+
showPromptDialog: (props: PromptDialogOptions) => Promise<null | string>

사용자에게 입력 대화상자를 표시합니다.

+

형식 선언

startNote: FNote

현재 스크립트 실행이 시작된 노트입니다. 이벤트의 진입점에 해당합니다.

+
triggerCommand: <K extends keyof CommandMappings>(
    name: K,
    _data?: CommandMappings[K],
) => undefined | null | Promise<unknown>

명령을 실행합니다. 매우 낮은 수준의 API이므로 가능하면 다른 방법을 사용하세요.

+
triggerEvent: <K extends EventNames>(
    name: K,
    data: EventData<K>,
) => undefined | null | Promise<unknown>

이벤트를 발생시킵니다. 매우 낮은 수준의 API이므로 가능하면 다른 방법을 사용하세요.

+
waitUntilSynced: () => Promise<void>

Trilium은 백엔드와 프런트엔드로 나뉘어 실행됩니다. 스크립트가 백엔드에서 변경한 내용은 프런트엔드에 비동기로 동기화됩니다.

+

이 메서드는 다음 과정이 모두 끝나면 완료되는 Promise를 반환합니다. 백엔드에서> 프런트엔드로의 동기화입니다. 새 노트를 만들었다면 프런트엔드에 동기화될 때까지 기다린 뒤 활성화하는 데 사용할 수 있습니다.

+

메서드

  • 새로 만든 노트를 활성화합니다. this.activateNote()와 달리 프런트엔드 동기화 완료까지 확인합니다.

    +

    매개변수

    • notePath: string

      (또는 noteId)

      +

    반환값 Promise<void>

  • 실행 도구 모음에 새 실행 도구를 추가합니다. 같은 ID가 있으면 변경합니다.

    +

    매개변수

    반환값 void

    이제 왼쪽 위 메뉴에서 실행 도구를 만들거나 변경할 수 있습니다. 메뉴 경로:> 실행 도구 모음 설정. 특수한 용도에는 백엔드 API의 createOrUpdateLauncher()도 사용할 수 있습니다.

    +
  • 편집기의 커서 위치에 지정한 글을 추가합니다.

    +

    매개변수

    • text: string

      일반 텍스트만 사용할 수 있습니다. HTML은 지원하지 않습니다.

      +

    반환값 void

  • 노트 상세 화면을 담당하는 위젯에 접근합니다. 사용할 수 있는 메서드의 예: getWidgetType() 및 getTypeWidget() 실제 위젯 유형의 구현체에 접근하는 데 사용합니다.

    +

    반환값 Promise<default>

  • 인스턴스 이름은 개별 Trilium 실행 환경을 구분합니다. 특정 인스턴스에서만 작업을 실행해야 하는 스크립트에 유용합니다.

    +

    반환값 string

  • 노트 목록을 반환합니다. 캐시에 없는 노트는 불러옵니다.

    +

    createLink() 등으로 노트를 하나씩 가져오는 대신 여러 노트를 한꺼번에 캐시에 채울 때 자주 사용합니다.

    +

    매개변수

    • noteIds: string[]
    • OptionalsilentNotFoundError: boolean

      노트를 찾지 못해도 오류를 보고하지 않음

      +

    반환값 Promise<FNote[]>

  • 새 분할 화면에서 노트를 엽니다.

    +

    매개변수

    • notePath: string

      (또는 noteId)

      +
    • activate: boolean

      새 분할 화면을 활성화하려면 true를 사용하고 현재 화면에 머무르려면 false를 사용합니다.

      +

    반환값 Promise<void>

  • 새 탭에서 노트를 엽니다.

    +

    매개변수

    • notePath: string

      (또는 noteId)

      +
    • activate: boolean

      새 탭을 활성화하려면 true를 사용하고 현재 탭에 머무르려면 false를 사용합니다.

      +

    반환값 Promise<void>

  • 매개변수로 지정한 노트를 포함하는 현재 열린 노트를 모두 새로 고칩니다.

    +

    매개변수

    • includedNoteId: string

      포함된 노트의 noteId

      +

    반환값 void

  • 백엔드의 내용을 바탕으로 프런트엔드 노트 트리 캐시를 갱신합니다.

    +

    매개변수

    • noteIds: string[]

    반환값 Promise<void>

  • 지정한 익명 함수를 백엔드에서 실행합니다. 내부적으로 함수를 문자열로 직렬화한 뒤 AJAX로 전송합니다. 비동기 함수가 필요한 고급 용도에 사용합니다. 요청 단위의 자동 트랜잭션 관리는 적용되지 않으므로 api.transactional()로 트랜잭션을 직접 지정해야 합니다.

    +

    동기 함수라면 api.runOnBackend()를 사용하세요.

    +

    매개변수

    • func: Func

      백엔드에서 실행할 동기 함수

      +
    • params: unknown[]

      백엔드로 보낼 익명 함수의 매개변수 목록

      +

    반환값 unknown

    백엔드에서 실행한 함수의 반환값

    +
  • 지정한 익명 함수를 백엔드에서 실행합니다. 내부적으로 함수를 문자열로 직렬화한 뒤 AJAX로 전송합니다. 트랜잭션 관리가 올바르게 작동하려면 동기 함수를 전달해야 합니다. 트랜잭션을 직접 관리할 수 있다면 api.runAsyncOnBackendWithManualTransactionHandling()을 사용할 수 있습니다.

    +

    매개변수

    • func: Func

      백엔드에서 실행할 동기 함수

      +
    • params: unknown[]

      백엔드로 보낼 익명 함수의 매개변수 목록

      +

    반환값 unknown

    백엔드에서 실행한 함수의 반환값

    +
\ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/internal.json b/updates/2026-09-05/phase9/doc_notes/en/api-ko/internal.json new file mode 100644 index 0000000..4cddd28 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/internal.json @@ -0,0 +1,2712 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "Trilium Notes 동기화 서버 API", + "version": "0.94.0", + "description": "Trilium Notes와 TriliumNext Notes에서 사용하는 내부 동기화 서버 API입니다.\n\n공식 지원 외부 API는 [ETAPI 안내](https://triliumnext.github.io/Docs/Wiki/etapi.html)를 참고하세요.\n\n이 문서에는 아직 모든 경로가 나와 있지 않습니다. 전체 목록은 [경로 제어 코드](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts)를 확인하세요.", + "contact": { + "name": "TriliumNext 문제 신고", + "url": "https://github.com/TriliumNext/Notes/issues" + }, + "license": { + "name": "GNU Free Documentation License 1.3 (or later)", + "url": "https://www.gnu.org/licenses/fdl-1.3" + } + }, + "paths": { + "/api/setup/sync-seed": { + "get": { + "tags": [ + "auth" + ], + "summary": "documentSecret 값 동기화", + "description": "로그인의 첫 단계입니다.", + "operationId": "setup-sync-seed", + "responses": { + "200": { + "description": "작업 성공", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "syncVersion": { + "type": "integer", + "example": 34 + }, + "options": { + "type": "object", + "properties": { + "documentSecret": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "user-password": [] + } + ] + } + }, + "/api/anthropic/models": { + "post": { + "summary": "사용 가능한 Anthropic 모델 조회", + "operationId": "anthropic-list-models", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "baseUrl": { + "type": "string", + "description": "사용자 지정 Anthropic API 기본 주소. 생략할 수 있습니다." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "사용 가능한 Anthropic 모델 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "chatModels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "embeddingModels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "모델 목록 조회 오류" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/app-info": { + "get": { + "summary": "설치 정보 조회", + "operationId": "app-info", + "externalDocs": { + "description": "서버 구현체", + "url": "https://github.com/TriliumNext/Notes/blob/v0.91.6/src/services/app_info.ts" + }, + "responses": { + "200": { + "description": "설치 정보", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "appVersion": { + "type": "string", + "example": "0.91.6" + }, + "dbVersion": { + "type": "integer", + "example": 228 + }, + "nodeVersion": { + "type": "string", + "description": "process.version 값" + }, + "syncVersion": { + "type": "integer", + "example": 34 + }, + "buildDate": { + "type": "string", + "example": "2024-09-07T18:36:34Z" + }, + "buildRevision": { + "type": "string", + "example": "7c0d6930fa8f20d269dcfbcbc8f636a25f6bb9a7" + }, + "dataDirectory": { + "type": "string", + "example": "/var/lib/trilium" + }, + "clipperProtocolVersion": { + "type": "string", + "example": "1.0" + }, + "utcDateTime": { + "$ref": "#/components/schemas/UtcDateTime" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ] + } + }, + "/api/branches/{branchId}": { + "delete": { + "summary": "가지 삭제 (노트 복제본)", + "operationId": "branches-delete", + "parameters": [ + { + "name": "branchId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/BranchId" + } + }, + { + "name": "taskId", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "작업 그룹 식별자" + }, + { + "name": "eraseNotes", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "노트를 즉시 지울지 여부" + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": true, + "description": "이 작업 그룹의 마지막 요청인지 여부" + } + ], + "responses": { + "200": { + "description": "가지 삭제 성공", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "noteDeleted": { + "type": "boolean", + "description": "마지막 노트 복제본이 삭제됐는지 여부" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "data" + ] + } + }, + "/api/llm/embeddings/similar/{noteId}": { + "get": { + "summary": "주어진 노트 ID를 기준으로 비슷한 노트 찾기", + "operationId": "embeddings-similar-by-note", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "default": "openai", + "description": "임베딩 제공자 ID" + }, + { + "name": "modelId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "default": "text-embedding-3-small", + "description": "임베딩 모델 ID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "default": 10, + "description": "반환할 비슷한 노트의 최대 개수" + }, + { + "name": "threshold", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "float" + }, + "default": 0.7, + "description": "유사도 기준값 (0.0~1.0)" + } + ], + "responses": { + "200": { + "description": "비슷한 노트 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "similarNotes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "similarity": { + "type": "number", + "format": "float" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "잘못된 요청 매개변수" + }, + "404": { + "description": "노트를 찾을 수 없음" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/search": { + "post": { + "summary": "입력한 글과 비슷한 노트 검색", + "operationId": "embeddings-search-by-text", + "parameters": [ + { + "name": "providerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "default": "openai", + "description": "임베딩 제공자 ID" + }, + { + "name": "modelId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "default": "text-embedding-3-small", + "description": "임베딩 모델 ID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "default": 10, + "description": "반환할 비슷한 노트의 최대 개수" + }, + { + "name": "threshold", + "in": "query", + "required": false, + "schema": { + "type": "number", + "format": "float" + }, + "default": 0.7, + "description": "유사도 기준값 (0.0~1.0)" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "검색에 사용할 글" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "비슷한 노트 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "similarNotes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "similarity": { + "type": "number", + "format": "float" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "잘못된 요청 매개변수" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/providers": { + "get": { + "summary": "사용 가능한 임베딩 제공자 조회", + "operationId": "embeddings-get-providers", + "responses": { + "200": { + "description": "사용 가능한 임베딩 제공자 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "providers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "isEnabled": { + "type": "boolean" + }, + "priority": { + "type": "integer" + }, + "config": { + "type": "object" + } + } + } + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/providers/{providerId}": { + "patch": { + "summary": "임베딩 제공자 설정 변경", + "operationId": "embeddings-update-provider", + "parameters": [ + { + "name": "providerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "변경할 제공자 ID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "제공자 사용 여부" + }, + "priority": { + "type": "integer", + "description": "우선순위. 숫자가 작을수록 우선합니다." + }, + "config": { + "type": "object", + "description": "제공자별 설정" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "제공자 변경 성공", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + }, + "400": { + "description": "잘못된 제공자 ID 또는 설정" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/reprocess": { + "post": { + "summary": "모든 노트의 임베딩 다시 처리", + "operationId": "embeddings-reprocess-all", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "다시 처리할 때 사용할 제공자 ID" + }, + "modelId": { + "type": "string", + "description": "다시 처리할 때 사용할 모델 ID" + }, + "forceReprocess": { + "type": "boolean", + "description": "임베딩이 이미 있는 노트도 다시 처리할지 여부" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "다시 처리 시작", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "jobId": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "잘못된 제공자 ID 또는 설정" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/queue-status": { + "get": { + "summary": "임베딩 처리 대기열 상태 조회", + "operationId": "embeddings-queue-status", + "parameters": [ + { + "name": "jobId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "특정 처리 작업의 상태를 조회할 작업 ID. 생략할 수 있습니다." + } + ], + "responses": { + "200": { + "description": "대기열 상태 정보", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "idle", + "processing", + "paused" + ] + }, + "progress": { + "type": "number", + "format": "float", + "description": "진행률 (0~100)" + }, + "details": { + "type": "object" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/stats": { + "get": { + "summary": "임베딩 통계 조회", + "operationId": "embeddings-stats", + "responses": { + "200": { + "description": "임베딩 통계", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "stats": { + "type": "object", + "properties": { + "totalEmbeddings": { + "type": "integer" + }, + "providers": { + "type": "object" + }, + "modelCounts": { + "type": "object" + }, + "lastUpdated": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/failed": { + "get": { + "summary": "임베딩 생성에 실패한 노트 목록 조회", + "operationId": "embeddings-failed-notes", + "responses": { + "200": { + "description": "실패한 노트 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "failedNotes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "error": { + "type": "string" + }, + "failedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/retry/{noteId}": { + "post": { + "summary": "실패한 노트의 임베딩 생성 재시도", + "operationId": "embeddings-retry-note", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "다시 시도할 노트 ID" + }, + { + "name": "providerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "사용할 제공자 ID. 생략하면 설정된 기본 제공자를 사용합니다." + }, + { + "name": "modelId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "사용할 모델 ID. 생략하면 제공자의 기본 모델을 사용합니다." + } + ], + "responses": { + "200": { + "description": "재시도 결과", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "잘못된 요청" + }, + "404": { + "description": "노트를 찾을 수 없음" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/retry-all-failed": { + "post": { + "summary": "실패한 모든 노트의 임베딩 생성 재시도", + "operationId": "embeddings-retry-all-failed", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "사용할 제공자 ID. 생략하면 설정된 기본 제공자를 사용합니다." + }, + "modelId": { + "type": "string", + "description": "사용할 모델 ID. 생략하면 제공자의 기본 모델을 사용합니다." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "재시도 시작", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "jobId": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/rebuild-index": { + "post": { + "summary": "벡터 저장소 색인 다시 만들기", + "operationId": "embeddings-rebuild-index", + "responses": { + "200": { + "description": "다시 만들기 시작", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "jobId": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/embeddings/index-rebuild-status": { + "get": { + "summary": "벡터 색인 다시 만들기 상태 조회", + "operationId": "embeddings-rebuild-status", + "parameters": [ + { + "name": "jobId", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "특정 색인 작업의 상태를 조회할 작업 ID. 생략할 수 있습니다." + } + ], + "responses": { + "200": { + "description": "색인 다시 만들기 상태 정보", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "idle", + "in_progress", + "completed", + "failed" + ] + }, + "progress": { + "type": "number", + "format": "float", + "description": "진행률 (0~100)" + }, + "message": { + "type": "string" + }, + "details": { + "type": "object", + "properties": { + "startTime": { + "type": "string", + "format": "date-time" + }, + "processed": { + "type": "integer" + }, + "total": { + "type": "integer" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/sessions": { + "post": { + "summary": "새 언어 모델 대화 생성", + "operationId": "llm-create-session", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "대화 제목" + }, + "systemPrompt": { + "type": "string", + "description": "도우미의 동작 방식을 지정할 시스템 메시지" + }, + "temperature": { + "type": "number", + "description": "언어 모델의 무작위성 설정값 (0.0~1.0)" + }, + "maxTokens": { + "type": "integer", + "description": "응답에서 생성할 최대 토큰 수" + }, + "model": { + "type": "string", + "description": "사용할 모델. 제공자에 따라 다릅니다." + }, + "provider": { + "type": "string", + "description": "사용할 언어 모델 제공자. 예: openai 또는 anthropic 또는 ollama" + }, + "contextNoteId": { + "type": "string", + "description": "대화의 참고 자료로 사용할 노트 ID" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "대화 생성 성공", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + }, + "get": { + "summary": "모든 대화 조회", + "operationId": "llm-list-sessions", + "responses": { + "200": { + "description": "대화 목록", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastActive": { + "type": "string", + "format": "date-time" + }, + "messageCount": { + "type": "integer" + } + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/sessions/{sessionId}": { + "get": { + "summary": "특정 대화 조회", + "operationId": "llm-get-session", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "대화 상세 정보", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "messages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "assistant", + "system" + ] + }, + "content": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastActive": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "404": { + "description": "대화를 찾을 수 없음" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + }, + "delete": { + "summary": "대화 삭제", + "operationId": "llm-delete-session", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "대화 삭제 성공" + }, + "404": { + "description": "대화를 찾을 수 없음" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/chat/{chatNoteId}": { + "patch": { + "summary": "대화 설정 변경", + "operationId": "llm-update-chat", + "parameters": [ + { + "name": "chatNoteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "대화 노트 ID. 이전 이름은 sessionId입니다." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "변경할 대화 제목" + }, + "systemPrompt": { + "type": "string", + "description": "변경할 시스템 프롬프트" + }, + "temperature": { + "type": "number", + "description": "변경할 무작위성 설정값" + }, + "maxTokens": { + "type": "integer", + "description": "변경할 최대 토큰 수" + }, + "model": { + "type": "string", + "description": "변경할 모델" + }, + "provider": { + "type": "string", + "description": "변경할 제공자" + }, + "contextNoteId": { + "type": "string", + "description": "참고 자료로 사용할 새 노트 ID" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "대화 변경 성공", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "404": { + "description": "대화를 찾을 수 없음" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/chat/{chatNoteId}/messages": { + "post": { + "summary": "언어 모델에 메시지를 보내고 응답 받기", + "operationId": "llm-send-message", + "parameters": [ + { + "name": "chatNoteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "대화 노트 ID. 이전 이름은 sessionId입니다." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "언어 모델에 보낼 사용자 메시지" + }, + "options": { + "type": "object", + "description": "이 메시지에만 적용할 매개변수. 생략할 수 있습니다.", + "properties": { + "temperature": { + "type": "number" + }, + "maxTokens": { + "type": "integer" + }, + "model": { + "type": "string" + }, + "provider": { + "type": "string" + } + } + }, + "includeContext": { + "type": "boolean", + "description": "관련 노트를 참고 자료에 포함할지 여부" + }, + "useNoteContext": { + "type": "boolean", + "description": "대화에 지정된 참고 노트를 사용할지 여부" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "언어 모델 응답", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "response": { + "type": "string" + }, + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "similarity": { + "type": "number" + } + } + } + }, + "sessionId": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "대화를 찾을 수 없음" + }, + "500": { + "description": "요청 처리 오류" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/indexes/stats": { + "get": { + "summary": "언어 모델 지식 자료의 색인 상태 통계 조회", + "operationId": "llm-index-stats", + "responses": { + "200": { + "description": "색인 통계 조회 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/indexes": { + "post": { + "summary": "지식 자료 색인 작업 시작 또는 계속하기", + "operationId": "llm-start-indexing", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "모든 노트의 색인을 강제로 다시 만들지 여부" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "색인 작업 시작 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/indexes/failed": { + "get": { + "summary": "색인에 실패한 노트 목록 조회", + "operationId": "llm-failed-indexes", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "색인 실패 목록 조회 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + }, + "put": { + "summary": "실패한 모든 노트의 색인 재시도", + "operationId": "llm-retry-all-indexes", + "responses": { + "200": { + "description": "실패한 모든 색인 작업 재시도 시작 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/indexes/notes/{noteId}": { + "put": { + "summary": "이전에 실패한 특정 노트의 색인 재시도", + "operationId": "llm-retry-index", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "색인 재시도 시작 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + }, + "post": { + "summary": "특정 노트를 언어 모델 지식 자료에 색인", + "operationId": "llm-index-note", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "노트 색인 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/indexes/notes/similar": { + "get": { + "summary": "검색어와 비슷한 노트 찾기", + "operationId": "llm-find-similar-notes", + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "contextNoteId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 5 + } + } + ], + "responses": { + "200": { + "description": "비슷한 노트 검색 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/indexes/context": { + "get": { + "summary": "지식 자료를 바탕으로 언어 모델 질문의 참고 자료 생성", + "operationId": "llm-generate-context", + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "contextNoteId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "depth", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 2 + } + } + ], + "responses": { + "200": { + "description": "참고 자료 생성 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/llm/chat/{chatNoteId}/messages/stream": { + "post": { + "summary": "WebSocket으로 언어 모델에 메시지를 보내고 응답을 순차 수신", + "operationId": "llm-stream-message", + "parameters": [ + { + "name": "chatNoteId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "메시지를 보낼 대화 노트 ID. 이전 이름은 sessionId입니다." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "언어 모델에 보낼 사용자 메시지" + }, + "useAdvancedContext": { + "type": "boolean", + "description": "고급 참고 자료 추출 기능을 사용할지 여부" + }, + "showThinking": { + "type": "boolean", + "description": "응답에 생각 과정을 표시할지 여부" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "순차 전송 시작 성공" + }, + "404": { + "description": "대화를 찾을 수 없음" + }, + "500": { + "description": "요청 처리 오류" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/login/sync": { + "post": { + "tags": [ + "auth" + ], + "summary": "documentSecret으로 로그인", + "description": "`hash` 매개변수는 `documentSecret`과 `timestamp`를 사용한 HMAC으로 계산합니다.", + "operationId": "login-sync", + "externalDocs": { + "description": "HMAC 계산", + "url": "https://github.com/TriliumNext/Notes/blob/v0.91.6/src/services/utils.ts#L62-L66" + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "$ref": "#/components/schemas/UtcDateTime" + }, + "hash": { + "type": "string" + }, + "syncVersion": { + "type": "integer", + "example": 34 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "작업 성공", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "syncVersion": { + "type": "integer", + "example": 34 + }, + "options": { + "type": "object", + "properties": { + "documentSecret": { + "type": "string" + } + } + } + } + } + } + } + }, + "400": { + "description": "동기화 버전 또는 문서 비밀 값 불일치", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "동기화 버전이 다릅니다. 로컬 버전은 ${server syncVersion}이며 원격 버전은 ${requested syncVersion}입니다. 양쪽에서 같은 Trilium 버전을 사용하는 것이 좋습니다." + } + } + } + } + } + }, + "401": { + "description": "타임스탬프 불일치", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "인증 요청 시각이 맞지 않습니다. 클라이언트와 서버의 시각이 올바른지 확인하세요. 두 시계의 차이는 5분 미만이어야 합니다." + } + } + } + } + } + } + } + } + }, + "/api/notes/{noteId}": { + "get": { + "summary": "노트 메타데이터 조회", + "operationId": "notes-get", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/NoteId" + } + } + ], + "responses": { + "200": { + "description": "노트 메타데이터", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Note" + }, + { + "$ref": "#/components/schemas/Timestamps" + } + ] + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "data" + ] + }, + "delete": { + "summary": "노트 삭제", + "operationId": "notes-delete", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/NoteId" + } + }, + { + "name": "taskId", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "description": "작업 그룹 식별자" + }, + { + "name": "eraseNotes", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "노트를 즉시 지울지 여부" + }, + { + "name": "last", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": true, + "description": "이 작업 그룹의 마지막 요청인지 여부" + } + ], + "responses": { + "200": { + "description": "노트 삭제 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "data" + ] + } + }, + "/api/notes/{noteId}/blob": { + "get": { + "summary": "노트 본문 조회", + "operationId": "notes-blob", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/NoteId" + } + } + ], + "responses": { + "304": { + "description": "노트 본문", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blob" + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "data" + ] + } + }, + "/api/notes/{noteId}/metadata": { + "get": { + "summary": "노트 메타데이터 조회 (시각 정보만)", + "operationId": "notes-metadata", + "parameters": [ + { + "name": "noteId", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/NoteId" + } + } + ], + "responses": { + "200": { + "description": "노트 메타데이터", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Timestamps" + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "data" + ] + } + }, + "/api/llm/providers/ollama/models": { + "get": { + "summary": "사용 가능한 Ollama 모델 조회", + "operationId": "ollama-list-models", + "parameters": [ + { + "name": "baseUrl", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "사용자 지정 Ollama API 기본 주소. 생략할 수 있습니다." + } + ], + "responses": { + "200": { + "description": "사용 가능한 Ollama 모델 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "models": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + }, + "500": { + "description": "모델 목록 조회 오류" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/openai/models": { + "post": { + "summary": "사용 가능한 OpenAI 모델 조회", + "operationId": "openai-list-models", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "baseUrl": { + "type": "string", + "description": "사용자 지정 OpenAI API 기본 주소. 생략할 수 있습니다." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "사용 가능한 OpenAI 모델 목록", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "chatModels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "embeddingModels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "500": { + "description": "모델 목록 조회 오류" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "llm" + ] + } + }, + "/api/sync/changed": { + "get": { + "summary": "동기화 변경 사항 가져오기", + "operationId": "sync-changed", + "externalDocs": { + "description": "서버 구현체", + "url": "https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/api/sync.ts" + }, + "parameters": [ + { + "in": "query", + "name": "instanceId", + "required": true, + "schema": { + "type": "string" + }, + "description": "로컬 인스턴스 ID" + }, + { + "in": "query", + "name": "lastEntityChangeId", + "required": true, + "schema": { + "type": "integer" + }, + "description": "로컬에 있는 마지막 변경 ID" + }, + { + "in": "query", + "name": "logMarkerId", + "required": true, + "schema": { + "type": "string" + }, + "description": "서버 로그에서 이 요청을 구분할 표시" + } + ], + "responses": { + "200": { + "description": "동기화 변경 사항. 응답 크기는 약 1메가바이트로 제한됩니다.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entityChanges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityChange" + } + }, + "lastEntityChangeId": { + "type": "integer", + "description": "`outstandingPullCount > 0`이면 다음 요청의 매개변수에 이 값을 넣어 계속 가져옵니다." + }, + "outstandingPullCount": { + "type": "integer", + "example": 42, + "description": "원격 서버가 아직 반환하지 않은 변경 사항 수" + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "sync" + ] + } + }, + "/api/sync/update": { + "put": { + "summary": "동기화 변경 사항 보내기", + "description": "기본 사용법: `pageCount = 1`과 `pageIndex = 0`으로 설정하고 `requestId`는 생략합니다. 요청 본문에 엔터티 변경 사항을 넣습니다.", + "operationId": "sync-update", + "externalDocs": { + "description": "서버 구현체", + "url": "https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/api/sync.ts" + }, + "parameters": [ + { + "in": "header", + "name": "pageCount", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "header", + "name": "pageIndex", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "header", + "name": "requestId", + "schema": { + "type": "string", + "description": "여러 페이지로 나눈 요청을 구분할 ID" + } + }, + { + "in": "query", + "name": "logMarkerId", + "required": true, + "schema": { + "type": "string" + }, + "description": "서버 로그에서 이 요청을 구분할 표시" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "instanceId": { + "type": "string", + "description": "로컬 인스턴스 ID" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityChange" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "변경 사항 처리 성공" + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "sync" + ] + } + }, + "/api/tree": { + "get": { + "summary": "트리 데이터 조회", + "operationId": "tree", + "externalDocs": { + "description": "서버 구현체", + "url": "https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/api/tree.ts" + }, + "parameters": [ + { + "in": "query", + "name": "subTreeNoteId", + "required": false, + "schema": { + "type": "string" + }, + "description": "트리 데이터를 이 노트와 하위 노트로 제한" + } + ], + "responses": { + "200": { + "description": "노트와 가지 및 속성", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "branches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Branch" + } + }, + "notes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Note" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + } + } + } + } + } + }, + "security": [ + { + "session": [] + } + ], + "tags": [ + "data" + ] + } + }, + "/login": { + "post": { + "tags": [ + "auth" + ], + "summary": "비밀번호로 로그인", + "description": "일부 API 호출에 필요한 Trilium 세션을 발급합니다. 사용자가 TOTP 인증을 설정한 경우에만 `totpToken`이 필요합니다.", + "operationId": "login-normal", + "externalDocs": { + "description": "HMAC 계산", + "url": "https://github.com/TriliumNext/Notes/blob/v0.91.6/src/services/utils.ts#L62-L66" + }, + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "type": "string" + }, + "totpToken": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "작업 성공" + }, + "401": { + "description": "비밀번호 또는 일회용 인증 번호 불일치" + } + } + } + } + }, + "components": { + "schemas": { + "Attribute": { + "type": "object", + "properties": { + "attributeId": { + "type": "string", + "example": "4G1DPrI58PAb" + }, + "noteId": { + "$ref": "#/components/schemas/NoteId" + }, + "type": { + "type": "string", + "enum": [ + "label", + "relation" + ] + }, + "name": { + "type": "string", + "example": "internalLink" + }, + "value": { + "type": "string", + "example": "hA8aHSpTRdZ6", + "description": "type이 \"relation\"이면 노트 ID입니다. 그 외에는 속성 내용입니다." + }, + "position": { + "type": "integer", + "example": 20 + }, + "isInheritable": { + "type": "boolean" + } + } + }, + "Blob": { + "type": "object", + "properties": { + "blobId": { + "type": "string", + "example": "8iqMIB8eiY1tPYmElfjm" + }, + "content": { + "type": [ + "string", + "null" + ], + "description": "텍스트가 아니면 `null`입니다." + }, + "contentLength": { + "type": "integer" + }, + "dateModified": { + "$ref": "#/components/schemas/DateTime" + }, + "utcDateModified": { + "$ref": "#/components/schemas/UtcDateTime" + } + } + }, + "Branch": { + "type": "object", + "required": [ + "branchId", + "noteId", + "parentNoteId", + "notePosition" + ], + "properties": { + "branchId": { + "$ref": "#/components/schemas/BranchId" + }, + "noteId": { + "$ref": "#/components/schemas/NoteId" + }, + "parentNoteId": { + "$ref": "#/components/schemas/NoteId" + }, + "notePosition": { + "type": "integer", + "example": 20 + }, + "prefix": { + "type": [ + "string", + "null" + ] + }, + "isExpanded": { + "type": "boolean" + } + } + }, + "BranchId": { + "type": "string", + "example": "WUjhaGp4EKah_ur11rSfHkzeV", + "description": "`{parentNoteId}_{noteId}`와 같습니다." + }, + "DateTime": { + "type": "string", + "example": "2025-02-14 08:19:59.203+0100" + }, + "EntityChange": { + "type": "object", + "properties": { + "entityChange": { + "type": "object", + "properties": { + "entityName": { + "type": "string", + "example": "notes", + "description": "이 엔터티의 데이터베이스 테이블" + }, + "changeId": { + "type": "string", + "example": "changeId9630", + "description": "`entity_changes` 테이블에서 참조하는 ID" + } + } + }, + "entity": { + "type": "object", + "description": "인코딩한 엔터티 데이터. 데이터베이스의 각 열에 대응하는 속성이 들어 있는 객체입니다." + } + } + }, + "Note": { + "type": "object", + "required": [ + "noteId", + "title", + "isProtected", + "type", + "mime", + "blobId" + ], + "properties": { + "noteId": { + "$ref": "#/components/schemas/NoteId" + }, + "title": { + "type": "string" + }, + "isProtected": { + "type": "boolean" + }, + "type": { + "type": "string", + "example": "text", + "enum": [ + "text", + "code", + "render", + "file", + "image", + "search", + "relationMap", + "book", + "noteMap", + "mermaid", + "canvas", + "webView", + "launcher", + "doc", + "contentWidget", + "mindMap", + "geoMap" + ], + "description": "[참고 목록](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/services/note_types.ts)" + }, + "mime": { + "type": "string", + "example": "text/html" + }, + "blobId": { + "type": "string", + "example": "z4PhNX7vuL3xVChQ1m2A" + } + } + }, + "NoteId": { + "type": "string", + "example": "ur11rSfHkzeV", + "description": "12자리 노트 ID. 특수 값은 \"none\"과 \"root\"입니다." + }, + "Timestamps": { + "type": "object", + "properties": { + "dateCreated": { + "$ref": "#/components/schemas/DateTime" + }, + "dateModified": { + "$ref": "#/components/schemas/DateTime" + }, + "utcDateCreated": { + "$ref": "#/components/schemas/UtcDateTime" + }, + "utcDateModified": { + "$ref": "#/components/schemas/UtcDateTime" + } + } + }, + "UtcDateTime": { + "type": "string", + "example": "2025-02-13T07:42:47.698Z", + "description": "`new Date().toISOString().replace('T', ' ')`의 결과" + } + }, + "securitySchemes": { + "user-password": { + "type": "apiKey", + "name": "trilium-cred", + "in": "header", + "description": "`user:password` 형식의 사용자 이름과 비밀번호" + }, + "session": { + "type": "apiKey", + "in": "cookie", + "name": "trilium.sid" + } + } + }, + "tags": [ + { + "name": "auth", + "description": "인증" + }, + { + "name": "sync", + "description": "동기화" + }, + { + "name": "data" + } + ] +} \ No newline at end of file diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/LICENSE b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/NOTICE b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/NOTICE new file mode 100644 index 0000000..ab788a2 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/NOTICE @@ -0,0 +1,2 @@ +swagger-ui +Copyright 2020-2021 SmartBear Software Inc. diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/favicon-16x16.png b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..8b194e617af1c135e6b37939591d24ac3a5efa18 GIT binary patch literal 665 zcmV;K0%rY*P)}JKSduyL>)s!A4EhTMMEM%Q;aL6%l#xiZiF>S;#Y{N2Zz%pvTGHJduXuC6Lx-)0EGfRy*N{Tv4i8@4oJ41gw zKzThrcRe|7J~(YYIBq{SYCkn-KQm=N8$CrEK1CcqMI1dv9z#VRL_{D)L|`QmF8}}l zJ9JV`Q}p!p_4f7m_U`WQ@apR4;o;!mnU<7}iG_qr zF(e)x9~BG-3IzcG2M4an0002kNkl41`ZiN1i62V%{PM@Ry|IS_+Yc7{bb`MM~xm(7p4|kMHP&!VGuDW4kFixat zXw43VmgwEvB$hXt_u=vZ>+v4i7E}n~eG6;n4Z=zF1n?T*yg<;W6kOfxpC6nao>VR% z?fpr=asSJ&`L*wu^rLJ5Peq*PB0;alL#XazZCBxJLd&giTfw@!hW167F^`7kobi;( ze<<>qNlP|xy7S1zl@lZNIBR7#o9ybJsptO#%}P0hz~sBp00000NkvXXu0mjfUsDF? literal 0 HcmV?d00001 diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/favicon-32x32.png b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..249737fe44558e679f0b67134e274461d988fa98 GIT binary patch literal 628 zcmV-)0*n2LP)Ma*GM0}OV<074bNCP7P7GVd{iMr*I6y~TMLss@FjvgL~HxU z%Vvj33AwpD(Z4*$Mfx=HaU16axM zt2xG_rloN<$iy9j9I5 + + + Swagger UI: OAuth2 Redirect + + + + + diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/package.json b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/package.json new file mode 100644 index 0000000..4bf2be8 --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/package.json @@ -0,0 +1,20 @@ +{ + "name": "swagger-ui-dist", + "version": "5.21.0", + "main": "index.js", + "repository": "git@github.com:swagger-api/swagger-ui.git", + "contributors": [ + "(in alphabetical order)", + "Anna Bodnia ", + "Buu Nguyen ", + "Josh Ponelat ", + "Kyle Shockey ", + "Robert Barnwell ", + "Sahar Jafari " + ], + "license": "Apache-2.0", + "dependencies": { + "@scarf/scarf": "=1.4.0" + }, + "devDependencies": {} +} diff --git a/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/swagger-ui-bundle.js b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/swagger-ui-bundle.js new file mode 100644 index 0000000..b703daa --- /dev/null +++ b/updates/2026-09-05/phase9/doc_notes/en/api-ko/swagger/swagger-ui-bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function webpackUniversalModuleDefinition(s,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.SwaggerUIBundle=o():s.SwaggerUIBundle=o()}(this,(()=>(()=>{var s={251:(s,o)=>{o.read=function(s,o,i,a,u){var _,w,x=8*u-a-1,C=(1<>1,L=-7,B=i?u-1:0,$=i?-1:1,V=s[o+B];for(B+=$,_=V&(1<<-L)-1,V>>=-L,L+=x;L>0;_=256*_+s[o+B],B+=$,L-=8);for(w=_&(1<<-L)-1,_>>=-L,L+=a;L>0;w=256*w+s[o+B],B+=$,L-=8);if(0===_)_=1-j;else{if(_===C)return w?NaN:1/0*(V?-1:1);w+=Math.pow(2,a),_-=j}return(V?-1:1)*w*Math.pow(2,_-a)},o.write=function(s,o,i,a,u,_){var w,x,C,j=8*_-u-1,L=(1<>1,$=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,V=a?0:_-1,U=a?1:-1,z=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(x=isNaN(o)?1:0,w=L):(w=Math.floor(Math.log(o)/Math.LN2),o*(C=Math.pow(2,-w))<1&&(w--,C*=2),(o+=w+B>=1?$/C:$*Math.pow(2,1-B))*C>=2&&(w++,C/=2),w+B>=L?(x=0,w=L):w+B>=1?(x=(o*C-1)*Math.pow(2,u),w+=B):(x=o*Math.pow(2,B-1)*Math.pow(2,u),w=0));u>=8;s[i+V]=255&x,V+=U,x/=256,u-=8);for(w=w<0;s[i+V]=255&w,V+=U,w/=256,j-=8);s[i+V-U]|=128*z}},462:(s,o,i)=>{"use strict";var a=i(40975);s.exports=a},659:(s,o,i)=>{var a=i(51873),u=Object.prototype,_=u.hasOwnProperty,w=u.toString,x=a?a.toStringTag:void 0;s.exports=function getRawTag(s){var o=_.call(s,x),i=s[x];try{s[x]=void 0;var a=!0}catch(s){}var u=w.call(s);return a&&(o?s[x]=i:delete s[x]),u}},694:(s,o,i)=>{"use strict";i(91599);var a=i(37257);i(12560),s.exports=a},953:(s,o,i)=>{"use strict";s.exports=i(53375)},1733:s=>{var o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;s.exports=function asciiWords(s){return s.match(o)||[]}},1882:(s,o,i)=>{var a=i(72552),u=i(23805);s.exports=function isFunction(s){if(!u(s))return!1;var o=a(s);return"[object Function]"==o||"[object GeneratorFunction]"==o||"[object AsyncFunction]"==o||"[object Proxy]"==o}},1907:(s,o,i)=>{"use strict";var a=i(41505),u=Function.prototype,_=u.call,w=a&&u.bind.bind(_,_);s.exports=a?w:function(s){return function(){return _.apply(s,arguments)}}},2205:function(s,o,i){var a;a=void 0!==i.g?i.g:this,s.exports=function(s){if(s.CSS&&s.CSS.escape)return s.CSS.escape;var cssEscape=function(s){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var o,i=String(s),a=i.length,u=-1,_="",w=i.charCodeAt(0);++u=1&&o<=31||127==o||0==u&&o>=48&&o<=57||1==u&&o>=48&&o<=57&&45==w?"\\"+o.toString(16)+" ":0==u&&1==a&&45==o||!(o>=128||45==o||95==o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122)?"\\"+i.charAt(u):i.charAt(u):_+="�";return _};return s.CSS||(s.CSS={}),s.CSS.escape=cssEscape,cssEscape}(a)},2209:(s,o,i)=>{"use strict";var a,u=i(9404),_=function productionTypeChecker(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};_.isRequired=_;var w=function getProductionTypeChecker(){return _};function getPropType(s){var o=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":s instanceof u.Iterable?"Immutable."+s.toSource().split(" ")[0]:o}function createChainableTypeChecker(s){function checkType(o,i,a,u,_,w){for(var x=arguments.length,C=Array(x>6?x-6:0),j=6;j>",null!=i[a]?s.apply(void 0,[i,a,u,_,w].concat(C)):o?new Error("Required "+_+" `"+w+"` was not specified in `"+u+"`."):void 0}var o=checkType.bind(null,!1);return o.isRequired=checkType.bind(null,!0),o}function createIterableSubclassTypeChecker(s,o){return function createImmutableTypeChecker(s,o){return createChainableTypeChecker((function validate(i,a,u,_,w){var x=i[a];if(!o(x)){var C=getPropType(x);return new Error("Invalid "+_+" `"+w+"` of type `"+C+"` supplied to `"+u+"`, expected `"+s+"`.")}return null}))}("Iterable."+s,(function(s){return u.Iterable.isIterable(s)&&o(s)}))}(a={listOf:w,mapOf:w,orderedMapOf:w,setOf:w,orderedSetOf:w,stackOf:w,iterableOf:w,recordOf:w,shape:w,contains:w,mapContains:w,orderedMapContains:w,list:_,map:_,orderedMap:_,set:_,orderedSet:_,stack:_,seq:_,record:_,iterable:_}).iterable.indexed=createIterableSubclassTypeChecker("Indexed",u.Iterable.isIndexed),a.iterable.keyed=createIterableSubclassTypeChecker("Keyed",u.Iterable.isKeyed),s.exports=a},2404:(s,o,i)=>{var a=i(60270);s.exports=function isEqual(s,o){return a(s,o)}},2523:s=>{s.exports=function baseFindIndex(s,o,i,a){for(var u=s.length,_=i+(a?1:-1);a?_--:++_{"use strict";var a=i(45951),u=Object.defineProperty;s.exports=function(s,o){try{u(a,s,{value:o,configurable:!0,writable:!0})}catch(i){a[s]=o}return o}},2694:(s,o,i)=>{"use strict";var a=i(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,o,i,u,_,w){if(w!==a){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}function getShim(){return shim}shim.isRequired=shim;var s={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return s.PropTypes=s,s}},2874:s=>{s.exports={}},2875:(s,o,i)=>{"use strict";var a=i(23045),u=i(80376);s.exports=Object.keys||function keys(s){return a(s,u)}},2955:(s,o,i)=>{"use strict";var a,u=i(65606);function _defineProperty(s,o,i){return(o=function _toPropertyKey(s){var o=function _toPrimitive(s,o){if("object"!=typeof s||null===s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(s)}(s,"string");return"symbol"==typeof o?o:String(o)}(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var _=i(86238),w=Symbol("lastResolve"),x=Symbol("lastReject"),C=Symbol("error"),j=Symbol("ended"),L=Symbol("lastPromise"),B=Symbol("handlePromise"),$=Symbol("stream");function createIterResult(s,o){return{value:s,done:o}}function readAndResolve(s){var o=s[w];if(null!==o){var i=s[$].read();null!==i&&(s[L]=null,s[w]=null,s[x]=null,o(createIterResult(i,!1)))}}function onReadable(s){u.nextTick(readAndResolve,s)}var V=Object.getPrototypeOf((function(){})),U=Object.setPrototypeOf((_defineProperty(a={get stream(){return this[$]},next:function next(){var s=this,o=this[C];if(null!==o)return Promise.reject(o);if(this[j])return Promise.resolve(createIterResult(void 0,!0));if(this[$].destroyed)return new Promise((function(o,i){u.nextTick((function(){s[C]?i(s[C]):o(createIterResult(void 0,!0))}))}));var i,a=this[L];if(a)i=new Promise(function wrapForNext(s,o){return function(i,a){s.then((function(){o[j]?i(createIterResult(void 0,!0)):o[B](i,a)}),a)}}(a,this));else{var _=this[$].read();if(null!==_)return Promise.resolve(createIterResult(_,!1));i=new Promise(this[B])}return this[L]=i,i}},Symbol.asyncIterator,(function(){return this})),_defineProperty(a,"return",(function _return(){var s=this;return new Promise((function(o,i){s[$].destroy(null,(function(s){s?i(s):o(createIterResult(void 0,!0))}))}))})),a),V);s.exports=function createReadableStreamAsyncIterator(s){var o,i=Object.create(U,(_defineProperty(o={},$,{value:s,writable:!0}),_defineProperty(o,w,{value:null,writable:!0}),_defineProperty(o,x,{value:null,writable:!0}),_defineProperty(o,C,{value:null,writable:!0}),_defineProperty(o,j,{value:s._readableState.endEmitted,writable:!0}),_defineProperty(o,B,{value:function value(s,o){var a=i[$].read();a?(i[L]=null,i[w]=null,i[x]=null,s(createIterResult(a,!1))):(i[w]=s,i[x]=o)},writable:!0}),o));return i[L]=null,_(s,(function(s){if(s&&"ERR_STREAM_PREMATURE_CLOSE"!==s.code){var o=i[x];return null!==o&&(i[L]=null,i[w]=null,i[x]=null,o(s)),void(i[C]=s)}var a=i[w];null!==a&&(i[L]=null,i[w]=null,i[x]=null,a(createIterResult(void 0,!0))),i[j]=!0})),s.on("readable",onReadable.bind(null,i)),i}},3110:(s,o,i)=>{const a=i(5187),u=i(85015),_=i(98023),w=i(53812),x=i(23805),C=i(85105),j=i(86804);class Namespace{constructor(s){this.elementMap={},this.elementDetection=[],this.Element=j.Element,this.KeyValuePair=j.KeyValuePair,s&&s.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({base:this}),this}useDefault(){return this.register("null",j.NullElement).register("string",j.StringElement).register("number",j.NumberElement).register("boolean",j.BooleanElement).register("array",j.ArrayElement).register("object",j.ObjectElement).register("member",j.MemberElement).register("ref",j.RefElement).register("link",j.LinkElement),this.detect(a,j.NullElement,!1).detect(u,j.StringElement,!1).detect(_,j.NumberElement,!1).detect(w,j.BooleanElement,!1).detect(Array.isArray,j.ArrayElement,!1).detect(x,j.ObjectElement,!1),this}register(s,o){return this._elements=void 0,this.elementMap[s]=o,this}unregister(s){return this._elements=void 0,delete this.elementMap[s],this}detect(s,o,i){return void 0===i||i?this.elementDetection.unshift([s,o]):this.elementDetection.push([s,o]),this}toElement(s){if(s instanceof this.Element)return s;let o;for(let i=0;i{const o=s[0].toUpperCase()+s.substr(1);this._elements[o]=this.elementMap[s]}))),this._elements}get serialiser(){return new C(this)}}C.prototype.Namespace=Namespace,s.exports=Namespace},3121:(s,o,i)=>{"use strict";var a=i(65482),u=Math.min;s.exports=function(s){var o=a(s);return o>0?u(o,9007199254740991):0}},3209:(s,o,i)=>{var a=i(91596),u=i(53320),_=i(36306),w="__lodash_placeholder__",x=128,C=Math.min;s.exports=function mergeData(s,o){var i=s[1],j=o[1],L=i|j,B=L<131,$=j==x&&8==i||j==x&&256==i&&s[7].length<=o[8]||384==j&&o[7].length<=o[8]&&8==i;if(!B&&!$)return s;1&j&&(s[2]=o[2],L|=1&i?0:4);var V=o[3];if(V){var U=s[3];s[3]=U?a(U,V,o[4]):V,s[4]=U?_(s[3],w):o[4]}return(V=o[5])&&(U=s[5],s[5]=U?u(U,V,o[6]):V,s[6]=U?_(s[5],w):o[6]),(V=o[7])&&(s[7]=V),j&x&&(s[8]=null==s[8]?o[8]:C(s[8],o[8])),null==s[9]&&(s[9]=o[9]),s[0]=o[0],s[1]=L,s}},3650:(s,o,i)=>{var a=i(74335)(Object.keys,Object);s.exports=a},3656:(s,o,i)=>{s=i.nmd(s);var a=i(9325),u=i(89935),_=o&&!o.nodeType&&o,w=_&&s&&!s.nodeType&&s,x=w&&w.exports===_?a.Buffer:void 0,C=(x?x.isBuffer:void 0)||u;s.exports=C},4509:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheHas(s){return a(this,s).has(s)}},4640:s=>{"use strict";var o=String;s.exports=function(s){try{return o(s)}catch(s){return"Object"}}},4664:(s,o,i)=>{var a=i(79770),u=i(63345),_=Object.prototype.propertyIsEnumerable,w=Object.getOwnPropertySymbols,x=w?function(s){return null==s?[]:(s=Object(s),a(w(s),(function(o){return _.call(s,o)})))}:u;s.exports=x},4901:(s,o,i)=>{var a=i(72552),u=i(30294),_=i(40346),w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w["[object Arguments]"]=w["[object Array]"]=w["[object ArrayBuffer]"]=w["[object Boolean]"]=w["[object DataView]"]=w["[object Date]"]=w["[object Error]"]=w["[object Function]"]=w["[object Map]"]=w["[object Number]"]=w["[object Object]"]=w["[object RegExp]"]=w["[object Set]"]=w["[object String]"]=w["[object WeakMap]"]=!1,s.exports=function baseIsTypedArray(s){return _(s)&&u(s.length)&&!!w[a(s)]}},4993:(s,o,i)=>{"use strict";var a=i(16946),u=i(74239);s.exports=function(s){return a(u(s))}},5187:s=>{s.exports=function isNull(s){return null===s}},5419:s=>{s.exports=function(s,o,i,a){var u=new Blob(void 0!==a?[a,s]:[s],{type:i||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(u,o);else{var _=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(u):window.webkitURL.createObjectURL(u),w=document.createElement("a");w.style.display="none",w.href=_,w.setAttribute("download",o),void 0===w.download&&w.setAttribute("target","_blank"),document.body.appendChild(w),w.click(),setTimeout((function(){document.body.removeChild(w),window.URL.revokeObjectURL(_)}),200)}}},5556:(s,o,i)=>{s.exports=i(2694)()},5861:(s,o,i)=>{var a=i(55580),u=i(68223),_=i(32804),w=i(76545),x=i(28303),C=i(72552),j=i(47473),L="[object Map]",B="[object Promise]",$="[object Set]",V="[object WeakMap]",U="[object DataView]",z=j(a),Y=j(u),Z=j(_),ee=j(w),ie=j(x),ae=C;(a&&ae(new a(new ArrayBuffer(1)))!=U||u&&ae(new u)!=L||_&&ae(_.resolve())!=B||w&&ae(new w)!=$||x&&ae(new x)!=V)&&(ae=function(s){var o=C(s),i="[object Object]"==o?s.constructor:void 0,a=i?j(i):"";if(a)switch(a){case z:return U;case Y:return L;case Z:return B;case ee:return $;case ie:return V}return o}),s.exports=ae},6048:s=>{s.exports=function negate(s){if("function"!=typeof s)throw new TypeError("Expected a function");return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}},6205:s=>{s.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},6233:(s,o,i)=>{const a=i(6048),u=i(10316),_=i(92340);class ArrayElement extends u{constructor(s,o,i){super(s||[],o,i),this.element="array"}primitive(){return"array"}get(s){return this.content[s]}getValue(s){const o=this.get(s);if(o)return o.toValue()}getIndex(s){return this.content[s]}set(s,o){return this.content[s]=this.refract(o),this}remove(s){const o=this.content.splice(s,1);return o.length?o[0]:null}map(s,o){return this.content.map(s,o)}flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(a);u&&i.push(u)})),i}filter(s,o){return new _(this.content.filter(s,o))}reject(s,o){return this.filter(a(s),o)}reduce(s,o){let i,a;void 0!==o?(i=0,a=this.refract(o)):(i=1,a="object"===this.primitive()?this.first.value:this.first);for(let o=i;o{s.bind(o)(i,this.refract(a))}))}shift(){return this.content.shift()}unshift(s){this.content.unshift(this.refract(s))}push(s){return this.content.push(this.refract(s)),this}add(s){this.push(s)}findElements(s,o){const i=o||{},a=!!i.recursive,u=void 0===i.results?[]:i.results;return this.forEach(((o,i,_)=>{a&&void 0!==o.findElements&&o.findElements(s,{results:u,recursive:a}),s(o,i,_)&&u.push(o)})),u}find(s){return new _(this.findElements(s,{recursive:!0}))}findByElement(s){return this.find((o=>o.element===s))}findByClass(s){return this.find((o=>o.classes.includes(s)))}getById(s){return this.find((o=>o.id.toValue()===s)).first}includes(s){return this.content.some((o=>o.equals(s)))}contains(s){return this.includes(s)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(s){return new this.constructor(this.content.concat(s.content))}"fantasy-land/concat"(s){return this.concat(s)}"fantasy-land/map"(s){return new this.constructor(this.map(s))}"fantasy-land/chain"(s){return this.map((o=>s(o)),this).reduce(((s,o)=>s.concat(o)),this.empty())}"fantasy-land/filter"(s){return new this.constructor(this.content.filter(s))}"fantasy-land/reduce"(s,o){return this.content.reduce(s,o)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement["fantasy-land/empty"]=ArrayElement.empty,"undefined"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),s.exports=ArrayElement},6499:(s,o,i)=>{"use strict";var a=i(1907),u=0,_=Math.random(),w=a(1..toString);s.exports=function(s){return"Symbol("+(void 0===s?"":s)+")_"+w(++u+_,36)}},6925:s=>{"use strict";s.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7057:(s,o,i)=>{"use strict";var a=i(11470).charAt,u=i(90160),_=i(64932),w=i(60183),x=i(59550),C="String Iterator",j=_.set,L=_.getterFor(C);w(String,"String",(function(s){j(this,{type:C,string:u(s),index:0})}),(function next(){var s,o=L(this),i=o.string,u=o.index;return u>=i.length?x(void 0,!0):(s=a(i,u),o.index+=s.length,x(s,!1))}))},7309:(s,o,i)=>{var a=i(62006)(i(24713));s.exports=a},7376:s=>{"use strict";s.exports=!0},7463:(s,o,i)=>{"use strict";var a=i(98828),u=i(62250),_=/#|\.prototype\./,isForced=function(s,o){var i=x[w(s)];return i===j||i!==C&&(u(o)?a(o):!!o)},w=isForced.normalize=function(s){return String(s).replace(_,".").toLowerCase()},x=isForced.data={},C=isForced.NATIVE="N",j=isForced.POLYFILL="P";s.exports=isForced},7666:(s,o,i)=>{var a=i(84851),u=i(953);function _extends(){var o;return s.exports=_extends=a?u(o=a).call(o):function(s){for(var o=1;o{const a=i(6205);o.wordBoundary=()=>({type:a.POSITION,value:"b"}),o.nonWordBoundary=()=>({type:a.POSITION,value:"B"}),o.begin=()=>({type:a.POSITION,value:"^"}),o.end=()=>({type:a.POSITION,value:"$"})},8068:s=>{"use strict";var o=(()=>{var s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,i,a)=>i in o?s(o,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[i]=a,__spreadValues=(s,o)=>{for(var i in o||(o={}))u.call(o,i)&&__defNormalProp(s,i,o[i]);if(a)for(var i of a(o))_.call(o,i)&&__defNormalProp(s,i,o[i]);return s},__publicField=(s,o,i)=>(__defNormalProp(s,"symbol"!=typeof o?o+"":o,i),i),w={};((o,i)=>{for(var a in i)s(o,a,{get:i[a],enumerable:!0})})(w,{DEFAULT_OPTIONS:()=>C,DEFAULT_UUID_LENGTH:()=>x,default:()=>B});var x=6,C={dictionary:"alphanum",shuffle:!0,debug:!1,length:x,counter:0},j=class _ShortUniqueId{constructor(s={}){__publicField(this,"counter"),__publicField(this,"debug"),__publicField(this,"dict"),__publicField(this,"version"),__publicField(this,"dictIndex",0),__publicField(this,"dictRange",[]),__publicField(this,"lowerBound",0),__publicField(this,"upperBound",0),__publicField(this,"dictLength",0),__publicField(this,"uuidLength"),__publicField(this,"_digit_first_ascii",48),__publicField(this,"_digit_last_ascii",58),__publicField(this,"_alpha_lower_first_ascii",97),__publicField(this,"_alpha_lower_last_ascii",123),__publicField(this,"_hex_last_ascii",103),__publicField(this,"_alpha_upper_first_ascii",65),__publicField(this,"_alpha_upper_last_ascii",91),__publicField(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),__publicField(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),__publicField(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),__publicField(this,"log",((...s)=>{const o=[...s];if(o[0]=`[short-unique-id] ${s[0]}`,!0===this.debug&&"undefined"!=typeof console&&null!==console)return console.log(...o)})),__publicField(this,"_normalizeDictionary",((s,o)=>{let i;if(s&&Array.isArray(s)&&s.length>1)i=s;else{let o;i=[],this.dictIndex=o=0;const a=`_${s}_dict_ranges`,u=this._dict_ranges[a];Object.keys(u).forEach((s=>{const a=s;for(this.dictRange=u[a],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=o=this.lowerBound;this.lowerBound<=this.upperBound?othis.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?o+=1:o-=1)i.push(String.fromCharCode(this.dictIndex))}))}if(o){const s=.5;i=i.sort((()=>Math.random()-s))}return i})),__publicField(this,"setDictionary",((s,o)=>{this.dict=this._normalizeDictionary(s,o),this.dictLength=this.dict.length,this.setCounter(0)})),__publicField(this,"seq",(()=>this.sequentialUUID())),__publicField(this,"sequentialUUID",(()=>{let s,o,i="";s=this.counter;do{o=s%this.dictLength,s=Math.trunc(s/this.dictLength),i+=this.dict[o]}while(0!==s);return this.counter+=1,i})),__publicField(this,"rnd",((s=this.uuidLength||x)=>this.randomUUID(s))),__publicField(this,"randomUUID",((s=this.uuidLength||x)=>{let o,i,a;if(null==s||s<1)throw new Error("Invalid UUID Length Provided");for(o="",a=0;athis.formattedUUID(s,o))),__publicField(this,"formattedUUID",((s,o)=>{const i={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return s.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(s=>{const a=s.slice(0,2),u=parseInt(s.slice(2),10);return"$s"===a?i[a]().padStart(u,"0"):"$t"===a&&o?i[a](u,o):i[a](u)}))})),__publicField(this,"availableUUIDs",((s=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,s).toFixed(0)))),__publicField(this,"approxMaxBeforeCollision",((s=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*s).toFixed(20)))),__publicField(this,"collisionProbability",((s=this.availableUUIDs(this.uuidLength),o=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(s)/this.availableUUIDs(o)).toFixed(20)))),__publicField(this,"uniqueness",((s=this.availableUUIDs(this.uuidLength))=>{const o=parseFloat((1-this.approxMaxBeforeCollision(s)/s).toFixed(20));return o>1?1:o<0?0:o})),__publicField(this,"getVersion",(()=>this.version)),__publicField(this,"stamp",((s,o)=>{const i=Math.floor(+(o||new Date)/1e3).toString(16);if("number"==typeof s&&0===s)return i;if("number"!=typeof s||s<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join("\n"));const a=s-9,u=Math.round(Math.random()*(a>15?15:a)),_=this.randomUUID(a);return`${_.substring(0,u)}${i}${_.substring(u)}${u.toString(16)}`})),__publicField(this,"parseStamp",((s,o)=>{if(o&&!/t0|t[1-9]\d{1,}/.test(o))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const i=o?o.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(s=>{const o={$r:s=>[...Array(s)].map((()=>"r")).join(""),$s:s=>[...Array(s)].map((()=>"s")).join(""),$t:s=>[...Array(s)].map((()=>"t")).join("")},i=s.slice(0,2),a=parseInt(s.slice(2),10);return o[i](a)})).replace(/^(.*?)(t{8,})(.*)$/g,((o,i,a)=>s.substring(i.length,i.length+a.length))):s;if(8===i.length)return new Date(1e3*parseInt(i,16));if(i.length<10)throw new Error("Stamp length invalid");const a=parseInt(i.substring(i.length-1),16);return new Date(1e3*parseInt(i.substring(a,a+8),16))})),__publicField(this,"setCounter",(s=>{this.counter=s})),__publicField(this,"validate",((s,o)=>{const i=o?this._normalizeDictionary(o):this.dict;return s.split("").every((s=>i.includes(s)))}));const o=__spreadValues(__spreadValues({},C),s);this.counter=0,this.debug=!1,this.dict=[],this.version="5.2.0";const{dictionary:i,shuffle:a,length:u,counter:_}=o;return this.uuidLength=u,this.setDictionary(i,a),this.setCounter(_),this.debug=o.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};__publicField(j,"default",j);var L,B=j;return L=w,((a,_,w,x)=>{if(_&&"object"==typeof _||"function"==typeof _)for(let C of i(_))u.call(a,C)||C===w||s(a,C,{get:()=>_[C],enumerable:!(x=o(_,C))||x.enumerable});return a})(s({},"__esModule",{value:!0}),L)})();s.exports=o.default,"undefined"!=typeof window&&(o=o.default)},9325:(s,o,i)=>{var a=i(34840),u="object"==typeof self&&self&&self.Object===Object&&self,_=a||u||Function("return this")();s.exports=_},9404:function(s){s.exports=function(){"use strict";var s=Array.prototype.slice;function createClass(s,o){o&&(s.prototype=Object.create(o.prototype)),s.prototype.constructor=s}function Iterable(s){return isIterable(s)?s:Seq(s)}function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq(s)}function isIterable(s){return!(!s||!s[o])}function isKeyed(s){return!(!s||!s[i])}function isIndexed(s){return!(!s||!s[a])}function isAssociative(s){return isKeyed(s)||isIndexed(s)}function isOrdered(s){return!(!s||!s[u])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var o="@@__IMMUTABLE_ITERABLE__@@",i="@@__IMMUTABLE_KEYED__@@",a="@@__IMMUTABLE_INDEXED__@@",u="@@__IMMUTABLE_ORDERED__@@",_="delete",w=5,x=1<>>0;if(""+i!==o||4294967295===i)return NaN;o=i}return o<0?ensureSize(s)+o:o}function returnTrue(){return!0}function wholeSlice(s,o,i){return(0===s||void 0!==i&&s<=-i)&&(void 0===o||void 0!==i&&o>=i)}function resolveBegin(s,o){return resolveIndex(s,o,0)}function resolveEnd(s,o){return resolveIndex(s,o,o)}function resolveIndex(s,o,i){return void 0===s?i:s<0?Math.max(0,o+s):void 0===o?s:Math.min(o,s)}var $=0,V=1,U=2,z="function"==typeof Symbol&&Symbol.iterator,Y="@@iterator",Z=z||Y;function Iterator(s){this.next=s}function iteratorValue(s,o,i,a){var u=0===s?o:1===s?i:[o,i];return a?a.value=u:a={value:u,done:!1},a}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(s){return!!getIteratorFn(s)}function isIterator(s){return s&&"function"==typeof s.next}function getIterator(s){var o=getIteratorFn(s);return o&&o.call(s)}function getIteratorFn(s){var o=s&&(z&&s[z]||s[Y]);if("function"==typeof o)return o}function isArrayLike(s){return s&&"number"==typeof s.length}function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():seqFromValue(s)}function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isIterable(s)?isKeyed(s)?s.toSeq():s.fromEntrySeq():keyedSeqFromValue(s)}function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s.toIndexedSeq():indexedSeqFromValue(s)}function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s:indexedSeqFromValue(s)).toSetSeq()}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=$,Iterator.VALUES=V,Iterator.ENTRIES=U,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[Z]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(s,o){return seqIterate(this,s,o,!0)},Seq.prototype.__iterator=function(s,o){return seqIterator(this,s,o,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq.prototype.__iterate=function(s,o){return seqIterate(this,s,o,!1)},IndexedSeq.prototype.__iterator=function(s,o){return seqIterator(this,s,o,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ee,ie,ae,ce="@@__IMMUTABLE_SEQ__@@";function ArraySeq(s){this._array=s,this.size=s.length}function ObjectSeq(s){var o=Object.keys(s);this._object=s,this._keys=o,this.size=o.length}function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}function isSeq(s){return!(!s||!s[ce])}function emptySequence(){return ee||(ee=new ArraySeq([]))}function keyedSeqFromValue(s){var o=Array.isArray(s)?new ArraySeq(s).fromEntrySeq():isIterator(s)?new IteratorSeq(s).fromEntrySeq():hasIterator(s)?new IterableSeq(s).fromEntrySeq():"object"==typeof s?new ObjectSeq(s):void 0;if(!o)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+s);return o}function indexedSeqFromValue(s){var o=maybeIndexedSeqFromValue(s);if(!o)throw new TypeError("Expected Array or iterable object of values: "+s);return o}function seqFromValue(s){var o=maybeIndexedSeqFromValue(s)||"object"==typeof s&&new ObjectSeq(s);if(!o)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+s);return o}function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(s):isIterator(s)?new IteratorSeq(s):hasIterator(s)?new IterableSeq(s):void 0}function seqIterate(s,o,i,a){var u=s._cache;if(u){for(var _=u.length-1,w=0;w<=_;w++){var x=u[i?_-w:w];if(!1===o(x[1],a?x[0]:w,s))return w+1}return w}return s.__iterateUncached(o,i)}function seqIterator(s,o,i,a){var u=s._cache;if(u){var _=u.length-1,w=0;return new Iterator((function(){var s=u[i?_-w:w];return w++>_?iteratorDone():iteratorValue(o,a?s[0]:w-1,s[1])}))}return s.__iteratorUncached(o,i)}function fromJS(s,o){return o?fromJSWith(o,s,"",{"":s}):fromJSDefault(s)}function fromJSWith(s,o,i,a){return Array.isArray(o)?s.call(a,i,IndexedSeq(o).map((function(i,a){return fromJSWith(s,i,a,o)}))):isPlainObj(o)?s.call(a,i,KeyedSeq(o).map((function(i,a){return fromJSWith(s,i,a,o)}))):o}function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(fromJSDefault).toList():isPlainObj(s)?KeyedSeq(s).map(fromJSDefault).toMap():s}function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.constructor)}function is(s,o){if(s===o||s!=s&&o!=o)return!0;if(!s||!o)return!1;if("function"==typeof s.valueOf&&"function"==typeof o.valueOf){if((s=s.valueOf())===(o=o.valueOf())||s!=s&&o!=o)return!0;if(!s||!o)return!1}return!("function"!=typeof s.equals||"function"!=typeof o.equals||!s.equals(o))}function deepEqual(s,o){if(s===o)return!0;if(!isIterable(o)||void 0!==s.size&&void 0!==o.size&&s.size!==o.size||void 0!==s.__hash&&void 0!==o.__hash&&s.__hash!==o.__hash||isKeyed(s)!==isKeyed(o)||isIndexed(s)!==isIndexed(o)||isOrdered(s)!==isOrdered(o))return!1;if(0===s.size&&0===o.size)return!0;var i=!isAssociative(s);if(isOrdered(s)){var a=s.entries();return o.every((function(s,o){var u=a.next().value;return u&&is(u[1],s)&&(i||is(u[0],o))}))&&a.next().done}var u=!1;if(void 0===s.size)if(void 0===o.size)"function"==typeof s.cacheResult&&s.cacheResult();else{u=!0;var _=s;s=o,o=_}var w=!0,x=o.__iterate((function(o,a){if(i?!s.has(o):u?!is(o,s.get(a,j)):!is(s.get(a,j),o))return w=!1,!1}));return w&&s.size===x}function Repeat(s,o){if(!(this instanceof Repeat))return new Repeat(s,o);if(this._value=s,this.size=void 0===o?1/0:Math.max(0,o),0===this.size){if(ie)return ie;ie=this}}function invariant(s,o){if(!s)throw new Error(o)}function Range(s,o,i){if(!(this instanceof Range))return new Range(s,o,i);if(invariant(0!==i,"Cannot step a Range by 0"),s=s||0,void 0===o&&(o=1/0),i=void 0===i?1:Math.abs(i),oa?iteratorDone():iteratorValue(s,u,i[o?a-u++:u++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(s,o){return void 0===o||this.has(s)?this._object[s]:o},ObjectSeq.prototype.has=function(s){return this._object.hasOwnProperty(s)},ObjectSeq.prototype.__iterate=function(s,o){for(var i=this._object,a=this._keys,u=a.length-1,_=0;_<=u;_++){var w=a[o?u-_:_];if(!1===s(i[w],w,this))return _+1}return _},ObjectSeq.prototype.__iterator=function(s,o){var i=this._object,a=this._keys,u=a.length-1,_=0;return new Iterator((function(){var w=a[o?u-_:_];return _++>u?iteratorDone():iteratorValue(s,w,i[w])}))},ObjectSeq.prototype[u]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(s,o){if(o)return this.cacheResult().__iterate(s,o);var i=getIterator(this._iterable),a=0;if(isIterator(i))for(var u;!(u=i.next()).done&&!1!==s(u.value,a++,this););return a},IterableSeq.prototype.__iteratorUncached=function(s,o){if(o)return this.cacheResult().__iterator(s,o);var i=getIterator(this._iterable);if(!isIterator(i))return new Iterator(iteratorDone);var a=0;return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,a++,o.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(s,o){if(o)return this.cacheResult().__iterate(s,o);for(var i,a=this._iterator,u=this._iteratorCache,_=0;_=a.length){var o=i.next();if(o.done)return o;a[u]=o.value}return iteratorValue(s,u,a[u++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Repeat.prototype.get=function(s,o){return this.has(s)?this._value:o},Repeat.prototype.includes=function(s){return is(this._value,s)},Repeat.prototype.slice=function(s,o){var i=this.size;return wholeSlice(s,o,i)?this:new Repeat(this._value,resolveEnd(o,i)-resolveBegin(s,i))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(s){return is(this._value,s)?0:-1},Repeat.prototype.lastIndexOf=function(s){return is(this._value,s)?this.size:-1},Repeat.prototype.__iterate=function(s,o){for(var i=0;i=0&&o=0&&ii?iteratorDone():iteratorValue(s,_++,w)}))},Range.prototype.equals=function(s){return s instanceof Range?this._start===s._start&&this._end===s._end&&this._step===s._step:deepEqual(this,s)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var le="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(s,o){var i=65535&(s|=0),a=65535&(o|=0);return i*a+((s>>>16)*a+i*(o>>>16)<<16>>>0)|0};function smi(s){return s>>>1&1073741824|3221225471&s}function hash(s){if(!1===s||null==s)return 0;if("function"==typeof s.valueOf&&(!1===(s=s.valueOf())||null==s))return 0;if(!0===s)return 1;var o=typeof s;if("number"===o){if(s!=s||s===1/0)return 0;var i=0|s;for(i!==s&&(i^=4294967295*s);s>4294967295;)i^=s/=4294967295;return smi(i)}if("string"===o)return s.length>Se?cachedHashString(s):hashString(s);if("function"==typeof s.hashCode)return s.hashCode();if("object"===o)return hashJSObj(s);if("function"==typeof s.toString)return hashString(s.toString());throw new Error("Value type "+o+" cannot be hashed.")}function cachedHashString(s){var o=Pe[s];return void 0===o&&(o=hashString(s),xe===we&&(xe=0,Pe={}),xe++,Pe[s]=o),o}function hashString(s){for(var o=0,i=0;i0)switch(s.nodeType){case 1:return s.uniqueID;case 9:return s.documentElement&&s.documentElement.uniqueID}}var fe,ye="function"==typeof WeakMap;ye&&(fe=new WeakMap);var be=0,_e="__immutablehash__";"function"==typeof Symbol&&(_e=Symbol(_e));var Se=16,we=255,xe=0,Pe={};function assertNotInfinite(s){invariant(s!==1/0,"Cannot perform this action with an infinite size.")}function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:emptyMap().withMutations((function(o){var i=KeyedIterable(s);assertNotInfinite(i.size),i.forEach((function(s,i){return o.set(i,s)}))}))}function isMap(s){return!(!s||!s[Re])}createClass(Map,KeyedCollection),Map.of=function(){var o=s.call(arguments,0);return emptyMap().withMutations((function(s){for(var i=0;i=o.length)throw new Error("Missing value for key: "+o[i]);s.set(o[i],o[i+1])}}))},Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(s,o){return this._root?this._root.get(0,void 0,s,o):o},Map.prototype.set=function(s,o){return updateMap(this,s,o)},Map.prototype.setIn=function(s,o){return this.updateIn(s,j,(function(){return o}))},Map.prototype.remove=function(s){return updateMap(this,s,j)},Map.prototype.deleteIn=function(s){return this.updateIn(s,(function(){return j}))},Map.prototype.update=function(s,o,i){return 1===arguments.length?s(this):this.updateIn([s],o,i)},Map.prototype.updateIn=function(s,o,i){i||(i=o,o=void 0);var a=updateInDeepMap(this,forceIterator(s),o,i);return a===j?void 0:a},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(o){return mergeIntoMapWith(this,o,s.call(arguments,1))},Map.prototype.mergeIn=function(o){var i=s.call(arguments,1);return this.updateIn(o,emptyMap(),(function(s){return"function"==typeof s.merge?s.merge.apply(s,i):i[i.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(o){var i=s.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(o),i)},Map.prototype.mergeDeepIn=function(o){var i=s.call(arguments,1);return this.updateIn(o,emptyMap(),(function(s){return"function"==typeof s.mergeDeep?s.mergeDeep.apply(s,i):i[i.length-1]}))},Map.prototype.sort=function(s){return OrderedMap(sortFactory(this,s))},Map.prototype.sortBy=function(s,o){return OrderedMap(sortFactory(this,o,s))},Map.prototype.withMutations=function(s){var o=this.asMutable();return s(o),o.wasAltered()?o.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(s,o){return new MapIterator(this,s,o)},Map.prototype.__iterate=function(s,o){var i=this,a=0;return this._root&&this._root.iterate((function(o){return a++,s(o[1],o[0],i)}),o),a},Map.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeMap(this.size,this._root,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Map.isMap=isMap;var Te,Re="@@__IMMUTABLE_MAP__@@",qe=Map.prototype;function ArrayMapNode(s,o){this.ownerID=s,this.entries=o}function BitmapIndexedNode(s,o,i){this.ownerID=s,this.bitmap=o,this.nodes=i}function HashArrayMapNode(s,o,i){this.ownerID=s,this.count=o,this.nodes=i}function HashCollisionNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entries=i}function ValueNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entry=i}function MapIterator(s,o,i){this._type=o,this._reverse=i,this._stack=s._root&&mapIteratorFrame(s._root)}function mapIteratorValue(s,o){return iteratorValue(s,o[0],o[1])}function mapIteratorFrame(s,o){return{node:s,index:0,__prev:o}}function makeMap(s,o,i,a){var u=Object.create(qe);return u.size=s,u._root=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyMap(){return Te||(Te=makeMap(0))}function updateMap(s,o,i){var a,u;if(s._root){var _=MakeRef(L),w=MakeRef(B);if(a=updateNode(s._root,s.__ownerID,0,void 0,o,i,_,w),!w.value)return s;u=s.size+(_.value?i===j?-1:1:0)}else{if(i===j)return s;u=1,a=new ArrayMapNode(s.__ownerID,[[o,i]])}return s.__ownerID?(s.size=u,s._root=a,s.__hash=void 0,s.__altered=!0,s):a?makeMap(u,a):emptyMap()}function updateNode(s,o,i,a,u,_,w,x){return s?s.update(o,i,a,u,_,w,x):_===j?s:(SetRef(x),SetRef(w),new ValueNode(o,a,[u,_]))}function isLeafNode(s){return s.constructor===ValueNode||s.constructor===HashCollisionNode}function mergeIntoNode(s,o,i,a,u){if(s.keyHash===a)return new HashCollisionNode(o,a,[s.entry,u]);var _,x=(0===i?s.keyHash:s.keyHash>>>i)&C,j=(0===i?a:a>>>i)&C;return new BitmapIndexedNode(o,1<>>=1)w[C]=1&i?o[_++]:void 0;return w[a]=u,new HashArrayMapNode(s,_+1,w)}function mergeIntoMapWith(s,o,i){for(var a=[],u=0;u>1&1431655765))+(s>>2&858993459))+(s>>4)&252645135,s+=s>>8,127&(s+=s>>16)}function setIn(s,o,i,a){var u=a?s:arrCopy(s);return u[o]=i,u}function spliceIn(s,o,i,a){var u=s.length+1;if(a&&o+1===u)return s[o]=i,s;for(var _=new Array(u),w=0,x=0;x=$e)return createNodes(s,C,a,u);var V=s&&s===this.ownerID,U=V?C:arrCopy(C);return $?x?L===B-1?U.pop():U[L]=U.pop():U[L]=[a,u]:U.push([a,u]),V?(this.entries=U,this):new ArrayMapNode(s,U)}},BitmapIndexedNode.prototype.get=function(s,o,i,a){void 0===o&&(o=hash(i));var u=1<<((0===s?o:o>>>s)&C),_=this.bitmap;return _&u?this.nodes[popCount(_&u-1)].get(s+w,o,i,a):a},BitmapIndexedNode.prototype.update=function(s,o,i,a,u,_,x){void 0===i&&(i=hash(a));var L=(0===o?i:i>>>o)&C,B=1<=ze)return expandNodes(s,z,$,L,Z);if(V&&!Z&&2===z.length&&isLeafNode(z[1^U]))return z[1^U];if(V&&Z&&1===z.length&&isLeafNode(Z))return Z;var ee=s&&s===this.ownerID,ie=V?Z?$:$^B:$|B,ae=V?Z?setIn(z,U,Z,ee):spliceOut(z,U,ee):spliceIn(z,U,Z,ee);return ee?(this.bitmap=ie,this.nodes=ae,this):new BitmapIndexedNode(s,ie,ae)},HashArrayMapNode.prototype.get=function(s,o,i,a){void 0===o&&(o=hash(i));var u=(0===s?o:o>>>s)&C,_=this.nodes[u];return _?_.get(s+w,o,i,a):a},HashArrayMapNode.prototype.update=function(s,o,i,a,u,_,x){void 0===i&&(i=hash(a));var L=(0===o?i:i>>>o)&C,B=u===j,$=this.nodes,V=$[L];if(B&&!V)return this;var U=updateNode(V,s,o+w,i,a,u,_,x);if(U===V)return this;var z=this.count;if(V){if(!U&&--z0&&a=0&&s>>o&C;if(a>=this.array.length)return new VNode([],s);var u,_=0===a;if(o>0){var x=this.array[a];if((u=x&&x.removeBefore(s,o-w,i))===x&&_)return this}if(_&&!u)return this;var j=editableVNode(this,s);if(!_)for(var L=0;L>>o&C;if(u>=this.array.length)return this;if(o>0){var _=this.array[u];if((a=_&&_.removeAfter(s,o-w,i))===_&&u===this.array.length-1)return this}var x=editableVNode(this,s);return x.array.splice(u+1),a&&(x.array[u]=a),x};var Ye,Qe,et={};function iterateList(s,o){var i=s._origin,a=s._capacity,u=getTailOffset(a),_=s._tail;return iterateNodeOrLeaf(s._root,s._level,0);function iterateNodeOrLeaf(s,o,i){return 0===o?iterateLeaf(s,i):iterateNode(s,o,i)}function iterateLeaf(s,w){var C=w===u?_&&_.array:s&&s.array,j=w>i?0:i-w,L=a-w;return L>x&&(L=x),function(){if(j===L)return et;var s=o?--L:j++;return C&&C[s]}}function iterateNode(s,u,_){var C,j=s&&s.array,L=_>i?0:i-_>>u,B=1+(a-_>>u);return B>x&&(B=x),function(){for(;;){if(C){var s=C();if(s!==et)return s;C=null}if(L===B)return et;var i=o?--B:L++;C=iterateNodeOrLeaf(j&&j[i],u-w,_+(i<=s.size||o<0)return s.withMutations((function(s){o<0?setListBounds(s,o).set(0,i):setListBounds(s,0,o+1).set(o,i)}));o+=s._origin;var a=s._tail,u=s._root,_=MakeRef(B);return o>=getTailOffset(s._capacity)?a=updateVNode(a,s.__ownerID,0,o,i,_):u=updateVNode(u,s.__ownerID,s._level,o,i,_),_.value?s.__ownerID?(s._root=u,s._tail=a,s.__hash=void 0,s.__altered=!0,s):makeList(s._origin,s._capacity,s._level,u,a):s}function updateVNode(s,o,i,a,u,_){var x,j=a>>>i&C,L=s&&j0){var B=s&&s.array[j],$=updateVNode(B,o,i-w,a,u,_);return $===B?s:((x=editableVNode(s,o)).array[j]=$,x)}return L&&s.array[j]===u?s:(SetRef(_),x=editableVNode(s,o),void 0===u&&j===x.array.length-1?x.array.pop():x.array[j]=u,x)}function editableVNode(s,o){return o&&s&&o===s.ownerID?s:new VNode(s?s.array.slice():[],o)}function listNodeFor(s,o){if(o>=getTailOffset(s._capacity))return s._tail;if(o<1<0;)i=i.array[o>>>a&C],a-=w;return i}}function setListBounds(s,o,i){void 0!==o&&(o|=0),void 0!==i&&(i|=0);var a=s.__ownerID||new OwnerID,u=s._origin,_=s._capacity,x=u+o,j=void 0===i?_:i<0?_+i:u+i;if(x===u&&j===_)return s;if(x>=j)return s.clear();for(var L=s._level,B=s._root,$=0;x+$<0;)B=new VNode(B&&B.array.length?[void 0,B]:[],a),$+=1<<(L+=w);$&&(x+=$,u+=$,j+=$,_+=$);for(var V=getTailOffset(_),U=getTailOffset(j);U>=1<V?new VNode([],a):z;if(z&&U>V&&x<_&&z.array.length){for(var Z=B=editableVNode(B,a),ee=L;ee>w;ee-=w){var ie=V>>>ee&C;Z=Z.array[ie]=editableVNode(Z.array[ie],a)}Z.array[V>>>w&C]=z}if(j<_&&(Y=Y&&Y.removeAfter(a,0,j)),x>=U)x-=U,j-=U,L=w,B=null,Y=Y&&Y.removeBefore(a,0,x);else if(x>u||U>>L&C;if(ae!==U>>>L&C)break;ae&&($+=(1<u&&(B=B.removeBefore(a,L,x-$)),B&&Uu&&(u=x.size),isIterable(w)||(x=x.map((function(s){return fromJS(s)}))),a.push(x)}return u>s.size&&(s=s.setSize(u)),mergeIntoCollectionWith(s,o,a)}function getTailOffset(s){return s>>w<=x&&w.size>=2*_.size?(a=(u=w.filter((function(s,o){return void 0!==s&&C!==o}))).toKeyedSeq().map((function(s){return s[0]})).flip().toMap(),s.__ownerID&&(a.__ownerID=u.__ownerID=s.__ownerID)):(a=_.remove(o),u=C===w.size-1?w.pop():w.set(C,void 0))}else if(L){if(i===w.get(C)[1])return s;a=_,u=w.set(C,[o,i])}else a=_.set(o,w.size),u=w.set(w.size,[o,i]);return s.__ownerID?(s.size=a.size,s._map=a,s._list=u,s.__hash=void 0,s):makeOrderedMap(a,u)}function ToKeyedSequence(s,o){this._iter=s,this._useKeys=o,this.size=s.size}function ToIndexedSequence(s){this._iter=s,this.size=s.size}function ToSetSequence(s){this._iter=s,this.size=s.size}function FromEntriesSequence(s){this._iter=s,this.size=s.size}function flipFactory(s){var o=makeSequence(s);return o._iter=s,o.size=s.size,o.flip=function(){return s},o.reverse=function(){var o=s.reverse.apply(this);return o.flip=function(){return s.reverse()},o},o.has=function(o){return s.includes(o)},o.includes=function(o){return s.has(o)},o.cacheResult=cacheResultThrough,o.__iterateUncached=function(o,i){var a=this;return s.__iterate((function(s,i){return!1!==o(i,s,a)}),i)},o.__iteratorUncached=function(o,i){if(o===U){var a=s.__iterator(o,i);return new Iterator((function(){var s=a.next();if(!s.done){var o=s.value[0];s.value[0]=s.value[1],s.value[1]=o}return s}))}return s.__iterator(o===V?$:V,i)},o}function mapFactory(s,o,i){var a=makeSequence(s);return a.size=s.size,a.has=function(o){return s.has(o)},a.get=function(a,u){var _=s.get(a,j);return _===j?u:o.call(i,_,a,s)},a.__iterateUncached=function(a,u){var _=this;return s.__iterate((function(s,u,w){return!1!==a(o.call(i,s,u,w),u,_)}),u)},a.__iteratorUncached=function(a,u){var _=s.__iterator(U,u);return new Iterator((function(){var u=_.next();if(u.done)return u;var w=u.value,x=w[0];return iteratorValue(a,x,o.call(i,w[1],x,s),u)}))},a}function reverseFactory(s,o){var i=makeSequence(s);return i._iter=s,i.size=s.size,i.reverse=function(){return s},s.flip&&(i.flip=function(){var o=flipFactory(s);return o.reverse=function(){return s.flip()},o}),i.get=function(i,a){return s.get(o?i:-1-i,a)},i.has=function(i){return s.has(o?i:-1-i)},i.includes=function(o){return s.includes(o)},i.cacheResult=cacheResultThrough,i.__iterate=function(o,i){var a=this;return s.__iterate((function(s,i){return o(s,i,a)}),!i)},i.__iterator=function(o,i){return s.__iterator(o,!i)},i}function filterFactory(s,o,i,a){var u=makeSequence(s);return a&&(u.has=function(a){var u=s.get(a,j);return u!==j&&!!o.call(i,u,a,s)},u.get=function(a,u){var _=s.get(a,j);return _!==j&&o.call(i,_,a,s)?_:u}),u.__iterateUncached=function(u,_){var w=this,x=0;return s.__iterate((function(s,_,C){if(o.call(i,s,_,C))return x++,u(s,a?_:x-1,w)}),_),x},u.__iteratorUncached=function(u,_){var w=s.__iterator(U,_),x=0;return new Iterator((function(){for(;;){var _=w.next();if(_.done)return _;var C=_.value,j=C[0],L=C[1];if(o.call(i,L,j,s))return iteratorValue(u,a?j:x++,L,_)}}))},u}function countByFactory(s,o,i){var a=Map().asMutable();return s.__iterate((function(u,_){a.update(o.call(i,u,_,s),0,(function(s){return s+1}))})),a.asImmutable()}function groupByFactory(s,o,i){var a=isKeyed(s),u=(isOrdered(s)?OrderedMap():Map()).asMutable();s.__iterate((function(_,w){u.update(o.call(i,_,w,s),(function(s){return(s=s||[]).push(a?[w,_]:_),s}))}));var _=iterableClass(s);return u.map((function(o){return reify(s,_(o))}))}function sliceFactory(s,o,i,a){var u=s.size;if(void 0!==o&&(o|=0),void 0!==i&&(i===1/0?i=u:i|=0),wholeSlice(o,i,u))return s;var _=resolveBegin(o,u),w=resolveEnd(i,u);if(_!=_||w!=w)return sliceFactory(s.toSeq().cacheResult(),o,i,a);var x,C=w-_;C==C&&(x=C<0?0:C);var j=makeSequence(s);return j.size=0===x?x:s.size&&x||void 0,!a&&isSeq(s)&&x>=0&&(j.get=function(o,i){return(o=wrapIndex(this,o))>=0&&ox)return iteratorDone();var s=u.next();return a||o===V?s:iteratorValue(o,C-1,o===$?void 0:s.value[1],s)}))},j}function takeWhileFactory(s,o,i){var a=makeSequence(s);return a.__iterateUncached=function(a,u){var _=this;if(u)return this.cacheResult().__iterate(a,u);var w=0;return s.__iterate((function(s,u,x){return o.call(i,s,u,x)&&++w&&a(s,u,_)})),w},a.__iteratorUncached=function(a,u){var _=this;if(u)return this.cacheResult().__iterator(a,u);var w=s.__iterator(U,u),x=!0;return new Iterator((function(){if(!x)return iteratorDone();var s=w.next();if(s.done)return s;var u=s.value,C=u[0],j=u[1];return o.call(i,j,C,_)?a===U?s:iteratorValue(a,C,j,s):(x=!1,iteratorDone())}))},a}function skipWhileFactory(s,o,i,a){var u=makeSequence(s);return u.__iterateUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterate(u,_);var x=!0,C=0;return s.__iterate((function(s,_,j){if(!x||!(x=o.call(i,s,_,j)))return C++,u(s,a?_:C-1,w)})),C},u.__iteratorUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterator(u,_);var x=s.__iterator(U,_),C=!0,j=0;return new Iterator((function(){var s,_,L;do{if((s=x.next()).done)return a||u===V?s:iteratorValue(u,j++,u===$?void 0:s.value[1],s);var B=s.value;_=B[0],L=B[1],C&&(C=o.call(i,L,_,w))}while(C);return u===U?s:iteratorValue(u,_,L,s)}))},u}function concatFactory(s,o){var i=isKeyed(s),a=[s].concat(o).map((function(s){return isIterable(s)?i&&(s=KeyedIterable(s)):s=i?keyedSeqFromValue(s):indexedSeqFromValue(Array.isArray(s)?s:[s]),s})).filter((function(s){return 0!==s.size}));if(0===a.length)return s;if(1===a.length){var u=a[0];if(u===s||i&&isKeyed(u)||isIndexed(s)&&isIndexed(u))return u}var _=new ArraySeq(a);return i?_=_.toKeyedSeq():isIndexed(s)||(_=_.toSetSeq()),(_=_.flatten(!0)).size=a.reduce((function(s,o){if(void 0!==s){var i=o.size;if(void 0!==i)return s+i}}),0),_}function flattenFactory(s,o,i){var a=makeSequence(s);return a.__iterateUncached=function(a,u){var _=0,w=!1;function flatDeep(s,x){var C=this;s.__iterate((function(s,u){return(!o||x0}function zipWithFactory(s,o,i){var a=makeSequence(s);return a.size=new ArraySeq(i).map((function(s){return s.size})).min(),a.__iterate=function(s,o){for(var i,a=this.__iterator(V,o),u=0;!(i=a.next()).done&&!1!==s(i.value,u++,this););return u},a.__iteratorUncached=function(s,a){var u=i.map((function(s){return s=Iterable(s),getIterator(a?s.reverse():s)})),_=0,w=!1;return new Iterator((function(){var i;return w||(i=u.map((function(s){return s.next()})),w=i.some((function(s){return s.done}))),w?iteratorDone():iteratorValue(s,_++,o.apply(null,i.map((function(s){return s.value}))))}))},a}function reify(s,o){return isSeq(s)?o:s.constructor(o)}function validateEntry(s){if(s!==Object(s))throw new TypeError("Expected [K, V] tuple: "+s)}function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?IndexedIterable:SetIterable}function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isIndexed(s)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(s,o){return s>o?1:s=0;i--)o={value:arguments[i],next:o};return this.__ownerID?(this.size=s,this._head=o,this.__hash=void 0,this.__altered=!0,this):makeStack(s,o)},Stack.prototype.pushAll=function(s){if(0===(s=IndexedIterable(s)).size)return this;assertNotInfinite(s.size);var o=this.size,i=this._head;return s.reverse().forEach((function(s){o++,i={value:s,next:i}})),this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(o,i)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(s){return this.pushAll(s)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(s,o){if(wholeSlice(s,o,this.size))return this;var i=resolveBegin(s,this.size);if(resolveEnd(o,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,s,o);for(var a=this.size-i,u=this._head;i--;)u=u.next;return this.__ownerID?(this.size=a,this._head=u,this.__hash=void 0,this.__altered=!0,this):makeStack(a,u)},Stack.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeStack(this.size,this._head,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Stack.prototype.__iterate=function(s,o){if(o)return this.reverse().__iterate(s);for(var i=0,a=this._head;a&&!1!==s(a.value,i++,this);)a=a.next;return i},Stack.prototype.__iterator=function(s,o){if(o)return this.reverse().__iterator(s);var i=0,a=this._head;return new Iterator((function(){if(a){var o=a.value;return a=a.next,iteratorValue(s,i++,o)}return iteratorDone()}))},Stack.isStack=isStack;var at,ct="@@__IMMUTABLE_STACK__@@",lt=Stack.prototype;function makeStack(s,o,i,a){var u=Object.create(lt);return u.size=s,u._head=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyStack(){return at||(at=makeStack(0))}function mixin(s,o){var keyCopier=function(i){s.prototype[i]=o[i]};return Object.keys(o).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(o).forEach(keyCopier),s}lt[ct]=!0,lt.withMutations=qe.withMutations,lt.asMutable=qe.asMutable,lt.asImmutable=qe.asImmutable,lt.wasAltered=qe.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var s=new Array(this.size||0);return this.valueSeq().__iterate((function(o,i){s[i]=o})),s},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(s){return s&&"function"==typeof s.toJS?s.toJS():s})).__toJS()},toJSON:function(){return this.toSeq().map((function(s){return s&&"function"==typeof s.toJSON?s.toJSON():s})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var s={};return this.__iterate((function(o,i){s[i]=o})),s},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(s,o){return 0===this.size?s+o:s+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+o},concat:function(){return reify(this,concatFactory(this,s.call(arguments,0)))},includes:function(s){return this.some((function(o){return is(o,s)}))},entries:function(){return this.__iterator(U)},every:function(s,o){assertNotInfinite(this.size);var i=!0;return this.__iterate((function(a,u,_){if(!s.call(o,a,u,_))return i=!1,!1})),i},filter:function(s,o){return reify(this,filterFactory(this,s,o,!0))},find:function(s,o,i){var a=this.findEntry(s,o);return a?a[1]:i},forEach:function(s,o){return assertNotInfinite(this.size),this.__iterate(o?s.bind(o):s)},join:function(s){assertNotInfinite(this.size),s=void 0!==s?""+s:",";var o="",i=!0;return this.__iterate((function(a){i?i=!1:o+=s,o+=null!=a?a.toString():""})),o},keys:function(){return this.__iterator($)},map:function(s,o){return reify(this,mapFactory(this,s,o))},reduce:function(s,o,i){var a,u;return assertNotInfinite(this.size),arguments.length<2?u=!0:a=o,this.__iterate((function(o,_,w){u?(u=!1,a=o):a=s.call(i,a,o,_,w)})),a},reduceRight:function(s,o,i){var a=this.toKeyedSeq().reverse();return a.reduce.apply(a,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(s,o){return reify(this,sliceFactory(this,s,o,!0))},some:function(s,o){return!this.every(not(s),o)},sort:function(s){return reify(this,sortFactory(this,s))},values:function(){return this.__iterator(V)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(s,o){return ensureSize(s?this.toSeq().filter(s,o):this)},countBy:function(s,o){return countByFactory(this,s,o)},equals:function(s){return deepEqual(this,s)},entrySeq:function(){var s=this;if(s._cache)return new ArraySeq(s._cache);var o=s.toSeq().map(entryMapper).toIndexedSeq();return o.fromEntrySeq=function(){return s.toSeq()},o},filterNot:function(s,o){return this.filter(not(s),o)},findEntry:function(s,o,i){var a=i;return this.__iterate((function(i,u,_){if(s.call(o,i,u,_))return a=[u,i],!1})),a},findKey:function(s,o){var i=this.findEntry(s,o);return i&&i[0]},findLast:function(s,o,i){return this.toKeyedSeq().reverse().find(s,o,i)},findLastEntry:function(s,o,i){return this.toKeyedSeq().reverse().findEntry(s,o,i)},findLastKey:function(s,o){return this.toKeyedSeq().reverse().findKey(s,o)},first:function(){return this.find(returnTrue)},flatMap:function(s,o){return reify(this,flatMapFactory(this,s,o))},flatten:function(s){return reify(this,flattenFactory(this,s,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(s,o){return this.find((function(o,i){return is(i,s)}),void 0,o)},getIn:function(s,o){for(var i,a=this,u=forceIterator(s);!(i=u.next()).done;){var _=i.value;if((a=a&&a.get?a.get(_,j):j)===j)return o}return a},groupBy:function(s,o){return groupByFactory(this,s,o)},has:function(s){return this.get(s,j)!==j},hasIn:function(s){return this.getIn(s,j)!==j},isSubset:function(s){return s="function"==typeof s.includes?s:Iterable(s),this.every((function(o){return s.includes(o)}))},isSuperset:function(s){return(s="function"==typeof s.isSubset?s:Iterable(s)).isSubset(this)},keyOf:function(s){return this.findKey((function(o){return is(o,s)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(s){return this.toKeyedSeq().reverse().keyOf(s)},max:function(s){return maxFactory(this,s)},maxBy:function(s,o){return maxFactory(this,o,s)},min:function(s){return maxFactory(this,s?neg(s):defaultNegComparator)},minBy:function(s,o){return maxFactory(this,o?neg(o):defaultNegComparator,s)},rest:function(){return this.slice(1)},skip:function(s){return this.slice(Math.max(0,s))},skipLast:function(s){return reify(this,this.toSeq().reverse().skip(s).reverse())},skipWhile:function(s,o){return reify(this,skipWhileFactory(this,s,o,!0))},skipUntil:function(s,o){return this.skipWhile(not(s),o)},sortBy:function(s,o){return reify(this,sortFactory(this,o,s))},take:function(s){return this.slice(0,Math.max(0,s))},takeLast:function(s){return reify(this,this.toSeq().reverse().take(s).reverse())},takeWhile:function(s,o){return reify(this,takeWhileFactory(this,s,o))},takeUntil:function(s,o){return this.takeWhile(not(s),o)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var ut=Iterable.prototype;ut[o]=!0,ut[Z]=ut.values,ut.__toJS=ut.toArray,ut.__toStringMapper=quoteString,ut.inspect=ut.toSource=function(){return this.toString()},ut.chain=ut.flatMap,ut.contains=ut.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(s,o){var i=this,a=0;return reify(this,this.toSeq().map((function(u,_){return s.call(o,[_,u],a++,i)})).fromEntrySeq())},mapKeys:function(s,o){var i=this;return reify(this,this.toSeq().flip().map((function(a,u){return s.call(o,a,u,i)})).flip())}});var pt=KeyedIterable.prototype;function keyMapper(s,o){return o}function entryMapper(s,o){return[o,s]}function not(s){return function(){return!s.apply(this,arguments)}}function neg(s){return function(){return-s.apply(this,arguments)}}function quoteString(s){return"string"==typeof s?JSON.stringify(s):String(s)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(s,o){return so?-1:0}function hashIterable(s){if(s.size===1/0)return 0;var o=isOrdered(s),i=isKeyed(s),a=o?1:0;return murmurHashOfSize(s.__iterate(i?o?function(s,o){a=31*a+hashMerge(hash(s),hash(o))|0}:function(s,o){a=a+hashMerge(hash(s),hash(o))|0}:o?function(s){a=31*a+hash(s)|0}:function(s){a=a+hash(s)|0}),a)}function murmurHashOfSize(s,o){return o=le(o,3432918353),o=le(o<<15|o>>>-15,461845907),o=le(o<<13|o>>>-13,5),o=le((o=o+3864292196^s)^o>>>16,2246822507),o=smi((o=le(o^o>>>13,3266489909))^o>>>16)}function hashMerge(s,o){return s^o+2654435769+(s<<6)+(s>>2)}return pt[i]=!0,pt[Z]=ut.entries,pt.__toJS=ut.toObject,pt.__toStringMapper=function(s,o){return JSON.stringify(o)+": "+quoteString(s)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(s,o){return reify(this,filterFactory(this,s,o,!1))},findIndex:function(s,o){var i=this.findEntry(s,o);return i?i[0]:-1},indexOf:function(s){var o=this.keyOf(s);return void 0===o?-1:o},lastIndexOf:function(s){var o=this.lastKeyOf(s);return void 0===o?-1:o},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(s,o){return reify(this,sliceFactory(this,s,o,!1))},splice:function(s,o){var i=arguments.length;if(o=Math.max(0|o,0),0===i||2===i&&!o)return this;s=resolveBegin(s,s<0?this.count():this.size);var a=this.slice(0,s);return reify(this,1===i?a:a.concat(arrCopy(arguments,2),this.slice(s+o)))},findLastIndex:function(s,o){var i=this.findLastEntry(s,o);return i?i[0]:-1},first:function(){return this.get(0)},flatten:function(s){return reify(this,flattenFactory(this,s,!1))},get:function(s,o){return(s=wrapIndex(this,s))<0||this.size===1/0||void 0!==this.size&&s>this.size?o:this.find((function(o,i){return i===s}),void 0,o)},has:function(s){return(s=wrapIndex(this,s))>=0&&(void 0!==this.size?this.size===1/0||s{"use strict";i(71340);var a=i(92046);s.exports=a.Object.assign},9999:(s,o,i)=>{var a=i(37217),u=i(83729),_=i(16547),w=i(74733),x=i(43838),C=i(93290),j=i(23007),L=i(92271),B=i(48948),$=i(50002),V=i(83349),U=i(5861),z=i(76189),Y=i(77199),Z=i(35529),ee=i(56449),ie=i(3656),ae=i(87730),ce=i(23805),le=i(38440),pe=i(95950),de=i(37241),fe="[object Arguments]",ye="[object Function]",be="[object Object]",_e={};_e[fe]=_e["[object Array]"]=_e["[object ArrayBuffer]"]=_e["[object DataView]"]=_e["[object Boolean]"]=_e["[object Date]"]=_e["[object Float32Array]"]=_e["[object Float64Array]"]=_e["[object Int8Array]"]=_e["[object Int16Array]"]=_e["[object Int32Array]"]=_e["[object Map]"]=_e["[object Number]"]=_e[be]=_e["[object RegExp]"]=_e["[object Set]"]=_e["[object String]"]=_e["[object Symbol]"]=_e["[object Uint8Array]"]=_e["[object Uint8ClampedArray]"]=_e["[object Uint16Array]"]=_e["[object Uint32Array]"]=!0,_e["[object Error]"]=_e[ye]=_e["[object WeakMap]"]=!1,s.exports=function baseClone(s,o,i,Se,we,xe){var Pe,Te=1&o,Re=2&o,qe=4&o;if(i&&(Pe=we?i(s,Se,we,xe):i(s)),void 0!==Pe)return Pe;if(!ce(s))return s;var $e=ee(s);if($e){if(Pe=z(s),!Te)return j(s,Pe)}else{var ze=U(s),We=ze==ye||"[object GeneratorFunction]"==ze;if(ie(s))return C(s,Te);if(ze==be||ze==fe||We&&!we){if(Pe=Re||We?{}:Z(s),!Te)return Re?B(s,x(Pe,s)):L(s,w(Pe,s))}else{if(!_e[ze])return we?s:{};Pe=Y(s,ze,Te)}}xe||(xe=new a);var He=xe.get(s);if(He)return He;xe.set(s,Pe),le(s)?s.forEach((function(a){Pe.add(baseClone(a,o,i,a,s,xe))})):ae(s)&&s.forEach((function(a,u){Pe.set(u,baseClone(a,o,i,u,s,xe))}));var Xe=$e?void 0:(qe?Re?V:$:Re?de:pe)(s);return u(Xe||s,(function(a,u){Xe&&(a=s[u=a]),_(Pe,u,baseClone(a,o,i,u,s,xe))})),Pe}},10023:(s,o,i)=>{const a=i(6205),INTS=()=>[{type:a.RANGE,from:48,to:57}],WORDS=()=>[{type:a.CHAR,value:95},{type:a.RANGE,from:97,to:122},{type:a.RANGE,from:65,to:90}].concat(INTS()),WHITESPACE=()=>[{type:a.CHAR,value:9},{type:a.CHAR,value:10},{type:a.CHAR,value:11},{type:a.CHAR,value:12},{type:a.CHAR,value:13},{type:a.CHAR,value:32},{type:a.CHAR,value:160},{type:a.CHAR,value:5760},{type:a.RANGE,from:8192,to:8202},{type:a.CHAR,value:8232},{type:a.CHAR,value:8233},{type:a.CHAR,value:8239},{type:a.CHAR,value:8287},{type:a.CHAR,value:12288},{type:a.CHAR,value:65279}];o.words=()=>({type:a.SET,set:WORDS(),not:!1}),o.notWords=()=>({type:a.SET,set:WORDS(),not:!0}),o.ints=()=>({type:a.SET,set:INTS(),not:!1}),o.notInts=()=>({type:a.SET,set:INTS(),not:!0}),o.whitespace=()=>({type:a.SET,set:WHITESPACE(),not:!1}),o.notWhitespace=()=>({type:a.SET,set:WHITESPACE(),not:!0}),o.anyChar=()=>({type:a.SET,set:[{type:a.CHAR,value:10},{type:a.CHAR,value:13},{type:a.CHAR,value:8232},{type:a.CHAR,value:8233}],not:!0})},10043:(s,o,i)=>{"use strict";var a=i(54018),u=String,_=TypeError;s.exports=function(s){if(a(s))return s;throw new _("Can't set "+u(s)+" as a prototype")}},10124:(s,o,i)=>{var a=i(9325);s.exports=function(){return a.Date.now()}},10300:(s,o,i)=>{"use strict";var a=i(13930),u=i(82159),_=i(36624),w=i(4640),x=i(73448),C=TypeError;s.exports=function(s,o){var i=arguments.length<2?x(s):o;if(u(i))return _(a(i,s));throw new C(w(s)+" is not iterable")}},10316:(s,o,i)=>{const a=i(2404),u=i(55973),_=i(92340);class Element{constructor(s,o,i){o&&(this.meta=o),i&&(this.attributes=i),this.content=s}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((s=>{s.parent=this,s.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const s=new this.constructor;return s.element=this.element,this.meta.length&&(s._meta=this.meta.clone()),this.attributes.length&&(s._attributes=this.attributes.clone()),this.content?this.content.clone?s.content=this.content.clone():Array.isArray(this.content)?s.content=this.content.map((s=>s.clone())):s.content=this.content:s.content=this.content,s}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof u?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((s=>s.toValue()),this):this.content}toRef(s){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const o=new this.RefElement(this.id.toValue());return s&&(o.path=s),o}findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const o=s.pop();let i=new _;const append=(s,o)=>(s.push(o),s),checkElement=(s,i)=>{i.element===o&&s.push(i);const a=i.findRecursive(o);return a&&a.reduce(append,s),i.content instanceof u&&(i.content.key&&checkElement(s,i.content.key),i.content.value&&checkElement(s,i.content.value)),s};return this.content&&(this.content.element&&checkElement(i,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,i)),s.isEmpty||(i=i.filter((o=>{let i=o.parents.map((s=>s.element));for(const o in s){const a=s[o],u=i.indexOf(a);if(-1===u)return!1;i=i.splice(0,u)}return!0}))),i}set(s){return this.content=s,this}equals(s){return a(this.toValue(),s)}getMetaProperty(s,o){if(!this.meta.hasKey(s)){if(this.isFrozen){const s=this.refract(o);return s.freeze(),s}this.meta.set(s,o)}return this.meta.get(s)}setMetaProperty(s,o){this.meta.set(s,o)}get element(){return this._storedElement||"element"}set element(s){this._storedElement=s}get content(){return this._content}set content(s){if(s instanceof Element)this._content=s;else if(s instanceof _)this.content=s.elements;else if("string"==typeof s||"number"==typeof s||"boolean"==typeof s||"null"===s||null==s)this._content=s;else if(s instanceof u)this._content=s;else if(Array.isArray(s))this._content=s.map(this.refract);else{if("object"!=typeof s)throw new Error("Cannot set content to given value");this._content=Object.keys(s).map((o=>new this.MemberElement(o,s[o])))}}get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._meta=new this.ObjectElement}return this._meta}set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set(s||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._attributes=new this.ObjectElement}return this._attributes}set attributes(s){s instanceof this.ObjectElement?this._attributes=s:this.attributes.set(s||{})}get id(){return this.getMetaProperty("id","")}set id(s){this.setMetaProperty("id",s)}get classes(){return this.getMetaProperty("classes",[])}set classes(s){this.setMetaProperty("classes",s)}get title(){return this.getMetaProperty("title","")}set title(s){this.setMetaProperty("title",s)}get description(){return this.getMetaProperty("description","")}set description(s){this.setMetaProperty("description",s)}get links(){return this.getMetaProperty("links",[])}set links(s){this.setMetaProperty("links",s)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:s}=this;const o=new _;for(;s;)o.push(s),s=s.parent;return o}get children(){if(Array.isArray(this.content))return new _(this.content);if(this.content instanceof u){const s=new _([this.content.key]);return this.content.value&&s.push(this.content.value),s}return this.content instanceof Element?new _([this.content]):new _}get recursiveChildren(){const s=new _;return this.children.forEach((o=>{s.push(o),o.recursiveChildren.forEach((o=>{s.push(o)}))})),s}}s.exports=Element},10392:s=>{s.exports=function getValue(s,o){return null==s?void 0:s[o]}},10776:(s,o,i)=>{var a=i(30756),u=i(95950);s.exports=function getMatchData(s){for(var o=u(s),i=o.length;i--;){var _=o[i],w=s[_];o[i]=[_,w,a(w)]}return o}},10866:(s,o,i)=>{const a=i(6048),u=i(92340);class ObjectSlice extends u{map(s,o){return this.elements.map((i=>s.bind(o)(i.value,i.key,i)))}filter(s,o){return new ObjectSlice(this.elements.filter((i=>s.bind(o)(i.value,i.key,i))))}reject(s,o){return this.filter(a(s.bind(o)))}forEach(s,o){return this.elements.forEach(((i,a)=>{s.bind(o)(i.value,i.key,i,a)}))}keys(){return this.map(((s,o)=>o.toValue()))}values(){return this.map((s=>s.toValue()))}}s.exports=ObjectSlice},11042:(s,o,i)=>{"use strict";var a=i(85582),u=i(1907),_=i(24443),w=i(87170),x=i(36624),C=u([].concat);s.exports=a("Reflect","ownKeys")||function ownKeys(s){var o=_.f(x(s)),i=w.f;return i?C(o,i(s)):o}},11091:(s,o,i)=>{"use strict";var a=i(45951),u=i(76024),_=i(92361),w=i(62250),x=i(13846).f,C=i(7463),j=i(92046),L=i(28311),B=i(61626),$=i(49724);i(36128);var wrapConstructor=function(s){var Wrapper=function(o,i,a){if(this instanceof Wrapper){switch(arguments.length){case 0:return new s;case 1:return new s(o);case 2:return new s(o,i)}return new s(o,i,a)}return u(s,this,arguments)};return Wrapper.prototype=s.prototype,Wrapper};s.exports=function(s,o){var i,u,V,U,z,Y,Z,ee,ie,ae=s.target,ce=s.global,le=s.stat,pe=s.proto,de=ce?a:le?a[ae]:a[ae]&&a[ae].prototype,fe=ce?j:j[ae]||B(j,ae,{})[ae],ye=fe.prototype;for(U in o)u=!(i=C(ce?U:ae+(le?".":"#")+U,s.forced))&&de&&$(de,U),Y=fe[U],u&&(Z=s.dontCallGetSet?(ie=x(de,U))&&ie.value:de[U]),z=u&&Z?Z:o[U],(i||pe||typeof Y!=typeof z)&&(ee=s.bind&&u?L(z,a):s.wrap&&u?wrapConstructor(z):pe&&w(z)?_(z):z,(s.sham||z&&z.sham||Y&&Y.sham)&&B(ee,"sham",!0),B(fe,U,ee),pe&&($(j,V=ae+"Prototype")||B(j,V,{}),B(j[V],U,z),s.real&&ye&&(i||!ye[U])&&B(ye,U,z)))}},11287:s=>{s.exports=function getHolder(s){return s.placeholder}},11331:(s,o,i)=>{var a=i(72552),u=i(28879),_=i(40346),w=Function.prototype,x=Object.prototype,C=w.toString,j=x.hasOwnProperty,L=C.call(Object);s.exports=function isPlainObject(s){if(!_(s)||"[object Object]"!=a(s))return!1;var o=u(s);if(null===o)return!0;var i=j.call(o,"constructor")&&o.constructor;return"function"==typeof i&&i instanceof i&&C.call(i)==L}},11470:(s,o,i)=>{"use strict";var a=i(1907),u=i(65482),_=i(90160),w=i(74239),x=a("".charAt),C=a("".charCodeAt),j=a("".slice),createMethod=function(s){return function(o,i){var a,L,B=_(w(o)),$=u(i),V=B.length;return $<0||$>=V?s?"":void 0:(a=C(B,$))<55296||a>56319||$+1===V||(L=C(B,$+1))<56320||L>57343?s?x(B,$):a:s?j(B,$,$+2):L-56320+(a-55296<<10)+65536}};s.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},11842:(s,o,i)=>{var a=i(82819),u=i(9325);s.exports=function createBind(s,o,i){var _=1&o,w=a(s);return function wrapper(){return(this&&this!==u&&this instanceof wrapper?w:s).apply(_?i:this,arguments)}}},12242:(s,o,i)=>{const a=i(10316);s.exports=class BooleanElement extends a{constructor(s,o,i){super(s,o,i),this.element="boolean"}primitive(){return"boolean"}}},12507:(s,o,i)=>{var a=i(28754),u=i(49698),_=i(63912),w=i(13222);s.exports=function createCaseFirst(s){return function(o){o=w(o);var i=u(o)?_(o):void 0,x=i?i[0]:o.charAt(0),C=i?a(i,1).join(""):o.slice(1);return x[s]()+C}}},12560:(s,o,i)=>{"use strict";i(99363);var a=i(19287),u=i(45951),_=i(14840),w=i(93742);for(var x in a)_(u[x],x),w[x]=w.Array},12651:(s,o,i)=>{var a=i(74218);s.exports=function getMapData(s,o){var i=s.__data__;return a(o)?i["string"==typeof o?"string":"hash"]:i.map}},12749:(s,o,i)=>{var a=i(81042),u=Object.prototype.hasOwnProperty;s.exports=function hashHas(s){var o=this.__data__;return a?void 0!==o[s]:u.call(o,s)}},13222:(s,o,i)=>{var a=i(77556);s.exports=function toString(s){return null==s?"":a(s)}},13846:(s,o,i)=>{"use strict";var a=i(39447),u=i(13930),_=i(22574),w=i(75817),x=i(4993),C=i(70470),j=i(49724),L=i(73648),B=Object.getOwnPropertyDescriptor;o.f=a?B:function getOwnPropertyDescriptor(s,o){if(s=x(s),o=C(o),L)try{return B(s,o)}catch(s){}if(j(s,o))return w(!u(_.f,s,o),s[o])}},13930:(s,o,i)=>{"use strict";var a=i(41505),u=Function.prototype.call;s.exports=a?u.bind(u):function(){return u.apply(u,arguments)}},14248:s=>{s.exports=function arraySome(s,o){for(var i=-1,a=null==s?0:s.length;++i{s.exports=function arrayPush(s,o){for(var i=-1,a=o.length,u=s.length;++i{const a=i(10316);s.exports=class RefElement extends a{constructor(s,o,i){super(s||[],o,i),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(s){this.attributes.set("path",s)}}},14744:s=>{"use strict";var o=function isMergeableObject(s){return function isNonNullObject(s){return!!s&&"object"==typeof s}(s)&&!function isSpecial(s){var o=Object.prototype.toString.call(s);return"[object RegExp]"===o||"[object Date]"===o||function isReactElement(s){return s.$$typeof===i}(s)}(s)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function cloneUnlessOtherwiseSpecified(s,o){return!1!==o.clone&&o.isMergeableObject(s)?deepmerge(function emptyTarget(s){return Array.isArray(s)?[]:{}}(s),s,o):s}function defaultArrayMerge(s,o,i){return s.concat(o).map((function(s){return cloneUnlessOtherwiseSpecified(s,i)}))}function getKeys(s){return Object.keys(s).concat(function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter((function(o){return Object.propertyIsEnumerable.call(s,o)})):[]}(s))}function propertyIsOnObject(s,o){try{return o in s}catch(s){return!1}}function mergeObject(s,o,i){var a={};return i.isMergeableObject(s)&&getKeys(s).forEach((function(o){a[o]=cloneUnlessOtherwiseSpecified(s[o],i)})),getKeys(o).forEach((function(u){(function propertyIsUnsafe(s,o){return propertyIsOnObject(s,o)&&!(Object.hasOwnProperty.call(s,o)&&Object.propertyIsEnumerable.call(s,o))})(s,u)||(propertyIsOnObject(s,u)&&i.isMergeableObject(o[u])?a[u]=function getMergeFunction(s,o){if(!o.customMerge)return deepmerge;var i=o.customMerge(s);return"function"==typeof i?i:deepmerge}(u,i)(s[u],o[u],i):a[u]=cloneUnlessOtherwiseSpecified(o[u],i))})),a}function deepmerge(s,i,a){(a=a||{}).arrayMerge=a.arrayMerge||defaultArrayMerge,a.isMergeableObject=a.isMergeableObject||o,a.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var u=Array.isArray(i);return u===Array.isArray(s)?u?a.arrayMerge(s,i,a):mergeObject(s,i,a):cloneUnlessOtherwiseSpecified(i,a)}deepmerge.all=function deepmergeAll(s,o){if(!Array.isArray(s))throw new Error("first argument should be an array");return s.reduce((function(s,i){return deepmerge(s,i,o)}),{})};var a=deepmerge;s.exports=a},14792:(s,o,i)=>{var a=i(13222),u=i(55808);s.exports=function capitalize(s){return u(a(s).toLowerCase())}},14840:(s,o,i)=>{"use strict";var a=i(52623),u=i(74284).f,_=i(61626),w=i(49724),x=i(54878),C=i(76264)("toStringTag");s.exports=function(s,o,i,j){var L=i?s:s&&s.prototype;L&&(w(L,C)||u(L,C,{configurable:!0,value:o}),j&&!a&&_(L,"toString",x))}},14974:s=>{s.exports=function safeGet(s,o){if(("constructor"!==o||"function"!=typeof s[o])&&"__proto__"!=o)return s[o]}},15287:(s,o)=>{"use strict";var i=Symbol.for("react.element"),a=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),C=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),B=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),V=Symbol.iterator;var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,Y={};function E(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i||U}function F(){}function G(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i||U}E.prototype.isReactComponent={},E.prototype.setState=function(s,o){if("object"!=typeof s&&"function"!=typeof s&&null!=s)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,o,"setState")},E.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")},F.prototype=E.prototype;var Z=G.prototype=new F;Z.constructor=G,z(Z,E.prototype),Z.isPureReactComponent=!0;var ee=Array.isArray,ie=Object.prototype.hasOwnProperty,ae={current:null},ce={key:!0,ref:!0,__self:!0,__source:!0};function M(s,o,a){var u,_={},w=null,x=null;if(null!=o)for(u in void 0!==o.ref&&(x=o.ref),void 0!==o.key&&(w=""+o.key),o)ie.call(o,u)&&!ce.hasOwnProperty(u)&&(_[u]=o[u]);var C=arguments.length-2;if(1===C)_.children=a;else if(1{var a=i(96131);s.exports=function arrayIncludes(s,o){return!!(null==s?0:s.length)&&a(s,o,0)>-1}},15340:()=>{},15389:(s,o,i)=>{var a=i(93663),u=i(87978),_=i(83488),w=i(56449),x=i(50583);s.exports=function baseIteratee(s){return"function"==typeof s?s:null==s?_:"object"==typeof s?w(s)?u(s[0],s[1]):a(s):x(s)}},15972:(s,o,i)=>{"use strict";var a=i(49724),u=i(62250),_=i(39298),w=i(92522),x=i(57382),C=w("IE_PROTO"),j=Object,L=j.prototype;s.exports=x?j.getPrototypeOf:function(s){var o=_(s);if(a(o,C))return o[C];var i=o.constructor;return u(i)&&o instanceof i?i.prototype:o instanceof j?L:null}},16038:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function baseIsSet(s){return u(s)&&"[object Set]"==a(s)}},16426:s=>{s.exports=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var o=document.activeElement,i=[],a=0;a{var a=i(43360),u=i(75288),_=Object.prototype.hasOwnProperty;s.exports=function assignValue(s,o,i){var w=s[o];_.call(s,o)&&u(w,i)&&(void 0!==i||o in s)||a(s,o,i)}},16708:(s,o,i)=>{"use strict";var a,u=i(65606);function CorkedRequest(s){var o=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(s,o,i){var a=s.entry;s.entry=null;for(;a;){var u=a.callback;o.pendingcb--,u(i),a=a.next}o.corkedRequestsFree.next=s}(o,s)}}s.exports=Writable,Writable.WritableState=WritableState;var _={deprecate:i(94643)},w=i(40345),x=i(48287).Buffer,C=(void 0!==i.g?i.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var j,L=i(75896),B=i(65291).getHighWaterMark,$=i(86048).F,V=$.ERR_INVALID_ARG_TYPE,U=$.ERR_METHOD_NOT_IMPLEMENTED,z=$.ERR_MULTIPLE_CALLBACK,Y=$.ERR_STREAM_CANNOT_PIPE,Z=$.ERR_STREAM_DESTROYED,ee=$.ERR_STREAM_NULL_VALUES,ie=$.ERR_STREAM_WRITE_AFTER_END,ae=$.ERR_UNKNOWN_ENCODING,ce=L.errorOrDestroy;function nop(){}function WritableState(s,o,_){a=a||i(25382),s=s||{},"boolean"!=typeof _&&(_=o instanceof a),this.objectMode=!!s.objectMode,_&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=B(this,s,"writableHighWaterMark",_),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=!1===s.decodeStrings;this.decodeStrings=!w,this.defaultEncoding=s.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){!function onwrite(s,o){var i=s._writableState,a=i.sync,_=i.writecb;if("function"!=typeof _)throw new z;if(function onwriteStateUpdate(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}(i),o)!function onwriteError(s,o,i,a,_){--o.pendingcb,i?(u.nextTick(_,a),u.nextTick(finishMaybe,s,o),s._writableState.errorEmitted=!0,ce(s,a)):(_(a),s._writableState.errorEmitted=!0,ce(s,a),finishMaybe(s,o))}(s,i,a,o,_);else{var w=needFinish(i)||s.destroyed;w||i.corked||i.bufferProcessing||!i.bufferedRequest||clearBuffer(s,i),a?u.nextTick(afterWrite,s,i,w,_):afterWrite(s,i,w,_)}}(o,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(s){var o=this instanceof(a=a||i(25382));if(!o&&!j.call(Writable,this))return new Writable(s);this._writableState=new WritableState(s,this,o),this.writable=!0,s&&("function"==typeof s.write&&(this._write=s.write),"function"==typeof s.writev&&(this._writev=s.writev),"function"==typeof s.destroy&&(this._destroy=s.destroy),"function"==typeof s.final&&(this._final=s.final)),w.call(this)}function doWrite(s,o,i,a,u,_,w){o.writelen=a,o.writecb=w,o.writing=!0,o.sync=!0,o.destroyed?o.onwrite(new Z("write")):i?s._writev(u,o.onwrite):s._write(u,_,o.onwrite),o.sync=!1}function afterWrite(s,o,i,a){i||function onwriteDrain(s,o){0===o.length&&o.needDrain&&(o.needDrain=!1,s.emit("drain"))}(s,o),o.pendingcb--,a(),finishMaybe(s,o)}function clearBuffer(s,o){o.bufferProcessing=!0;var i=o.bufferedRequest;if(s._writev&&i&&i.next){var a=o.bufferedRequestCount,u=new Array(a),_=o.corkedRequestsFree;_.entry=i;for(var w=0,x=!0;i;)u[w]=i,i.isBuf||(x=!1),i=i.next,w+=1;u.allBuffers=x,doWrite(s,o,!0,o.length,u,"",_.finish),o.pendingcb++,o.lastBufferedRequest=null,_.next?(o.corkedRequestsFree=_.next,_.next=null):o.corkedRequestsFree=new CorkedRequest(o),o.bufferedRequestCount=0}else{for(;i;){var C=i.chunk,j=i.encoding,L=i.callback;if(doWrite(s,o,!1,o.objectMode?1:C.length,C,j,L),i=i.next,o.bufferedRequestCount--,o.writing)break}null===i&&(o.lastBufferedRequest=null)}o.bufferedRequest=i,o.bufferProcessing=!1}function needFinish(s){return s.ending&&0===s.length&&null===s.bufferedRequest&&!s.finished&&!s.writing}function callFinal(s,o){s._final((function(i){o.pendingcb--,i&&ce(s,i),o.prefinished=!0,s.emit("prefinish"),finishMaybe(s,o)}))}function finishMaybe(s,o){var i=needFinish(o);if(i&&(function prefinish(s,o){o.prefinished||o.finalCalled||("function"!=typeof s._final||o.destroyed?(o.prefinished=!0,s.emit("prefinish")):(o.pendingcb++,o.finalCalled=!0,u.nextTick(callFinal,s,o)))}(s,o),0===o.pendingcb&&(o.finished=!0,s.emit("finish"),o.autoDestroy))){var a=s._readableState;(!a||a.autoDestroy&&a.endEmitted)&&s.destroy()}return i}i(56698)(Writable,w),WritableState.prototype.getBuffer=function getBuffer(){for(var s=this.bufferedRequest,o=[];s;)o.push(s),s=s.next;return o},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:_.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(s){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(s){return!!j.call(this,s)||this===Writable&&(s&&s._writableState instanceof WritableState)}})):j=function realHasInstance(s){return s instanceof this},Writable.prototype.pipe=function(){ce(this,new Y)},Writable.prototype.write=function(s,o,i){var a=this._writableState,_=!1,w=!a.objectMode&&function _isUint8Array(s){return x.isBuffer(s)||s instanceof C}(s);return w&&!x.isBuffer(s)&&(s=function _uint8ArrayToBuffer(s){return x.from(s)}(s)),"function"==typeof o&&(i=o,o=null),w?o="buffer":o||(o=a.defaultEncoding),"function"!=typeof i&&(i=nop),a.ending?function writeAfterEnd(s,o){var i=new ie;ce(s,i),u.nextTick(o,i)}(this,i):(w||function validChunk(s,o,i,a){var _;return null===i?_=new ee:"string"==typeof i||o.objectMode||(_=new V("chunk",["string","Buffer"],i)),!_||(ce(s,_),u.nextTick(a,_),!1)}(this,a,s,i))&&(a.pendingcb++,_=function writeOrBuffer(s,o,i,a,u,_){if(!i){var w=function decodeChunk(s,o,i){s.objectMode||!1===s.decodeStrings||"string"!=typeof o||(o=x.from(o,i));return o}(o,a,u);a!==w&&(i=!0,u="buffer",a=w)}var C=o.objectMode?1:a.length;o.length+=C;var j=o.length-1))throw new ae(s);return this._writableState.defaultEncoding=s,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(s,o,i){i(new U("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(s,o,i){var a=this._writableState;return"function"==typeof s?(i=s,s=null,o=null):"function"==typeof o&&(i=o,o=null),null!=s&&this.write(s,o),a.corked&&(a.corked=1,this.uncork()),a.ending||function endWritable(s,o,i){o.ending=!0,finishMaybe(s,o),i&&(o.finished?u.nextTick(i):s.once("finish",i));o.ended=!0,s.writable=!1}(this,a,i),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(s){this._writableState&&(this._writableState.destroyed=s)}}),Writable.prototype.destroy=L.destroy,Writable.prototype._undestroy=L.undestroy,Writable.prototype._destroy=function(s,o){o(s)}},16946:(s,o,i)=>{"use strict";var a=i(1907),u=i(98828),_=i(45807),w=Object,x=a("".split);s.exports=u((function(){return!w("z").propertyIsEnumerable(0)}))?function(s){return"String"===_(s)?x(s,""):w(s)}:w},16962:(s,o)=>{o.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},o.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},o.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},o.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},o.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},o.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},o.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},o.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},o.realToAlias=function(){var s=Object.prototype.hasOwnProperty,i=o.aliasToReal,a={};for(var u in i){var _=i[u];s.call(a,_)?a[_].push(u):a[_]=[u]}return a}(),o.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},o.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},o.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},17255:(s,o,i)=>{var a=i(47422);s.exports=function basePropertyDeep(s){return function(o){return a(o,s)}}},17285:s=>{function source(s){return s?"string"==typeof s?s:s.source:null}function lookahead(s){return concat("(?=",s,")")}function concat(...s){return s.map((s=>source(s))).join("")}function either(...s){return"("+s.map((s=>source(s))).join("|")+")"}s.exports=function xml(s){const o=concat(/[A-Z_]/,function optional(s){return concat("(",s,")?")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},u=s.inherit(a,{begin:/\(/,end:/\)/}),_=s.inherit(s.APOS_STRING_MODE,{className:"meta-string"}),w=s.inherit(s.QUOTE_STRING_MODE,{className:"meta-string"}),x={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,w,_,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,u,w,_]}]}]},s.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[x],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[x],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:o,relevance:0,starts:x}]},{className:"tag",begin:concat(/<\//,lookahead(concat(o,/>/))),contains:[{className:"name",begin:o,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},17400:(s,o,i)=>{var a=i(99374),u=1/0;s.exports=function toFinite(s){return s?(s=a(s))===u||s===-1/0?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0}},17533:s=>{s.exports=function yaml(s){var o="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[s.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},u=s.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),_={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},w={end:",",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},x={begin:/\{/,end:/\}/,contains:[w],illegal:"\\n",relevance:0},C={begin:"\\[",end:"\\]",contains:[w],illegal:"\\n",relevance:0},j=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+s.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+s.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},s.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},_,{className:"number",begin:s.C_NUMBER_RE+"\\b",relevance:0},x,C,a],L=[...j];return L.pop(),L.push(u),w.contains=L,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:j}}},17670:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheDelete(s){var o=a(this,s).delete(s);return this.size-=o?1:0,o}},17965:(s,o,i)=>{"use strict";var a=i(16426),u={"text/plain":"Text","text/html":"Url",default:"Text"};s.exports=function copy(s,o){var i,_,w,x,C,j,L=!1;o||(o={}),i=o.debug||!1;try{if(w=a(),x=document.createRange(),C=document.getSelection(),(j=document.createElement("span")).textContent=s,j.ariaHidden="true",j.style.all="unset",j.style.position="fixed",j.style.top=0,j.style.clip="rect(0, 0, 0, 0)",j.style.whiteSpace="pre",j.style.webkitUserSelect="text",j.style.MozUserSelect="text",j.style.msUserSelect="text",j.style.userSelect="text",j.addEventListener("copy",(function(a){if(a.stopPropagation(),o.format)if(a.preventDefault(),void 0===a.clipboardData){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var _=u[o.format]||u.default;window.clipboardData.setData(_,s)}else a.clipboardData.clearData(),a.clipboardData.setData(o.format,s);o.onCopy&&(a.preventDefault(),o.onCopy(a.clipboardData))})),document.body.appendChild(j),x.selectNodeContents(j),C.addRange(x),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");L=!0}catch(a){i&&console.error("unable to copy using execCommand: ",a),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(o.format||"text",s),o.onCopy&&o.onCopy(window.clipboardData),L=!0}catch(a){i&&console.error("unable to copy using clipboardData: ",a),i&&console.error("falling back to prompt"),_=function format(s){var o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return s.replace(/#{\s*key\s*}/g,o)}("message"in o?o.message:"Copy to clipboard: #{key}, Enter"),window.prompt(_,s)}}finally{C&&("function"==typeof C.removeRange?C.removeRange(x):C.removeAllRanges()),j&&document.body.removeChild(j),w()}return L}},18073:(s,o,i)=>{var a=i(85087),u=i(54641),_=i(70981);s.exports=function createRecurry(s,o,i,w,x,C,j,L,B,$){var V=8&o;o|=V?32:64,4&(o&=~(V?64:32))||(o&=-4);var U=[s,o,x,V?C:void 0,V?j:void 0,V?void 0:C,V?void 0:j,L,B,$],z=i.apply(void 0,U);return a(s)&&u(z,U),z.placeholder=w,_(z,s,o)}},19123:(s,o,i)=>{var a=i(65606),u=i(31499),_=i(88310).Stream;function resolve(s,o,i){var a,_=function create_indent(s,o){return new Array(o||0).join(s||"")}(o,i=i||0),w=s;if("object"==typeof s&&((w=s[a=Object.keys(s)[0]])&&w._elem))return w._elem.name=a,w._elem.icount=i,w._elem.indent=o,w._elem.indents=_,w._elem.interrupt=w,w._elem;var x,C=[],j=[];function get_attributes(s){Object.keys(s).forEach((function(o){C.push(function attribute(s,o){return s+'="'+u(o)+'"'}(o,s[o]))}))}switch(typeof w){case"object":if(null===w)break;w._attr&&get_attributes(w._attr),w._cdata&&j.push(("/g,"]]]]>")+"]]>"),w.forEach&&(x=!1,j.push(""),w.forEach((function(s){"object"==typeof s?"_attr"==Object.keys(s)[0]?get_attributes(s._attr):j.push(resolve(s,o,i+1)):(j.pop(),x=!0,j.push(u(s)))})),x||j.push(""));break;default:j.push(u(w))}return{name:a,interrupt:!1,attributes:C,content:j,icount:i,indents:_,indent:o}}function format(s,o,i){if("object"!=typeof o)return s(!1,o);var a=o.interrupt?1:o.content.length;function proceed(){for(;o.content.length;){var u=o.content.shift();if(void 0!==u){if(interrupt(u))return;format(s,u)}}s(!1,(a>1?o.indents:"")+(o.name?"":"")+(o.indent&&!i?"\n":"")),i&&i()}function interrupt(o){return!!o.interrupt&&(o.interrupt.append=s,o.interrupt.end=proceed,o.interrupt=!1,s(!0),!0)}if(s(!1,o.indents+(o.name?"<"+o.name:"")+(o.attributes.length?" "+o.attributes.join(" "):"")+(a?o.name?">":"":o.name?"/>":"")+(o.indent&&a>1?"\n":"")),!a)return s(!1,o.indent?"\n":"");interrupt(o)||proceed()}s.exports=function xml(s,o){"object"!=typeof o&&(o={indent:o});var i=o.stream?new _:null,u="",w=!1,x=o.indent?!0===o.indent?" ":o.indent:"",C=!0;function delay(s){C?a.nextTick(s):s()}function append(s,o){if(void 0!==o&&(u+=o),s&&!w&&(i=i||new _,w=!0),s&&w){var a=u;delay((function(){i.emit("data",a)})),u=""}}function add(s,o){format(append,resolve(s,x,x?1:0),o)}function end(){if(i){var s=u;delay((function(){i.emit("data",s),i.emit("end"),i.readable=!1,i.emit("close")}))}}return delay((function(){C=!1})),o.declaration&&function addXmlDeclaration(s){var o={version:"1.0",encoding:s.encoding||"UTF-8"};s.standalone&&(o.standalone=s.standalone),add({"?xml":{_attr:o}}),u=u.replace("/>","?>")}(o.declaration),s&&s.forEach?s.forEach((function(o,i){var a;i+1===s.length&&(a=end),add(o,a)})):add(s,end),i?(i.readable=!0,i):u},s.exports.element=s.exports.Element=function element(){var s={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(s){if(!this.append)throw new Error("not assigned to a parent!");var o=this,i=this._elem.indent;format(this.append,resolve(s,i,this._elem.icount+(i?1:0)),(function(){o.append(!0)}))},close:function(s){void 0!==s&&this.push(s),this.end&&this.end()}};return s}},19219:s=>{s.exports=function cacheHas(s,o){return s.has(o)}},19287:s=>{"use strict";s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},19358:(s,o,i)=>{"use strict";var a=i(85582),u=i(49724),_=i(61626),w=i(88280),x=i(79192),C=i(19595),j=i(54829),L=i(34084),B=i(32096),$=i(39259),V=i(85884),U=i(39447),z=i(7376);s.exports=function(s,o,i,Y){var Z="stackTraceLimit",ee=Y?2:1,ie=s.split("."),ae=ie[ie.length-1],ce=a.apply(null,ie);if(ce){var le=ce.prototype;if(!z&&u(le,"cause")&&delete le.cause,!i)return ce;var pe=a("Error"),de=o((function(s,o){var i=B(Y?o:s,void 0),a=Y?new ce(s):new ce;return void 0!==i&&_(a,"message",i),V(a,de,a.stack,2),this&&w(le,this)&&L(a,this,de),arguments.length>ee&&$(a,arguments[ee]),a}));if(de.prototype=le,"Error"!==ae?x?x(de,pe):C(de,pe,{name:!0}):U&&Z in ce&&(j(de,ce,Z),j(de,ce,"prepareStackTrace")),C(de,ce),!z)try{le.name!==ae&&_(le,"name",ae),le.constructor=de}catch(s){}return de}}},19570:(s,o,i)=>{var a=i(37334),u=i(93243),_=i(83488),w=u?function(s,o){return u(s,"toString",{configurable:!0,enumerable:!1,value:a(o),writable:!0})}:_;s.exports=w},19595:(s,o,i)=>{"use strict";var a=i(49724),u=i(11042),_=i(13846),w=i(74284);s.exports=function(s,o,i){for(var x=u(o),C=w.f,j=_.f,L=0;L{"use strict";var a=i(23034);s.exports=a},19846:(s,o,i)=>{"use strict";var a=i(20798),u=i(98828),_=i(45951).String;s.exports=!!Object.getOwnPropertySymbols&&!u((function(){var s=Symbol("symbol detection");return!_(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&a&&a<41}))},19931:(s,o,i)=>{var a=i(31769),u=i(68090),_=i(68969),w=i(77797);s.exports=function baseUnset(s,o){return o=a(o,s),null==(s=_(s,o))||delete s[w(u(o))]}},20181:(s,o,i)=>{var a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,w=/^0o[0-7]+$/i,x=parseInt,C="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,j="object"==typeof self&&self&&self.Object===Object&&self,L=C||j||Function("return this")(),B=Object.prototype.toString,$=Math.max,V=Math.min,now=function(){return L.Date.now()};function isObject(s){var o=typeof s;return!!s&&("object"==o||"function"==o)}function toNumber(s){if("number"==typeof s)return s;if(function isSymbol(s){return"symbol"==typeof s||function isObjectLike(s){return!!s&&"object"==typeof s}(s)&&"[object Symbol]"==B.call(s)}(s))return NaN;if(isObject(s)){var o="function"==typeof s.valueOf?s.valueOf():s;s=isObject(o)?o+"":o}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(a,"");var i=_.test(s);return i||w.test(s)?x(s.slice(2),i?2:8):u.test(s)?NaN:+s}s.exports=function debounce(s,o,i){var a,u,_,w,x,C,j=0,L=!1,B=!1,U=!0;if("function"!=typeof s)throw new TypeError("Expected a function");function invokeFunc(o){var i=a,_=u;return a=u=void 0,j=o,w=s.apply(_,i)}function shouldInvoke(s){var i=s-C;return void 0===C||i>=o||i<0||B&&s-j>=_}function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEdge(s);x=setTimeout(timerExpired,function remainingWait(s){var i=o-(s-C);return B?V(i,_-(s-j)):i}(s))}function trailingEdge(s){return x=void 0,U&&a?invokeFunc(s):(a=u=void 0,w)}function debounced(){var s=now(),i=shouldInvoke(s);if(a=arguments,u=this,C=s,i){if(void 0===x)return function leadingEdge(s){return j=s,x=setTimeout(timerExpired,o),L?invokeFunc(s):w}(C);if(B)return x=setTimeout(timerExpired,o),invokeFunc(C)}return void 0===x&&(x=setTimeout(timerExpired,o)),w}return o=toNumber(o)||0,isObject(i)&&(L=!!i.leading,_=(B="maxWait"in i)?$(toNumber(i.maxWait)||0,o):_,U="trailing"in i?!!i.trailing:U),debounced.cancel=function cancel(){void 0!==x&&clearTimeout(x),j=0,a=C=u=x=void 0},debounced.flush=function flush(){return void 0===x?w:trailingEdge(now())},debounced}},20317:s=>{s.exports=function mapToArray(s){var o=-1,i=Array(s.size);return s.forEach((function(s,a){i[++o]=[a,s]})),i}},20334:(s,o,i)=>{"use strict";var a=i(48287).Buffer;class NonError extends Error{constructor(s){super(NonError._prepareSuperMessage(s)),Object.defineProperty(this,"name",{value:"NonError",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,NonError)}static _prepareSuperMessage(s){try{return JSON.stringify(s)}catch{return String(s)}}}const u=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],_=Symbol(".toJSON called"),destroyCircular=({from:s,seen:o,to_:i,forceEnumerable:w,maxDepth:x,depth:C})=>{const j=i||(Array.isArray(s)?[]:{});if(o.push(s),C>=x)return j;if("function"==typeof s.toJSON&&!0!==s[_])return(s=>{s[_]=!0;const o=s.toJSON();return delete s[_],o})(s);for(const[i,u]of Object.entries(s))"function"==typeof a&&a.isBuffer(u)?j[i]="[object Buffer]":"function"!=typeof u&&(u&&"object"==typeof u?o.includes(s[i])?j[i]="[Circular]":(C++,j[i]=destroyCircular({from:s[i],seen:o.slice(),forceEnumerable:w,maxDepth:x,depth:C})):j[i]=u);for(const{property:o,enumerable:i}of u)"string"==typeof s[o]&&Object.defineProperty(j,o,{value:s[o],enumerable:!!w||i,configurable:!0,writable:!0});return j};s.exports={serializeError:(s,o={})=>{const{maxDepth:i=Number.POSITIVE_INFINITY}=o;return"object"==typeof s&&null!==s?destroyCircular({from:s,seen:[],forceEnumerable:!0,maxDepth:i,depth:0}):"function"==typeof s?`[Function: ${s.name||"anonymous"}]`:s},deserializeError:(s,o={})=>{const{maxDepth:i=Number.POSITIVE_INFINITY}=o;if(s instanceof Error)return s;if("object"==typeof s&&null!==s&&!Array.isArray(s)){const o=new Error;return destroyCircular({from:s,seen:[],to_:o,maxDepth:i,depth:0}),o}return new NonError(s)}}},20426:s=>{var o=Object.prototype.hasOwnProperty;s.exports=function baseHas(s,i){return null!=s&&o.call(s,i)}},20575:(s,o,i)=>{"use strict";var a=i(3121);s.exports=function(s){return a(s.length)}},20798:(s,o,i)=>{"use strict";var a,u,_=i(45951),w=i(96794),x=_.process,C=_.Deno,j=x&&x.versions||C&&C.version,L=j&&j.v8;L&&(u=(a=L.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&w&&(!(a=w.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=w.match(/Chrome\/(\d+)/))&&(u=+a[1]),s.exports=u},20850:(s,o,i)=>{"use strict";s.exports=i(46076)},20999:(s,o,i)=>{var a=i(69302),u=i(36800);s.exports=function createAssigner(s){return a((function(o,i){var a=-1,_=i.length,w=_>1?i[_-1]:void 0,x=_>2?i[2]:void 0;for(w=s.length>3&&"function"==typeof w?(_--,w):void 0,x&&u(i[0],i[1],x)&&(w=_<3?void 0:w,_=1),o=Object(o);++a<_;){var C=i[a];C&&s(o,C,a,w)}return o}))}},21549:(s,o,i)=>{var a=i(22032),u=i(63862),_=i(66721),w=i(12749),x=i(35749);function Hash(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o{var a=i(16547),u=i(43360);s.exports=function copyObject(s,o,i,_){var w=!i;i||(i={});for(var x=-1,C=o.length;++x{var a=i(51873),u=i(37828),_=i(75288),w=i(25911),x=i(20317),C=i(84247),j=a?a.prototype:void 0,L=j?j.valueOf:void 0;s.exports=function equalByTag(s,o,i,a,j,B,$){switch(i){case"[object DataView]":if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case"[object ArrayBuffer]":return!(s.byteLength!=o.byteLength||!B(new u(s),new u(o)));case"[object Boolean]":case"[object Date]":case"[object Number]":return _(+s,+o);case"[object Error]":return s.name==o.name&&s.message==o.message;case"[object RegExp]":case"[object String]":return s==o+"";case"[object Map]":var V=x;case"[object Set]":var U=1&a;if(V||(V=C),s.size!=o.size&&!U)return!1;var z=$.get(s);if(z)return z==o;a|=2,$.set(s,o);var Y=w(V(s),V(o),a,j,B,$);return $.delete(s),Y;case"[object Symbol]":if(L)return L.call(s)==L.call(o)}return!1}},22032:(s,o,i)=>{var a=i(81042);s.exports=function hashClear(){this.__data__=a?a(null):{},this.size=0}},22225:s=>{var o="\\ud800-\\udfff",i="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",u="A-Z\\xc0-\\xd6\\xd8-\\xde",_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",w="["+_+"]",x="\\d+",C="["+i+"]",j="["+a+"]",L="[^"+o+_+x+i+a+u+"]",B="(?:\\ud83c[\\udde6-\\uddff]){2}",$="[\\ud800-\\udbff][\\udc00-\\udfff]",V="["+u+"]",U="(?:"+j+"|"+L+")",z="(?:"+V+"|"+L+")",Y="(?:['’](?:d|ll|m|re|s|t|ve))?",Z="(?:['’](?:D|LL|M|RE|S|T|VE))?",ee="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ie="[\\ufe0e\\ufe0f]?",ae=ie+ee+("(?:\\u200d(?:"+["[^"+o+"]",B,$].join("|")+")"+ie+ee+")*"),ce="(?:"+[C,B,$].join("|")+")"+ae,le=RegExp([V+"?"+j+"+"+Y+"(?="+[w,V,"$"].join("|")+")",z+"+"+Z+"(?="+[w,V+U,"$"].join("|")+")",V+"?"+U+"+"+Y,V+"+"+Z,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",x,ce].join("|"),"g");s.exports=function unicodeWords(s){return s.match(le)||[]}},22551:(s,o,i)=>{"use strict";var a=i(96540),u=i(69982);function p(s){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+s,i=1;i