gitifact 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +45 -32
  2. package/dist/browser/assets/{Grid-D1SNqxih.js → Grid-DlI9bhVm.js} +1 -1
  3. package/dist/browser/assets/{Markdown-DKZFXPE0.js → Markdown-68DgpF6D.js} +1 -1
  4. package/dist/browser/assets/{MetadataListItem-BHqMTUIy.js → MetadataListItem-Bvdm7SCW.js} +1 -1
  5. package/dist/browser/assets/{Table-DykMjEgT.js → Table-GZptlOQa.js} +1 -1
  6. package/dist/browser/assets/{about-CwpTU41C.js → about-LBmmoJtj.js} +1 -1
  7. package/dist/browser/assets/{activity-DJ808sVo.js → activity-paVxugse.js} +1 -1
  8. package/dist/browser/assets/{changelog-DWK3Qw5N.js → changelog-DMndHW2p.js} +1 -1
  9. package/dist/browser/assets/{contributors._email-Bu46gkJ8.js → contributors._email-Ch0pZAte.js} +1 -1
  10. package/dist/browser/assets/{contributors.index-DGAkSUmH.js → contributors.index-BwSL0x8o.js} +1 -1
  11. package/dist/browser/assets/{document-CUHZSDYL.js → document-Ceyg9sKE.js} +1 -1
  12. package/dist/browser/assets/{features._featureId-CZ1QE69X.js → features._featureId-DtlIpe3Y.js} +1 -1
  13. package/dist/browser/assets/{features.index-C0Ecj5SM.js → features.index-CsxYbWGn.js} +1 -1
  14. package/dist/browser/assets/{getting-started-Bo0MbK7i.js → getting-started-LVh16CZ8.js} +1 -1
  15. package/dist/browser/assets/{git-C77vcInF.js → git-H0K9dpC3.js} +1 -1
  16. package/dist/browser/assets/{index-CgDfX0u7.js → index-DClmARNh.js} +16 -16
  17. package/dist/browser/assets/page-header-sbYRXZP4.js +531 -0
  18. package/dist/browser/assets/product-BIGIVBUa.js +10 -0
  19. package/dist/browser/assets/product-DNaVAIwO.css +1 -0
  20. package/dist/browser/assets/{product.index-C_eXOx4v.js → product.index-vzVtG_rC.js} +1 -1
  21. package/dist/browser/assets/{request-state-H0vXVi6T.js → request-state-J0QLm_8G.js} +1 -1
  22. package/dist/browser/assets/{requirements-jd-dp9SQ.js → requirements-POF-07kZ.js} +1 -1
  23. package/dist/browser/assets/{settings-CCOYFeaM.js → settings-eas7Zq56.js} +1 -1
  24. package/dist/browser/assets/{wiki-DZmdT1pI.js → wiki-fpAHbhnh.js} +1 -1
  25. package/dist/browser/index.html +10 -10
  26. package/dist/i18n/en/block.md +4 -4
  27. package/dist/i18n/en/changelog.md +11 -0
  28. package/dist/i18n/en/docs/workflow.md +8 -2
  29. package/dist/i18n/ko/block.md +4 -4
  30. package/dist/i18n/ko/changelog.md +11 -0
  31. package/dist/i18n/ko/docs/workflow.md +8 -2
  32. package/dist/main.js +284 -111
  33. package/package.json +1 -1
  34. package/dist/browser/assets/page-header-DcMV32eV.js +0 -505
  35. package/dist/browser/assets/product-BSEt07YP.css +0 -1
  36. package/dist/browser/assets/product-CN8SmBrX.js +0 -10
@@ -1,505 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Tooltip-QZg2pB5o.js","assets/rolldown-runtime-hePW80VL.js","assets/themeProps-CfjLB1h4.js","assets/useIsomorphicLayoutEffect-DByj3svz.js"])))=>i.map(i=>d[i]);
2
- import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{E as n,H as r,J as i,S as a,_ as o,d as s,g as c,h as l,l as u,m as d,n as f,q as p,u as m,v as h,w as g,x as _,y as v}from"./themeProps-CfjLB1h4.js";import{c as y,s as b,t as x}from"./useIsomorphicLayoutEffect-DByj3svz.js";import{a as S}from"./useMediaQuery-CqJr5z44.js";import{A as C,B as w,C as T,D as E,E as ee,F as D,I as te,L as O,M as k,N as ne,O as re,P as ie,R as ae,T as oe,V as se,W as ce,_ as A,b as j,j as le,k as ue,t as M,w as N,z as de}from"./Icon-EsJf4C7A.js";import{t as fe}from"./preload-helper-BZ1Pz5am.js";import{t as pe}from"./useScrollLock-CmZKJxOo.js";import{t as me}from"./container.stylex-6OsSOpKw.js";var P=e(i(),1),he={"gettingStarted.title":`시작하기`,"nav.gettingStarted":`시작하기`,"about.title":`Gitifact 소개`,"activity.changedRecords":`이 이유로 바뀐 기록`,"activity.list":`활동 목록`,"activity.moreRecords":`기록 {count}건 더 →`,"activity.noReason":`변경 이유가 기록되지 않았습니다.`,"activity.recent":`최근 명세 활동`,"activity.recordCount":`기록 {count}건`,"activity.today":`오늘`,"activity.yesterday":`어제`,"activity.resizeDetail":`변경 상세 너비 조절`,"api.invalidContract":`서버 응답이 지원하는 계약과 일치하지 않습니다.`,"api.invalidSession":`서버 세션 형식이 호환되지 않습니다.`,"api.invalidSpecs":`명세 응답 형식이 호환되지 않습니다.`,"api.networkError":`로컬 서버에 연결하지 못했습니다. 서버 실행 상태를 확인하세요.`,"api.otherCheckout":`다른 checkout의 응답입니다. 다시 연결하세요.`,"api.serverChanged":`서버가 변경됐습니다. 다시 연결하세요.`,"api.statusMismatch":`서버 상태와 응답 결과가 일치하지 않습니다.`,"api.unreadableResponse":`서버 응답 형식을 확인할 수 없습니다. CLI와 브라우저 버전을 확인하세요.`,"app.rootMissing":`앱을 표시할 root 요소가 없습니다.`,"change.created":`추가`,"change.deleted":`제거`,"change.modified":`변경`,"change.moved":`이동`,"common.inProgress":`작업 중`,"common.path":`경로`,"common.recentChange":`최근 변경`,"common.reconnect":`다시 연결`,"common.refresh":`새로고침`,"common.uncommitted":`미커밋`,"compare.after":`변경 후`,"compare.before":`변경 전`,"compare.hint":`핸들을 오른쪽으로 끌면 변경 전 내용이 드러납니다.`,"compare.reveal":`변경 전 드러내기`,"contributors.activity":`이 참여자의 활동 →`,"contributors.back":`← 참여자`,"contributors.backToList":`참여자 목록으로`,"contributors.cardCommits":`커밋 {count}`,"contributors.cardFeatures":`기능 {count}`,"contributors.count":`참여자 {count}명 · Git author 기준이며 커밋 수는 코드 커밋을 포함합니다.`,"contributors.detail":`참여자 상세`,"contributors.emptyDescription":`검색어를 확인하거나 첫 커밋을 남겨보세요.`,"contributors.emptyTitle":`표시할 참여자가 없습니다`,"contributors.featureShare":`명세 커밋 {commits}개 · 요구사항 {requirements}개`,"contributors.features":`참여한 기능`,"contributors.gitCommits":`Git 커밋 {count}개`,"contributors.latest":`최근 활동 {time}`,"contributors.noRecentActivity":`최근 이력에 이 참여자의 명세 활동이 없습니다. 활동 페이지에서 이전 이력을 더 불러오면 보일 수 있습니다.`,"contributors.noSpecCommits":`명세 폴더를 바꾼 커밋이 없습니다. 코드 커밋 참여와 명세 활동은 다를 수 있습니다.`,"contributors.notFoundDescription":`{email}로 기록된 Git author가 최근 커밋에 없습니다.`,"contributors.notFoundTitle":`참여자를 찾을 수 없습니다`,"design.missingRequirement":`{id} (현재 명세에 없음)`,"design.relatedRequirements":`관련 요구사항`,"documents.activity":`이 문서의 활동 →`,"documents.backToList":`위키 목록으로`,"documents.browse":`폴더 내용`,"documents.document":`위키 페이지`,"documents.emptyDescription":`위키에는 운영 방침(.gitifact/wiki/README.md)이 기본으로 들어갑니다. 지웠다면 에이전트에게 위키를 정리해 달라고 하면 다시 만들 수 있습니다.`,"documents.emptyFolder":`비어 있는 폴더입니다.`,"documents.emptyTitle":`위키 페이지가 아직 없습니다`,"documents.notFoundDescription":`{id}는 현재 위키에 없습니다. 옮겨졌거나 제거된 페이지일 수 있습니다.`,"documents.notFoundTitle":`문서를 찾을 수 없습니다`,"event.changes":`변경 내용`,"event.bodyLoading":`변경 내용을 불러오는 중`,"event.bodyFailed":`변경 내용을 불러오지 못했습니다.`,"event.committer":`커미터 {name}`,"event.currentDocument":`현재 문서 보기 →`,"event.currentFeature":`현재 기능 명세 보기 →`,"event.deletedContent":`삭제 전 내용`,"event.noContent":`내용이 없습니다.`,"event.noReasons":`기록된 이유가 없습니다.`,"event.reasons":`변경 이유`,"features.back":`← 기능별 요구사항`,"features.backToList":`기능별 요구사항 목록으로`,"features.changeFilters":`검색어나 필터를 바꿔 보세요.`,"features.column.contributors":`참여자`,"features.column.feature":`기능`,"features.column.requirements":`요구사항`,"features.count":`기능 명세 {count}개`,"features.detail":`기능 명세`,"features.requirementShare":`{title} 요구사항 비율`,"features.designMark":`설계 →`,"features.moreRequirements":`요구사항 {count}개 더 →`,"features.emptyDescription":`에이전트와 기능 명세를 정리하고 커밋하면 이곳에서 볼 수 있습니다.`,"features.emptyTitle":`일치하는 기능이 없습니다.`,"features.history":`기능 변경 이력 →`,"features.index":`명세 목차`,"features.indexTitle":`이 명세의 요구사항`,"features.noDesignMark":`설계 없음`,"features.noDesignDescription":`에이전트와 구현 방식을 정리하면 이곳에서 볼 수 있습니다.`,"features.noDesignTitle":`아직 작성된 설계가 없습니다.`,"features.noRequirements":`현재 요구사항이 없는 기능입니다.`,"features.ofTotal":` (전체 {total}개 중)`,"features.countNote":`참여자와 최근 변경은 커밋된 기록 기준입니다.`,"features.notFoundDescription":`{id}는 현재 명세에 없습니다. 이름이 바뀌었거나 제거된 기능일 수 있습니다.`,"features.notFoundTitle":`기능을 찾을 수 없습니다`,"features.requirementCount":`요구사항 {count}개`,"features.requirementDesign":`이 요구사항의 설계 →`,"features.requirementHistory":`이 요구사항의 이력 →`,"features.requirementNumber":`요구사항 {number}`,"features.tab.design":`설계`,"features.tab.requirements":`요구사항`,"filters.allAuthors":`모든 작성자`,"filters.allChanges":`모든 변경`,"filters.allDocuments":`전체 명세`,"filters.allContributors":`모든 참여자`,"filters.allDesigns":`설계 전체`,"filters.allFeatures":`모든 기능`,"filters.author":`작성자 필터`,"filters.contributor":`참여자 필터`,"filters.change":`변경 종류`,"filters.document":`명세 종류`,"filters.feature":`기능 필터`,"filters.design":`설계 여부`,"filters.designMissing":`설계 없음`,"filters.designWritten":`설계 있음`,"filters.search":`검색`,"filters.searchContributors":`이름 또는 이메일 검색`,"filters.searchEvents":`이름 또는 ID 검색`,"filters.searchFeatures":`기능·요구사항 검색`,"git.branch":`브랜치`,"git.changeSummary":`변경 경로 {count}개 · 코드의 첫 글자는 staged, 두 번째는 unstaged이며 .은 변경 없음입니다.`,"git.checksNote":`gitifact 요구사항 검사는 아직 실행하지 않습니다.`,"git.cleanDescription":`작업 트리가 마지막 커밋과 같습니다.`,"git.cleanTitle":`변경된 파일이 없습니다`,"git.column.code":`코드`,"git.column.extra":`추가 정보`,"git.column.path":`경로`,"git.column.state":`상태`,"git.conflict":`충돌`,"git.connecting":`로컬 서버에 연결하고 있습니다.`,"git.noCommits":`아직 커밋이 없습니다`,"git.observedNote":`관측한 Git 상태이며 파일 내용을 고정한 스냅샷은 아닙니다.`,"git.previousResult":`이전 조회 결과입니다. 상단의 조회 시각을 참고하세요.`,"git.reading":`저장소 상태를 읽고 있습니다.`,"git.refresh":`상태 새로고침`,"git.refreshing":`조회 중…`,"git.repository":`저장소`,"git.repositoryState":`저장소 상태`,"git.submoduleCommit":`submodule 커밋 변경`,"git.submoduleTracked":`내부 tracked 변경`,"git.submoduleUntracked":`내부 untracked 변경`,"git.summary":`변경 집계`,"git.viewRequirements":`요구사항 보기 →`,"git.workingNotice":`제품 개요·기능별 요구사항·위키 화면은 작업 중인 내용이고, 활동은 커밋된 내용입니다. 커밋은 에이전트에게 요청하세요.`,"git.workingTitle":`미커밋 명세 변경이 있습니다`,"header.location":`현재 위치`,"header.observedAt":`{time} 조회`,"history.changeFilters":`필터나 검색어를 바꿔 보세요.`,"history.shown":`전체 {total}건 중 {shown}건을 보고 있습니다.`,"history.contributorsLimited":`참여자는 최근 10,000개 Git 커밋 기준입니다.`,"history.emptyDescription":`에이전트와 요구사항을 정리하고 커밋하면 이곳에서 변경 활동을 볼 수 있습니다.`,"history.emptyTitle":`표시할 활동이 없습니다.`,"history.legacyBoundary":`새 명세 도입 이전의 구형 기록은 표시하지 않습니다.`,"history.loadMore":`이전 이력 더 보기`,"history.loadingMore":`이전 이력 불러오는 중…`,"history.reachedEnd":`마지막 이력까지 확인했습니다.`,"history.retryMore":`이전 이력 다시 불러오기`,"history.selectedMissing":`이 변경을 찾을 수 없습니다. 이력이 바뀌었을 수 있습니다.`,"history.staleData":`이전 조회 자료입니다. 현재 상태로 확정하지 마세요.`,"kind.design":`설계`,"kind.requirement":`요구사항`,"markdown.alertCaution":`주의`,"markdown.alertImportant":`중요`,"markdown.alertNote":`참고`,"markdown.alertTip":`팁`,"markdown.alertWarning":`경고`,"markdown.diagram":`다이어그램`,"markdown.diagramFailed":`다이어그램을 그릴 수 없어 원문을 그대로 보여 줍니다. {message}`,"nav.about":`소개`,"nav.contributors":`참여자`,"nav.features":`기능별 요구사항`,"nav.git":`Git 상태`,"nav.history":`활동`,"nav.product":`제품 개요`,"notFound.description":`주소를 확인하거나 제품 개요로 돌아가세요.`,"notFound.home":`처음으로`,"notFound.title":`페이지를 찾을 수 없습니다`,"overview.commitsByContributor":`참여자별 커밋`,"overview.contributorsLink":`참여자 →`,"overview.legend":`{label} 범례`,"overview.noData":`아직 자료가 없습니다.`,"overview.otherContributors":`그 외 {count}명`,"overview.recentActivity":`최신 활동`,"overview.recentChangeTypes":`변경 종류`,"overview.pulse":`최근 {days}일 변경`,"overview.activityLink":`활동 →`,"overview.totalEvents":`전체 활동 {count}건`,"overview.noActivity":`커밋된 명세 활동이 아직 없습니다.`,"overview.stat.contributors":`참여자`,"overview.stat.features":`기능 명세`,"overview.stat.requirements":`요구사항`,"overview.summary":`현재 명세 요약`,"overview.uncommittedToken":`미커밋 변경`,"project.local":`로컬 프로젝트`,"request.failed":`불러오지 못했습니다`,"request.loading":`불러오는 중`,"request.loadingProject":`프로젝트 불러오는 중`,"request.loadingRecords":`프로젝트 기록을 불러오고 있습니다.`,"shell.home":`GITIFACT 홈`,"shell.workingChanges":`미커밋 명세 변경 있음`,"shell.workingChangesTooltip":`미커밋 명세 변경 있음 · Git 상태에서 확인`,"nav.changelog":`패치노트`,"shell.version":`v{version}`,"shell.versionTooltip":`패치노트 보기`,"shell.updateAvailable":`{version} 사용 가능`,"update.title":`새 버전이 있습니다`,"update.versions":`현재 {current} · 최신 {latest}`,"update.promptLabel":`에이전트에게 맡기기`,"update.promptHelp":`아래 문장을 복사해 프로젝트에서 쓰는 에이전트에게 전달하세요.`,"update.prompt":`gitifact를 {latest} 버전으로 업데이트해 주세요. 먼저 gitifact update를 실행해 설치 방법을 확인하고, 이 환경의 설치 방식에 맞게 설치한 뒤 gitifact update --commit을 다시 실행해 프로젝트의 GITIFACT 지침 블록을 새 버전으로 갱신하고 커밋해 주세요.`,"update.promptTitle":`요청 문장`,"update.commandTitle":`터미널`,"update.commandLabel":`직접 설치하기`,"update.commandHelp":`npm 전역 설치용 명령입니다. 다른 방식으로 설치했다면 그 방식에 맞게 업데이트하세요. 설치한 뒤 브라우저를 다시 열어 주세요.`,"changelog.title":`패치노트`,"changelog.subtitle":`설치된 버전까지의 변경 내역입니다.`,"changelog.release":`{version} 변경 내역`,"changelog.current":`사용 중`,"changelog.added":`추가`,"changelog.changed":`변경`,"changelog.removed":`제거`,"changelog.fixed":`수정`,"changelog.empty":`기록된 변경 내역이 없습니다.`,"changelog.fallback":`이 언어의 패치노트가 없어 기본 언어로 보여 줍니다.`,"api.invalidChangelog":`패치노트 응답이 지원하는 형식과 일치하지 않습니다.`,"documents.folderCount":`문서 {count}개`,"nav.settings":`설정`,"search.empty":`검색할 문서가 없습니다.`,"search.emptyDescription":`요구사항이나 위키 페이지를 저장하면 여기에서 찾을 수 있습니다.`,"search.group.design":`설계`,"search.group.document":`위키 페이지`,"search.group.history":`변경 이력`,"search.group.feature":`기능 명세`,"search.group.requirement":`요구사항`,"search.group.recent":`최근 변경`,"search.hint.close":`닫기`,"search.hint.move":`이동`,"search.hint.open":`열기`,"search.label":`문서 검색`,"search.loading":`문서를 읽는 중…`,"search.noMatch":`일치하는 문서가 없습니다.`,"search.noMatchDescription":`다른 낱말로 찾아보세요. 제목과 본문을 함께 봅니다.`,"search.open":`문서 검색 열기`,"search.placeholder":`요구사항·설계·위키 페이지 검색`,"search.trigger":`검색`,"settings.title":`설정`,"settings.subtitle":`이 브라우저에만 저장되며 프로젝트에는 아무것도 기록하지 않습니다.`,"settings.mode":`화면 모드`,"settings.modeHint":`시스템을 고르면 운영체제의 밝은·어두운 설정을 따릅니다.`,"settings.mode.system":`시스템`,"settings.mode.light":`라이트`,"settings.mode.dark":`다크`,"settings.palette":`색 조합`,"settings.paletteHint":`모든 조합은 라이트와 다크를 함께 갖습니다. 글자는 무채색에 가깝게 두고 바탕에만 은은한 색을 입혔습니다.`,"settings.palette.stone":`스톤`,"settings.palette.stoneHint":`따뜻한 회색과 잉크색 강조. 기본값`,"settings.palette.sage":`세이지 & 크림`,"settings.palette.sageHint":`은은한 녹색과 따뜻한 크림색. 부드럽고 편안한 조합`,"settings.palette.slate":`슬레이트 & 블루`,"settings.palette.slateHint":`푸른 회색과 선명한 파랑. 작업 도구다운 또렷한 조합`,"settings.palette.clay":`샌드 & 클레이`,"settings.palette.clayHint":`모래빛 바탕과 적갈색 강조. 따뜻하면서 개성이 있는 조합`,"settings.palette.olive":`올리브 & 웜그레이`,"settings.palette.oliveHint":`따뜻한 무채색 바탕에 짙은 올리브 그린. 세이지보다 진하고 또렷한 조합`,"nav.wiki":`프로젝트 위키`,"kind.wiki":`위키 페이지`,"overview.stat.wiki":`위키 페이지`,"design.sources":`참고 문서`,"link.missing":`페이지가 없습니다: {path}`,"link.outside":`브라우저 밖의 파일입니다`,"link.copied":`경로를 복사했습니다`,"link.copyFailed":`경로를 복사하지 못했습니다: {path}`,"documents.tree":`위키 트리`,"documents.path":`현재 위치`,"settings.language":`언어`,"settings.language.system":`브라우저 설정`,"shell.githubTooltip":`Gitifact GitHub 저장소 (새 탭)`},ge={"gettingStarted.title":`Get started`,"nav.gettingStarted":`Get started`,"about.title":`About Gitifact`,"activity.changedRecords":`Records changed for this reason`,"activity.list":`Activity list`,"activity.moreRecords":`{count} more records →`,"activity.noReason":`No change reason recorded.`,"activity.recent":`Recent specification activity`,"activity.recordCount":`Records: {count}`,"activity.today":`Today`,"activity.yesterday":`Yesterday`,"activity.resizeDetail":`Resize change details`,"api.invalidContract":`The server response does not match a supported contract.`,"api.invalidSession":`The server session format is incompatible.`,"api.invalidSpecs":`The specification response format is incompatible.`,"api.networkError":`Could not connect to the local server. Check that it is running.`,"api.otherCheckout":`This response belongs to a different checkout. Reconnect to continue.`,"api.serverChanged":`The server has changed. Reconnect to continue.`,"api.statusMismatch":`The HTTP status and response result do not match.`,"api.unreadableResponse":`Could not read the response format. Check the CLI and browser versions.`,"app.rootMissing":`The root element for the app is missing.`,"change.created":`Added`,"change.deleted":`Removed`,"change.modified":`Changed`,"change.moved":`Moved`,"common.inProgress":`In progress`,"common.path":`Path`,"common.recentChange":`Last changed`,"common.reconnect":`Reconnect`,"common.refresh":`Refresh`,"common.uncommitted":`Uncommitted`,"compare.after":`After`,"compare.before":`Before`,"compare.hint":`Drag the handle to the right to reveal the previous content.`,"compare.reveal":`Reveal previous content`,"contributors.activity":`Contributor activity →`,"contributors.back":`← Contributors`,"contributors.backToList":`Back to contributors`,"contributors.cardCommits":`Commits: {count}`,"contributors.cardFeatures":`Features: {count}`,"contributors.count":`Contributors: {count} · Based on Git authors; counts include code commits.`,"contributors.detail":`Contributor details`,"contributors.emptyDescription":`Check your search or create the first commit.`,"contributors.emptyTitle":`No contributors to show`,"contributors.featureShare":`Specification commits: {commits} · Requirements: {requirements}`,"contributors.features":`Contributed features`,"contributors.gitCommits":`Git commits: {count}`,"contributors.latest":`Last active {time}`,"contributors.noRecentActivity":`No specification activity by this contributor in the recent history. Older activity may be available on the activity page.`,"contributors.noSpecCommits":`No commits changed a specification folder. Code contributions and specification activity may differ.`,"contributors.notFoundDescription":`No Git author with the email {email} was found in recent commits.`,"contributors.notFoundTitle":`Contributor not found`,"design.missingRequirement":`{id} (not in current specifications)`,"design.relatedRequirements":`Related requirements`,"documents.activity":`Document activity →`,"documents.backToList":`Back to wiki`,"documents.browse":`Folder contents`,"documents.document":`Wiki page`,"documents.emptyDescription":`A new wiki includes its policy in .gitifact/wiki/README.md. If it was deleted, ask your agent to set up the wiki again.`,"documents.emptyFolder":`This folder is empty.`,"documents.emptyTitle":`No wiki pages yet`,"documents.notFoundDescription":`{id} is not in the current wiki. It may have been moved or removed.`,"documents.notFoundTitle":`Document not found`,"event.changes":`Changes`,"event.bodyLoading":`Loading change content`,"event.bodyFailed":`Could not load the change content.`,"event.committer":`Committer: {name}`,"event.currentDocument":`View current document →`,"event.currentFeature":`View current feature specification →`,"event.deletedContent":`Content before deletion`,"event.noContent":`No content.`,"event.noReasons":`No reasons recorded.`,"event.reasons":`Change reasons`,"features.back":`← Feature requirements`,"features.backToList":`Back to feature requirements`,"features.changeFilters":`Try different search terms or filters.`,"features.column.contributors":`Contributors`,"features.column.feature":`Feature`,"features.column.requirements":`Requirements`,"features.count":`Feature specifications: {count}`,"features.detail":`Feature specification`,"features.requirementShare":`Requirement share for {title}`,"features.designMark":`Design →`,"features.moreRequirements":`{count} more requirements →`,"features.emptyDescription":`Ask your agent to write and commit feature specifications to see them here.`,"features.emptyTitle":`No matching features.`,"features.history":`Feature history →`,"features.index":`Specification contents`,"features.indexTitle":`Requirements in this specification`,"features.noDesignMark":`No design`,"features.noDesignDescription":`Work out the implementation with your agent to see the design here.`,"features.noDesignTitle":`No design yet.`,"features.noRequirements":`This feature has no current requirements.`,"features.ofTotal":` (of {total})`,"features.countNote":`Contributors and last changes are based on committed records.`,"features.notFoundDescription":`{id} is not in the current specifications. It may have been renamed or removed.`,"features.notFoundTitle":`Feature not found`,"features.requirementCount":`Requirements: {count}`,"features.requirementDesign":`Design for this requirement →`,"features.requirementHistory":`Requirement history →`,"features.requirementNumber":`Requirement {number}`,"features.tab.design":`Design`,"features.tab.requirements":`Requirements`,"filters.allAuthors":`All authors`,"filters.allChanges":`All changes`,"filters.allDocuments":`All specifications`,"filters.allContributors":`All contributors`,"filters.allDesigns":`All designs`,"filters.allFeatures":`All features`,"filters.author":`Filter by author`,"filters.contributor":`Filter by contributor`,"filters.change":`Change type`,"filters.document":`Specification type`,"filters.feature":`Filter by feature`,"filters.design":`Design status`,"filters.designMissing":`No design`,"filters.designWritten":`Has design`,"filters.search":`Search`,"filters.searchContributors":`Search names or emails`,"filters.searchEvents":`Search names or IDs`,"filters.searchFeatures":`Search features and requirements`,"git.branch":`Branch`,"git.changeSummary":`Changed paths: {count} · The first character is staged, the second is unstaged; . means unchanged.`,"git.checksNote":`Gitifact requirement checks are not run yet.`,"git.cleanDescription":`The working tree matches the last commit.`,"git.cleanTitle":`No changed files`,"git.column.code":`Code`,"git.column.extra":`Details`,"git.column.path":`Path`,"git.column.state":`Status`,"git.conflict":`Conflict`,"git.connecting":`Connecting to the local server.`,"git.noCommits":`No commits yet`,"git.observedNote":`This is an observation of Git status, not a fixed snapshot of file contents.`,"git.previousResult":`Previous result. See the observation time above.`,"git.reading":`Reading repository status.`,"git.refresh":`Refresh status`,"git.refreshing":`Reading…`,"git.repository":`Repository`,"git.repositoryState":`Repository status`,"git.submoduleCommit":`Submodule commit changed`,"git.submoduleTracked":`Tracked changes inside submodule`,"git.submoduleUntracked":`Untracked changes inside submodule`,"git.summary":`Change summary`,"git.viewRequirements":`View requirements →`,"git.workingNotice":`Overview, feature requirements and wiki show your working files; activity shows committed records. Ask your agent to commit changes.`,"git.workingTitle":`Uncommitted specification changes`,"header.location":`Current location`,"header.observedAt":`Read at {time}`,"history.changeFilters":`Try different filters or search terms.`,"history.shown":`Showing {shown} of {total} records.`,"history.contributorsLimited":`Contributors are based on the latest 10,000 Git commits.`,"history.emptyDescription":`Ask your agent to write and commit requirements to see activity here.`,"history.emptyTitle":`No activity to show.`,"history.legacyBoundary":`Legacy records from before Markdown specifications were adopted are not shown.`,"history.loadMore":`Load older history`,"history.loadingMore":`Loading older history…`,"history.reachedEnd":`You have reached the end of the history.`,"history.retryMore":`Retry loading older history`,"history.selectedMissing":`This change could not be found. The history may have changed.`,"history.staleData":`Previous result. It may not reflect the current state.`,"kind.design":`Design`,"kind.requirement":`Requirement`,"markdown.alertCaution":`Caution`,"markdown.alertImportant":`Important`,"markdown.alertNote":`Note`,"markdown.alertTip":`Tip`,"markdown.alertWarning":`Warning`,"markdown.diagram":`Diagram`,"markdown.diagramFailed":`Could not render the diagram. Showing its source instead. {message}`,"nav.about":`About`,"nav.contributors":`Contributors`,"nav.features":`Feature requirements`,"nav.git":`Git status`,"nav.history":`Activity`,"nav.product":`Overview`,"notFound.description":`Check the address or return to the overview.`,"notFound.home":`Home`,"notFound.title":`Page not found`,"overview.commitsByContributor":`Commits by contributor`,"overview.contributorsLink":`Contributors →`,"overview.legend":`{label} legend`,"overview.noData":`No data yet.`,"overview.otherContributors":`{count} other contributors`,"overview.recentActivity":`Latest activity`,"overview.recentChangeTypes":`Change types`,"overview.pulse":`Changes over {days} days`,"overview.activityLink":`Activity →`,"overview.totalEvents":`Total activity: {count}`,"overview.noActivity":`No committed specification activity yet.`,"overview.stat.contributors":`Contributors`,"overview.stat.features":`Feature specifications`,"overview.stat.requirements":`Requirements`,"overview.summary":`Current specifications`,"overview.uncommittedToken":`Uncommitted changes`,"project.local":`Local project`,"request.failed":`Could not load`,"request.loading":`Loading`,"request.loadingProject":`Loading project`,"request.loadingRecords":`Loading project records.`,"shell.home":`GITIFACT home`,"shell.workingChanges":`Uncommitted specification changes`,"shell.workingChangesTooltip":`Uncommitted specification changes · See Git status`,"nav.changelog":`Release notes`,"shell.version":`v{version}`,"shell.versionTooltip":`View release notes`,"shell.updateAvailable":`{version} available`,"update.title":`An update is available`,"update.versions":`Current: {current} · Latest: {latest}`,"update.promptLabel":`Ask your agent`,"update.promptHelp":`Copy this request to the agent you use for the project.`,"update.prompt":`Update gitifact to version {latest}. First run gitifact update to check the installation instructions, install it using this environment's installation method, then run gitifact update --commit to update and commit the project's GITIFACT instruction blocks.`,"update.promptTitle":`Request`,"update.commandTitle":`Terminal`,"update.commandLabel":`Install manually`,"update.commandHelp":`For a global npm installation. If you installed another way, use that method to update. Reopen the browser after installation.`,"changelog.title":`Release notes`,"changelog.subtitle":`Changes through the installed version.`,"changelog.release":`Release {version}`,"changelog.current":`Current`,"changelog.added":`Added`,"changelog.changed":`Changed`,"changelog.removed":`Removed`,"changelog.fixed":`Fixed`,"changelog.empty":`No release notes available.`,"changelog.fallback":`Release notes are unavailable in this language. Showing the default language.`,"api.invalidChangelog":`The release notes response format is incompatible.`,"documents.folderCount":`Documents: {count}`,"nav.settings":`Settings`,"search.empty":`No documents to search.`,"search.emptyDescription":`Save requirements or wiki pages to find them here.`,"search.group.design":`Designs`,"search.group.document":`Wiki pages`,"search.group.history":`Change history`,"search.group.feature":`Feature specifications`,"search.group.requirement":`Requirements`,"search.group.recent":`Recent changes`,"search.hint.close":`Close`,"search.hint.move":`Move`,"search.hint.open":`Open`,"search.label":`Search documents`,"search.loading":`Reading documents…`,"search.noMatch":`No matching documents.`,"search.noMatchDescription":`Try another term. Search includes titles and content.`,"search.open":`Open document search`,"search.placeholder":`Search requirements, designs and wiki pages`,"search.trigger":`Search`,"settings.title":`Settings`,"settings.subtitle":`Saved only in this browser. Nothing is written to the project.`,"settings.mode":`Appearance`,"settings.modeHint":`System follows your operating system's light or dark setting.`,"settings.mode.system":`System`,"settings.mode.light":`Light`,"settings.mode.dark":`Dark`,"settings.palette":`Color palette`,"settings.paletteHint":`Each palette includes light and dark modes, with neutral text and subtly tinted backgrounds.`,"settings.palette.stone":`Stone`,"settings.palette.stoneHint":`Warm gray with ink accents. Default.`,"settings.palette.sage":`Sage & cream`,"settings.palette.sageHint":`Muted green and warm cream.`,"settings.palette.slate":`Slate & blue`,"settings.palette.slateHint":`Blue-gray with clear blue accents.`,"settings.palette.clay":`Sand & clay`,"settings.palette.clayHint":`Sandy backgrounds with reddish-brown accents.`,"settings.palette.olive":`Olive & warm gray`,"settings.palette.oliveHint":`Warm neutrals with deep olive green. Darker than sage.`,"nav.wiki":`Project wiki`,"kind.wiki":`Wiki page`,"overview.stat.wiki":`Wiki pages`,"design.sources":`References`,"link.missing":`Page not found: {path}`,"link.outside":`File outside the browser`,"link.copied":`Path copied`,"link.copyFailed":`Could not copy path: {path}`,"documents.tree":`Wiki tree`,"documents.path":`Current location`,"settings.language":`Language`,"settings.language.system":`Browser default`,"shell.githubTooltip":`Gitifact on GitHub (opens in a new tab)`};function _e(e){return/^ko(?:[-_]|$)/i.test(e)?`ko`:`en`}var ve=`gitifact-language`,ye=new Set;function be(){try{let e=localStorage.getItem(ve);return e===`ko`||e===`en`?e:`system`}catch{return`system`}}var xe=be(),Se=()=>xe,Ce=()=>xe===`system`?_e(navigator.language):xe;function we(){document.documentElement.lang=Ce(),ye.forEach(e=>e())}function Te(e){if([`system`,`ko`,`en`].includes(e)){xe=e;try{localStorage.setItem(ve,e)}catch{}we()}}window.addEventListener(`storage`,e=>{(e.key===ve||e.key===null)&&(xe=be(),we())}),window.addEventListener(`languagechange`,we);var Ee=e=>(ye.add(e),()=>{ye.delete(e)}),De=()=>(0,P.useSyncExternalStore)(Ee,Ce),Oe=()=>(0,P.useSyncExternalStore)(Ee,Se);document.documentElement.lang=Ce();var ke=`<p align="center">
3
- <img src="https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/gitifact-logo.svg" alt="GITIFACT" width="720" />
4
- </p>
5
-
6
- [한국어](https://github.com/dev-goraebap/gitifact/blob/main/README.ko.md)
7
-
8
- Gitifact keeps the requirements, designs, and reasons for changes that emerge from conversations with AI agents alongside code in a Git repository. It quietly helps maintain those records as you develop, without asking you to adopt a separate documentation process.
9
-
10
- Agents can use requirements, designs, and past decisions as context for their work. Users can explore those documents and their history in the browser viewer built into the CLI. A project wiki holds development rules, architecture decisions, and other shared knowledge. Its structure and guidelines can be tailored to how you or your team work.
11
-
12
- ## Quick start
13
-
14
- Give this prompt to the agent you use in your project:
15
-
16
- \`\`\`text
17
- Run npm install -g gitifact@latest to install Gitifact, even if it is already installed, so we have the latest version. Then run gitifact init in this project.
18
- Read the GITIFACT block that init adds to AGENTS.md or the relevant agent instructions file, and follow it from this session onward.
19
- \`\`\`
20
-
21
- Once setup is complete, keep working as usual: describe the feature you want to build or the behavior you want to change. Ask “Open the Gitifact browser” to see the documents and change history.
22
-
23
- When the browser viewer shows a new version, ask your agent to update Gitifact. To run commands yourself, see the [CLI guide](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/README.md).
24
-
25
- ## Why I built it
26
-
27
- While developing with agents, I found it helpful to keep track of what I wanted to build and why I made particular changes.
28
-
29
- At work, most of my projects involved maintaining a substantial set of project documents. In personal projects, I used only what an agent needed to develop the product, such as a short PRD or a design document. The gap between those two settings left me thinking about how to manage requirements and documentation. Even where the basic document formats were similar, teams and individuals wrote and maintained them differently.
30
-
31
- I was unsure whether those established documentation practices would fit development with agents. I also did not feel ready to define a new approach and present it as the answer. Gitifact therefore draws on well-known spec-driven development tools, organizing requirements and designs together by feature.
32
-
33
- I wanted Gitifact to **stay in the background**: to help keep records within the flow of a project, without putting a methodology or process first.
34
-
35
- If you want to manage requirements closely, you can refine them through conversations with your agent. If you would rather focus on building the product, that should work too. The aim is to have the requirements ready when you eventually ask, “What does this product actually do now?”
36
-
37
- ## Tracking requirements in Git
38
-
39
- Git tracks changes to files and lines. Requirements describe product behavior and rules, so their identity does not always follow file boundaries.
40
-
41
- When a document is reorganized, a heading changes, or a section moves to another file, a diff can show it as a deletion and an addition. An agent then has to infer where the requirement went from the conversation and the diff. I wanted code to preserve that continuity instead of relying on the agent to reconstruct it each time.
42
-
43
- Gitifact pairs **requirements (\`requirements.md\`)** with **designs (\`design.md\`)** for each feature. It continues to track the same requirement when its title or location changes.
44
-
45
- - **Requirements (\`requirements.md\`)** describe the behavior and rules the product should provide, in a form people can read and review.
46
- - **Designs (\`design.md\`)** give agents the technical context needed to implement a feature. They cover details and processing flows that do not belong in a project-wide architecture decision record, along with the wiki pages and external documents that informed the design.
47
-
48
- ![Feature requirements grouped by feature in the Fieldnotes demo project](https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/screenshots/feature-requirements.jpg)
49
-
50
- ## A wiki you can tailor
51
-
52
- Feature specifications follow a defined structure for tracking requirements. The **wiki (\`.gitifact/wiki/\`)** gives you room to organize the knowledge and agreements that apply across your project.
53
-
54
- Different projects need different kinds of documentation. Gitifact leaves that structure up to you.
55
-
56
- - **Choose your own structure.** Organize folders and pages around architecture decision records, coding conventions, development environments, or other topics your project needs.
57
- - **Define how the wiki is maintained.** The contents of \`.gitifact/wiki/README.md\` become the wiki guidelines your agent follows. Edit this page to reflect how you or your team work.
58
-
59
- Wiki pages retain their identity when their titles or paths change. When the agent commits a change, it records the reason alongside it. You define the project context; the agent works from those guidelines.
60
-
61
- ![The Fieldnotes project wiki with its document tree and product overview](https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/screenshots/project-wiki.jpg)
62
-
63
- ## Recording changes at commit time
64
-
65
- Not every small request in a conversation needs a requirements revision.
66
-
67
- I often develop by looking at a screen, asking for a change, trying it, and adjusting it again. Recording every intermediate attempt as a requirements change made it harder to see which behavior I ultimately wanted.
68
-
69
- With Gitifact, the agent prepares a requirements draft and refines it as the conversation develops. **At commit time, it records the final requirements changes and their reasons together with the code.**
70
-
71
- You do not need to write a separate explanation or remember recording commands. The agent uses the conversation to describe why the change happened. When the intended behavior is unclear, it asks for clarification.
72
-
73
- ![Requirement and design changes with their reasons in the activity timeline](https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/screenshots/activity.jpg)
74
-
75
- ## Adopt it gradually
76
-
77
- In an existing project, you can start recording from the point of adoption. Document the areas you maintain or extend as you work on them; there is no need to reconstruct the project's entire history first.
78
-
79
- You can also ask your agent to review the existing code and documents and prepare an initial set of requirements and designs. Refine that draft as actual changes reveal what needs more detail.
80
-
81
- For a new project, start with a conversation about the idea. As you describe the product, the agent can organize requirements and designs and ask about unclear behavior.
82
-
83
- ## Scope
84
-
85
- Gitifact is designed for a product developed **within one Git repository**, whether a single project or a monorepo. Managing relationships across repositories would add complexity to both the tool and its use, so that is outside its scope.
86
-
87
- ## Project status
88
-
89
- Gitifact connects Markdown requirements, designs, and reasons for changes to Git commits. The browser viewer shows activity, requirements, and contributors. Ask your agent to “Open the Gitifact browser.”
90
-
91
- Find the latest published version on [npm](https://www.npmjs.com/package/gitifact) and version-by-version changes in the [release notes](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/src/shared/i18n/en/changelog.md).
92
-
93
- This document describes the product's purpose, principles, and scope. Feature requirements and designs live in the [specifications](https://github.com/dev-goraebap/gitifact/tree/main/.gitifact/spec).
94
-
95
- ## License
96
-
97
- [MIT](https://github.com/dev-goraebap/gitifact/blob/main/LICENSE).
98
- `,Ae=`# Getting started
99
-
100
- [한국어](https://github.com/dev-goraebap/gitifact/blob/main/packages/intro/ko/getting-started.md)
101
-
102
- ## Install and set up
103
-
104
- Give this prompt to the agent you use in your project:
105
-
106
- \`\`\`text
107
- Run npm install -g gitifact@latest to install Gitifact, even if it is already installed, so we have the latest version. Then run gitifact init in this project.
108
- Read the GITIFACT block that init adds to AGENTS.md or the relevant agent instructions file, and follow it from this session onward.
109
- \`\`\`
110
-
111
- ## Keep developing
112
-
113
- After setup, ask your agent to work as usual.
114
-
115
- \`\`\`text
116
- Let users delete their posts.
117
- \`\`\`
118
-
119
- The agent organizes requirements and designs according to the project guidelines. When the work is ready, ask it to “Commit the changes.” It will include the relevant specifications and reasons along with the code.
120
-
121
- For an existing project, you can start with the features you work on next. To document the whole product first, ask:
122
-
123
- \`\`\`text
124
- Document this project's requirements and designs.
125
- \`\`\`
126
-
127
- ## Tailor the wiki
128
-
129
- Use the wiki for development rules and architecture decisions. You can adjust its structure and guidelines with your agent.
130
-
131
- \`\`\`text
132
- Add our project's development rules to the wiki.
133
- \`\`\`
134
-
135
- ## View documents and history
136
-
137
- Tell your agent what you want to see. For example:
138
-
139
- - “I'd like to see the requirements.”
140
- - “Show me the product specifications.”
141
- - “Show me recent changes.”
142
- - “Open the Gitifact browser.”
143
-
144
- The browser viewer includes:
145
-
146
- | Page | Contents |
147
- | :--- | :--- |
148
- | Product overview | Project size and recent activity |
149
- | Features | Current requirements and designs by feature |
150
- | Project wiki | Development rules, architecture decisions, and other project documents |
151
- | Activity | Reasons for committed changes and before/after content |
152
- | Contributors | Contributions by Git author |
153
- | Git status | Changed files in the working directory |
154
-
155
- Requirements, designs, and wiki pages show the working copy. Activity shows committed history.
156
-
157
- ## Language
158
-
159
- Choose English, 한국어, or Browser default in the viewer's Settings. The selection is saved in that browser. Project documents stay in their original language.
160
-
161
- The CLI follows your environment's language and uses English for unsupported languages. To choose explicitly, use \`gitifact --lang en <command>\` or \`gitifact --lang ko <command>\`. You can also set \`GITIFACT_LANG\` to \`en\` or \`ko\` for your shell. Updating an existing project preserves the language of its GITIFACT blocks unless you supply \`--lang\`.
162
-
163
- ## Update
164
-
165
- When the viewer shows a new version, ask your agent to update:
166
-
167
- \`\`\`text
168
- Update Gitifact.
169
- \`\`\`
170
-
171
- Restart the browser server after updating to use the new version.
172
-
173
- ## Run commands yourself
174
-
175
- Gitifact requires Node.js 24.x and Git. After installing, run commands inside the target Git repository.
176
-
177
- \`\`\`sh
178
- npm install -g gitifact@latest
179
- gitifact init
180
- gitifact browser
181
- \`\`\`
182
-
183
- Open the local URL printed by \`browser\`. Press Ctrl+C in the terminal to stop the server.
184
-
185
- ### Common commands
186
-
187
- | Command | Purpose |
188
- | :--- | :--- |
189
- | \`gitifact init --dry-run\` | Preview setup without changing files |
190
- | \`gitifact init\` | Set up Gitifact and install or refresh agent instructions |
191
- | \`gitifact browser\` | Start the browser viewer |
192
- | \`gitifact status\` | Read the current Git status |
193
- | \`gitifact update\` | Check for a new version and refresh project instructions |
194
- | \`gitifact docs\` | List agent guide topics |
195
- | \`gitifact docs spec\` | Requirements format and writing rules |
196
- | \`gitifact docs design\` | Feature design rules |
197
- | \`gitifact docs wiki\` | Wiki format and this project's guidelines |
198
- | \`gitifact docs commit\` | Commit changes with their reasons and related files |
199
-
200
- ### Read and save specifications
201
-
202
- | Command | Purpose |
203
- | :--- | :--- |
204
- | \`gitifact spec working\` | Read current specifications, wiki pages, and save metadata |
205
- | \`gitifact spec save --file <input-file>\` | Save requirements, designs, and wiki pages |
206
- | \`gitifact spec changes\` | Compare working specifications with HEAD and read uncommitted reasons |
207
- | \`gitifact spec commit --file <input-file> --dry-run\` | Preview the commit without changing files |
208
- | \`gitifact spec commit --file <input-file>\` | Record reasons and commit related files |
209
- | \`gitifact spec read --ref HEAD\` | Read specifications at a commit |
210
- | \`gitifact spec diff --from <earlier-commit> --to <later-commit>\` | Compare specifications between commits |
211
-
212
- See \`gitifact docs spec\` and \`gitifact docs commit\` for input formats.
213
-
214
- ### Setup and runtime options
215
-
216
- | Option | Purpose |
217
- | :--- | :--- |
218
- | \`gitifact init --agent codex\` | Install instructions for a tool: \`claude\`, \`cursor\`, \`codex\`, \`hermes\`, or \`all\` |
219
- | \`gitifact init --skip-agents\` | Set up without changing agent instruction files |
220
- | \`gitifact init --remove-agents\` | Remove GITIFACT blocks from agent instructions |
221
- | \`gitifact browser --port 4317\` | Choose the browser server port |
222
- | \`gitifact browser --no-update-check\` | Start without checking npm for updates |
223
- | \`gitifact --lang en <command>\` | Use English for output and any generated agent blocks |
224
-
225
- \`--remove-agents\` removes only GITIFACT blocks; it preserves project records.
226
-
227
- Add \`--help\` to any command to see its options.
228
- `,je=`<p align="center">
229
- <img src="packages/intro/assets/gitifact-logo.svg" alt="GITIFACT" width="720" />
230
- </p>
231
-
232
- [English](https://github.com/dev-goraebap/gitifact/blob/main/README.md)
233
-
234
- Gitifact는 AI 에이전트와의 대화에서 나온 요구사항과 설계, 변경 이유를 코드와 함께 Git 저장소에 관리하는 도구입니다. 별도의 문서 작업이나 정해진 개발 절차를 앞세우기보다, 평소처럼 에이전트와 대화하며 개발하는 흐름 속에서 요구사항이 정리되고 유지되도록 조용히 돕습니다.
235
-
236
- 에이전트는 요구사항과 설계, 프로젝트의 결정 이력을 작업 맥락으로 참고하고, 사용자는 CLI에 내장된 브라우저 뷰어에서 이 문서들과 변경 이력을 살펴볼 수 있습니다. 위키에는 개발 규칙이나 아키텍처 결정 등 프로젝트 전반의 지식을 담고, 문서 구조와 운영 방침을 조직이나 개인의 작업 방식에 맞게 구성할 수 있습니다.
237
-
238
- ## 빠른 시작
239
-
240
- 아래 프롬프트를 프로젝트에서 사용하는 에이전트에게 전달하세요.
241
-
242
- \`\`\`text
243
- npm install -g gitifact@latest로 gitifact를 설치하세요. 이미 설치돼 있어도 최신 버전으로 올리기 위해 실행합니다. 그다음 이 프로젝트에서 gitifact init을 실행하세요.
244
- init이 AGENTS.md 등에 쓴 GITIFACT 블록을 읽고 이번 세션부터 따르세요.
245
- \`\`\`
246
-
247
- 설치가 끝나면 평소처럼 에이전트에게 만들고 싶은 기능이나 바꾸고 싶은 동작을 설명하며 개발을 이어가세요. 정리된 문서와 변경 이력은 "gitifact 브라우저를 열어주세요"라고 요청해 확인할 수 있습니다.
248
-
249
- 브라우저 뷰어에 새 버전 안내가 나타나면 에이전트에게 Gitifact 업데이트를 요청하세요. 직접 명령을 실행하려면 [CLI 안내](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/README.md)를 참고하세요.
250
-
251
- ## 도구의 목적: 구현 바깥의 맥락
252
-
253
- 에이전트와 함께 개발하면서 저는 "무엇을, 왜 그렇게 만들었는가"라는 맥락을 남기는 일이 중요하다고 느꼈습니다.
254
-
255
- 제가 속한 조직에서는 개발 과정의 산출물을 체계적으로 관리하는 프로젝트를 주로 다뤄왔습니다. 반면 개인 프로젝트에서는 간단한 PRD나 설계 문서처럼 에이전트가 개발하는 데 필요한 정도의 문서만 작성해왔습니다. 두 환경 사이의 간극을 경험하면서 요구사항과 문서를 어떻게 관리하면 좋을지 고민이 많았습니다. 산출물의 기본 틀은 비슷하더라도 조직이나 사람마다 작성하고 관리하는 방식이 달라, 하나의 방식으로 정리하기도 어려웠습니다.
256
-
257
- 에이전트와 함께하는 개발에서도 기존의 문서 관리 방식을 그대로 적용하는 것이 적절한지 확신하기 어려웠습니다. 그렇다고 새로운 방식을 스스로 정해 답으로 제시하기도 어려웠습니다. 그래서 Gitifact는 널리 알려진 스펙 주도 개발 도구들을 참고해, 기능별로 요구사항과 설계를 함께 관리하는 구조를 택했습니다.
258
-
259
- Gitifact를 만들며 추구한 것은 **'조용함'**입니다. 특정한 방법론이나 프로세스를 앞세우기보다, 진행 중인 프로젝트의 흐름에 맞춰 기록을 돕고자 했습니다.
260
-
261
- 요구사항을 주도적으로 관리하고 싶은 사람이라면 에이전트와 대화하며 명세의 품질을 얼마든지 정교하게 다듬을 수 있습니다. 반대로 문서에 신경 쓸 겨를 없이 오로지 제품의 완성에만 몰두하고 싶은 사람이라도 괜찮습니다. 평소처럼 개발에만 집중하다가, 문득 "이 제품이 지금 정확히 어떤 일들을 하고 있는가?" 확인하려 했을 때 이미 제품의 요구사항들이 차분히 정리되어 있는 도구를 지향합니다.
262
-
263
- ## Git 요구사항 추적
264
-
265
- Git은 뛰어난 버전 관리 도구이지만 파일과 줄(line) 단위로 변경을 추적합니다. 반면 요구사항은 제품의 기능과 규칙을 나타내는 의미 단위입니다.
266
-
267
- 문서 구조가 바뀌어 제목이 달라지거나 내용이 다른 파일로 옮겨지면, Git diff는 이를 단순한 삭제와 추가로 인식합니다. 그 결과 에이전트는 이전 요구사항이 어디로 이동했는지 대화와 diff 속에서 매번 추론해야 하고, 맥락을 놓치기 쉽습니다. 이런 연속성과 연결만큼은 에이전트의 불확실한 추론에 기대기보다 코드가 명확히 보장해 주는 편이 안전하다고 생각했습니다.
268
-
269
- Gitifact는 기능마다 **요구사항(\`requirements.md\`)**과 **설계(\`design.md\`)**를 짝지어 다루며, 문서 안에서 제목이나 위치가 바뀌더라도 같은 요구사항으로 끝까지 추적을 이어줍니다.
270
-
271
- - **요구사항(\`requirements.md\`).** 사람이 직접 보고 검토하며 제품의 동작과 현상을 쉽게 이해할 수 있는 형태로 작성됩니다. 제품이 보장해야 할 규칙과 기능이 여기에 담깁니다.
272
- - **설계(\`design.md\`).** 에이전트가 실제 코드 구현을 원활하게 수행할 수 있도록 돕는 구체적인 기술 맥락입니다. 전역적인 아키텍처 결정 기록(ADR)에는 담기 어려운 해당 기능만의 기술적 특이사항과 세부 구현 흐름이 다루어지며, 위키의 아키텍처 지침이나 외부의 어떤 문서를 참고하여 작업했는지 그 출처와 배경도 함께 담깁니다.
273
-
274
- ![Fieldnotes 데모 프로젝트의 기능별 요구사항](https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/screenshots/feature-requirements.jpg)
275
-
276
- ## 프로젝트 규칙과 자율성을 위한 위키
277
-
278
- 개별 기능의 명세가 명확한 규칙과 추적으로 관리된다면, 프로젝트 전반의 지식과 약속을 다루는 **위키(\`.gitifact/wiki/\`)**는 사용자에게 온전한 자율성을 제공합니다.
279
-
280
- 프로젝트마다 관리해야 할 지식의 성격과 방식은 다릅니다. Gitifact는 특정 문서 양식을 강요하지 않고 프로젝트에 맞게 자유롭게 구조화할 수 있도록 열어두었습니다.
281
-
282
- - **자유로운 구조와 테일러링.** 아키텍처 결정 기록(ADR), 코딩 컨벤션, 개발 환경 규칙 등 프로젝트에 필요한 주제별로 하위 폴더와 문서를 원하는 대로 구성할 수 있습니다.
283
- - **운영 방침의 사용자 정의.** 위키의 진입점인 \`.gitifact/wiki/README.md\`에 작성한 내용이 곧 에이전트가 따르는 '위키 운영 방침'이 됩니다. 프로젝트나 팀의 일하는 방식에 맞게 이 문서를 고치면, 에이전트는 그 지침을 읽고 사용자가 정한 규칙에 맞춰 작업합니다.
284
-
285
- 위키 문서 역시 파일 위치나 제목이 바뀌어도 끊김 없이 추적되며, 에이전트가 커밋할 때 변경 이유를 함께 묶어 기록합니다. 사용자는 프로젝트의 맥락을 자율적으로 구성하고, 에이전트는 그 규칙을 바탕으로 일관된 작업을 수행합니다.
286
-
287
- ![문서 트리와 제품 개요를 함께 보여주는 프로젝트 위키](https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/screenshots/project-wiki.jpg)
288
-
289
- ## 바이브 코딩과 커밋 시점의 기록
290
-
291
- 에이전트와의 대화에서 사소한 수정 요청이 오갈 때마다 매번 요구사항 문서를 개정하지 않습니다.
292
-
293
- 저는 화면을 보며 "이걸 이렇게 고쳐줘", "동작이 마음에 안 드니 저렇게 바꿔줘"라며 빠르게 시도하고 수정하는 바이브 코딩(vibe coding) 방식으로 작업하곤 합니다. 그 과정의 중간 시도를 모두 요구사항 변경으로 남기면, 최종적으로 어떤 동작을 원했는지 읽기 어려워진다고 느꼈습니다.
294
-
295
- 그래서 Gitifact에서는 작업을 지시받으면 요구사항 초안을 준비하고 대화에 맞춰 다듬다가, **커밋할 때 에이전트가 바뀐 요구사항과 그 변경 이유를 코드와 함께 묶어 Git에 기록**하도록 했습니다.
296
-
297
- 사용자가 변경 이유를 남기기 위해 문서를 따로 작성하거나 복잡한 명령을 외울 필요는 없습니다. 대화 맥락을 이해한 에이전트가 "왜 이 변경이 일어났는가"를 알아서 정리하여 커밋에 담아줍니다. 만약 제품의 동작이나 의도가 모호한 부분이 있다면 에이전트가 먼저 질문을 건네며 구체화해 나갑니다.
298
-
299
- ![요구사항·설계 변경과 그 이유를 보여주는 활동 이력](https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/screenshots/activity.jpg)
300
-
301
- ## 점진적인 도입
302
-
303
- 기존 프로젝트라면 도입한 시점부터 기록을 쌓아가면 됩니다. 유지보수하거나 새 기능을 추가하면서 해당 영역의 요구사항부터 조금씩 정리해 나가도 되고, 과거 이력 전체를 먼저 문서화해야 한다는 부담을 가질 필요는 없습니다.
304
-
305
- 반대로 도입하는 시점에 에이전트에게 기존 소스코드나 정보가 담긴 파일들을 살펴보게 하여, 전체적인 요구사항과 설계 초안을 빠르게 먼저 뽑아내는 방식도 얼마든지 가능합니다. 초안에 부족한 부분이 있으면 이후 실제 변경이 일어날 때마다 대화를 통해 보완해 나갈 수 있습니다.
306
-
307
- 새 프로젝트라면 처음 아이디어를 나누는 대화부터 가볍게 시작하면 됩니다. 만들고 싶은 제품을 구체화하는 동안 에이전트가 요구사항과 구현 설계를 함께 정리하고 불명확한 제품 동작을 질문합니다.
308
-
309
- ## 적용 범위와 한계
310
-
311
- 고민 끝에 이 도구는 **하나의 Git 저장소(단일 레포 또는 모노레포) 안에서 제품을 만드는 환경**만을 전제로 두었습니다. 여러 저장소 사이의 연결까지 관리하면 도구의 구조와 사용법이 복잡해질 것이라고 판단했습니다. 여러 저장소를 함께 관리하는 기능은 Gitifact의 범위에 포함하지 않았습니다.
312
-
313
- ## 프로젝트 상태
314
-
315
- Markdown 요구사항·설계와 커밋 시점의 변경 이유를 Git에 연결하고, 브라우저 뷰어에서 활동·요구사항·참여자를 볼 수 있습니다. 에이전트에게 "gitifact 브라우저를 열어주세요"라고 요청하세요.
316
-
317
- 최신 공개 버전은 [npm](https://www.npmjs.com/package/gitifact)에서, 버전별 변경 내역은 [패치노트](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/src/shared/i18n/ko/changelog.md)에서 확인하세요.
318
-
319
- 제품의 목적·원칙·범위는 이 문서에서, 기능별 요구사항과 설계는 [요구사항](https://github.com/dev-goraebap/gitifact/tree/main/.gitifact/spec)에서 확인할 수 있습니다.
320
-
321
- ## 라이선스
322
-
323
- [MIT](https://github.com/dev-goraebap/gitifact/blob/main/LICENSE).
324
- `,Me=`# 시작하기
325
-
326
- ## 설치와 도입
327
-
328
- 프로젝트에서 사용하는 에이전트에게 아래 내용을 전달하세요.
329
-
330
- \`\`\`text
331
- npm install -g gitifact@latest로 gitifact를 설치하세요. 이미 설치돼 있어도 최신 버전으로 올리기 위해 실행합니다. 그다음 이 프로젝트에서 gitifact init을 실행하세요.
332
- init이 AGENTS.md 등에 쓴 GITIFACT 블록을 읽고 이번 세션부터 따르세요.
333
- \`\`\`
334
-
335
- ## 개발 이어가기
336
-
337
- 설치 후에는 평소처럼 에이전트에게 작업을 요청하세요.
338
-
339
- \`\`\`text
340
- 게시물을 삭제할 수 있게 해주세요.
341
- \`\`\`
342
-
343
- 에이전트가 프로젝트 지침에 따라 요구사항과 설계를 정리합니다. 작업을 마친 뒤 “커밋해주세요”라고 요청하면 관련 명세와 변경 이유도 코드와 함께 기록합니다.
344
-
345
- 기존 프로젝트는 앞으로 작업하는 기능부터 기록할 수 있습니다. 전체 요구사항을 먼저 정리하고 싶다면 이렇게 요청하세요.
346
-
347
- \`\`\`text
348
- 이 프로젝트의 요구사항과 설계를 정리해주세요.
349
- \`\`\`
350
-
351
- ## 프로젝트에 맞게 위키 구성하기
352
-
353
- 개발 규칙이나 아키텍처 결정은 위키에서 관리할 수 있습니다. 문서 구조와 운영 방식도 에이전트와 대화하며 조정하세요.
354
-
355
- \`\`\`text
356
- 우리 프로젝트의 개발 규칙을 위키에 정리해주세요.
357
- \`\`\`
358
-
359
- ## 문서와 변경 이력 확인하기
360
-
361
- 보고 싶은 내용을 에이전트에게 말하면 됩니다. 예를 들어 다음과 같이 요청할 수 있습니다.
362
-
363
- - “요구사항을 확인하고 싶어요.”
364
- - “제품 명세를 보고 싶어요.”
365
- - “최근 변경 이력을 보여주세요.”
366
- - “gitifact 브라우저를 열어주세요.”
367
-
368
- 브라우저 뷰어에서 다음 내용을 확인할 수 있습니다.
369
-
370
- | 화면 | 확인할 내용 |
371
- | :--- | :--- |
372
- | 제품 개요 | 프로젝트 규모와 최신 활동 |
373
- | 기능별 요구사항 | 현재 요구사항과 기능별 설계 |
374
- | 프로젝트 위키 | 개발 규칙과 아키텍처 결정 등 프로젝트 문서 |
375
- | 활동 | 커밋된 변경의 이유와 변경 전후 내용 |
376
- | 참여자 | Git 작성자별 참여 내역 |
377
- | Git 상태 | 현재 작업 폴더의 변경 파일 |
378
-
379
- 요구사항·설계·위키에는 작업 중인 내용이, 활동에는 커밋된 이력이 보입니다.
380
-
381
- ## 언어 설정
382
-
383
- 브라우저 설정에서 한국어, English, 브라우저 설정 중 하나를 고를 수 있습니다. 선택은 해당 브라우저에 저장되며 프로젝트 문서의 언어는 바꾸지 않습니다.
384
-
385
- CLI는 실행 환경의 언어를 따르고, 지원하지 않는 언어이면 영어를 사용합니다. 직접 지정하려면 \`gitifact --lang ko <명령>\` 또는 \`gitifact --lang en <명령>\`을 사용하세요. 셸의 \`GITIFACT_LANG\` 환경변수에 \`ko\`나 \`en\`을 지정할 수도 있습니다. 기존 프로젝트의 GITIFACT 블록은 \`--lang\`을 지정하지 않는 한 업데이트 후에도 원래 언어를 유지합니다.
386
-
387
- ## 업데이트
388
-
389
- 브라우저 뷰어에 새 버전 안내가 나타나면 에이전트에게 업데이트를 요청하세요.
390
-
391
- \`\`\`text
392
- Gitifact를 업데이트해주세요.
393
- \`\`\`
394
-
395
- 업데이트 후 브라우저 서버를 다시 열면 새 버전이 적용됩니다.
396
-
397
- ## 직접 명령 실행하기
398
-
399
- Node.js 24.x와 Git이 설치된 환경에서 사용합니다. 설치 후 명령은 대상 Git 저장소 안에서 실행하세요.
400
-
401
- \`\`\`sh
402
- npm install -g gitifact@latest
403
- gitifact init
404
- gitifact browser
405
- \`\`\`
406
-
407
- \`browser\`가 출력한 로컬 주소를 열면 됩니다. 서버는 터미널에서 Ctrl+C로 종료합니다.
408
-
409
- ### 자주 쓰는 명령
410
-
411
- | 명령 | 용도 |
412
- | :--- | :--- |
413
- | \`gitifact init --dry-run\` | 파일을 바꾸기 전에 도입 계획 확인 |
414
- | \`gitifact init\` | 프로젝트에 Gitifact 도입, 에이전트 지침 설치·갱신 |
415
- | \`gitifact browser\` | 브라우저 뷰어 실행 |
416
- | \`gitifact status\` | 현재 Git 상태 조회 |
417
- | \`gitifact update\` | 새 버전 확인과 프로젝트 지침 갱신 |
418
- | \`gitifact docs\` | 에이전트 작업 지침의 주제 목록 |
419
- | \`gitifact docs spec\` | 요구사항 저장 형식과 작성 규칙 |
420
- | \`gitifact docs design\` | 기능 설계 작성 규칙 |
421
- | \`gitifact docs wiki\` | 위키 형식과 이 프로젝트의 운영 방침 |
422
- | \`gitifact docs commit\` | 변경 이유와 관련 파일을 함께 커밋하는 방법 |
423
-
424
- ### 명세 조회와 저장
425
-
426
- | 명령 | 용도 |
427
- | :--- | :--- |
428
- | \`gitifact spec working\` | 현재 명세·위키와 저장에 필요한 정보 조회 |
429
- | \`gitifact spec save --file <입력 파일>\` | 요구사항·설계·위키 저장 |
430
- | \`gitifact spec changes\` | HEAD와 작업 중인 명세의 차이, 미커밋 변경 이유 조회 |
431
- | \`gitifact spec commit --file <입력 파일> --dry-run\` | 파일을 바꾸지 않고 커밋 계획 확인 |
432
- | \`gitifact spec commit --file <입력 파일>\` | 변경 이유 기록과 관련 파일 커밋 |
433
- | \`gitifact spec read --ref HEAD\` | 특정 커밋의 명세 조회 |
434
- | \`gitifact spec diff --from <이전 커밋> --to <이후 커밋>\` | 두 커밋 사이의 명세 변경 조회 |
435
-
436
- 저장·커밋 입력 형식은 \`gitifact docs spec\`과 \`gitifact docs commit\`에서 확인할 수 있습니다.
437
-
438
- ### 도입과 실행 옵션
439
-
440
- | 옵션 | 용도 |
441
- | :--- | :--- |
442
- | \`gitifact init --agent codex\` | 특정 도구의 지침 파일에 설치. \`claude\`, \`cursor\`, \`codex\`, \`hermes\`, \`all\` 지원 |
443
- | \`gitifact init --skip-agents\` | 에이전트 지침 파일을 수정하지 않고 도입 |
444
- | \`gitifact init --remove-agents\` | 에이전트 지침의 GITIFACT 블록 제거 |
445
- | \`gitifact browser --port 4317\` | 브라우저 서버의 포트 지정 |
446
- | \`gitifact browser --no-update-check\` | npm 새 버전 조회 없이 브라우저 실행 |
447
-
448
- \`--remove-agents\`는 에이전트 지침의 GITIFACT 블록만 제거하며, 프로젝트 기록은 유지합니다.
449
-
450
- 각 명령에 \`--help\`를 붙이면 사용할 수 있는 옵션을 확인할 수 있습니다.
451
- `,Ne={ko:he,en:ge},Pe={ko:{about:je,gettingStarted:Me},en:{about:ke,gettingStarted:Ae}},Fe=/\{(\w+)\}/g;function F(e,t={},n=Ce()){return Ne[n][e].replace(Fe,(e,n)=>n in t?String(t[n]):e)}function Ie(e,t,n=Ce()){return Ne[n][e].split(Fe).map((e,n)=>n%2==0?e:(0,P.createElement)(P.Fragment,{key:n},e in t?t[e]:`{`+e+`}`))}function Le(e,t=Ce()){return Pe[t][e]}var I=u();function Re(...e){return t=>{for(let n of e)if(n?.(t),t.defaultPrevented)return}}var ze=[`button`,`a`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="combobox"]`,`[role="listbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[data-pressable-container]`].join(`,`),Be=`[aria-readonly="true"]`;function Ve(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(ze)&&!n.matches(Be))return!0;n=n.parentElement}return!1}function He(e){if(typeof document>`u`||!(`getSelection`in document))return!1;let t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function Ue({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return(0,P.useEffect)(()=>{let t=e.current;t&&t.setAttribute(`data-pressable-container`,`true`)},[e]),{onClick:(0,P.useCallback)(o=>{if(a)return;let s=e.current;if(!s||He(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&Ve(c,s))&&(n?.(o),!o.defaultPrevented&&(r!=null&&(i===`_blank`||o.ctrlKey||o.metaKey?window.open(r,`_blank`,`noopener`):t?.current?t.current.click():window.location.href=r),r==null&&n==null&&t?.current))){let e=new MouseEvent(`click`,{bubbles:o.bubbles,cancelable:o.cancelable,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey,altKey:o.altKey,button:o.button});t.current.dispatchEvent(e),o.stopPropagation()}},[e,t,n,r,i,a]),onMouseUp:(0,P.useCallback)(t=>{if(a)return;let n=e.current;if(!n)return;let i=t.target;i instanceof Element&&t.button===1&&r!=null&&(i===t.currentTarget||!Ve(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a])}}var We=(0,P.lazy)(async()=>fe(()=>import(`./Tooltip-QZg2pB5o.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2,3])));function Ge(e){return e===`display-1`||e===`display-2`||e===`display-3`}var Ke={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function qe({level:e,type:t,weight:n,accessibilityLevel:r,color:i=`primary`,display:a=`block`,maxLines:o=0,hasTruncateTooltip:s=!0,wordBreak:c,textWrap:l,justify:u=`start`,hasCapsize:d=!1,hasStrikethrough:m=!1,xstyle:h,className:g,style:_,children:v,ref:y,...b}){let x=Ke[e],T=r&&r!==e?{"aria-level":r}:{},se=c??(o===1?`break-all`:`break-word`),ce=o>0||d?`block`:a,A=t&&Ge(t)?t:void 0,j=E({maxLines:o}),M=typeof s==`string`?s:`above`,N=o>0&&s!==!1&&j.isTruncated,fe=(0,P.useRef)(null),pe=ee(y,j.ref,fe),me=o>1?{WebkitLineClamp:o}:void 0;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(x,{ref:pe,...S(f(`heading`,{level:e,color:i,type:t,weight:n}),p(ue[oe(i)],A?D[A]:ie[e],A&&le[A],n&&de[n],o===1?O.singleLine:o>1?O.multiLine:k[ce],o>0&&w[se],l&&te[l],u!==`start`&&ne[u],d&&re.enabled,m&&C.strikethrough,h),g,{..._,...me}),...T,...b,children:v}),N&&(0,I.jsx)(P.Suspense,{fallback:null,children:(0,I.jsx)(We,{anchorRef:fe,content:(0,I.jsx)(`span`,{...p(ae.content),children:j.fullText}),placement:M})})]})}qe.displayName=`Heading`;var Je=P.use,Ye=P.useLayoutEffect;function Xe(e,t,n){P.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function Ze(e){let t=P.useRef(null);return P.useImperativeHandle(e,()=>t.current,[]),t}function Qe(e){return e[e.length-1]}function $e(e,t){return typeof e==`function`?e(t):e}var et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable;function nt(e){for(let t in e)if(et.call(e,t))return!0;return!1}var rt=()=>Object.create(null),it=(e,t)=>at(e,t,rt);function at(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=lt(e)&&lt(i);if(!a&&!(st(e)&&st(i)))return i;let o=a?e:ot(e);if(!o)return i;let s=a?i:ot(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:et.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=at(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ot(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!tt.call(e,r))return!1;t.push(r)}return t}function st(e){if(!ct(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ct(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ct(e){return Object.prototype.toString.call(e)===`[object Object]`}function lt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ut(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!ut(e[r],t[r],n))return!1;return!0}if(st(e)&&st(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!ut(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!ut(e[o],t[o],n)))return!1;return i===a}return!1}function dt(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var ft=/[\x00-\x1f\x7f"<>`{}]/g;function pt(e){return e.replace(ft,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function mt(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return pt(t)}var ht=[`http:`,`https:`,`mailto:`,`tel:`];function gt(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var _t=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function vt(e,t){if(!e)return!1;if(_t.test(e))return!0;let n=gt(e);return n?!t.has(n):!1}function yt(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=mt(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=mt(r?e.slice(r):e)}return t}function bt(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function xt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function St(){throw Error(`Invariant failed`)}function Ct(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var wt=4,Tt=5;function Et(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Dt(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=Et(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=kt(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=At(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=kt(r);e.kind=Tt,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=kt(r);e.kind=wt,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)Dt(e,t,r,c,i,a,o,s)}function Ot(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function kt(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function At(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function jt(e,t){let n=kt(`/`),r=new Uint16Array(6),i=[];for(let t of e)Dt(!1,r,t,1,n,0,i);for(let e of i)e.sort(Ot);t.masksTree=n,t.flatCache=Ct(1e3)}function Mt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Lt(e,t.masksTree);return t.flatCache.set(e,r),r}function Nt(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=kt(`/`),Dt(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Lt(r,o,n)}function Pt(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Lt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=zt(a.route)),t.matchCache.set(r,a),a}function Ft(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function It(e,t=!1,n){let r=kt(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;Dt(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&St(),o[e.id]=e,c!==0&&e.path){let t=Ft(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(Ot);return{processedTree:{segmentTree:r,singleCache:Ct(1e3),matchCache:Ct(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Lt(e,t,n=!1){let r=e.split(`/`),i=Vt(e,r,t,n);if(!i)return null;let[a]=Rt(e,r,i);return{route:i.node.route,rawParams:a}}function Rt(e,t,n){let r=Bt(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===wt)break;if(u.kind===Tt){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function zt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Bt(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Vt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!Qe(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Gt(l,n))continue;if(i.parse){if(!Wt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==wt&&Gt(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===wt||i.kind===2)&&Gt(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Wt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Ut(f,o))return n;Gt(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Ht(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Ht(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Ht(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Ht(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ht(e,t){return 2**(e-t-1)}function Ut(e,t){return e===2**(t-1)-1}function Wt(e,t,n){let r,i;try{[r,i]=Rt(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Gt(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===wt)>(e.node.kind===wt)||t.node.kind===wt==(e.node.kind===wt)&&t.node.depth>e.node.depth)))}function Kt(e){return qt(e.filter(e=>e!==void 0).join(`/`))}function qt(e){return e.replace(/\/{2,}/g,`/`)}function Jt(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Yt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Xt(e){return Yt(Jt(e))}function Zt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Qt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=qt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=qt(e)),o=e.split(`/`);o.length>1&&Qe(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(Qe(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?qt(s):s)||`/`;return a&&r&&r.set(a,c),c}function $t(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function en(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>nn(e,n)).join(`/`):nn(r,n):r}function tn({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=Et(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=en(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=en(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=en(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function nn(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var rn=`Error preloading route! ☝️`;function an({children:e,fallback:t=null}){return(0,I.jsx)(P.Fragment,{children:on()?e:t})}function on(){return P.useSyncExternalStore(sn,()=>!0,()=>!1)}function sn(){return()=>{}}var cn=P.createContext(null);function ln(e){return P.useContext(cn)}var un=t((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),dn=t(((e,t)=>{t.exports=un()})),fn=t((e=>{var t=i(),n=dn();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),pn=t(((e,t)=>{t.exports=fn()}))();function mn(e,t){return e===t}function hn(e,t=e=>e,n){let r=n?.compare??mn,i=(0,P.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,P.useCallback)(()=>e.get(),[e]);return(0,pn.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function gn(e){let t=ln();return P.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function _n(e){let t=P.useRef(e);return ut(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function vn(e,t){return e[0]===t[0]&&e[1]===t[1]}function yn(e,t){let n=typeof e==`string`&&gt(e);if(n)return t.has(n)?e:null}function bn(e,t,n,r,i){let a=Zt(e.pathname,r),o=Zt(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!ut(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function xn(e,t){let n=ln(),r=Ze(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:ee,params:D,search:te,hash:O,state:k,mask:ne,reloadDocument:re,unsafeRelative:ie,from:ae,_fromLocation:oe,...se}=e,ce=s,A=on(),j=_n(e.search),le=_n(e.params),ue=_n(o),M=P.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,j,le,e.state,e.mask,e.unsafeRelative]),N=P.useCallback(e=>{let t=yn(ce,n.protocolAllowlist);if(t!==void 0)return[t??void 0];let r=n.buildLocation({_fromLocation:e,...M}),i=kn(r,n,v);return[i,!v&&(!i||gt(i))?void 0:bn(e,r,ue,n.basepath,A)]},[ue,v,A,M,n,ce]),[de,fe]=hn(n.stores.location,N,{compare:vn}),pe=fe===void 0?de:void 0,me=v||de===void 0,he=P.useRef(!1),ge=e.reloadDocument||pe||me?!1:c??n.options.defaultPreload,_e=l??n.options.defaultPreloadDelay??0,ve=P.useCallback(()=>{n.preloadRoute(M).catch(e=>{console.warn(e),console.warn(rn)})},[n,M]),ye=P.useCallback(e=>{if(!e){Dn(r);return}if(!(e.isIntersecting??ge===`intent`)){e.isIntersecting===!1&&Dn(r);return}if(!_e){ve();return}En.has(r)||En.set(r,setTimeout(()=>{En.delete(r),ve()},_e))},[ve,r,ge,_e]);if(Xe(r,ye,ge!==`viewport`),P.useEffect(()=>{he.current||ge===`render`&&(ve(),he.current=!0)},[ve,ge]),pe)return{...se,ref:r,href:pe,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let be=$e(fe?i:a,{})??(fe?Cn:Sn),xe=be.className,Se=b?xe?`${b} ${xe}`:b:xe,Ce=be.style,we=y&&Ce?{...y,...Ce}:y||Ce,Te=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!me&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...M,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:ee}))},Ee=()=>{ge===`intent`&&ve()},De=()=>{ge===`intent`&&Dn(r)};return{...se,...be,href:de,ref:r,onClick:On(x,Te),onBlur:On(S,De),onFocus:On(C,ye),onMouseEnter:On(w,ye),onMouseLeave:On(T,De),onTouchStart:On(E,Ee),disabled:!!me,target:_,...we&&{style:we},...Se&&{className:Se},...me&&wn,...fe&&Tn}}var Sn={},Cn={className:`active`},wn={role:`link`,"aria-disabled":!0},Tn={"data-status":`active`,"aria-current":`page`},En=new WeakMap,Dn=e=>{clearTimeout(En.get(e)),En.delete(e)},On=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function kn(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!vt(i,t.protocolAllowlist))return i}var An=P.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=xn(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;a=t}return P.createElement(n||`a`,a,o)});function jn(e){return!e||typeof window>`u`?!1:window.getComputedStyle(e).direction===`rtl`}var Mn=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function Nn(e){if(e.isContentEditable)return e;let t=e.closest(`[contenteditable]`);return t&&t.getAttribute(`contenteditable`)!==`false`?t:null}function Pn(e,t){if(!(e instanceof HTMLElement))return!1;let n=Nn(e);if(n){let e=typeof window<`u`?window.getSelection():null;return e&&e.rangeCount>0&&!e.isCollapsed?!0:(n.textContent??``).length>0}let r=e.tagName===`TEXTAREA`,i=e.tagName===`INPUT`&&Mn.has(e.type);if(!r&&!i)return!1;let{selectionStart:a,selectionEnd:o,value:s}=e;return a!==o||a==null?!0:t===`ArrowLeft`||t===`ArrowUp`||t===`Home`?a>0:t===`ArrowRight`||t===`ArrowDown`||t===`End`?a<s.length:!1}function Fn(e={}){let{itemSelector:t=`[role="menuitem"]`,boundarySelector:n,wrap:r=!0,onEscape:i,orientation:a=`vertical`,hasHomeEnd:o=!0,hasRovingTabIndex:s=!1,hasCaretGuard:c=!1}=e,l=(0,P.useRef)(null),u=(0,P.useCallback)(e=>e.getAttribute(`aria-disabled`)===`true`||e.disabled===!0||e.hasAttribute(`disabled`),[]),d=(0,P.useCallback)(()=>{let e=l.current;if(!e)return[];let r=Array.from(e.querySelectorAll(t));return n?r.filter(t=>t.closest(n)===e):r},[t,n]),f=(0,P.useCallback)(e=>{let t=l.current;if(!t||!n)return!0;let r=e.target;return!r||r.closest(n)===t},[n]),p=(0,P.useCallback)((e,t,n,r)=>{let i=e.length;if(i===0)return-1;let a=t;for(let t=0;t<i;t++){if(a<0||a>=i){if(!r)return-1;a=(a+i)%i}let t=e[a];if(t&&!u(t))return a;a+=n}return-1},[u]),m=(0,P.useCallback)(()=>{let e=d(),t=document.activeElement;return e.findIndex(e=>e===t||e.contains(t))},[d]),h=(0,P.useCallback)((e,t)=>{e.getAttribute(`tabindex`)!==String(t)&&e.setAttribute(`tabindex`,String(t))},[]),g=(0,P.useCallback)(()=>{let e=d(),t=e.filter(e=>!u(e));if(t.length===0)return;let n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0];for(let t of e)h(t,t===n?0:-1)},[d,u,h]);x(()=>{s&&g()});let _=(0,P.useCallback)((e,t)=>{let n=e[t];if(n){if(s)for(let t of e)h(t,t===n?0:-1);n.focus()}},[s,h]),v=(0,P.useCallback)(e=>{let t=d();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1));_(t,n)},[d,_]),y=(0,P.useCallback)(()=>{let e=d(),t=p(e,0,1,!1);return t!==-1&&(_(e,t),!0)},[d,p,_]),b=(0,P.useCallback)(()=>{let e=d(),t=p(e,e.length-1,-1,!1);return t!==-1&&(_(e,t),!0)},[d,p,_]),S=(0,P.useCallback)(()=>{s&&g()},[s,g]);return{listRef:l,handleKeyDown:(0,P.useCallback)(e=>{if(e.ctrlKey||e.metaKey||e.altKey||!f(e))return;if(e.key===`Escape`){i&&(e.preventDefault(),i());return}let t=a===`horizontal`||a===`both`,n=a===`vertical`||a===`both`,s=[],u=[];if(t){let t=e.key===`ArrowLeft`||e.key===`ArrowRight`?jn(l.current):!1;s.push(t?`ArrowLeft`:`ArrowRight`),u.push(t?`ArrowRight`:`ArrowLeft`)}n&&(s.push(`ArrowDown`),u.push(`ArrowUp`));let h=s.includes(e.key),g=u.includes(e.key),v=o&&e.key===`Home`,x=o&&e.key===`End`;if(!h&&!g&&!v&&!x||c&&(Pn(e.target,e.key)||Pn(document.activeElement,e.key)))return;let S=m(),C=d();if(h){let e=S===-1?0:S+1,t=p(C,e,1,r);t!==-1&&_(C,t)}else if(g){let e=S===-1?C.length-1:S-1,t=p(C,e,-1,r);t!==-1&&_(C,t)}else v?y():x&&b();e.preventDefault()},[m,d,r,a,o,c,p,_,y,b,i,f]),handleFocus:S,focusItem:v,focusFirst:y,focusLast:b,ownsEvent:f,getItems:d}}function In(){if(typeof navigator>`u`)return!1;let e=`userAgentData`in navigator?navigator.userAgentData:null;if(e&&typeof e==`object`&&`platform`in e){let t=e.platform,n=typeof t==`string`?t.trim():``;if(n!==``&&n.toLowerCase()!==`unknown`)return/mac/i.test(n)}return/Mac|iPhone|iPad|iPod/.test(navigator.platform??``)}var Ln={esc:`escape`,space:` `,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`,return:`enter`,plus:`+`};function Rn(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`}function zn(e,t,n){let r=e.toLowerCase().split(`+`).map(e=>e.trim()).filter(Boolean);if(r.length===0)return!1;let i=r[r.length-1],a=new Set(r.slice(0,-1)),o=a.has(`mod`),s=a.has(`ctrl`)||o&&!n,c=a.has(`meta`)||o&&n,l=a.has(`alt`),u=a.has(`shift`);if(t.ctrlKey!==s||t.metaKey!==c||t.altKey!==l||u&&!t.shiftKey)return!1;let d=Ln[i]??i;return t.key.toLowerCase()===d}function Bn(e){let t=(0,P.useRef)(e);(0,P.useEffect)(()=>{t.current=e}),(0,P.useEffect)(()=>{let e=In(),n=n=>{if(n.defaultPrevented)return;let r=Rn(n.target);for(let i of t.current)if(!i.isDisabled&&(!r||i.allowInInputs)&&zn(i.keys,n,e)){n.preventDefault(),i.onPress(n);return}};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[])}var Vn={wrapper:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`xzye2dw`,kmuXW:`x2lah0s`,$$css:!0}},Hn={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,enter:`↵`,backspace:`⌫`,escape:`Esc`,tab:`⇥`,up:`↑`,down:`↓`,left:`←`,right:`→`,plus:`+`};function Un(e,t){return e===`mod`?t?`⌘`:`Ctrl`:Hn[e]??e.toUpperCase()}var Wn={ctrl:`Control`,alt:`Alt`,shift:`Shift`,enter:`Enter`,backspace:`Backspace`,escape:`Escape`,tab:`Tab`,up:`Up arrow`,down:`Down arrow`,left:`Left arrow`,right:`Right arrow`,plus:`Plus`};function Gn(e,t){return e===`mod`?t?`Command`:`Control`:Wn[e]??e.toUpperCase()}function Kn(){return()=>{}}function qn(){return!1}function Jn({keys:e,ref:t,xstyle:n,className:r,style:i,...a}){let o=(0,P.useSyncExternalStore)(Kn,In,qn),s=e.split(`+`).map(e=>e.trim().toLowerCase()),c=s.map(e=>Gn(e,o)).join(` + `);return(0,I.jsx)(`span`,{...a,ref:t,role:`img`,"aria-label":c,...S(f(`kbd`),p(Vn.wrapper,n),r,i),children:s.map(e=>(0,I.jsx)(`kbd`,{"aria-hidden":`true`,className:`x3nfvp2 x6s0dn4 xl56j7k x16asifk x1grt7ep x7a5moj xx3sua9 x17x4s8c xlxy82 x1q0q8m5 xib2hle xv1l7n4 x9ynric x141an7d x1e4wzip x1ltkj2j x87ps6o`,children:Un(e,o)},e))})}Jn.displayName=`Kbd`;var Yn={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k9WMMc:`x2b8uid`,kOIVth:`x18g69wz`,k8WAf4:`xmfvnks`,kg3NbH:`xm7rs69`,$$css:!0},containerCompact:{kOIVth:`x1txdalj`,k8WAf4:`x1na6nto`,kg3NbH:`x1pzlopt`,$$css:!0}};function Xn({title:e,description:t,icon:n,actions:r,headingLevel:i=3,isCompact:a=!1,xstyle:o,className:s,style:c,ref:l,...u}){let d=`h${i}`;return(0,I.jsxs)(`div`,{ref:l,...u,role:`status`,...S(f(`empty-state`,{variant:a?`compact`:null}),p(Yn.container,a&&Yn.containerCompact,o),s,c),children:[n!=null&&(0,I.jsx)(`div`,{"aria-hidden":`true`,children:n}),(0,I.jsxs)(`div`,{className:`x78zum5 xdt5ytf x6s0dn4 xxc7z9f`,children:[(0,P.createElement)(d,S(f(`empty-state-title`,{variant:a?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0`},1:{className:`x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib`}}[!!a<<0]),e),t!=null&&(0,I.jsx)(`div`,{...S(f(`empty-state-description`,{variant:a?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4`},1:{className:`x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d`}}[!!a<<0]),children:t})]}),r!=null&&(0,I.jsx)(`div`,{...{0:{className:`x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d`},1:{className:`x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf`}}[!!a<<0],children:r})]})}Xn.displayName=`EmptyState`;var Zn={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},Qn={start:{kjj79g:`x1nhvcw1`,$$css:!0},center:{kjj79g:`xl56j7k`,$$css:!0},end:{kjj79g:`x13a6bvl`,$$css:!0},between:{kjj79g:`x1qughib`,$$css:!0},around:{kjj79g:`x1l1ennw`,$$css:!0},evenly:{kjj79g:`xaw8158`,$$css:!0}},$n={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},er={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},tr={stack:{k1xSpc:`x78zum5`,$$css:!0}},nr={0:{k1C7PZ:`x1o57wo1`,khm7nJ:`x6yxi7o`,$$css:!0},1:{k1C7PZ:`x1lfs0n9`,khm7nJ:`x1ngg2t4`,$$css:!0},2:{k1C7PZ:`xak3so`,khm7nJ:`x1x7z4sm`,$$css:!0},3:{k1C7PZ:`xewh9hi`,khm7nJ:`x4olc9o`,$$css:!0},4:{k1C7PZ:`xty4p9g`,khm7nJ:`xtx9w7w`,$$css:!0},5:{k1C7PZ:`x1eqhezk`,khm7nJ:`x1iu6piu`,$$css:!0},6:{k1C7PZ:`x3qlgwd`,khm7nJ:`xczp1bk`,$$css:!0},8:{k1C7PZ:`xicv188`,khm7nJ:`xgx0vcf`,$$css:!0},10:{k1C7PZ:`x1p37tyl`,khm7nJ:`x1xpicb7`,$$css:!0},"0.5":{k1C7PZ:`x1kihgfc`,khm7nJ:`x1tw44j4`,$$css:!0},"1.5":{k1C7PZ:`x1thn6ci`,khm7nJ:`xhq53yo`,$$css:!0}};function rr({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[tr.stack,$n[t],n!=null&&nr[n],e!=null&&Zn[e],r!=null&&Qn[r],i!=null&&er[i]]}var ir={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function ar({direction:e=`vertical`,hAlign:t,vAlign:n,justify:r,align:i,gap:o,padding:s,paddingInline:c,paddingInlineStart:l,paddingInlineEnd:u,paddingBlock:d,paddingBlockStart:m,paddingBlockEnd:g,isScrollable:y,width:b,height:x,maxWidth:C,minHeight:w,wrap:T,as:E=`div`,xstyle:ee,className:D,style:te,children:O,ref:k,...ne}){let re=t??(e===`horizontal`?r:i),ie=n??(e===`horizontal`?i:r),ae=e===`horizontal`?re:ie,oe=e===`horizontal`?ie:re,se=l??c??s,ce=u??c??s,A=m??d??s,j=g??d??s,le=p(...rr({direction:e,crossAlign:oe,mainAlign:ae,gap:o,wrap:T}),se!=null&&a[se],ce!=null&&_[ce],A!=null&&v[A],j!=null&&h[j],y&&ir.scrollable,ee),ue={...b!=null&&{width:typeof b==`number`?`${b}px`:b},...x!=null&&{height:typeof x==`number`?`${x}px`:x},...C!=null&&{maxWidth:typeof C==`number`?`${C}px`:C},...w!=null&&{minHeight:typeof w==`number`?`${w}px`:w}};return(0,P.createElement)(E,{ref:k,...S(f(`stack`,{direction:e,gap:o,wrap:T}),le,D,{...te,...ue}),...ne},O)}ar.displayName=`Stack`;function or({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,I.jsx)(ar,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}or.displayName=`VStack`;function sr({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,I.jsx)(ar,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}sr.displayName=`HStack`;function cr({data:e,size:t}){return(0,I.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`${t/16}rem`,height:`${t/16}rem`,style:{flexShrink:0},fill:`none`,"aria-hidden":`true`,focusable:`false`,children:e.map(([e,t],n)=>(0,P.createElement)(e,{...t,key:n}))})}var lr=P.createContext(void 0),ur=e=>{let t=P.useContext(lr);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},dr=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,I.jsx)(lr.Provider,{value:e,children:t})),fr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},pr=new class{#e=fr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function mr(e){setTimeout(e,0)}var hr=typeof window>`u`||`Deno`in globalThis;function gr(){}function _r(e,t){return typeof e==`function`?e(t):e}function vr(e){return typeof e==`number`&&e>=0&&e!==1/0}function yr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function L(e,t){return typeof e==`function`?e(t):e}function br(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Sr(o,t.options))return!1}else if(!wr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function xr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Cr(t.options.mutationKey)!==Cr(a))return!1}else if(!wr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Sr(e,t){return(t?.queryKeyHashFn||Cr)(e)}function Cr(e){return JSON.stringify(e,(e,t)=>kr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function wr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!wr(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!wr(e[r],t[r]))return!1;return!0}return!1}var Tr=Object.prototype.hasOwnProperty;function Er(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Or(e)&&Or(t);if(!r&&!(kr(e)&&kr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Tr.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Er(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Dr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Or(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kr(e){if(!Ar(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Ar(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Ar(e){return Object.prototype.toString.call(e)===`[object Object]`}function jr(e){return new Promise(t=>{pr.setTimeout(t,e)})}function Mr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Er(e,t)}function Nr(e){return e}function Pr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ir=Symbol();function Lr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ir?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rr(e,t){return typeof e==`function`?e(...t):!!e}function zr(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Br=()=>hr,Vr=()=>Br(),Hr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ur=new class extends Hr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Wr=mr;function Gr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Wr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Kr=Gr(),qr=new class extends Hr{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Jr(e){return Math.min(1e3*2**e,3e4)}function Yr(e){return(e??`online`)!==`online`||qr.isOnline()}var Xr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Zr(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(gr);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Xr(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Ur.isFocused()&&(e.networkMode===`always`||qr.isOnline())&&e.canRun(),p=()=>Yr(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Vr()?0:3),a=e.retryDelay??Jr,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),jr(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var Qr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vr(this.gcTime)&&(this.#e=pr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vr()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(pr.clearTimeout(this.#e),this.#e=void 0)}};function $r(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{zr(e,()=>t.signal,()=>n=!0)},u=Lr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Fr:Pr;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ti:ei,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ei(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ei(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ti(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ni(e,t){return t?ei(e,t)!=null:!1}function ri(e,t){return!t||!e.getPreviousPageParam?!1:ti(e,t)!=null}var ii=class extends Qr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=si(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=si(this.options);e.data!==void 0&&(this.setState(oi(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Mr(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(gr).catch(gr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>L(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ir||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>L(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!yr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Lr(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?$r(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Zr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Xr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Xr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ai(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...oi(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Kr.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ai(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function oi(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function si(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ci=class extends Hr{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ui(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return di(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return di(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof L(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Dr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&fi(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||L(this.options.enabled,this.#t)!==L(t.enabled,this.#t)||L(this.options.staleTime,this.#t)!==L(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||L(this.options.enabled,this.#t)!==L(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Dr(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(gr)),t}#h(e){return!Vr()&&L(this.options.enabled,this.#t)!==!1&&vr(e)}#g(){this.#b();let e=L(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=yr(this.#r.dataUpdatedAt,e)+1;this.#u=pr.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=pr.setInterval(()=>{(this.options.refetchIntervalInBackground||Ur.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(pr.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(pr.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ui(e,t),o=i&&fi(e,n,t,r);(a||o)&&(l={...l,...ai(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Mr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Mr(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:pi(e,t),refetch:this.refetch,isEnabled:L(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Dr(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Kr.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function li(e,t){return L(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||L(t.retryOnMount,e)!==!1)}function ui(e,t){return li(e,t)||e.state.data!==void 0&&di(e,t,t.refetchOnMount)}function di(e,t,n){if(L(t.enabled,e)!==!1&&L(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&pi(e,t)}return!1}function fi(e,t,n,r){return(e!==t||L(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&pi(e,n)}function pi(e,t){return L(t.enabled,e)!==!1&&e.isStaleByTime(L(t.staleTime,e))}var mi=P.createContext(!1),hi=()=>P.useContext(mi);mi.Provider;function gi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _i=P.createContext(gi()),vi=()=>P.useContext(_i),yi=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Rr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},bi=e=>{P.useEffect(()=>{e.clearReset()},[e])},xi=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Rr(n,[e.error,r])),Si=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ci=(e,t)=>e?.suspense&&t.isPending,wi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ti(e,t,n){let r=hi(),i=vi(),a=ur(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Si(o),yi(o,i,s),bi(i);let[l]=P.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(P.useSyncExternalStore(P.useCallback(e=>{let t=d?l.subscribe(Kr.batchCalls(e)):gr;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),P.useEffect(()=>{l.setOptions(o)},[o,l]),Ci(o,u))throw wi(o,l,i);if(xi({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Ei(e,t){return Ti(e,ci,t)}function Di(e){return e}function Oi(e){return e}var ki=(0,P.createContext)(null);ki.displayName=`LayoutAreaContext`;var Ai=(0,P.createContext)({hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1});Ai.displayName=`LayoutSlotsContext`;var ji=(0,P.createContext)(null);ji.displayName=`LayoutDividerContext`;var Mi={reset:{kAzted:`x2lwn1j`,k7Eaqz:`xeuugli`,$$css:!0}},Ni={center:{kSGwAc:`xamitd3`,$$css:!0},end:{kSGwAc:`xpvyfi4`,$$css:!0},start:{kSGwAc:`xqcrz7y`,$$css:!0},stretch:{kSGwAc:`xkh2ocl`,$$css:!0}},Pi={fill:{kzQI83:`x1iyjqo2`,$$css:!0},static:{kzQI83:`x1c4vz4f`,kmuXW:`x2lah0s`,$$css:!0}};function Fi({crossAlignSelf:e,size:t}={}){return[Mi.reset,Pi[t??`static`],e!=null&&Ni[e]]}function Ii(e){if(e==null||typeof e==`number`)return!0;let t=e.trim().toLowerCase();return t.includes(`%`)?!1:t===`0`||/^-?(?:\d+(?:\.\d+)?|\.\d+)[a-z]+$/.test(t)||/^(?:calc|min|max|clamp)\(/.test(t)}var R={layoutOuter:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,$$css:!0},layoutInner:{"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,"--layout-content-width":`x15lplax`,"--layout-alignment-width":`x19kr0ht`,$$css:!0},fill:{kZKoxP:`x12qplqi`,kskxy:`xenllk4`,$$css:!0},auto:{kAzted:`x1us19tq`,$$css:!0},middle:{kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,$$css:!0},middleQuery:{k9g6sI:`xsw3flo`,$$css:!0},singleColumnContent:{kzqmXN:`xh8yej3`,ks0D6T:`xjl2t3p xpgkkid`,kUOVxO:`xvueqy4`,$$css:!0},singlePanelMiddle:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,ks0D6T:`xjl2t3p xnpzo02`,kUOVxO:`xvueqy4 xb0m1lw`,$$css:!0},singleStartPanel:{kZCmMZ:`x1vvd0s7`,$$css:!0},singleEndPanel:{kwRFfy:`xxdn8bs`,$$css:!0},fullBleed:{"--layout-padding-outer-x":`x1wbjvqu`,"--layout-padding-outer-y":`xzxxx64`,$$css:!0}},Li={kzqmXN:`xh8yej3`,kUOVxO:`xvueqy4`,$$css:!0},Ri={contentWidthVar:e=>[{"--layout-content-width":(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x4906uf`,$$css:!0},{"--x---layout-content-width":(typeof e==`number`?`${e}px`:e)==null?void 0:typeof e==`number`?`${e}px`:e}],contentAlignmentWidthVar:e=>[{"--layout-alignment-width":(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x1b1nz06`,$$css:!0},{"--x---layout-alignment-width":(typeof e==`number`?`${e}px`:e)==null?void 0:typeof e==`number`?`${e}px`:e}],contentWidth:e=>[Li,{ks0D6T:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xf68679`,$$css:!0},{"--x-maxWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]};function zi({area:e,children:t}){return t==null?null:(0,I.jsx)(ki,{value:e,children:t})}var Bi={"x-default-marker":`x-default-marker`,$$css:!0};function Vi({children:e,content:t,contentWidth:n,defaultHasDividers:r,end:i,footer:a,header:o,height:s=`fill`,padding:u,ref:d,start:m,xstyle:h,className:g,style:_}){let v=s===`fill`,y=t??e,b=(0,P.useMemo)(()=>r==null?null:{defaultHasDividers:r},[r]),x=o!=null,C=a!=null,w=m!=null,T=i!=null,E=w&&T,ee=w!==T,D=n!=null&&Ii(n),te=(0,P.useMemo)(()=>({hasHeader:x,hasFooter:C,hasStart:w,hasEnd:T}),[x,C,w,T]),O=(0,I.jsx)(Ai,{value:te,children:(0,I.jsx)(`div`,{ref:d,...S(f(`layout`,{height:s}),p(R.layoutOuter,v?R.fill:R.auto,h),g,_),children:(0,I.jsxs)(`div`,{...p(Bi,R.layoutInner,...rr({direction:`vertical`}),v?R.fill:R.auto,u===0&&R.fullBleed,u!=null&&l[u],u!=null&&c[u],n!=null&&Ri.contentWidthVar(n),D&&Ri.contentAlignmentWidthVar(n)),children:[(0,I.jsx)(zi,{area:`header`,children:o}),(0,I.jsxs)(`div`,{...p(...rr({direction:`horizontal`}),R.middle,n!=null&&(!D||E)&&Ri.contentWidth(n),D&&!E&&R.middleQuery,D&&ee&&R.singlePanelMiddle,D&&w&&!T&&R.singleStartPanel,D&&!w&&T&&R.singleEndPanel),children:[(0,I.jsx)(zi,{area:`start`,children:m}),(0,I.jsx)(`div`,{...p(...Fi({size:`fill`}),D&&!w&&!T&&R.singleColumnContent),children:(0,I.jsx)(zi,{area:`content`,children:y})}),(0,I.jsx)(zi,{area:`end`,children:i})]}),(0,I.jsx)(zi,{area:`footer`,children:a})]})})});return b==null?O:(0,I.jsx)(ji,{value:b,children:O})}Vi.displayName=`Layout`;var Hi={header:{kmuXW:`x2lah0s`,$$css:!0},inner:{kB7OPa:`x9f619`,ks0D6T:`xjl2t3p`,kUOVxO:`xvueqy4`,kZCmMZ:`x139j0dd`,kwRFfy:`xpc6k2p`,kLKAdn:`x81pis9`,kGO01o:`xg476vw`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,"--container-padding-block-start":`xzz8v79`,"--container-padding-block-end":`xi9ns85`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},divider:{kt9PQ7:`xso031l`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Ui={sizing:e=>[{kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function Wi({children:e,hasDivider:t,height:n,label:r,padding:i,paddingBlockEnd:a,role:o,xstyle:c,className:l,style:u,ref:_,...v}){let y=(0,P.use)(ji),b=t??y?.defaultHasDividers??!1,x=i===0;return(0,I.jsx)(`div`,{ref:_,role:o,"aria-label":r,"data-divider":b||void 0,...S(f(`layout-header`),p(Hi.header,Ui.sizing(n??null),b&&Hi.divider,c),l,u),...v,children:(0,I.jsx)(`div`,{...p(Hi.inner,x&&Hi.fullBleed,i!=null&&g[i],i!=null&&d[i],i!=null&&s[i],i!=null&&m[i],a!=null&&h[a],a!=null&&m[a]),children:e})})}Wi.displayName=`LayoutHeader`;var Gi={content:{kB7OPa:`x9f619`,kZKoxP:`x5yr21d`,kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,kVQacm:`x7giv3`,kZCmMZ:`xwjyata`,kwRFfy:`x1peupej`,kLKAdn:`xqty4a x1ioh5az`,kGO01o:`xg476vw xsg11nj`,"--container-padding-inline-start":`x408pgh`,"--container-padding-inline-end":`xikqloz`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`xi9ns85`,$$css:!0},noStart:{kZCmMZ:`x139j0dd`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,$$css:!0},noEnd:{kwRFfy:`xpc6k2p`,$$css:!0},noHeader:{kLKAdn:`x81pis9`,"--container-padding-block-start":`xzz8v79`,$$css:!0},noFooter:{kGO01o:`xon7vh3`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},scrollable:{kVQacm:`xysyzu8`,$$css:!0},constrainedNoPanelsStart:{kZCmMZ:`xhlv5e7`,$$css:!0},constrainedNoPanelsEnd:{kwRFfy:`x1ahicqp`,$$css:!0},constrainedSingleStartPanel:{kwRFfy:`xy07wb4`,$$css:!0},constrainedSingleEndPanel:{kZCmMZ:`xxjme2g`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0}};function Ki({children:e,isScrollable:t=!0,padding:n,label:r,role:i,xstyle:a,className:o,style:c,ref:l,...u}){let{hasHeader:h,hasFooter:_,hasStart:v,hasEnd:y}=(0,P.use)(Ai),b=n===0;return(0,I.jsx)(`div`,{ref:l,role:i,"aria-label":r,...S(f(`layout-content`),p(Gi.content,!v&&!b&&n==null&&Gi.noStart,!y&&!b&&n==null&&Gi.noEnd,!h&&!b&&n==null&&Gi.noHeader,!_&&!b&&n==null&&Gi.noFooter,t&&Gi.scrollable,b&&Gi.fullBleed,n!=null&&g[n],n!=null&&d[n],n!=null&&s[n],n!=null&&m[n],!v&&!y&&!b&&Gi.constrainedNoPanelsStart,!v&&!y&&!b&&Gi.constrainedNoPanelsEnd,v&&!y&&!b&&Gi.constrainedSingleStartPanel,!v&&y&&!b&&Gi.constrainedSingleEndPanel,a),o,c),...u,children:e})}Ki.displayName=`LayoutContent`;function qi(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Ji(e,t=`|`){return e.map(e=>ya(e)).join(t)}function Yi(e,t){return typeof t==`bigint`?t.toString():t}var Xi=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Zi(e){return new Xi(e)}function Qi(e){return e==null}function $i(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ea(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function ta(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function na(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function ra(e){return na(e._zod.def)??e._zod.def.shape}function ia(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return ta(this,t,e),e},enumerable:!0,configurable:!0})}function aa(e,t,n){t in e?ta(e,t,n):e[t]=n}function oa(e,t,n,r){let i=ra(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ia(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):aa(e,a,r?r(n.value,a):n.value))}}function sa(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ia(e,n,()=>t[n]):aa(e,n,r.value))}}function ca(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function la(e){return JSON.stringify(e)}function ua(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var da=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function fa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var pa=Zi(()=>{if(so.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ma(e){if(fa(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return fa(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ha(e){return ma(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ga=new Set([`string`,`number`,`symbol`]);function _a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function va(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function z(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ya(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ba(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var xa={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Sa={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ca(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return oa(i,e,wa(e,t)),va(e,ca(n,{shape:i,checks:[]}))}function wa(e,t){let n=ra(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Ta(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(wa(e,t)),a={};return oa(a,e,Reflect.ownKeys(ra(e)).filter(e=>!i.has(e))),va(e,ca(n,{shape:a,checks:[]}))}function Ea(e,t){if(!ma(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=ra(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return va(e,ca(e._zod.def,{shape:Da(e,t)}))}function Da(e,t){let n={};return oa(n,e,Reflect.ownKeys(ra(e))),sa(n,t),n}function Oa(e,t){if(!ma(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return va(e,ca(e._zod.def,{shape:Da(e,t)}))}function ka(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return oa(n,e,Reflect.ownKeys(ra(e))),oa(n,t,Reflect.ownKeys(ra(t))),va(e,ca(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Aa(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(wa(t,n)):void 0,o={};return oa(o,t,Reflect.ownKeys(ra(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),va(t,ca(t._zod.def,{shape:o,checks:[]}))}function ja(e,t,n){let r=n?new Set(wa(t,n)):void 0,i={};return oa(i,t,Reflect.ownKeys(ra(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),va(t,ca(t._zod.def,{shape:i}))}function Ma(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Na(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Pa(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Fa(e){return typeof e==`string`?e:e?.message}function Ia(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function La(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Fa(e.inst?._zod.def?.error?.(e))??Fa(a?.(e))??Fa(t?.error?.(e))??Fa(n.customError?.(e))??Fa(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Ra=/[\uD800-\uDBFF]/;function za(e){let t=e.length;if(!Ra.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ba(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Va(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ha(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ua(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):qa(e,n,r.value)}}function Wa(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ga(e,t,n){return Wa(e,t,n,!1)}function Ka(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Wa(this,n,r(this))},set(e){Wa(this,n,e)}})}return t}function qa(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Wa(this,t,n.bind(this))},set(e){Wa(this,t,e)}})}function Ja(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ya,Xa=!1,Za={configurable:!0,get(){Xa=!0}};function B(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ya!==e._zod){Ya=void 0;return}Ya=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Za);let e=Xa;Xa=!1;try{let r=n(this);return Xa?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Xa||=e,r}catch(n){throw delete this[t],Xa||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Qa(e,t,n,r){let i=Ja(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var $a=`~constantCatch`;function eo(e){let t=()=>e;return t[$a]=!0,t}var to,no={value:void 0,enumerable:!1},ro=`captureStackTrace`in Error?Error:null;function io(e){let t=ro;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return ro=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function V(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){no.value=new a(r);try{Object.defineProperty(n,"_zod",no)}finally{no.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ua(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?io(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ao=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},oo=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(to=globalThis).__zod_globalConfig??(to.__zod_globalConfig={});var so=globalThis.__zod_globalConfig;function co(e){return e&&Object.assign(so,e),so}function lo(){let e=this._zod;return e.message??=JSON.stringify(e.def,Yi,2),e.message}function uo(e){this._zod.message=e}var fo={get:lo,set:uo,enumerable:!0,configurable:!0},po={value:void 0,enumerable:!1},mo=new WeakSet([Object.prototype,Error.prototype]),ho=(e,t)=>{e.name=`$ZodError`,po.value=t,Object.defineProperty(e,"issues",po),po.value=void 0,Object.defineProperty(e,"message",fo);let n=Object.getPrototypeOf(e);mo.has(n)||(mo.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},go=V(`$ZodError`,ho);V(`$ZodError`,ho,void 0,{Parent:Error});function _o(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function vo(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?_o(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function yo(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function bo(e,t){return{callee:t?.callee??e,Err:t?.Err}}var xo=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ao;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>La(e,o,co())));throw da(n,a?.callee??t),n}return s.value};return t},So=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>La(e,o,co())));throw da(n,a?.callee??t),n}return s.value};return t},Co=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ao;return a.issues.length?wo(e,a.issues,i):{success:!0,data:a.value}};function wo(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>La(e,n,co()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var To=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?wo(e,a.issues,i):{success:!0,data:a.value}},Eo=Symbol.for(`zod.compile.invalid`),Do=Symbol.for(`zod.compile.fallback`),Oo=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Eo)return!0;if(r.definite===!0&&n===void 0)return!1}return ko(e,t,n)});function ko(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Do]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new ao;return a.issues.length===0}var Ao=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},jo=e=>{let t=xo(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,bo(n,a))};return n},Mo=e=>{let t=xo(e),n=(e,r,i,a)=>t(e,r,i,bo(n,a));return n},No=e=>{let t=So(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,bo(n,a))};return n},Po=e=>{let t=So(e),n=async(e,r,i,a)=>await t(e,r,i,bo(n,a));return n},Fo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Co(e)(t,n,i)},Io=e=>(t,n,r)=>Co(e)(t,n,r),Lo=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return To(e)(t,n,i)},Ro=e=>async(t,n,r)=>To(e)(t,n,r),zo=/^[cC][0-9a-z]{6,}$/,Bo=/^[0-9a-z]+$/,Vo=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ho=/^[0-9a-vA-V]{20}$/,Uo=/^[A-Za-z0-9]{27}$/,Wo=/^[a-zA-Z0-9_-]{21}$/;function Go(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ko=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jo=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Yo=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xo=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Zo(){return new RegExp(Xo,`u`)}var Qo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$o=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,es=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ts=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ns=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rs=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,is=/^https?$/,as=/^\+[1-9]\d{6,14}$/,os=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function ss(e){return RegExp(`^${e}$`)}var cs=ss(os);function ls(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function us(e){return RegExp(`^${ls(e)}$`)}function ds(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${ls({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${ls({precision:e.precision})}`:n;return RegExp(`^${os}T(?:${r})$`)}var fs=/^[\s\S]{0,}$/,ps=/^-?\d+(?:\.\d+)?$/,ms=/^(?:true|false)$/i,hs=/^null$/i,gs=/^[^A-Z]*$/,_s=/^[^a-z]*$/,H=V(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vs=e=>{let t=e.value;return!Qi(t)&&t.length!==void 0},ys={number:`number`,bigint:`bigint`,object:`date`},bs=V(`$ZodCheckLessThan`,(e,t)=>{H.init(e,t);let n=ys[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:ys[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xs=V(`$ZodCheckGreaterThan`,(e,t)=>{H.init(e,t);let n=ys[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:ys[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ss=V(`$ZodCheckMultipleOf`,(e,t)=>{H.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ea(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Cs=V(`$ZodCheckNumberFormat`,(e,t)=>{H.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=xa[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ws=V(`$ZodCheckMaxLength`,(e,t)=>{var n;H.init(e,t),(n=e._zod.def).when??(n.when=vs),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?za(r):i)<=t.maximum)return;let a=Ba(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ts=V(`$ZodCheckMinLength`,(e,t)=>{var n;H.init(e,t),(n=e._zod.def).when??(n.when=vs),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?za(r):i)>=t.minimum)return;let a=Ba(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Es=V(`$ZodCheckLengthEquals`,(e,t)=>{var n;H.init(e,t),(n=e._zod.def).when??(n.when=vs),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?za(r):i;if(a===t.length)return;let o=Ba(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ds=V(`$ZodCheckStringFormat`,(e,t)=>{var n,r;H.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Os=V(`$ZodCheckRegex`,(e,t)=>{Ds.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ks=V(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=gs,Ds.init(e,t)}),As=V(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=_s,Ds.init(e,t)}),js=V(`$ZodCheckIncludes`,(e,t)=>{H.init(e,t);let n=_a(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ms=V(`$ZodCheckStartsWith`,(e,t)=>{H.init(e,t);let n=RegExp(`^${_a(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ns=V(`$ZodCheckEndsWith`,(e,t)=>{H.init(e,t);let n=RegExp(`.*${_a(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ps=V(`$ZodCheckOverwrite`,(e,t)=>{H.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Fs=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
452
- `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
453
- `)}\n};`)(...Object.values(this.closed))}},Is={major:4,minor:6,patch:4},U=V(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Is;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Ma(t),a;for(let o of n){if(o._zod.def.when){if(Na(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ao;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ia(t.issues,n,e),i||=Ma(t,n))});else{if(t.issues.length===n)continue;Ia(t.issues,n,e),i||=Ma(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Ma(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ao;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ao;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ga(this,`~standard`,zs(this))},set"~standard"(e){Wa(this,`~standard`,e)}}),Ls=(e,t)=>e.issues.length?{issues:e.issues.map(e=>La(e,t,co()))}:{value:e.value};async function Rs(e,t){let n={async:!0};return Ls(await e._zod.run({value:t,issues:[]},n),n)}function zs(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Ls(r,n)}catch{}return Rs(e,t)},vendor:`zod`,version:1}}var Bs=V(`$ZodString`,(e,t)=>{U.init(e,t),e._zod.pattern=t.pattern??fs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),W=V(`$ZodStringFormat`,(e,t)=>{Ds.init(e,t),Bs.init(e,t)}),Vs=V(`$ZodGUID`,(e,t)=>{t.pattern??=qo,W.init(e,t)}),Hs=V(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Jo(e)}else t.pattern??=Jo();W.init(e,t)}),Us=V(`$ZodEmail`,(e,t)=>{t.pattern??=Yo,W.init(e,t)});function Ws(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Gs(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Ws(e)||2:Ks(e,t)}function Ks(e,t){if(!t.normalize&&t.protocol?.source===is.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var qs=/[\t\n\r]/g;function Js(e){return e.replace(qs,``)}function Ys(e,t){return t.lastIndex=0,t.test(e.hostname)}function Xs(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Zs=V(`$ZodURL`,(e,t)=>{W.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Gs(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Js(r);return}t.hostname&&!Ys(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Xs(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Js(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Qs=V(`$ZodEmoji`,(e,t)=>{t.pattern??=Zo(),W.init(e,t)}),$s=V(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Wo:Go(t.length),W.init(e,t)}),ec=V(`$ZodCUID`,(e,t)=>{t.pattern??=zo,W.init(e,t)}),tc=V(`$ZodCUID2`,(e,t)=>{t.pattern??=Bo,W.init(e,t)}),nc=V(`$ZodULID`,(e,t)=>{t.pattern??=Vo,W.init(e,t)}),rc=V(`$ZodXID`,(e,t)=>{t.pattern??=Ho,W.init(e,t)}),ic=V(`$ZodKSUID`,(e,t)=>{t.pattern??=Uo,W.init(e,t)}),ac=V(`$ZodISODateTime`,(e,t)=>{t.pattern??=ds(t),W.init(e,t)}),oc=V(`$ZodISODate`,(e,t)=>{t.pattern??=cs,W.init(e,t)}),sc=V(`$ZodISOTime`,(e,t)=>{t.pattern??=us(t),W.init(e,t)}),cc=V(`$ZodISODuration`,(e,t)=>{t.pattern??=Ko,W.init(e,t)}),lc=V(`$ZodIPv4`,(e,t)=>{t.pattern??=Qo,W.init(e,t)}),uc=/^[0-9a-fA-F:.]+$/;function dc(e){return uc.test(e)?Ws(`http://[${e}]`):!1}var fc=V(`$ZodIPv6`,(e,t)=>{t.pattern??=$o,W.init(e,t),e._zod.check=n=>{dc(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),pc=V(`$ZodCIDRv4`,(e,t)=>{t.pattern??=es,W.init(e,t)});function mc(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:dc(n)}var hc=V(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ts,W.init(e,t),e._zod.check=n=>{mc(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function gc(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var _c=/^[0-9a-zA-Z+/]*={0,2}$/,vc=V(`$ZodBase64`,(e,t)=>{t.pattern??=_c,W.init(e,t),e._zod.check=n=>{gc(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),yc=/^[A-Za-z0-9_-]*$/;function bc(e){if(!yc.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return gc(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var xc=V(`$ZodBase64URL`,(e,t)=>{t.pattern??=yc,W.init(e,t),e._zod.check=n=>{bc(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Sc=V(`$ZodE164`,(e,t)=>{t.pattern??=as,W.init(e,t)});function Cc(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var wc=V(`$ZodJWT`,(e,t)=>{W.init(e,t),e._zod.check=n=>{Cc(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Tc=V(`$ZodNumber`,(e,t)=>{U.init(e,t),e._zod.pattern=ps,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Ec=V(`$ZodNumberFormat`,(e,t)=>{Cs.init(e,t),Tc.init(e,t)}),Dc=V(`$ZodBoolean`,(e,t)=>{U.init(e,t),e._zod.pattern=ms,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Oc=V(`$ZodNull`,(e,t)=>{U.init(e,t),e._zod.pattern=hs,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),kc=V(`$ZodUnknown`,(e,t)=>{U.init(e,t),e._zod.parse=e=>e}),Ac=V(`$ZodNever`,(e,t)=>{U.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function jc(e,t,n){e.issues.length&&t.issues.push(...Pa(n,e.issues)),t.value[n]=e.value}var Mc=V(`$ZodArray`,(e,t)=>{U.init(e,t);let n=so.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>jc(t,r,e)));else if(jc(c,r,e),s&&c.issues.length!==0&&Ma(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Nc(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Pa(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Pc=[];function Fc(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Pc,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ba(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Ic(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Ma(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Nc(e,n,i,t,d,f))):Nc(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Lc=V(`$ZodObject`,(e,t)=>{U.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Zi(()=>Fc(t));B(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||ta(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=fa,o=t.catchall,s,c=so.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Ma(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Nc(n,t,e,r,a,o))):Nc(s,t,e,r,a,o)}return o?Ic(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Rc=V(`$ZodObjectJIT`,(e,t)=>{Lc.init(e,t);let n=e._zod.parse,r=Zi(()=>Fc(t)),i=so.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Fs([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
454
- let ${e}_ab = false;
455
- for (let i = 0; i < ${e}.issues.length; i++) {
456
- const iss = ${e}.issues[i];
457
- iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
458
- payload.issues.push(iss);
459
- if (iss.continue !== true) ${e}_ab = true;
460
- }
461
- if (${e}_ab && ctx && ctx.abortEarly) {
462
- payload.value = newResult;
463
- return payload;
464
- }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:la(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
465
- const ${n}_present = ${i};
466
- if (!${n}.issues.length || ${n}_present) {
467
- if (${n}.issues.length) {${c(n,r)}
468
- }
469
-
470
- if (${e}) {
471
- newResult[${r}] = ${n}.value;
472
- }
473
- }
474
-
475
- `)}else f?(o.write(`
476
- if (${n}.issues.length) {${c(n,r)}
477
- }
478
- `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
479
- if (${n}.value !== undefined || ${i}) {
480
- newResult[${r}] = ${n}.value;
481
- }
482
- `)):o.write(`
483
- const ${n}_present = ${i};
484
- if (${n}.issues.length) {${c(n,r)}
485
- }
486
- if (!${n}_present && !${n}.issues.length) {
487
- payload.issues.push({
488
- code: "invalid_type",
489
- expected: "nonoptional",
490
- input: undefined,
491
- path: [${r}]
492
- });
493
- if (ctx && ctx.abortEarly) {
494
- payload.value = newResult;
495
- return payload;
496
- }
497
- }
498
-
499
- if (${n}_present) {
500
- newResult[${r}] = ${n}.value;
501
- }
502
-
503
- `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=fa,c=!so.jitless,l=c&&pa.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Ic([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function zc(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Ma(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>La(e,r,co())))}),t)}var Bc=V(`$ZodUnion`,(e,t)=>{U.init(e,t),B(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),B(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),B(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),B(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>$i(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>zc(t,r,e,i)):zc(o,r,e,i)}});function Vc(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Hc=V(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Bc.init(e,t);let n=e._zod.parse;B(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||ta(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=na(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=Zi(()=>Vc(t));e._zod.parse=(i,a)=>{let o=i.value;if(!fa(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Uc=V(`$ZodIntersection`,(e,t)=>{U.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Gc(e,t,n)):Gc(e,i,a)}});function Wc(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ma(e)&&ma(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Wc(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Wc(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Gc(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Wc(t.value,n.value);if(!c.valid){if(Ma(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Kc=V(`$ZodEnum`,(e,t)=>{U.init(e,t);let n=qi(t.entries),r=new Set(n);e._zod.values=r,B(e,`pattern`,e=>{let t=qi(e.def.entries).filter(e=>ga.has(typeof e));return RegExp(t.length?`^(${t.map(e=>_a(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qc=V(`$ZodLiteral`,(e,t)=>{U.init(e,t);let n=new Set(t.values);e._zod.values=n,B(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?_a(e):e?_a(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Jc=V(`$ZodTransform`,(e,t)=>{U.init(e,t),e._zod.optin=`optional`,so.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new oo(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new ao;return n.value=i,n}});function Yc(e,t){return e.value=t.issues.length?void 0:t.value,e}var Xc=V(`$ZodOptional`,(e,t)=>{U.init(e,t),B(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,B(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),B(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${$i(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Yc(e,t)):Yc(e,r)}return t.innerType._zod.run(e,n)}}),Zc=V(`$ZodExactOptional`,(e,t)=>{Xc.init(e,t),B(e,`values`,e=>e.def.innerType._zod.values),B(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Qc=V(`$ZodNullable`,(e,t)=>{U.init(e,t),B(e,`optin`,e=>e.def.innerType._zod.optin),B(e,`optout`,e=>e.def.innerType._zod.optout),B(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${$i(t.source)}|null)$`):void 0}),B(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$c=V(`$ZodDefault`,(e,t)=>{U.init(e,t),e._zod.optin=`defaulted`,B(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>el(e,t)):el(r,t)}});function el(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tl=V(`$ZodPrefault`,(e,t)=>{U.init(e,t),e._zod.optin=`defaulted`,B(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nl=V(`$ZodNonOptional`,(e,t)=>{U.init(e,t),B(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rl(t,e)):rl(i,e)}});function rl(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function il(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>La(e,r,co()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var al=V(`$ZodCatch`,(e,t)=>{U.init(e,t),B(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),B(e,`optout`,e=>e.def.innerType._zod.optout),B(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>il(e,r,t,n)):il(e,r,t,n)}}),ol=V(`$ZodPipe`,(e,t)=>{U.init(e,t),B(e,`values`,e=>e.def.in._zod.values),B(e,`optin`,e=>e.def.in._zod.optin),B(e,`optout`,e=>e.def.out._zod.optout),B(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>sl(e,t.in,n)):sl(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>sl(e,t.out,n)):sl(r,t.out,n)}});function sl(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var cl=V(`$ZodReadonly`,(e,t)=>{U.init(e,t),B(e,`propValues`,e=>e.def.innerType._zod.propValues),B(e,`values`,e=>e.def.innerType._zod.values),B(e,`optin`,e=>e.def.innerType?._zod?.optin),B(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ll):ll(r)}});function ll(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ul=V(`$ZodCustom`,(e,t)=>{H.init(e,t),U.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>dl(t,n,r,e));dl(i,n,r,e)}});function dl(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ha(e))}}var fl=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},pl=`~memo`,ml=[];function hl(e){return typeof e==`object`&&!!e}function gl(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var _l=new WeakMap,vl=0,yl=1,bl=2;function xl(e,t,n){let r=_l.get(e);if(r!==void 0)return r?bl:vl;if(t.has(e))return bl;t.add(e);let i=vl,a=e=>{if(i!==bl&&e?._zod){let r=xl(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=vl;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?yl:o.value?._zod?xl(o.value,t,n):vl;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=na(c);s(e?o(e,!0):yl),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?xl(r,t,!1):yl);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Sl(e,i)}function Sl(e,t){return t!==yl&&_l.set(e,t===bl),t}function Cl(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var wl,Tl=[],El={alloc(e,t,n){let r=wl;if(!r)return n;wl=void 0;let i={value:n,issues:null};return r.set(t.value,i),Tl.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Ol(n,e.value))throw new fl;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=xl(e,new Set,!1);if(i===vl)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===bl||r?n=!0:r=!0}let l=s.value;if(!hl(l))return t(s,c);let u=c[pl];u||(u={buckets:new WeakMap,backEdges:void 0},c[pl]=u);let d;i===c?d=a:(d=Cl(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...gl(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;wl=d;let p=Tl.length,m=t(s,c);wl=void 0;let h=Tl.length>p?Tl.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?gl(e.issues):ml),e)):(h&&(h.issues=m.issues.length?gl(m.issues):ml),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Dl(){return El}function Ol(e,t){let n=e[pl]?.backEdges;return n!==void 0&&hl(t)&&n.has(t)}var kl=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Va(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${ya(e.values[0])}`:`Invalid option: expected one of ${Ji(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${Ji(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Al(){return{localeError:kl()}}var jl,Ml=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Nl(){return new Ml}(jl=globalThis).__zod_globalRegistry??(jl.__zod_globalRegistry=Nl());var Pl=globalThis.__zod_globalRegistry;function Fl(e){return e.checks&&=[...e.checks],e}function Il(e,t){return new e(Fl({type:`string`,...z(t)}))}function Ll(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...z(t)})}function Rl(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...z(t)})}function zl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...z(t)})}function Bl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...z(t)})}function Vl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...z(t)})}function Hl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...z(t)})}function Ul(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...z(t)})}function Wl(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...z(t)})}function Gl(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...z(t)})}function Kl(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...z(t)})}function ql(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...z(t)})}function Jl(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...z(t)})}function Yl(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...z(t)})}function Xl(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...z(t)})}function Zl(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...z(t)})}function Ql(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...z(t)})}function $l(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...z(t)})}function eu(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...z(t)})}function tu(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...z(t)})}function nu(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...z(t)})}function ru(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...z(t)})}function iu(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...z(t)})}function au(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...z(t)})}function ou(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...z(t)})}function su(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...z(t)})}function cu(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...z(t)})}function lu(e,t){return new e(Fl({type:`number`,checks:[],...z(t)}))}function uu(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...z(t)})}function du(e,t){return new e({type:`boolean`,...z(t)})}function fu(e,t){return new e({type:`null`,...z(t)})}function pu(e){return new e({type:`unknown`})}function mu(e,t){return new e({type:`never`,...z(t)})}function hu(e,t){return new bs({check:`less_than`,...z(t),value:e,inclusive:!1})}function gu(e,t){return new bs({check:`less_than`,...z(t),value:e,inclusive:!0})}function _u(e,t){return new xs({check:`greater_than`,...z(t),value:e,inclusive:!1})}function vu(e,t){return new xs({check:`greater_than`,...z(t),value:e,inclusive:!0})}function yu(e,t){return new Ss({check:`multiple_of`,...z(t),value:e})}function bu(e,t){return new ws({check:`max_length`,...z(t),maximum:e})}function xu(e,t){return new Ts({check:`min_length`,...z(t),minimum:e})}function Su(e,t){return new Es({check:`length_equals`,...z(t),length:e})}function Cu(e,t){return new Os({check:`string_format`,format:`regex`,...z(t),pattern:e})}function wu(e){return new ks({check:`string_format`,format:`lowercase`,...z(e)})}function Tu(e){return new As({check:`string_format`,format:`uppercase`,...z(e)})}function Eu(e,t){return new js({check:`string_format`,format:`includes`,...z(t),includes:e})}function Du(e,t){return new Ms({check:`string_format`,format:`starts_with`,...z(t),prefix:e})}function Ou(e,t){return new Ns({check:`string_format`,format:`ends_with`,...z(t),suffix:e})}function ku(e){return new Ps({check:`overwrite`,tx:e})}function Au(e){return ku(t=>t.normalize(e))}function ju(){return ku(e=>e.trim())}function Mu(){return ku(e=>e.toLowerCase())}function Nu(){return ku(e=>e.toUpperCase())}function Pu(){return ku(e=>ua(e))}function Fu(e,t,n){return new e({type:`array`,element:t,...z(n)})}function Iu(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...z(n)})}function Lu(e,t){let n=Ru(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ha(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ha(r))}},e(t.value,t)),t);return n}function Ru(e,t){let n=new H({check:`custom`,...z(t)});return n._zod.check=e,n}function zu(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&ta(e,t,n[t]);return e}function Bu(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Pl,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Vu(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function G(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,G(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&zu(o.schema,c),t.io===`input`&&K(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Hu(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Uu(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Hu(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Hu(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
504
-
505
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Wu(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Wu(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Gu=new Set([`type`,`properties`,`required`,`additionalProperties`]),Ku=[`oneOf`,`anyOf`];function qu(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Ju(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Gu.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??qu(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}ta(n,r,e.length===1?e[0]:Ju(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=qu(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Yu(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Gu)if(t in e)return;let n=t.filter(e=>Ku.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Ju(t);else{let e=n[0],i=Ku.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Ju([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,zu(e,r))}function Xu(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):zu(i,s),zu(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Wu(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Yu(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}zu(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,ta(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Qu(t,`input`,e.processors),output:Qu(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function K(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return K(r.element,n);if(r.type===`set`)return K(r.valueType,n);if(r.type===`lazy`)return K(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return K(r.innerType,n);if(r.type===`intersection`)return K(r.left,n)||K(r.right,n);if(r.type===`record`||r.type===`map`)return K(r.keyType,n)||K(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:K(r.in,n)||K(r.out,n);if(r.type===`object`){for(let e in r.shape)if(K(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(K(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(K(e,n))return!0;return!!(r.rest&&K(r.rest,n))}return!1}var Zu=(e,t={})=>n=>{let r=Bu({...n,processors:t});return G(e,r),Uu(r,e),Xu(r,e)},Qu=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Bu({...i??{},target:a,io:t,processors:n});return G(e,o),Uu(o,e),Xu(o,e)},$u=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ed=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},td=(e,t)=>{$u(e,`minimum`,t),ed(e,`maximum`,t)},nd=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},rd=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},id=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ad=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},od=(e,t)=>$u(e,`minimum`,t.minimum),sd=(e,t)=>ed(e,`maximum`,t.maximum),cd=e=>(t,n)=>{ad(t,n.format);let[r,i]=e[n.format];$u(t,`minimum`,r),ed(t,`maximum`,i)},ld={greater_than:(e,t)=>$u(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>ed(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>nd(e,t.value),number_format:cd(xa),bigint_format:cd(Sa),min_length:od,max_length:sd,length_equals:(e,t)=>td(e,t.length),min_size:od,max_size:sd,size_equals:(e,t)=>td(e,t.size),string_format:(e,t)=>{ad(e,t.format),t.pattern&&rd(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>id(e,t.mime)};function ud(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)ld[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&$u(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&$u(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&ed(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&ed(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&nd(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&id(t,i.mime);for(let e of i.patterns??[])rd(t,e);return t}var dd={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fd=new Map([[_c,ns],[yc,rs]]),pd=e=>fd.get(e)??e,md=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=ud(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=dd[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(pd);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},hd=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=ud(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Vu(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},gd=(e,t,n,r)=>{n.type=`boolean`},_d=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},vd=(e,t,n,r)=>{n.not={}},yd=(e,t,n,r)=>{let i=e._zod.def,a=qi(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},bd=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Vu(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Vu(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},xd=(e,t,n,r)=>{Vu(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Sd=(e,t,n,r)=>{Vu(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Cd=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=ud(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=G(a.element,t,{...r,path:[...r.path,`items`]})};function wd(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?wd(t.out):t.type===`catch`?wd(t.innerType):e._zod.optin}var Td=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Vu(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)ta(i.properties,e,G(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?wd(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=G(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ed=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>G(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Dd=(e,t,n,r)=>{let i=e._zod.def,a=G(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=G(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Od=(e,t,n,r)=>{let i=e._zod.def,a=G(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},kd=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ad=Symbol();function jd(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Vu(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Ad):JSON.parse(o)}var Md=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=jd(i.defaultValue,e,t,n,r);o!==Ad&&(n.default=o)},Nd=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=jd(i.defaultValue,e,t,n,r);o!==Ad&&(n._prefault=o)},Pd=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Vu(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Fd=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;G(o,t,r);let s=t.seen.get(e);s.ref=o},Id=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ld=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Rd=new WeakSet([Object.prototype,Error.prototype]);function zd(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Bd=V(`ZodError`,(e,t)=>{go.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Rd.has(n)||(Rd.add(n),zd(n,`format`,e=>t=>yo(e,t)),zd(n,`flatten`,e=>t=>vo(e,t)),zd(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Yi,2)}),zd(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Yi,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Vd=xo(Bd),Hd=So(Bd),Ud=Co(Bd),Wd=To(Bd),Gd=jo(Bd),Kd=Mo(Bd),qd=No(Bd),Jd=Po(Bd),Yd=Fo(Bd),Xd=Io(Bd),Zd=Lo(Bd),Qd=Ro(Bd);function $d(){so.localeError||co(Al())}function ef(){so.memoizer||co({memoizer:Dl()})}var q=V(`ZodType`,(e,t)=>($d(),U.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(ca(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return va(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_p(e,t))},superRefine(e,t){return this.check(vp(e,t))},overwrite(e){return this.check(ku(e))},optional(){return $f(this)},exactOptional(){return tp(this)},nullable(){return rp(this)},nullish(){return $f(rp(this))},nonoptional(e){return lp(this,e)},array(){return X(this)},or(e){return Uf([this,e])},and(e){return qf(this,e)},transform(e){return pp(this,Zf(e))},default(e){return ap(this,e)},prefault(e){return sp(this,e)},catch(e){return dp(this,e)},pipe(e){return pp(this,e)},readonly(){return hp(this)},describe(e){let t=this.clone();return Pl.add(t,{description:e}),t},meta(...e){if(e.length===0)return Pl.get(this);let t=this.clone();return Pl.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ga(this,`~standard`,{...zs(this),jsonSchema:{input:Qu(this,`input`),output:Qu(this,`output`)}})},set"~standard"(e){Wa(this,`~standard`,e)},parse:function e(t,n){return Vd(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Hd(this,t,n,{callee:e})},safeParse(e,t){return Ud(this,e,t)},async safeParseAsync(e,t){return Wd(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Wa(this,`spa`,e)},validate(e,t){return Oo(this,e,t)},validateAsync(e,t){return Ao(this,e,t)},encode:function e(t,n){return Gd(this,t,n,{callee:e})},decode:function e(t,n){return Kd(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await qd(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Jd(this,t,n,{callee:e})},safeEncode(e,t){return Yd(this,e,t)},safeDecode(e,t){return Xd(this,e,t)},async safeEncodeAsync(e,t){return Zd(this,e,t)},async safeDecodeAsync(e,t){return Qd(this,e,t)},toJSONSchema(e){return Zu(this,{})(e)},get description(){return Pl.get(this)?.description},get _def(){return this._zod.def}}),tf=V(`_ZodString`,(e,t)=>{Bs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>md(e,t,n,r)},Ka({format:e=>ud(e).format??null,minLength:e=>ud(e).minimum??null,maxLength:e=>ud(e).maximum??null},{regex(...e){return this.check(Cu(...e))},includes(...e){return this.check(Eu(...e))},startsWith(...e){return this.check(Du(...e))},endsWith(...e){return this.check(Ou(...e))},min(...e){return this.check(xu(...e))},max(...e){return this.check(bu(...e))},length(...e){return this.check(Su(...e))},nonempty(...e){return this.check(xu(1,...e))},lowercase(e){return this.check(wu(e))},uppercase(e){return this.check(Tu(e))},trim(){return this.check(ju())},normalize(...e){return this.check(Au(...e))},toLowerCase(){return this.check(Mu())},toUpperCase(){return this.check(Nu())},slugify(){return this.check(Pu())}})),nf=V(`ZodString`,(e,t)=>{Bs.init(e,t),tf.init(e,t)},{email(e){return this.check(Ll(cf,e))},url(e){return this.check(Ul(ff,e))},jwt(e){return this.check(iu(Df,e))},emoji(e){return this.check(Wl(pf,e))},guid(e){return this.check(Rl(lf,e))},uuid(e){return this.check(zl(uf,e))},uuidv4(e){return this.check(Bl(uf,e))},uuidv6(e){return this.check(Vl(uf,e))},uuidv7(e){return this.check(Hl(uf,e))},nanoid(e){return this.check(Gl(mf,e))},cuid(e){return this.check(Kl(hf,e))},cuid2(e){return this.check(ql(gf,e))},ulid(e){return this.check(Jl(_f,e))},base64(e){return this.check(tu(wf,e))},base64url(e){return this.check(nu(Tf,e))},xid(e){return this.check(Yl(vf,e))},ksuid(e){return this.check(Xl(yf,e))},ipv4(e){return this.check(Zl(bf,e))},ipv6(e){return this.check(Ql(xf,e))},cidrv4(e){return this.check($l(Sf,e))},cidrv6(e){return this.check(eu(Cf,e))},e164(e){return this.check(ru(Ef,e))},datetime(e){return this.check(au(rf,e))},date(e){return this.check(ou(af,e))},time(e){return this.check(su(of,e))},duration(e){return this.check(cu(sf,e))}});function J(e){return Il(nf,e)}var Y=V(`ZodStringFormat`,(e,t)=>{W.init(e,t),tf.init(e,t)}),rf=V(`ZodISODateTime`,(e,t)=>{ac.init(e,t),Y.init(e,t)}),af=V(`ZodISODate`,(e,t)=>{oc.init(e,t),Y.init(e,t)}),of=V(`ZodISOTime`,(e,t)=>{sc.init(e,t),Y.init(e,t)}),sf=V(`ZodISODuration`,(e,t)=>{cc.init(e,t),Y.init(e,t)}),cf=V(`ZodEmail`,(e,t)=>{Us.init(e,t),Y.init(e,t)}),lf=V(`ZodGUID`,(e,t)=>{Vs.init(e,t),Y.init(e,t)}),uf=V(`ZodUUID`,(e,t)=>{Hs.init(e,t),Y.init(e,t)});function df(e){return zl(uf,e)}var ff=V(`ZodURL`,(e,t)=>{Zs.init(e,t),Y.init(e,t)}),pf=V(`ZodEmoji`,(e,t)=>{Qs.init(e,t),Y.init(e,t)}),mf=V(`ZodNanoID`,(e,t)=>{$s.init(e,t),Y.init(e,t)}),hf=V(`ZodCUID`,(e,t)=>{ec.init(e,t),Y.init(e,t)}),gf=V(`ZodCUID2`,(e,t)=>{tc.init(e,t),Y.init(e,t)}),_f=V(`ZodULID`,(e,t)=>{nc.init(e,t),Y.init(e,t)}),vf=V(`ZodXID`,(e,t)=>{rc.init(e,t),Y.init(e,t)}),yf=V(`ZodKSUID`,(e,t)=>{ic.init(e,t),Y.init(e,t)}),bf=V(`ZodIPv4`,(e,t)=>{lc.init(e,t),Y.init(e,t)}),xf=V(`ZodIPv6`,(e,t)=>{fc.init(e,t),Y.init(e,t)}),Sf=V(`ZodCIDRv4`,(e,t)=>{pc.init(e,t),Y.init(e,t)}),Cf=V(`ZodCIDRv6`,(e,t)=>{hc.init(e,t),Y.init(e,t)}),wf=V(`ZodBase64`,(e,t)=>{vc.init(e,t),Y.init(e,t)}),Tf=V(`ZodBase64URL`,(e,t)=>{xc.init(e,t),Y.init(e,t)}),Ef=V(`ZodE164`,(e,t)=>{Sc.init(e,t),Y.init(e,t)}),Df=V(`ZodJWT`,(e,t)=>{wc.init(e,t),Y.init(e,t)}),Of=V(`ZodNumber`,(e,t)=>{Tc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hd(e,t,n,r),e.isFinite=!0},Ka({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=ud(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=ud(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=ud(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>ud(e).format??null},{gt(e,t){return this.check(_u(e,t))},gte(e,t){return this.check(vu(e,t))},min(e,t){return this.check(vu(e,t))},lt(e,t){return this.check(hu(e,t))},lte(e,t){return this.check(gu(e,t))},max(e,t){return this.check(gu(e,t))},int(e){return this.check(jf(e))},safe(e){return this.check(jf(e))},positive(e){return this.check(_u(0,e))},nonnegative(e){return this.check(vu(0,e))},negative(e){return this.check(hu(0,e))},nonpositive(e){return this.check(gu(0,e))},multipleOf(e,t){return this.check(yu(e,t))},step(e,t){return this.check(yu(e,t))},finite(){return this}}));function kf(e){return lu(Of,e)}var Af=V(`ZodNumberFormat`,(e,t)=>{Ec.init(e,t),Of.init(e,t)});function jf(e){return uu(Af,e)}var Mf=V(`ZodBoolean`,(e,t)=>{Dc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gd(e,t,n,r)});function Nf(e){return du(Mf,e)}var Pf=V(`ZodNull`,(e,t)=>{Oc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_d(e,t,n,r)});function Ff(e){return fu(Pf,e)}var If=V(`ZodUnknown`,(e,t)=>{kc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Lf(){return pu(If)}var Rf=V(`ZodNever`,(e,t)=>{Ac.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vd(e,t,n,r)});function zf(e){return mu(Rf,e)}var Bf=V(`ZodArray`,(e,t)=>{ef(),Mc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cd(e,t,n,r),e.element=t.element},{min(e,t){return this.check(xu(e,t))},nonempty(e){return this.check(xu(1,e))},max(e,t){return this.check(bu(e,t))},length(e,t){return this.check(Su(e,t))},unwrap(){return this.element}});function X(e,t){return Fu(Bf,e,t)}var Vf=V(`ZodObject`,(e,t)=>{ef(),Rc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Td(e,t,n,r),Qa(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(ca(this._zod.def,{catchall:e}))},passthrough(){return this.clone(ca(this._zod.def,{catchall:Lf()}))},loose(){return this.clone(ca(this._zod.def,{catchall:Lf()}))},strict(){return this.clone(ca(this._zod.def,{catchall:zf()}))},strip(){return this.clone(ca(this._zod.def,{catchall:void 0}))},extend(e){return Ea(this,e)},safeExtend(e){return Oa(this,e)},merge(e){return ka(this,e)},pick(e){return Ca(this,e)},omit(e){return Ta(this,e)},partial(...e){return Aa(Qf,this,e[0])},exactPartial(...e){return Aa(ep,this,e[0],`exactPartial`)},required(...e){return ja(cp,this,e[0])}});function Z(e,t){return new Vf({type:`object`,shape:e,catchall:zf(),...z(t)})}var Hf=V(`ZodUnion`,(e,t)=>{Bc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ed(e,t,n,r),e.options=t.options});function Uf(e,t){return new Hf({type:`union`,options:e,...z(t)})}var Wf=V(`ZodDiscriminatedUnion`,(e,t)=>{Hf.init(e,t),Hc.init(e,t)});function Gf(e,t,n){return new Wf({type:`union`,options:t,discriminator:e,...z(n)})}var Kf=V(`ZodIntersection`,(e,t)=>{Uc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dd(e,t,n,r)});function qf(e,t){return new Kf({type:`intersection`,left:e,right:t})}var Jf=V(`ZodEnum`,(e,t)=>{Kc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yd(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Jf({...t,checks:[],...z(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Jf({...t,checks:[],...z(r),entries:i})}});function Q(e,t){return new Jf({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...z(t)})}var Yf=V(`ZodLiteral`,(e,t)=>{qc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bd(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function $(e,t){return new Yf({type:`literal`,values:Array.isArray(e)?e:[e],...z(t)})}var Xf=V(`ZodTransform`,(e,t)=>{ef(),Jc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sd(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new oo(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ha(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ha(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zf(e){return new Xf({type:`transform`,transform:e})}var Qf=V(`ZodOptional`,(e,t)=>{Xc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ld(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $f(e){return new Qf({type:`optional`,innerType:e})}var ep=V(`ZodExactOptional`,(e,t)=>{Zc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ld(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tp(e){return new ep({type:`optional`,innerType:e})}var np=V(`ZodNullable`,(e,t)=>{Qc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Od(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rp(e){return new np({type:`nullable`,innerType:e})}var ip=V(`ZodDefault`,(e,t)=>{$c.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Md(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ap(e,t){return new ip({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ha(t)}})}var op=V(`ZodPrefault`,(e,t)=>{tl.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sp(e,t){return new op({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ha(t)}})}var cp=V(`ZodNonOptional`,(e,t)=>{nl.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lp(e,t){return new cp({type:`nonoptional`,innerType:e,...z(t)})}var up=V(`ZodCatch`,(e,t)=>{al.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dp(e,t){return new up({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:eo(t)})}var fp=V(`ZodPipe`,(e,t)=>{ol.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fd(e,t,n,r),e.in=t.in,e.out=t.out});function pp(e,t){return new fp({type:`pipe`,in:e,out:t})}var mp=V(`ZodReadonly`,(e,t)=>{cl.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Id(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hp(e){return new mp({type:`readonly`,innerType:e})}var gp=V(`ZodCustom`,(e,t)=>{ul.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xd(e,t,n,r)});function _p(e,t={}){return Iu(gp,e,t)}function vp(e,t){return Lu(e,t)}function yp(e){return au(rf,e)}function bp(e){return ou(af,e)}var xp=J().min(1).refine(e=>!e.includes(`\0`)&&!/[\uD800-\uDFFF]/u.test(e),`Paths must be lossless Unicode strings without NUL.`),Sp=xp.refine(e=>!e.startsWith(`/`)&&!/^[A-Za-z]:/.test(e)&&!(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`).some(e=>e===`.`||e===`..`||e===``)),Cp=J().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/).refine(e=>!/^0+$/.test(e)),wp=Z({commitChanged:Nf(),trackedChanges:Nf(),untrackedChanges:Nf()}).nullable(),Tp=Sp.refine(e=>!e.endsWith(`/`)),Ep=Gf(`kind`,[Z({kind:$(`tracked`),path:Tp,xy:J().regex(/^[.MTAD]{2}$/).refine(e=>e!==`..`),submodule:wp}),Z({kind:$(`unmerged`),path:Tp,xy:Q([`DD`,`AU`,`UD`,`UA`,`DU`,`AA`,`UU`]),submodule:wp}),Z({kind:$(`untracked`),path:Sp,xy:Ff(),submodule:Ff()})]),Dp=Uf([Z({contract:$(`repository-status`),version:$(1),ok:$(!0),observation:Z({id:df(),startedAt:yp(),completedAt:yp(),consistency:$(`best-effort`)}),repository:Z({key:J().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:J().regex(/^worktree:[0-9a-f]{64}$/),rootPath:xp.refine(e=>e.startsWith(`/`)||/^[A-Za-z]:[/\\]/.test(e)||e.startsWith(`\\\\`)),objectFormat:Q([`sha1`,`sha256`])}),head:Gf(`state`,[Z({state:$(`branch`),branch:xp,commit:Cp}),Z({state:$(`detached`),branch:Ff(),commit:Cp}),Z({state:$(`unborn`),branch:xp,commit:Ff()})]),changes:X(Ep),summary:Z({staged:jf().nonnegative(),unstaged:jf().nonnegative(),untracked:jf().nonnegative(),conflicted:jf().nonnegative()}),checks:Z({state:$(`not-run`),reason:$(`git-status-only`)})}).superRefine((e,t)=>{e.head.commit&&e.head.commit.length!==(e.repository.objectFormat===`sha1`?40:64)&&t.addIssue({code:`custom`,message:`Object ID does not match objectFormat.`,path:[`head`,`commit`]});let n=new Set,r={staged:0,unstaged:0,untracked:0,conflicted:0};for(let i of e.changes)n.has(i.path)&&t.addIssue({code:`custom`,message:`Duplicate path.`,path:[`changes`]}),n.add(i.path),i.kind===`unmerged`?r.conflicted++:i.kind===`untracked`?r.untracked++:(i.xy[0]!==`.`&&r.staged++,i.xy[1]!==`.`&&r.unstaged++);for(let n of[`staged`,`unstaged`,`untracked`,`conflicted`])e.summary[n]!==r[n]&&t.addIssue({code:`custom`,message:`Summary does not match changes.`,path:[`summary`,n]})}),Z({contract:$(`repository-status`),version:$(1),ok:$(!1),error:Z({code:Q([`GIT_NOT_FOUND`,`GIT_CONTEXT_OVERRIDE`,`NOT_A_REPOSITORY`,`UNSUPPORTED_REPOSITORY`,`GIT_UNSUPPORTED`,`GIT_FAILED`,`INVALID_GIT_OUTPUT`,`UNSUPPORTED_PATH_ENCODING`,`REPOSITORY_CHANGED`,`READ_LIMIT_EXCEEDED`]),message:J().min(1)})})]),Op=Z({contract:$(`browser-http-error`),version:$(1),error:Z({code:Q([`BAD_REQUEST`,`FORBIDDEN`,`NOT_FOUND`,`METHOD_NOT_ALLOWED`,`SESSION_CHANGED`,`SERVER_CLOSING`,`INTERNAL_ERROR`]),message:J().min(1)})}),kp=J().regex(/^\d+\.\d+\.\d+$/),Ap=Z({status:Q([`checking`,`available`,`up-to-date`,`unavailable`,`disabled`]),latestVersion:kp.nullable()}).refine(e=>(e.status===`available`||e.status===`up-to-date`)==(e.latestVersion!==null),`latestVersion is set exactly when the check produced a result.`),jp=Z({contract:$(`browser-session`),version:$(2),sessionId:df(),repository:Z({key:J().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:J().regex(/^worktree:[0-9a-f]{64}$/)}),cliVersion:J().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/),update:Ap});Gf(`ok`,[Z({contract:$(`project-init`),version:$(5),ok:$(!0),outcome:Q([`planned`,`created`,`replaced`,`already-initialized`]),rootPath:J(),configPath:$(`.gitifact/config.json`),schemaVersion:$(2),baseline:Gf(`kind`,[Z({kind:$(`empty`)}),Z({kind:$(`commit`),objectFormat:Q([`sha1`,`sha256`]),commit:J()})]),agentDocs:Z({mode:Q([`install`,`remove`,`skip`]),paths:X(J())}),update:Ap,install:Z({npmGlobal:J().min(1)}).nullable()}),Z({contract:$(`project-init`),version:$(5),ok:$(!1),error:Z({code:J(),message:J()})})]);var Mp=Z({id:J(),title:J(),body:J()}),Np=Z({email:J(),name:J(),commits:kf().int().nonnegative(),latest:J()}),Pp=Z({title:J(),path:J().optional(),url:J().optional(),note:J().optional()}),Fp=Z({id:J(),path:J(),title:J(),description:J(),requirements:X(Mp),design:Z({title:J(),body:J(),requirements:X(J()),sources:X(Pp)}).optional(),contributors:X(Np),updatedAt:J().nullable()}),Ip=Z({id:J(),path:J(),title:J(),body:J(),updatedAt:J().nullable()}),Lp=J().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),Rp=Z({contract:$(`browser-specs`),version:$(4),sessionId:J(),head:Lp.nullable(),observedAt:J(),working:Nf(),features:X(Fp),documents:X(Ip),contributors:X(Np),contributorsLimited:Nf()}),zp=Z({id:J(),title:J(),specId:J(),path:J()}).nullable(),Bp=Mp.extend({specId:J(),path:J(),sources:X(Pp).optional()}).nullable(),Vp=Q([`created`,`modified`,`moved`,`deleted`]),Hp=Z({key:J(),commit:Lp,date:J(),author:J(),email:J(),committer:J(),message:J(),id:J(),kind:Q([`requirement`,`design`,`wiki`]),types:X(Vp),before:zp,after:zp,reasons:X(J())}),Up=Z({contract:$(`browser-history`),version:$(1),sessionId:J(),head:Lp,total:kf().int().nonnegative(),offset:kf().int().nonnegative(),events:X(Hp),boundary:Nf()}),Wp=Z({contract:$(`browser-history-summary`),version:$(1),sessionId:J(),head:Lp,total:kf().int().nonnegative(),byType:Z({created:kf().int().nonnegative(),modified:kf().int().nonnegative(),moved:kf().int().nonnegative(),deleted:kf().int().nonnegative()}),pulse:X(Z({date:J(),count:kf().int().positive()})),recent:X(Z({commit:Lp,count:kf().int().positive(),events:X(Hp)}))}),Gp=Z({contract:$(`browser-change`),version:$(1),sessionId:J(),event:Hp,before:Bp,after:Bp}),Kp=Z({contract:$(`browser-search`),version:$(1),sessionId:J(),query:J(),hits:X(Z({id:J(),kind:Q([`feature`,`requirement`,`design`,`document`,`history`]),title:J(),where:J(),line:J(),featureId:J().optional(),documentId:J().optional(),key:J().optional()}))}),qp=Lp,Jp=e=>J().regex(/^(0|[1-9]\d{0,6})$/).transform(Number).pipe(kf().int().min(0).max(e));Z({head:qp,offset:Jp(1e6).optional(),limit:Jp(100).pipe(kf().min(1)).optional(),kind:Vp.optional(),document:Q([`requirement`,`design`,`wiki`]).optional(),feature:J().regex(/^S-[a-z2-7]{10}$/).optional(),author:J().min(1).max(320).optional(),q:J().max(200).optional()}),Z({head:qp}),Z({key:J().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64}):[RSW]-[a-z2-7]{10}$/)}),Z({q:J().min(1).max(200),head:qp.optional()}),Z({lang:J().regex(/^[a-z]{2}(?:-[A-Z]{2})?$/).optional()});var Yp=X(J().min(1)),Xp=Z({version:J().regex(/^\d+\.\d+\.\d+$/),date:bp(),added:Yp,changed:Yp,removed:Yp,fixed:Yp}).refine(e=>e.added.length+e.changed.length+e.removed.length+e.fixed.length>0,`A version must list at least one change.`),Zp=Z({contract:$(`changelog`),version:$(1),language:J().regex(/^[a-z]{2}(?:-[A-Z]{2})?$/),fallback:Nf(),entries:X(Xp)}).superRefine((e,t)=>{let n=new Set;for(let[r,i]of e.entries.entries())n.has(i.version)&&t.addIssue({code:`custom`,path:[`entries`,r,`version`],message:`Duplicate version.`}),n.add(i.version)}),Qp=Q([`untracked`,`other-changes`,`commit-failed`]),$p=Z({state:Q([`not-requested`,`nothing`,`committed`,`skipped`]),commit:J().nullable(),paths:X(J()),message:J().nullable(),reason:Qp.nullable(),detail:J().nullable()}).refine(e=>e.state===`committed`==(e.commit!==null)&&e.state===`skipped`==(e.reason!==null),`commit is set exactly when committed, reason exactly when skipped.`);Gf(`ok`,[Z({contract:$(`update`),version:$(3),ok:$(!0),cliVersion:J().min(1),update:Ap,install:Z({npmGlobal:J().min(1)}).nullable(),agentDocs:Z({state:Q([`refreshed`,`current`,`not-initialized`,`no-block`]),paths:X(J()),missing:X(J())}),commit:$p}),Z({contract:$(`update`),version:$(3),ok:$(!1),error:Z({code:J(),message:J()})})]);var em=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`ApiError`}};async function tm(e,t={}){let n,r=new Headers(t.headers);r.set(`Accept-Language`,Ce());try{n=await fetch(e,{...t,headers:r,cache:`no-store`})}catch(e){throw e instanceof Error&&e.name===`AbortError`?e:new em(F(`api.networkError`),`NETWORK_ERROR`)}try{return{response:n,data:await n.json()}}catch{throw new em(F(`api.unreadableResponse`),`INVALID_RESPONSE`)}}var nm=8,rm=[`browser-session`,2,window.location.origin];function im(e){let t=Op.safeParse(e);throw t.success?new em(t.data.error.message,t.data.error.code):new em(F(`api.invalidContract`),`INVALID_RESPONSE`)}var am=()=>Di({queryKey:rm,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!0,refetchInterval:e=>e.state.data?.update.status===`checking`&&e.state.dataUpdateCount<nm&&1e3,queryFn:async({signal:e})=>{let{response:t,data:n}=await tm(`/api/v1/session`,{signal:e});if(!t.ok)return im(n);let r=jp.safeParse(n);if(!r.success)throw new em(F(`api.invalidSession`),`INVALID_RESPONSE`);return r.data}});function om(e){return[`repository-status`,1,window.location.origin,e.sessionId,e.repository.key,e.repository.worktreeKey]}async function sm(e,t,n){let{response:r,data:i}=await tm(`/api/v1/status`+(t?`/refresh`:``),{method:t?`POST`:`GET`,headers:{"X-Gitifact-Session":e.sessionId},...n?{signal:n}:{}}),a=Dp.safeParse(i);if(!a.success)return im(i);if(!a.data.ok)throw new em(a.data.error.message,a.data.error.code);if(!r.ok)throw new em(F(`api.statusMismatch`),`INVALID_RESPONSE`);if(a.data.repository.key!==e.repository.key||a.data.repository.worktreeKey!==e.repository.worktreeKey)throw new em(F(`api.otherCheckout`),`SESSION_CHANGED`);return a.data}var cm=e=>Di({queryKey:om(e),staleTime:5e3,retry:!1,queryFn:({signal:t})=>sm(e,!1,t)}),lm=e=>sm(e,!0);function um(){De();let e=Ei(am());return e.data?(0,I.jsx)(dm,{session:e.data}):(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:F(`project.local`)})}function dm({session:e}){De();let t=Ei(cm(e)).data?.repository.rootPath;return(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:t?.split(/[\/]/).filter(Boolean).at(-1)??F(`project.local`)})}async function fm(e,t,n,r){let{response:i,data:a}=await tm(t,{...r?{signal:r}:{},headers:{"X-Gitifact-Session":e.sessionId}});if(!i.ok)return im(a);let o=n.safeParse(a);if(!o.success)throw new em(F(`api.invalidSpecs`),`INVALID_RESPONSE`);if(o.data.sessionId!==e.sessionId)throw new em(F(`api.serverChanged`),`SESSION_CHANGED`);return o.data}var pm=e=>[window.location.origin,e.sessionId,e.repository.worktreeKey],mm=e=>Di({queryKey:[`browser-specs`,4,...pm(e)],staleTime:1/0,retry:!1,queryFn:({signal:t})=>fm(e,`/api/v1/specs`,Rp,t)}),hm=(e,t,n,r=50)=>Oi({queryKey:[`browser-history`,1,...pm(e),t,n,r],initialPageParam:0,staleTime:1/0,retry:!1,queryFn:({signal:i,pageParam:a})=>{let o=new URLSearchParams({head:t,offset:String(a),limit:String(r)});for(let[e,t]of Object.entries(n))t&&o.set(e,t);return fm(e,`/api/v1/history?`+o,Up,i)},getNextPageParam:e=>e.offset+e.events.length<e.total?e.offset+e.events.length:void 0}),gm=(e,t)=>Di({queryKey:[`browser-history-summary`,1,...pm(e),t],staleTime:1/0,retry:!1,queryFn:({signal:n})=>fm(e,`/api/v1/history/summary?head=`+t,Wp,n)}),_m=(e,t)=>Di({queryKey:[`browser-change`,1,...pm(e),t],staleTime:1/0,retry:!1,queryFn:({signal:n})=>fm(e,`/api/v1/change?key=`+encodeURIComponent(t),Gp,n)});function vm(e,t,n,r){let i=new URLSearchParams({q:t});return n&&i.set(`head`,n),fm(e,`/api/v1/search?`+i,Kp,r)}var ym=(e,t)=>Di({queryKey:[`changelog`,1,window.location.origin,e.sessionId,t],staleTime:1/0,retry:!1,queryFn:async({signal:n})=>{let{response:r,data:i}=await tm(`/api/v1/changelog?lang=`+t,{signal:n,headers:{"X-Gitifact-Session":e.sessionId}});if(!r.ok)return im(i);let a=Zp.safeParse(i);if(!a.success)throw new em(F(`api.invalidChangelog`),`INVALID_RESPONSE`);return a.data}}),bm={contract:`browser-session`,version:2,sessionId:``,repository:{key:``,worktreeKey:``},cliVersion:`0.0.0`,update:{status:`disabled`,latestVersion:null}},xm=/^\.(?:gitifact|tryce)\//;function Sm(){let e=Ei(am()),t=Ei({...mm(e.data??bm),enabled:!1}),n=Ei({...cm(e.data??bm),enabled:!!e.data&&!e.error}),r=t.data?.working,i=n.data?n.data.changes.some(e=>xm.test(e.path)):void 0;if(r!==void 0||i!==void 0)return!!r||!!i}var Cm=(0,P.createContext)(null);Cm.displayName=`DialogContext`;function wm(){return(0,P.use)(Cm)}function Tm(e,t=16){let n=e.getBoundingClientRect(),r=n.left+n.width/2-window.innerWidth/2,i=n.top+n.height/2-window.innerHeight/2,a=Math.sqrt(r*r+i*i)||1;return{x:Math.round(r/a*t),y:Math.round(i/a*t)}}`${r[`--spacing-4`]}`,`${r[`--spacing-4`]}`,`${r[`--spacing-4`]}`,`${r[`--spacing-4`]}`,`${r[`--spacing-4`]}`,`${r[`--spacing-4`]}`;var Em={dialog:{kVAEAm:`xixxii4`,kogj98:`x1bpp3o7`,kmVPX3:`x1717udv`,kWkggS:`x10xzikg`,"--_dialog-radius":`xvuvksw`,kaIpWk:`xuacgfc`,kGVxlE:`x1kcpxr7`,k1xSpc:`x1s85apg`,kXwgrk:`xdt5ytf`,kZKoxP:`xg7h5cd`,kZeWKH:`xish69e`,kSiTet:`xg01cxk`,k44tkh:`xqgcaz`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},open:{k1xSpc:`x78zum5`,kSiTet:`x1hc1fzr`,kKVMdj:`x1ewfqum x1aquc0h`,$$css:!0},backdrop:{kGyWv1:`xnixb3f`,kba3nw:`x1abwkk1`,$$css:!0},fullscreen:{kzqmXN:`x1o6l61p`,kZKoxP:`xtdtrs8`,ks0D6T:`xlbgzzq`,kskxy:`x1wj9ous`,kaIpWk:`x2u8bby`,kogj98:`x1ghz6dp`,kpwlN0:`x10a8y8t`,$$css:!0},fullscreenOpen:{kKVMdj:`xqcmdr3 x1aquc0h`,$$css:!0},fullscreenSafeArea:{kLKAdn:`x15ld1ci`,kGO01o:`x1rgxemn`,kZCmMZ:`xqmdmw x1i7f2ot`,kwRFfy:`x1by8st6 xtjjor6`,$$css:!0},inner:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kUk6DE:`x12lumcd`,kAzted:`x2lwn1j`,kVQacm:`xb3r6kr`,kaIpWk:`x1pjcqnp`,$$css:!0},inlineWrapper:{kmVPX3:`x1717udv`,kWkggS:`x10xzikg`,"--_dialog-radius":`xvuvksw`,kaIpWk:`xuacgfc`,kGVxlE:`x1kcpxr7`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kZKoxP:`xg7h5cd`,kZeWKH:`xish69e`,$$css:!0}},Dm=r[`--spacing-4`],Om=`min(100%, ${`calc(100dvw - ${Dm} - ${Dm})`})`;function km(e){return typeof e==`number`?`${e}px`:e}function Am(e,t){return{width:km(e),maxWidth:Om,maxHeight:km(t)}}var jm={kogj98:`x1ghz6dp`,$$css:!0},Mm={sizing:(e,t,n)=>[{kzqmXN:e==null?e:`x5lhr3w`,ks0D6T:t==null?t:`xf68679`,kskxy:n==null?n:`x1jols5v`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-maxWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(t),"--x-maxHeight":(e=>typeof e==`number`?e+`px`:e??void 0)(n)}],position:(e,t,n,r)=>[jm,{k87sOh:e==null?e:`xjbys53`,kLqNvP:t==null?t:`x1lxsm33`,kt4wiu:n==null?n:`xqxgn94`,krVfgx:r==null?r:`x1nqzi6q`,$$css:!0},{"--x-top":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-insetInlineStart":(e=>typeof e==`number`?e+`px`:e??void 0)(t),"--x-insetInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(n),"--x-bottom":(e=>typeof e==`number`?e+`px`:e??void 0)(r)}]};function Nm(e){return typeof e==`number`?`${e}px`:e}function Pm(e){let{top:t,bottom:n,start:r,end:i}=e;return{top:t===void 0?`auto`:Nm(t),bottom:n===void 0?`auto`:Nm(n),insetInlineStart:r===void 0?`auto`:Nm(r),insetInlineEnd:i===void 0?`auto`:Nm(i)}}function Fm({isOpen:e,isInline:t=!1,onOpenChange:r,width:i=400,maxHeight:a=`75dvh`,position:c,variant:l=`standard`,purpose:u=`info`,padding:h,children:_,xstyle:v,className:x,style:C,ref:w,...T}){let E=h==null,D=h??4,te=n[D],O=l===`fullscreen`,k=O?null:Am(i,a),ne=(0,P.useId)(),re=(0,P.useMemo)(()=>({isInline:t,titleId:ne}),[t,ne]),ie=T[`aria-label`]!=null||T[`aria-labelledby`]!=null,ae=(0,P.useRef)(null),oe=(0,P.useCallback)(e=>{ae.current=e,e&&!ie&&(e.querySelector(`#${CSS.escape(ne)}`)==null?e.removeAttribute(`aria-labelledby`):e.setAttribute(`aria-labelledby`,ne))},[ne,ie]),se=ee(w,oe),A=(0,P.useRef)(null),j=u!==`required`,le=u===`info`;(0,P.useEffect)(()=>{if(t)return;let n=ae.current;if(n){if(e){A.current=document.activeElement;let e=A.current;if(e&&e!==document.body){let t=Tm(e);n.style.setProperty(`--dialog-dir-x`,`${t.x}px`),n.style.setProperty(`--dialog-dir-y`,`${t.y}px`)}else n.style.setProperty(`--dialog-dir-x`,`0px`),n.style.setProperty(`--dialog-dir-y`,`16px`);if(!n.open){n.showModal();let e=n.querySelector(`[data-autofocus]`);e&&e.focus()}}else n.open&&n.close(),A.current?.focus(),A.current=null}},[e,t]),pe(e&&!t);let{shouldDismissOnCloseRequest:ue}=b({isActive:e,isEnabled:!t,escapeBehavior:j?`close`:`block`,onDismiss:()=>{r(!1)}}),M=(0,P.useRef)(!1);(0,P.useEffect)(()=>{let n=ae.current?.querySelector(`#${CSS.escape(ne)}`)!=null;e&&!t&&!ie&&!n&&!M.current&&(M.current=!0)},[e,t,ie,ne]);let N=e=>{e.target===e.currentTarget&&le&&r(!1)},de=e=>{e.preventDefault(),ue()&&j&&r(!1)},fe=(0,I.jsx)(`div`,{...p(Em.inner,...me(E?{useThemeDefault:`dialog`,maxHeight:k?.maxHeight}:{paddingInnerX:te,paddingInnerY:te,paddingOuterX:te,paddingOuterY:te,maxHeight:k?.maxHeight}),!E&&D!==4&&g[D],!E&&D!==4&&d[D],!E&&D!==4&&s[D],!E&&D!==4&&m[D],O&&E&&Em.fullscreenSafeArea),children:(0,I.jsx)(Cm,{value:re,children:_})}),he=c!=null&&!O,{open:ge,..._e}=T;return t?e?(0,I.jsx)(`div`,{..._e,...S(f(`dialog`,{variant:l}),p(Em.inlineWrapper,o.reset,k&&Mm.sizing(k.width,k.maxWidth,k.maxHeight),O&&Em.fullscreen,v),x,C),"data-testid":T[`data-testid`],children:(0,I.jsx)(y,{children:fe})}):null:(0,I.jsx)(`dialog`,{ref:se,..._e,...S(f(`dialog`,{variant:l}),ce.focusVisible(Em.dialog,o.reset,e&&Em.open,Em.backdrop,k&&Mm.sizing(k.width,k.maxWidth,k.maxHeight),he&&(()=>{let e=Pm(c);return Mm.position(e.top,e.insetInlineStart,e.insetInlineEnd,e.bottom)})(),O&&Em.fullscreen,O&&e&&Em.fullscreenOpen,v),x,C),onClick:N,onCancel:de,"aria-modal":`true`,...u===`required`?{role:`alertdialog`}:void 0,children:(0,I.jsx)(y,{children:fe})})}Fm.displayName=`Dialog`;var Im={footer:{kmuXW:`x2lah0s`,$$css:!0},inner:{kB7OPa:`x9f619`,ks0D6T:`xjl2t3p`,kUOVxO:`xvueqy4`,kZCmMZ:`x139j0dd`,kwRFfy:`xpc6k2p`,kLKAdn:`xqty4a`,kGO01o:`xon7vh3`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},divider:{kEafiO:`x178xt8z`,kPef9Z:`x13fuv20`,kLZC3w:`x1pc3f07`,$$css:!0}},Lm={sizing:e=>[{kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function Rm({children:e,hasDivider:t,height:n,label:r,padding:i,role:a,xstyle:o,className:c,style:l,ref:u,...h}){let _=(0,P.use)(ji),v=t??_?.defaultHasDividers??!1,y=i===0;return(0,I.jsx)(`div`,{ref:u,role:a,"aria-label":r,"data-divider":v||void 0,...S(f(`layout-footer`),p(Im.footer,Lm.sizing(n??null),v&&Im.divider,o),c,l),...h,children:(0,I.jsx)(`div`,{...p(Im.inner,y&&Im.fullBleed,i!=null&&g[i],i!=null&&d[i],i!=null&&s[i],i!=null&&m[i]),children:e})})}Rm.displayName=`LayoutFooter`;function zm({isOpen:e,highlightedIndex:t,setHighlightedIndex:n,getOptionId:r,itemCount:i}){let a=(0,P.useRef)(!1),o=(0,P.useCallback)(e=>{e!==t&&(a.current=!0),n(e)},[t,n]);return(0,P.useEffect)(()=>{if(a.current){a.current=!1;return}!e||t<0||document.getElementById(r(t))?.scrollIntoView?.({block:`nearest`})},[e,t,r,i]),o}var Bm=1;function Vm(e){let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t}function Hm({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:r,anchorRef:i}){let[a,o]=(0,P.useState)(0),[s,c]=(0,P.useState)(!1),l=(0,P.useCallback)((e,t)=>{o(e),c(t)},[]);return x(()=>{if(!e){l(0,!1);return}if(!r.current||!i.current){l(0,!0);return}let a=`${n}-item-${t>=0?t:0}`,o=document.getElementById(a);if(!o){l(0,!0);return}let s=r.current,c=i.current.getBoundingClientRect(),u=s.offsetHeight;if(u<=0){l(0,!0);return}let d=Vm(o)-Vm(s)-s.scrollTop+o.offsetHeight/2,f=c.top+c.height/2-d-Bm,p=window.innerHeight,m=Math.max(0,p-u),h=Math.min(Math.max(f,0),m),g=Math.max(0,c.bottom-h);l(g,!0)},[e,t,n,r,i,l]),{offset:a,isPositioned:s}}function Um({selectableItems:e,value:t,isDisabled:n=!1,isOpen:r,hasSearch:i=!1,onOpen:a,onClose:o,onSelect:s,onClear:c,onSearchSeed:l,listboxId:u}){let[d,f]=(0,P.useState)(-1),p=(0,P.useCallback)(e=>`${u}-item-${e}`,[u]),m=(0,P.useCallback)(()=>e.map((e,t)=>e.disabled?-1:t).filter(e=>e>=0),[e]),h=(0,P.useCallback)(()=>e.findIndex(e=>e.value===t),[e,t]),g=(0,P.useCallback)(()=>{f(-1),o()},[o]),_=(0,P.useCallback)(e=>{e.disabled||(s?.(e.value),g())},[s,g]),v=(0,P.useCallback)(()=>{if(!n){if(r)g();else if(a()!==!1&&!i){let e=h();f(e>=0?e:0)}}},[n,r,a,g,h,i]),y=zm({isOpen:r,highlightedIndex:d,setHighlightedIndex:f,getOptionId:p}),b=(0,P.useCallback)((e,t)=>{e.disabled||y(t)},[y]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:p,onTriggerClick:v,onKeyDown:(0,P.useCallback)(o=>{if(n)return;let s=m();switch(o.key){case`ArrowDown`:if(o.preventDefault(),!r)a()!==!1&&f(0);else{let e=s.indexOf(d),t=Math.min(e+1,s.length-1);f(s[t]??d)}break;case`ArrowUp`:if(o.preventDefault(),!r)a()!==!1&&f(e.length-1);else{let e=s.indexOf(d),t=Math.max(e-1,0);f(s[t]??d)}break;case` `:if(i)break;case`Enter`:if(o.preventDefault(),r&&d>=0){let t=e[d];t&&!t.disabled&&_(t)}else if(!r&&a()!==!1&&!i){let e=h();f(e>=0?e:0)}break;case`Escape`:r&&(o.preventDefault(),g());break;case`Tab`:r&&g();break;case`Home`:o.preventDefault(),r&&s.length>0&&f(s[0]);break;case`End`:o.preventDefault(),r&&s.length>0&&f(s[s.length-1]);break;case`PageUp`:o.preventDefault(),r&&s.length>0&&f(s[0]);break;case`PageDown`:o.preventDefault(),r&&s.length>0&&f(s[s.length-1]);break;case`Delete`:case`Backspace`:!i&&!r&&c!=null&&t!=null&&(o.preventDefault(),c());break;default:i&&l&&o.key.length===1&&!o.ctrlKey&&!o.metaKey&&(r||a()!==!1)&&l(o.key)}},[n,r,a,g,e,d,_,h,m,i,c,l,t]),onItemSelect:_,onItemMouseEnter:b}}var Wm=(0,P.createContext)(null);Wm.displayName=`CommandPaletteContext`;function Gm(){return(0,P.use)(Wm)}var Km={list:{kORKVm:`x1odjw0f`,kskxy:`xmz0i5r`,kmVPX3:`x9epnlk`,kUk6DE:`x98rzlu`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,$$css:!0}};function qm({children:e,label:t,ref:n,xstyle:r,className:i,style:a,...o}){let s=A(),c=t??s(`@astryx.commandPalette.list.label`),l=Gm();return(0,I.jsx)(`div`,{ref:n,...o,id:l?.listId,role:`listbox`,"aria-label":c,...S(f(`command-palette-list`),p(Km.list,r),i,a),children:e})}qm.displayName=`CommandPaletteList`;var Jm={item:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,kg3NbH:`xrrkdod`,k8WAf4:`xce4md1`,kaIpWk:`xx3sua9`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,kfSwDN:`x87ps6o`,$$css:!0},itemHighlighted:{kWkggS:`x1lmrjuc`,$$css:!0},itemDisabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},itemSelected:{kWkggS:`xgcxg3y`,$$css:!0}};function Ym({value:e,onSelect:t,isHighlighted:n,isSelected:r,isDisabled:i=!1,children:a,ref:o,xstyle:s,className:c,style:l,onClick:u,onMouseEnter:d,...m}){let h=Gm(),g=wm()?.isInline===!0,_=(0,P.useRef)(null),v=(0,P.useRef)(!1),y=(0,P.useMemo)(()=>h?.selectableItems.findIndex(t=>t.value===e)??-1,[h?.selectableItems,e]),b=n??(h?h.highlightedIndex===y&&y>=0:!1),x=r??(h?h.value===e:!1);(0,P.useEffect)(()=>{if(h)return;let e=g&&!v.current;v.current=!0,!e&&b&&_.current&&_.current.scrollIntoView?.({block:`nearest`})},[h,b,g]);let C=(0,P.useCallback)(()=>{i||(t?.(e),h&&(h.selectItem(e),h.onClose()))},[i,e,t,h]);return(0,I.jsx)(`div`,{ref:ee(o,_),...m,id:h&&y>=0?h.getItemId(y):void 0,role:`option`,"aria-selected":x,"aria-disabled":i||void 0,"data-value":e,onClick:Re(u,C),onMouseEnter:d,...S(f(`command-palette-item`),p(Jm.item,!i&&j.backgroundColor,b&&Jm.itemHighlighted,x&&Jm.itemSelected,i&&Jm.itemDisabled,s),c,l),children:a})}Ym.displayName=`CommandPaletteItem`;var Xm={group:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,k8WAf4:`xu0wf1k`,$$css:!0}};function Zm({heading:e,children:t,ref:n,xstyle:r,className:i,style:a,...o}){return(0,I.jsxs)(`div`,{ref:n,role:`group`,"aria-label":e,...S(f(`command-palette-group`),p(Xm.group,r),i,a),...o,children:[(0,I.jsx)(`div`,{"aria-hidden":`true`,...S(f(`command-palette-group-heading`),{className:`xrrkdod xu0wf1k x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o`}),children:e}),t]})}Zm.displayName=`CommandPaletteGroup`;var Qm={wrapper:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kg3NbH:`x1pzlopt`,k8WAf4:`x8o8v82`,kmuXW:`x2lah0s`,$$css:!0}};function $m({value:e,onValueChange:t,placeholder:n,label:r,hasAutoFocus:i=!0,endContent:a,onChange:o,onKeyDown:s,ref:c,xstyle:l,className:u,style:d,...m}){let h=A(),g=n??h(`@astryx.commandPalette.input.placeholder`),_=Gm(),v=wm(),y=(0,P.useRef)(null),b=e??_?.search,x=t??_?.setSearch,C=i&&v?.isInline!==!0;(0,P.useEffect)(()=>{C&&y.current&&requestAnimationFrame(()=>{y.current?.focus()})},[C]);let w=(0,P.useCallback)(e=>{s?.(e),!e.defaultPrevented&&_?.onKeyDown(e)},[_,s]);return(0,I.jsxs)(`div`,{...S(f(`command-palette-input`),p(Qm.wrapper,l),u,d),children:[(0,I.jsx)(`span`,{className:`x78zum5 x6s0dn4 x2lah0s xv1l7n4`,children:(0,I.jsx)(M,{icon:`search`,size:`sm`,color:`inherit`})}),(0,I.jsx)(`input`,{ref:ee(c,y),type:`text`,role:`combobox`,"aria-expanded":_?.isOpen??!0,"aria-autocomplete":`list`,"aria-controls":_?.listId,"aria-activedescendant":_&&_.highlightedIndex>=0?_.getItemId(_.highlightedIndex):void 0,"aria-label":r??g,placeholder:g,value:b,"data-autofocus":C||void 0,onChange:e=>{x?.(e.target.value),o?.(e)},onKeyDown:w,className:`x98rzlu xeuugli x1a2a7pz xjbqb8w x1tgivj0 x9ynric xjm74w1 x6pjikd xw6l6zx x1717udv xeyghm5`,...m}),(_?.isBusy||a)&&(0,I.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw x2lah0s`,children:[_?.isBusy&&(0,I.jsx)(`span`,{className:`x78zum5 x6s0dn4 x2lah0s xv1l7n4 x1hc1fzr x19991ni xjd9b36 x5h36tt x4itv7f`,children:(0,I.jsx)(T,{size:`sm`})}),a]}),` `]})}$m.displayName=`CommandPaletteInput`;var eh={footer:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x18g69wz`,kg3NbH:`x1pzlopt`,k8WAf4:`xce4md1`,kmuXW:`x2lah0s`,kMv6JI:`x9ynric`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,kMwMTN:`xv1l7n4`,$$css:!0}};function th({children:e,ref:t,xstyle:n,className:r,style:i,...a}){let o=A();return(0,I.jsx)(`div`,{ref:t,...S(f(`command-palette-footer`),p(eh.footer,n),r,i),...a,children:e??(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw`,children:[(0,I.jsx)(Jn,{keys:`up`}),(0,I.jsx)(Jn,{keys:`down`}),o(`@astryx.commandPalette.footer.navigate`)]}),(0,I.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw`,children:[(0,I.jsx)(Jn,{keys:`enter`}),o(`@astryx.commandPalette.footer.select`)]}),(0,I.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw`,children:[(0,I.jsx)(Jn,{keys:`escape`}),o(`@astryx.commandPalette.footer.close`)]})]})})}th.displayName=`CommandPaletteFooter`;var nh={empty:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k8WAf4:`xmfvnks`,kg3NbH:`x1pzlopt`,kMv6JI:`x9ynric`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,kMwMTN:`xv1l7n4`,k9WMMc:`x2b8uid`,$$css:!0}};function rh({ref:e,children:t,xstyle:n,className:r,style:i,...a}){return(0,I.jsx)(`div`,{ref:e,...S(f(`command-palette-empty`),p(nh.empty,n),r,i),...a,children:t})}rh.displayName=`CommandPaletteEmpty`;function ih(e){let t=e.auxiliaryData;return typeof t?.group==`string`?t.group:void 0}function ah(e){if(!e.some(e=>ih(e)!=null))return e.map(e=>({value:e.id,label:e.label}));let t=[],n=new Map,r=[];for(let i of e){let e=ih(i);e==null?r.push(i):(n.has(e)||(t.push(e),n.set(e,[])),n.get(e)?.push(i))}let i=[];for(let e of t)for(let t of n.get(e)??[])i.push({value:t.id,label:t.label});for(let e of r)i.push({value:e.id,label:e.label});return i}function oh(e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n].value;t.has(r)||t.set(r,n)}return e=>t.get(e)}function sh({items:e,value:t,renderItem:n}){let r=e=>(0,I.jsx)(Ym,{value:e.id,children:n?n(e,e.id===t):e.label},e.id);if(!e.some(e=>ih(e)!=null))return(0,I.jsx)(I.Fragment,{children:e.map(r)});let i=[],a=new Map,o=[];for(let t of e){let e=ih(t);e==null?o.push(t):(a.has(e)||(i.push(e),a.set(e,[])),a.get(e)?.push(t))}return(0,I.jsxs)(I.Fragment,{children:[i.map(e=>(0,I.jsx)(Zm,{heading:e,children:(a.get(e)??[]).map(r)},e)),o.map(r)]})}function ch({ref:e,isOpen:t,isInline:n,onOpenChange:r,searchSource:i,input:a,footer:o,renderItem:s,emptySearchText:c,emptyBootstrapText:l,value:u,onValueChange:d,label:f,width:p=640,maxHeight:m=480,...h}){let g=A(),_=f??g(`@astryx.commandPalette.label`),v=c??g(`@astryx.commandPalette.emptySearch`),y=l??g(`@astryx.commandPalette.emptyBootstrap`),b=(0,P.useId)(),[x,S]=(0,P.useState)(``),[C,w]=(0,P.useState)(``),[T,E]=(0,P.useState)([]),[ee,D]=(0,P.useTransition)(),[te,O]=(0,P.useOptimistic)(x),[k,ne]=(0,P.useOptimistic)(T),re=ee,ie=(0,P.useRef)(0),ae=se(),oe=u??C,ce=(0,P.useCallback)(e=>{u===void 0&&w(e),d?.(e)},[u,d]),j=(0,P.useMemo)(()=>ah(k),[k]),le=(0,P.useMemo)(()=>oh(j),[j]),ue=(0,P.useCallback)(()=>{ie.current++,S(``),E([]),u===void 0&&w(``),i.cancel?.(),ae(``),r(!1)},[r,i,u,ae]),M=(0,P.useCallback)(e=>{ce(e)},[ce]),N=Um({selectableItems:j,value:oe,isOpen:!0,onOpen:()=>{},onClose:()=>{},onSelect:e=>{M(e),ue()},listboxId:b}),de=(0,P.useCallback)(e=>{i.cancel?.();let t=++ie.current;D(async()=>{let r=e===``;if(r||ae(g(`@astryx.commandPalette.loading`)),!r&&T.length>0){let t=e.toLowerCase().trim();ne(T.filter(e=>e.label.toLowerCase().includes(t)))}let a=r?i.bootstrap():i.search(e),o=await Promise.resolve(a);if(ie.current===t&&(S(e),ne(o),E(o),r?ae(``):o.length===0?ae(g(`@astryx.commandPalette.noResultsFor`,{query:e})):ae(g(`@astryx.commandPalette.resultCount`,{count:o.length})),r&&oe!=null&&oe!==``)){let e=o.findIndex(e=>e.id===oe);if(e>=0){if(n){let t=o[e];t&&N.onItemMouseEnter({value:t.id},e)}else N.setHighlightedIndex(e)}}})},[i,T,D,oe,n,N,ne,ae,g]),fe=(0,P.useRef)(de);fe.current=de,(0,P.useEffect)(()=>{t&&fe.current(``)},[t]);let pe=(0,P.useCallback)(e=>{if(e.key===`Escape`){e.preventDefault(),ue();return}if(e.key===`Enter`){if(e.preventDefault(),N.highlightedIndex>=0&&N.highlightedIndex<j.length){let e=j[N.highlightedIndex];e&&!e.disabled&&(M(e.value),ue())}return}e.key!==` `&&N.onKeyDown(e)},[N,ue,j,M]),me=(0,P.useCallback)(e=>{let t=e.target.closest?.(`[role="option"]`);if(!t||t.getAttribute(`aria-disabled`)===`true`)return;let n=t.getAttribute(`data-value`);if(n==null)return;let r=le(n);r!==void 0&&N.onItemMouseEnter(j[r],r)},[N,j,le]),he=(0,P.useMemo)(()=>({search:te,setSearch:e=>{D(()=>{O(e)}),de(e)},value:oe,setValue:ce,listId:b,highlightedIndex:N.highlightedIndex,setHighlightedIndex:N.setHighlightedIndex,getItemId:N.getItemId,selectableItems:j,searchResults:k,selectItem:M,onKeyDown:pe,onClose:ue,isOpen:t,isBusy:re}),[te,O,de,oe,ce,b,N.highlightedIndex,N.setHighlightedIndex,N.getItemId,j,k,M,pe,ue,t,re]),ge=x===``&&k.length===0,_e=x!==``&&k.length===0,ve;return ve=ge?(0,I.jsx)(rh,{children:y}):_e?(0,I.jsx)(rh,{children:v}):(0,I.jsx)(sh,{items:k,value:oe,renderItem:s}),(0,I.jsx)(Fm,{ref:e,isOpen:t,isInline:n,onOpenChange:e=>{e?r(!0):ue()},width:p,maxHeight:m,purpose:`info`,"aria-label":_,...h,children:(0,I.jsx)(Wm,{value:he,children:(0,I.jsx)(Vi,{defaultHasDividers:!0,header:(0,I.jsx)(Wi,{hasDivider:!0,padding:0,children:a??(0,I.jsx)($m,{})}),content:(0,I.jsx)(Ki,{padding:0,children:(0,I.jsx)(qm,{onMouseOver:me,children:ve})}),footer:(0,I.jsx)(Rm,{hasDivider:!0,padding:0,children:o??(0,I.jsx)(th,{})})})})})}ch.displayName=`CommandPalette`;var lh=1e3,uh=100,dh={root:{kWkggS:`xprdx6m x1j0df82 x1o55y2u`,kSiTet:`xvpkmg4 x1tbh5bv`,$$css:!0},animate:{kILWW9:`xpz12be`,k44tkh:`xqgcaz`,ko0y90:`xa4qsjk`,kKVMdj:`xeuoslp x1aquc0h`,kyAemX:`x193epu2`,$$css:!0}},fh={0:{kaIpWk:`xwksslw`,$$css:!0},1:{kaIpWk:`xx3sua9`,$$css:!0},2:{kaIpWk:`xh6dtrn`,$$css:!0},3:{kaIpWk:`x1hviunn`,$$css:!0},4:{kaIpWk:`x1hviunn`,$$css:!0},none:{kaIpWk:`x2u8bby`,$$css:!0},rounded:{kaIpWk:`xjspbzw`,$$css:!0}},ph={kKxzle:`xvo38ju`,$$css:!0},mh={animationDelay:e=>[ph,{"--x-animationDelay":(e=>typeof e==`number`?e+`ms`:e??void 0)(`${lh+uh*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x5lhr3w`,kZKoxP:(typeof t==`number`?`${t}px`:t)==null?typeof t==`number`?`${t}px`:t:`x16ye13r`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e),"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof t==`number`?`${t}px`:t)}]};function hh({width:e=`100%`,height:t=`100%`,radius:n=3,index:r=0,"data-testid":i,xstyle:a,className:o,style:s,ref:c,...l}){return(0,I.jsx)(`div`,{ref:c,"aria-hidden":`true`,"data-testid":i,...S(f(`skeleton`),p(dh.root,dh.animate,fh[n],mh.dimensions(e,t),mh.animationDelay(r),a),o,s),...l})}hh.displayName=`Skeleton`;var gh={empty:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M70%20167Q60%20121%2055%2077Q52%2061%2067%2062L97%2060Q105%2060%20113%2077L133%2077M209%2083L248%2081Q264%2080%20260%2096'/%3e%3cpath%20d='M72%20166Q77%20141%2084%20119Q88%20108%20100%20109L141%20108Q151%20105%20160%2097L251%2094Q267%2093%20261%20109L245%20170Q243%20179%20230%20180Q162%20183%2087%20183Q70%20182%2072%20166Z'/%3e%3cpath%20d='M115%20105Q142%2081%20164%2032Q195%2038%20231%2035Q224%2065%20205%2094M174%2055Q189%2056%20207%2059M164%2073L197%2077'/%3e%3cpath%20d='M39%20181Q41%20169%2038%20157M24%20184Q38%20181%2052%20183M38%20159Q20%20162%2018%20146Q33%20143%2038%20159ZM39%20154Q39%20140%2054%20137Q58%20150%2039%20154Z'/%3e%3cpath%20d='M128%2046L121%2039M143%2036L141%2027'%20stroke='%23a7ac93'/%3e%3cpath%20d='M91%20162L98%20141M99%20169L108%20139M110%20171L118%20148'%20stroke-width='1.2'%20opacity='.4'/%3e%3c/g%3e%3c/svg%3e`,search:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M207%20108Q215%2073%20192%2048Q176%2027%20144%2029Q112%2028%2092%2052Q71%2077%2079%20112Q87%20145%20119%20157Q155%20173%20185%20148Q197%20138%20202%20124'/%3e%3cpath%20d='M197%20101Q201%2073%20183%2053Q168%2037%20143%2038Q114%2036%2096%2060Q79%2084%2090%20114Q101%20143%20129%20149Q158%20157%20181%20137Q191%20128%20195%20118'/%3e%3cpath%20d='M195%20140Q208%20146%20218%20154M207%20128L230%20143M218%20154Q214%20164%20226%20174L263%20197Q279%20207%20288%20192Q296%20180%20282%20170L241%20144Q230%20136%20221%20147'/%3e%3cpath%20d='M69%20148Q52%20171%2032%20178Q69%20188%20109%20187L124%20169M208%2074Q215%2057%20233%2063Q257%2070%20256%2096Q256%20121%20236%20125M232%2062Q231%2052%20239%2045M242%2062L248%2053M226%2091L226%2092M242%2095L242%2096M231%20107Q236%20111%20241%20107'/%3e%3cpath%20d='M111%2060Q121%2049%20136%2047M64%2047L55%2042M75%2034L73%2025'%20stroke='%23a7ac93'/%3e%3cpath%20d='M233%20164L249%20174M233%20172L247%20181'%20stroke-width='1.2'%20opacity='.45'/%3e%3c/g%3e%3c/svg%3e`,"not-found":`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M30%2069Q29%2059%2039%2060L75%2059L93%2080Q95%20130%2093%20172Q65%20177%2030%20174Q27%20126%2030%2069ZM75%2060Q73%2069%2077%2078L92%2080M43%20101Q57%20100%2077%20104M44%20119L69%20120'/%3e%3cpath%20d='M114%20173Q110%20125%20114%2064Q131%2061%20155%2063L174%2083Q175%20124%20171%20175Q142%20173%20114%20173Z'%20stroke-dasharray='3%208'%20stroke='%23a0a98c'/%3e%3cpath%20d='M156%2064L155%2081L171%2084'%20stroke-dasharray='3%206'/%3e%3cpath%20d='M194%2067Q215%2069%20234%2075L251%2095L247%20122M192%2069L180%20165Q203%20173%20233%20176M235%2077L234%2094L249%2097M201%20108L230%20114M199%20125L220%20130'/%3e%3cpath%20d='M244%20147Q250%20125%20269%20128Q286%20132%20289%20159Q291%20182%20269%20186Q247%20187%20239%20168Q234%20156%20244%20155M267%20127Q266%20116%20275%20109M279%20129L287%20119M256%20152L256%20153M276%20154L276%20155M264%20168Q270%20172%20275%20166M256%20186L254%20191M274%20186L278%20191'/%3e%3cpath%20d='M135%2041L131%2032M150%2042L155%2032'%20stroke='%23a7ac93'/%3e%3c/g%3e%3c/svg%3e`,error:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M25%20153Q45%20164%2072%20151M26%20159Q46%20174%2074%20158M74%20144Q76%20126%2087%20123M74%20159L88%20160M122%20101Q94%20101%2089%20131Q83%20156%20109%20169L122%20170M125%2097Q136%2092%20143%2099Q148%20134%20143%20176Q132%20181%20123%20174Q119%20135%20125%2097ZM134%20113L134%20128M134%20147L134%20161'/%3e%3cpath%20d='M203%20113Q191%20111%20187%20117Q185%20123%20202%20123M203%20152Q186%20148%20187%20156Q188%20161%20202%20160M207%2099Q213%2093%20223%2098Q227%20132%20223%20176Q212%20181%20204%20174Q201%20135%20207%2099ZM225%20105Q250%20108%20254%20134Q255%20161%20226%20169M254%20150Q276%20168%20298%20153M255%20158Q280%20176%20301%20160'/%3e%3cpath%20d='M173%20102L158%20133L174%20131L162%20161'%20stroke='%23b0a078'/%3e%3cpath%20d='M252%2093Q241%2076%20248%2061Q259%2041%20277%2048Q294%2058%20293%2082Q292%20101%20277%20109M264%2048Q264%2037%20273%2032M277%2048L285%2039M259%2073L259%2074M278%2077L278%2078M266%2090Q271%2094%20276%2089M269%20108Q252%20103%20249%20114'/%3e%3cpath%20d='M113%2072L108%2062M130%2069L135%2060'%20stroke='%23a7ac93'/%3e%3cpath%20d='M101%20146L104%20159M108%20146L111%20161'%20stroke-width='1.2'%20opacity='.4'/%3e%3c/g%3e%3c/svg%3e`};function _h({kind:e,compact:t=!1}){return(0,I.jsx)(`img`,{src:gh[e],alt:``,"aria-hidden":`true`,width:320,height:220,style:{display:`block`,width:t?`10rem`:`min(18rem, 60vw)`,maxWidth:`100%`,height:`auto`}})}function vh({kind:e=`empty`,style:t,...n}){return(0,I.jsx)(Xn,{...n,icon:(0,I.jsx)(_h,{kind:e,compact:n.isCompact??!1}),style:{width:`100%`,minHeight:n.isCompact?void 0:`min(30rem, 65vh)`,...t}})}var yh=!1,bh=new Set,xh=()=>{bh.forEach(e=>e())};function Sh(){yh||(yh=!0,xh())}function Ch(){yh&&(yh=!1,xh())}function wh(e){e!==yh&&(yh=e,xh())}var Th=e=>(bh.add(e),()=>{bh.delete(e)}),Eh=()=>(0,P.useSyncExternalStore)(Th,()=>yh),Dh={palette:`_palette_1fe7u_3`,loading:`_loading_1fe7u_9`,loadingHeading:`_loadingHeading_1fe7u_10`,loadingRow:`_loadingRow_1fe7u_11`,row:`_row_1fe7u_14`,head:`_head_1fe7u_15`,hit:`_hit_1fe7u_19`,trigger:`_trigger_1fe7u_21`,oneLine:`_oneLine_1fe7u_28`},Oh=()=>({feature:F(`search.group.feature`),requirement:F(`search.group.requirement`),design:F(`search.group.design`),document:F(`search.group.document`),history:F(`search.group.history`)});function kh(e){if(e.kind===`document`)return{to:`/wiki/$documentId`,params:{documentId:e.documentId??``}};if(e.kind===`history`)return{to:`/activity`,search:{selected:e.key??``}};let t={featureId:e.featureId??``};return e.kind===`requirement`?{to:`/features/$featureId`,params:t,search:{tab:`requirements`},hash:e.id}:e.kind===`design`?{to:`/features/$featureId`,params:t,search:{tab:`design`}}:{to:`/features/$featureId`,params:t}}function Ah(e){return e.replace(/```[\s\S]*?```/g,` `).replace(/<!--[\s\S]*?-->/g,` `).replace(/^\s*[#>]+\s*/gm,` `).replace(/^\s*[-*+]\s+/gm,` `).replace(/^\s*\|/gm,` `).replace(/\|/g,` `).replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/[*_`]/g,``).replace(/\s+/g,` `).trim()}function jh(e,t){let n=e.toLowerCase().indexOf(t);if(n<0)return e.slice(0,90);let r=Math.max(0,n-30);return(r>0?`…`:``)+e.slice(r,n+t.length+70).trim()+(n+t.length+70<e.length?`…`:``)}function Mh(e,t){if(!t)return e;let n=e.toLowerCase().indexOf(t);return n<0?e:(0,I.jsxs)(I.Fragment,{children:[e.slice(0,n),(0,I.jsx)(`mark`,{className:Dh.hit,children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}var Nh={bootstrap:()=>[],search:()=>[]},Ph=e=>(0,I.jsxs)(or,{gap:2,className:Dh.loadingRow,"aria-hidden":`true`,children:[(0,I.jsx)(hh,{index:e,width:`${44-e*5}%`,height:`var(--spacing-5)`}),(0,I.jsx)(hh,{index:e,width:`${88-e*7}%`,height:`var(--spacing-3)`})]},e),Fh=(e,t,n)=>(0,I.jsxs)(or,{gap:0,"aria-hidden":`true`,children:[(0,I.jsx)(or,{gap:0,className:Dh.loadingHeading,children:(0,I.jsx)(hh,{index:e,width:t,height:`var(--spacing-3)`})}),n.map(Ph)]},e),Ih=()=>(0,I.jsxs)(or,{gap:0,role:`status`,"aria-label":F(`search.loading`),"aria-busy":`true`,className:Dh.loading,children:[Fh(0,`4rem`,[0,1,2]),Fh(1,`5.5rem`,[3,4])]}),Lh=()=>(0,I.jsx)(vh,{kind:`search`,isCompact:!0,title:F(`search.noMatch`),description:F(`search.noMatchDescription`)}),Rh=()=>(0,I.jsx)(vh,{kind:`empty`,isCompact:!0,title:F(`search.empty`),description:F(`search.emptyDescription`)}),zh=()=>(0,I.jsx)(th,{children:(0,I.jsxs)(sr,{gap:4,children:[(0,I.jsxs)(sr,{gap:2,children:[(0,I.jsx)(Jn,{keys:`up`}),(0,I.jsx)(Jn,{keys:`down`}),(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:F(`search.hint.move`)})]}),(0,I.jsxs)(sr,{gap:2,children:[(0,I.jsx)(Jn,{keys:`enter`}),(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:F(`search.hint.open`)})]}),(0,I.jsxs)(sr,{gap:2,children:[(0,I.jsx)(Jn,{keys:`escape`}),(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:F(`search.hint.close`)})]})]})});function Bh(){De();let e=Eh();Bn([{keys:`mod+k`,onPress:Sh,allowInInputs:!0}]);let t=Ei(am());return t.data?(0,I.jsx)(Vh,{session:t.data,isOpen:e}):(0,I.jsx)(ch,{isOpen:e,onOpenChange:wh,searchSource:Nh,label:F(`search.label`),width:720,className:Dh.palette,input:(0,I.jsx)($m,{placeholder:F(`search.placeholder`)}),footer:zh(),emptyBootstrapText:Ih(),emptySearchText:Ih()})}function Vh({session:e,isOpen:t}){let n=De(),r=gn(),i=Ei({...mm(e),enabled:t}),a=i.data,o=(0,P.useMemo)(()=>{if(!a)return[];let e=[];for(let t of a.features){e.push({id:t.id,label:t.title,auxiliaryData:{group:Oh().feature,kind:`feature`,where:t.path.replace(/^\.gitifact\//,``),body:Ah(t.description),updatedAt:t.updatedAt,target:{to:`/features/$featureId`,params:{featureId:t.id}}}});for(let n of t.requirements)e.push({id:n.id,label:n.title,auxiliaryData:{group:Oh().requirement,kind:`requirement`,where:t.title,body:Ah(n.body),updatedAt:t.updatedAt,target:{to:`/features/$featureId`,params:{featureId:t.id},search:{tab:`requirements`},hash:n.id}}});t.design&&e.push({id:t.id+`:design`,label:t.design.title,auxiliaryData:{group:Oh().design,kind:`design`,where:t.title,body:Ah(t.design.body),updatedAt:t.updatedAt,target:{to:`/features/$featureId`,params:{featureId:t.id},search:{tab:`design`}}}})}for(let t of a.documents)e.push({id:t.id,label:t.title,auxiliaryData:{group:Oh().document,kind:`document`,where:t.path.replace(/^\.gitifact\/wiki\//,``),body:Ah(t.body),updatedAt:t.updatedAt,target:{to:`/wiki/$documentId`,params:{documentId:t.id}}}});return e},[a,n]),s=(0,P.useMemo)(()=>({bootstrap:()=>o.filter(e=>e.auxiliaryData?.updatedAt&&(e.auxiliaryData.kind===`feature`||e.auxiliaryData.kind===`document`)).sort((e,t)=>(t.auxiliaryData?.updatedAt??``).localeCompare(e.auxiliaryData?.updatedAt??``)).slice(0,6).map(e=>({...e,auxiliaryData:{...e.auxiliaryData,group:F(`search.group.recent`)}})),search:async(t,n)=>{let r=t.trim();return r?(await vm(e,r,a?.head??null,n)).hits.map(e=>({id:e.kind+`:`+e.id,label:e.title,auxiliaryData:{group:Oh()[e.kind],kind:e.kind,where:e.where,body:e.line,line:e.line,updatedAt:null,target:kh(e)}})):[]}}),[o,e,a,n]),c=(0,P.useRef)(``),l=(0,P.useRef)([]),u=(0,P.useRef)(s);u.current=s;let d=(0,P.useRef)(void 0);if(!d.current){let e=()=>{};d.current={wait:new Promise(t=>{e=t}),done:e}}(0,P.useEffect)(()=>{a&&d.current.done()},[a]);let[f,p]=(0,P.useState)(!1),m=(0,P.useMemo)(()=>{let e,t,n=[],r=e=>{let t=n;n=[],p(!1);for(let n of t)n(e)};return{bootstrap:()=>d.current.wait.then(()=>l.current=u.current.bootstrap()),search:i=>new Promise(a=>{n.push(a),clearTimeout(e),e=setTimeout(()=>{t?.abort();let e=t=new AbortController;d.current.wait.then(()=>u.current.search(i,e.signal)).then(t=>{e.signal.aborted||(c.current=i.trim().toLowerCase(),r(l.current=t))}).catch(()=>{e.signal.aborted||r(l.current=[])})},500)}),cancel:()=>{clearTimeout(e),t?.abort(),r(l.current)}}},[]),h=e=>{if(!e)return;let{to:t,params:n,search:i,hash:a}=e.auxiliaryData.target;Ch(),r({to:t,params:n??{},search:i??{},...a?{hash:a}:{}})};return(0,I.jsx)(ch,{isOpen:t,onOpenChange:wh,searchSource:m,label:F(`search.label`),width:720,className:Dh.palette,input:(0,I.jsx)($m,{placeholder:F(`search.placeholder`),onKeyDown:e=>{if(e.key!==`Enter`||e.currentTarget.getAttribute(`aria-activedescendant`))return;let t=l.current[0];t&&(e.preventDefault(),h(t))},onChange:e=>{p(e.currentTarget.value.trim()!==``)}}),footer:zh(),emptySearchText:f?Ih():Lh(),emptyBootstrapText:i.isPending||f?Ih():Rh(),renderItem:e=>{let t=e.auxiliaryData,n=c.current,r=t.line??(n?jh(t.body,n):t.body.slice(0,90));return(0,I.jsxs)(or,{gap:1,className:Dh.row,children:[(0,I.jsxs)(sr,{gap:3,className:Dh.head,children:[(0,I.jsx)(N,{weight:`semibold`,className:Dh.oneLine,children:Mh(e.label,n)}),(0,I.jsx)(N,{type:`supporting`,color:`secondary`,className:Dh.oneLine,children:t.where})]}),r&&(0,I.jsx)(N,{type:`supporting`,color:`secondary`,className:Dh.oneLine,children:Mh(r,n)})]})},onValueChange:e=>{h(l.current.find(t=>t.id===e))}})}var Hh=[[`path`,{d:`M17 17L21 21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]];function Uh(){return De(),(0,I.jsxs)(`button`,{type:`button`,className:Dh.trigger,onClick:Sh,"aria-label":F(`search.open`),"aria-keyshortcuts":`Meta+K Control+K`,children:[(0,I.jsx)(cr,{data:Hh,size:16}),(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:F(`search.trigger`)}),(0,I.jsx)(Jn,{keys:`mod+k`})]})}var Wh=[[`path`,{d:`M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]];function Gh({size:e=16}){return(0,I.jsx)(cr,{data:Wh,size:e})}var Kh={bar:`_bar_r3105_2`,trail:`_trail_r3105_3`,crumb:`_crumb_r3105_4`,tools:`_tools_r3105_7`};function qh({trail:e,actions:t}){return De(),(0,I.jsxs)(sr,{as:`header`,"aria-label":F(`header.location`),gap:3,className:Kh.bar,children:[(0,I.jsxs)(sr,{gap:2,className:Kh.trail,children:[(0,I.jsx)(Gh,{}),(0,I.jsx)(um,{}),e.map((t,n)=>(0,I.jsxs)(P.Fragment,{children:[(0,I.jsx)(N,{type:`supporting`,color:`secondary`,children:`/`}),t.to&&n<e.length-1?(0,I.jsx)(An,{to:t.to,search:t.search??{},className:Kh.crumb,children:t.label}):(0,I.jsx)(N,{type:`supporting`,maxLines:1,children:t.label})]},n))]}),(0,I.jsxs)(sr,{gap:3,className:Kh.tools,children:[(0,I.jsx)(Uh,{}),t]})]})}export{sr as $,ni as A,bt as At,Sr as B,Je as Bt,Vi as C,It as Ct,Ti as D,xt as Dt,Ei as E,ht as Et,Kr as F,dt as Ft,wr as G,Re as Gt,xr as H,qe as Ht,Ur as I,Qe as It,Rr as J,Ie as Jt,L as K,Le as Kt,Hr as L,it as Lt,Qr as M,gt as Mt,Zr as N,nt as Nt,ci as O,yt as Ot,qr as P,vt as Pt,cr as Q,Oe as Qt,_r as R,_t as Rt,Wi as S,jt as St,ki as T,St as Tt,br as U,ze as Ut,Nr as V,Ye as Vt,gr as W,Ue as Wt,dr as X,Te as Xt,Ir as Y,Ce as Yt,ur as Z,De as Zt,am as _,Yt as _t,hh as a,An as at,em as b,Pt as bt,Fm as c,ln as ct,ym as d,$t as dt,or as et,_m as f,tn as ft,lm as g,Jt as gt,gm as h,Xt as ht,vh as i,jn as it,ri as j,$e as jt,ii as k,ut as kt,wm as l,cn as lt,mm as m,Qt as mt,Gh as n,Jn as nt,Um as o,gn as ot,hm as p,Kt as pt,Dr as q,F as qt,Bh as r,Fn as rt,Hm as s,hn as st,qh as t,Xn as tt,Sm as u,an as ut,om as v,zt as vt,Ai as w,Ct as wt,Ki as x,Nt as xt,cm as y,Mt as yt,Cr as z,at as zt};