@inkeep/open-knowledge 0.8.0-beta.7 → 0.8.0-beta.9
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.
- package/dist/alias-JE7RI5QX-CjsckksZ.mjs +1 -0
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/awk2-POPGKRAI-DeuggFRh.mjs +1 -0
- package/dist/{banner-ewegHsSq.mjs → banner-BEKwr_uU.mjs} +2 -2
- package/dist/base64-4YMZCVJ5-Cj7j5Pz8.mjs +1 -0
- package/dist/basename-AA2KJYZQ-DSRxx5mc.mjs +1 -0
- package/dist/bash-IJWYRKFO-DFBZjU3V.mjs +1 -0
- package/dist/build-GAD37AZK.mjs +1 -0
- package/dist/{build-BZeImWox.mjs → build-fAc55Z_L.mjs} +1 -1
- package/dist/cat-RDUMLXKC-CI2IrKwx.mjs +1 -0
- package/dist/chmod-SYMGL4JA-D31pO-B4.mjs +1 -0
- package/dist/{chokidar-DkLjLiwY.mjs → chokidar-CblsKfnx.mjs} +1 -1
- package/dist/{chunk-24IMIIXA-B6yIPkk2.mjs → chunk-24IMIIXA-_PX4ITYZ.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-DztAF386.mjs → chunk-3THT3N7L-DrzOuTpA.mjs} +1 -1
- package/dist/{chunk-3ZUFRYJ4-DJGI-ol3.mjs → chunk-3ZUFRYJ4-C93H8j0V.mjs} +1 -1
- package/dist/{chunk-44UOCSGV-CaFxJDHm.mjs → chunk-44UOCSGV-BbZqjKvt.mjs} +1 -1
- package/dist/{chunk-4GTNDTRF-DLfmDsTz.mjs → chunk-4GTNDTRF-_OVmXcJ-.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-Do18aeKJ.mjs → chunk-4HHKTUW3-Dm69hDaZ.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-BC5DMmtl.mjs → chunk-4Q4SM6WR-DDQRsilN.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-BkiwXNts.mjs → chunk-55VFSPNA-DVZfQAzN.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-CAp625aG.mjs → chunk-5QMZ5MUS-SLhNX8t9.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-DxXSmS6b.mjs → chunk-5QVNJEHU-BvsipSFW.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-CxAvX_p_.mjs → chunk-5V6VZH6T-BCr5_GDF.mjs} +2 -2
- package/dist/{chunk-62RKD26F-DFxm_wsk.mjs → chunk-62RKD26F-Xy18vjr1.mjs} +2 -2
- package/dist/{chunk-64BAICW3-CbWqy6AU.mjs → chunk-64BAICW3-CTJNEx4Q.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-Ce6zfZno.mjs → chunk-74CEPOFO-D1bzz49u.mjs} +1 -1
- package/dist/{chunk-7L36YK2X-B9iPLZYF.mjs → chunk-7L36YK2X-RiPZFKaV.mjs} +1 -1
- package/dist/{chunk-7TSDKFEO-Clyycgm6.mjs → chunk-7TSDKFEO-a-GUGBTu.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-KpVaWQZk.mjs → chunk-A4HU7SVR-hefV_YmW.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-DZdE_RBM.mjs → chunk-A4JSPFCI-D3-Pg2lq.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-DvJz5Cpw.mjs → chunk-A5O5YHGN-DQP-O5US.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-BSl75Gzh.mjs → chunk-A65PWWJC-D7J5l9eq.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-CI4JCXh0.mjs → chunk-A7A2DBEE-PLfkXLI4.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-BzesEh8O.mjs → chunk-A7ICOL4V-Drb3XsEL.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-DryLwDJN.mjs → chunk-ALLTKNUZ-BMiTDN50.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-ghqP5RjQ.mjs → chunk-APT7OOP2-CXHnSuct.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-CBa2upXR.mjs → chunk-BBXLRYSX-Cxoye6wj.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-BFUsD38L.mjs → chunk-BRGMQKJV-Dr9Z7G7y.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-CaGcSJNH.mjs → chunk-CR5AFCPT-BBd9E4Jo.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-Co4ALolT.mjs → chunk-CWQS3NFK-BQ5SUtd7.mjs} +1 -1
- package/dist/{chunk-D4J545R4-39tfGEas.mjs → chunk-D4J545R4-C8nMOauR.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-B0H0ZE0g.mjs → chunk-D6CWQ5DW-BudNEuOo.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-DjGAq771.mjs → chunk-D7MEQ3VN-Csvth_Ss.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-2hAkTSsi.mjs → chunk-DCAAORBQ-BdrR5ttw.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-DIKSLkPq.mjs → chunk-DXB73IDG-DfmyzFzL.mjs} +1 -1
- package/dist/{chunk-EEXR5ZDP-CqRIzSRf.mjs → chunk-EEXR5ZDP-C5AJH114.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-BNKZIY4Y.mjs → chunk-EIZGF4BS-8bsVXqW0.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-C6mQ92-8.mjs → chunk-F23WWYKW-DST0dB7V.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-Ch4EQu4J.mjs → chunk-F55TLFGB-CezmwFJN.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-C25Und0M.mjs → chunk-FEIOJCZD-Vm1q1kLH.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-BrH2kwP5.mjs → chunk-GCTKCWKD-Deqi1D_N.mjs} +1 -1
- package/dist/{chunk-GFQRA5P5-DnjwTqP3.mjs → chunk-GFQRA5P5-CkMj9l7f.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-Cjp7e-4Y.mjs → chunk-GOV5EKKI-DNFJiYJI.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-DfpAAE3t.mjs → chunk-GXVXFKBA-993FoPmq.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-oo03cv9O.mjs → chunk-HDQ56CKY-pGV4pOJA.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-BX2ngisD.mjs → chunk-HJQJAYMS-Ci3vsKQW.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-B2veqSYo.mjs → chunk-HJWBQKYG-UZig4wUt.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-BK04cmy7.mjs → chunk-HWBSOZZR-CFFhOzgy.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-D-Y0sZAA.mjs → chunk-HWKDQ44K-CPSjqtR_.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-BPQZMhwo.mjs → chunk-I57KEIP3-C9JW7Nfp.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-C3IodQq7.mjs → chunk-IPJHKYVM-orb6vjJ1.mjs} +1 -1
- package/dist/{chunk-J642UCRS-DXUFHVvX.mjs → chunk-J642UCRS-D2hPh3Cf.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-CLwH0uCX.mjs → chunk-JVPRLUMK-DnQCNjpq.mjs} +2 -2
- package/dist/{chunk-KMEYNNUA-DGQRus36.mjs → chunk-KMEYNNUA-DfdK88O_.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-DQF3ekov.mjs → chunk-LL3S3NLB-DxXgE3kY.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-unxmYj-H.mjs → chunk-LPQPILI2-8E8WwnE3.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-Bj3GMNey.mjs → chunk-LTZRCH7N-GAjTFNwG.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-DmdrV1En.mjs → chunk-LWEGUNWT-BALY4RLC.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-DM-9Iq67.mjs → chunk-MDDMCKUK-DD6paciv.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-iT7NLOSj.mjs → chunk-MDLLFABN-oBQf6bGE.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-CoXvnzFl.mjs → chunk-MHTUABJP-dKmK6Hw7.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-C_Ew6iFJ.mjs → chunk-MIZPJHVH-BPfxJ3C2.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-D0cew-4g.mjs → chunk-MLXIYONF-CQ5Q9uTP.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-Ba0ek4dq.mjs → chunk-MYE6AGBJ-B4pRo9ma.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-BjY7nf_U.mjs → chunk-NAERJDUW-B3fduMx2.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-BfpDmYta.mjs → chunk-NCNPKYJZ-BFGan4lR.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-CTmaNmMV.mjs → chunk-NUYSJFDK-BVw8oahq.mjs} +2 -2
- package/dist/{chunk-NYQYO467-De27bHHh.mjs → chunk-NYQYO467-nPa6J2DD.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-B7qGh_d9.mjs → chunk-OARHFVLG-DGpNgI6K.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-JsUybhKc.mjs → chunk-OCLXQMOG-Bktk24jL.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-DxqjLuBg.mjs → chunk-OCS6LSEM-WwUGJ0am.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-ikvLWpfV.mjs → chunk-OJDRYQWQ-D4lSWh0K.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-5k30myjg.mjs → chunk-OL3S66CO-DtsweltN.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-DjO83anU.mjs → chunk-PBXLG62G-Ci7A7XGA.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-BT5CrRx8.mjs → chunk-PP6PSHAB-DMC_XCfO.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-Sp2cHHMB.mjs → chunk-PYSFUGCK-CY7pclEB.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-CKprjJi1.mjs → chunk-QCDB2VPH-D1RuXtOm.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-DAJDwVLZ.mjs → chunk-QJ7O6ZN3-BH67tCjg.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-BhmoPD7w.mjs → chunk-R6QSAL5T-CtbJTvt9.mjs} +1 -1
- package/dist/{chunk-R6VWJ2ZL-FwG_Za20.mjs → chunk-R6VWJ2ZL-DSqbA7Rj.mjs} +1 -1
- package/dist/{chunk-RPNGRAAP-C2BHhnew.mjs → chunk-RPNGRAAP-BughPjdR.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-B0K39uOy.mjs → chunk-SDNKECQQ-C3GEf3VZ.mjs} +2 -2
- package/dist/{chunk-SYMJJMQ4-BHTQ9-zw.mjs → chunk-SYMJJMQ4-0QtKvQIP.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-Cm6aWFiU.mjs → chunk-T56QNPHK-DjHqXy9T.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-BQSN0_NC.mjs → chunk-TLSUDHID-6EWOySH2.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-CyB5ygtc.mjs → chunk-TOMNU26N-BjLxRX8P.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-hJoWF3in.mjs → chunk-TXBZCHCQ-l48TczF5.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-C1ZMf296.mjs → chunk-UNYNJIFU-BbdoO4yb.mjs} +3 -3
- package/dist/{chunk-V7TAPXDL-CbyQ432v.mjs → chunk-V7TAPXDL-CnKUp2df.mjs} +2 -2
- package/dist/{chunk-VJFXDYWH-Ju3YsoA8.mjs → chunk-VJFXDYWH-IiUXkKX0.mjs} +2 -2
- package/dist/{chunk-VLGZJRPG-dvgMu0oq.mjs → chunk-VLGZJRPG-B678hnuU.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-CpbDs1cF.mjs → chunk-VOBGTVA6-BT7gUxqf.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-COBa4MtL.mjs → chunk-VYOJP4TV-BvibOnKG.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-9cXM_L_4.mjs → chunk-WKFATFPP-DCZdrA8x.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-CvfqmCuM.mjs → chunk-X2AJGDEF-BaH6i1Rq.mjs} +1 -1
- package/dist/{chunk-XHM67O4N-akBjDPaR.mjs → chunk-XHM67O4N-Cd7Fiqsb.mjs} +1 -1
- package/dist/{chunk-XKQRETAK-Bbdvongf.mjs → chunk-XKQRETAK-cVWA9gEB.mjs} +2 -2
- package/dist/{chunk-XORM457F-BzpdJr6h.mjs → chunk-XORM457F-BAW3OKIy.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-C2xS3KJO.mjs → chunk-XVDPCNWR-CtK-Xs2O.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-B0tITlai.mjs → chunk-YCFVLTST-PFJX6AMj.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-Cz08u2O6.mjs → chunk-YFG2CMIF-CVDz5Fsh.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-DesxOVHh.mjs → chunk-YNYSPYQ5-Dq-BWW-f.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-WmJwXHQO.mjs → chunk-YS3AZT3J-DRSVwRFh.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-CUlXw32O.mjs → chunk-YTNYSM6T-KUvMCIKS.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-4l180K8r.mjs → chunk-Z6LRHWXI-CF_r-CgG.mjs} +2 -2
- package/dist/{chunk-Z7JVV2SM-BUdEAZMZ.mjs → chunk-Z7JVV2SM-BzR-yvwK.mjs} +2 -2
- package/dist/clear-5CZ5X4YR-CwAD0ujG.mjs +1 -0
- package/dist/cli.mjs +42 -44
- package/dist/{colors-BtKMHmBX.mjs → colors-D0wh7lK1.mjs} +1 -1
- package/dist/colors-Dl3c2q5r.mjs +1 -0
- package/dist/column-WLPMMSTS-OtgXQJPP.mjs +1 -0
- package/dist/comm-5SLSESQG-Dbe_0JM-.mjs +1 -0
- package/dist/constants-ChqGJV83.mjs +2 -0
- package/dist/cp-XOYR4ABJ-Fs-BUNPK.mjs +1 -0
- package/dist/{curl-47BFPSFW-Di93oHWG.mjs → curl-47BFPSFW-Dq2QRfS5.mjs} +2 -2
- package/dist/cut-OPC3VAGB-QytesYLS.mjs +1 -0
- package/dist/date-DD7FVA2V-Cg5stPCO.mjs +1 -0
- package/dist/diff-HJF2MPDN-DRmjT8LD.mjs +1 -0
- package/dist/dirname-LEMTZZFS-BU2v6Jk9.mjs +1 -0
- package/dist/{dist-DIChSlVj.mjs → dist-9wjL9Ivy.mjs} +1 -1
- package/dist/{dist-h073CA-s.mjs → dist-Cn5JHf5F.mjs} +37 -36
- package/dist/{dist-bundle-BSdjl7Rj.mjs → dist-bundle-BK4P1EQn.mjs} +1 -1
- package/dist/dist-bundle-CjV1Pdeo.mjs +1 -0
- package/dist/du-WO2ENHXQ-BcC6aUKa.mjs +1 -0
- package/dist/echo-O45JWWI2-D_LDH8mS.mjs +1 -0
- package/dist/env-5EPCWSXR-C4ozdy42.mjs +1 -0
- package/dist/{esm-BbkJd7ro.mjs → esm-s2X3YAg-.mjs} +1 -1
- package/dist/{execAsync-BvlEgtAU.mjs → execAsync-0jii24p9.mjs} +1 -1
- package/dist/{execAsync-CXON0DWd.mjs → execAsync-Czqc-yAz.mjs} +1 -1
- package/dist/{execAsync-JPnR_wx1.mjs → execAsync-DgmLXmTx.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-CHt1YsOk.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-CcahEplO.mjs +1 -0
- package/dist/expr-5T3UU5KE-BL4xVSIz.mjs +1 -0
- package/dist/file-ZIGAJ4YS-CT98h277.mjs +1 -0
- package/dist/find-TPUOAIUQ-BE_RhPSK.mjs +1 -0
- package/dist/flag-coverage-QT4N2Z44-CQ2g5NLf.mjs +2 -0
- package/dist/fold-LDSORVYE-CnErgTj9.mjs +1 -0
- package/dist/{getMachineId-bsd-Bv-VsEyc.mjs → getMachineId-bsd-BCJXEJCn.mjs} +2 -2
- package/dist/{getMachineId-bsd-CWLhAjUn.mjs → getMachineId-bsd-D7C80Q-x.mjs} +2 -2
- package/dist/{getMachineId-bsd-VWU2b38Z.mjs → getMachineId-bsd-GIcY1fmf.mjs} +2 -2
- package/dist/{getMachineId-darwin-BhzfDfjK.mjs → getMachineId-darwin-C9wsuHP1.mjs} +2 -2
- package/dist/{getMachineId-darwin-DGlWH8bP.mjs → getMachineId-darwin-D9y6ky_l.mjs} +2 -2
- package/dist/{getMachineId-darwin-DvOo46Q9.mjs → getMachineId-darwin-DG876t7S.mjs} +2 -2
- package/dist/{getMachineId-linux-CDvTv3pB.mjs → getMachineId-linux-BJESQahL.mjs} +2 -2
- package/dist/{getMachineId-linux-ROmYpdDb.mjs → getMachineId-linux-Bt9mk0EE.mjs} +2 -2
- package/dist/{getMachineId-linux-CCJsqLNI.mjs → getMachineId-linux-D9atImpV.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DPtt_3fd.mjs → getMachineId-unsupported-DAbsbHrs.mjs} +2 -2
- package/dist/{getMachineId-unsupported-ejON9VjP.mjs → getMachineId-unsupported-Dabs3aBp.mjs} +2 -2
- package/dist/{getMachineId-unsupported-BkIyKQdM.mjs → getMachineId-unsupported-cApRznzG.mjs} +2 -2
- package/dist/{getMachineId-win-D3tcWjnb.mjs → getMachineId-win-1MPHaim9.mjs} +2 -2
- package/dist/{getMachineId-win-DmRv23KP.mjs → getMachineId-win-CH98qgwX.mjs} +2 -2
- package/dist/{getMachineId-win-WiGlM2s-.mjs → getMachineId-win-CU_iAQo9.mjs} +2 -2
- package/dist/gh-detect-8zY2NNuZ.mjs +4 -0
- package/dist/{git-handle-CjyGVy33-CK0dYQ8y.mjs → git-handle-CjyGVy33-B_7lAMm9.mjs} +2 -2
- package/dist/git-handle-CjyGVy33-lwHYMDQ0.mjs +1 -0
- package/dist/grep-3AIAIJVR-02E3dSfi.mjs +1 -0
- package/dist/gzip-AQXSGOVS-UkVql__3.mjs +1 -0
- package/dist/head-HT2B6D2J-C2sNM7Dv.mjs +1 -0
- package/dist/help-VVWX7SA5-CZumUR0P.mjs +1 -0
- package/dist/history-J4QRNGRO-rwbd7U40.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BQG1bQvh.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-Db230ZWS.mjs +1 -0
- package/dist/index.d.mts +37 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-C0DDo7NM.mjs → init-B-7x7gxL.mjs} +4 -4
- package/dist/init-BspSFYbX.mjs +1 -0
- package/dist/{is-object-C-4FJ0rP.mjs → is-object-BXWpSxBI.mjs} +1 -1
- package/dist/join-GG2LDHE5-Bc_GxS8t.mjs +1 -0
- package/dist/jq-ODXZBPLY-B5VN-dXM.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-DXM3rg6y.mjs → js-exec-M6UR76J5-BssUQ3SC.mjs} +2 -2
- package/dist/{lib-Bp6oCBmn.mjs → lib-Dl2j2VNl.mjs} +1 -1
- package/dist/{libesm-Cfo1LhlX.mjs → libesm-YL3Bqolr.mjs} +1 -1
- package/dist/ln-4TRFBYAT-oG2zzF3W.mjs +1 -0
- package/dist/{loader-SyPhXU0b.mjs → loader-CGnAxV-z.mjs} +2 -2
- package/dist/loader-XusDpPul.mjs +1 -0
- package/dist/ls-KSXFZCWH-BWWIeWvm.mjs +1 -0
- package/dist/{lzma-BhiA9VHg.mjs → lzma-BSHkPrAt.mjs} +1 -1
- package/dist/md5sum-INMIK4DX-lBp2yvEW.mjs +1 -0
- package/dist/mkdir-TDEMSB6C-DbpQ_xq6.mjs +1 -0
- package/dist/mv-Z6MORUFL-CH8FstC-.mjs +1 -0
- package/dist/nl-U5YJDM32-VxSz_iJ4.mjs +1 -0
- package/dist/od-VJEF2UR5-BniMheOA.mjs +1 -0
- package/dist/{open-browser-DKQcpNx8.mjs → open-browser-C6LU_1mt.mjs} +1 -1
- package/dist/paste-7N6AFSDS-C1AAbgf8.mjs +1 -0
- package/dist/{preview-DtQoB0FW.mjs → preview-C6NAItZb.mjs} +2 -2
- package/dist/preview-DGMTzIrG.mjs +1 -0
- package/dist/printf-CX64KX2P-DjH-DHsP.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DeW1i47n.js → ActivityModeContent-vlSGPi7K.js} +1 -1
- package/dist/public/assets/{DocumentContext-CwBWJ4Ks.js → DocumentContext-BRfvUgZV.js} +1 -1
- package/dist/public/assets/{GraphPanel-MybfqBCo.js → GraphPanel-B-LlGAGO.js} +1 -1
- package/dist/public/assets/SettingsDialogBody-1i4q2xz7.js +7 -0
- package/dist/public/assets/{SourceEditor-z6339Mj3.js → SourceEditor-MMeo5vmo.js} +1 -1
- package/dist/public/assets/config-validation-events-BWyyZh-d.js +12 -0
- package/dist/public/assets/{dist-BkI3xKU4.js → dist-CtVt9wZe.js} +1 -1
- package/dist/public/assets/{dropdown-menu-DL6A5saL.js → dropdown-menu-CGgRqddr.js} +1 -1
- package/dist/public/assets/index-Bco5OsBq.css +1 -0
- package/dist/public/assets/index-C96Loq20.js +1914 -0
- package/dist/public/assets/{prop-types-CuXJaENL.js → prop-types-CGu0ru1E.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DBwiHDPG.js → target-navigation-intent-DQPHklQL.js} +1 -1
- package/dist/public/assets/{toggle-group-BNXCmF3n.js → toggle-group-Dy2sV5Bv.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BbezQD9h.js → typing-burst-detector-Ty1Gy_nX.js} +1 -1
- package/dist/public/index.html +10 -10
- package/dist/pwd-D4OZ7N27-VQ3RwUo8.mjs +1 -0
- package/dist/{python3-AUFTPCU6-Dq9xUUBq.mjs → python3-AUFTPCU6-BSuL_Nsg.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-L50-Upms.mjs +1 -0
- package/dist/{repair-launch-json-3H6ovk6a.mjs → repair-launch-json-D1Xg8LAy.mjs} +2 -2
- package/dist/{repair-mcp-configs-BbXM8Jiu.mjs → repair-mcp-configs-CMNHRhif.mjs} +2 -2
- package/dist/repair-skills-7rlg54ML.mjs +1 -0
- package/dist/{repair-skills-BmAa1apA.mjs → repair-skills-DL08j-QR.mjs} +2 -2
- package/dist/rev-XOSYPP45-CwKU0j6Z.mjs +1 -0
- package/dist/rg-FOQSCCX3-BrvjgaMQ.mjs +1 -0
- package/dist/rm-RTZG23RL-_UcxChNg.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-BRaqkv9Z.mjs +1 -0
- package/dist/{rolldown-runtime-twds-ZHy-Dxr-RWJs.mjs → rolldown-runtime-twds-ZHy-DU73unG7.mjs} +1 -1
- package/dist/sed-VFTTATXJ-CZsNmySp.mjs +1 -0
- package/dist/seq-RN5ZUASB-Cg0b6SeB.mjs +1 -0
- package/dist/{server-lock-BniQ3qki-CadPGoZN.mjs → server-lock-BniQ3qki-C_0QTo_r.mjs} +2 -2
- package/dist/server-lock-BniQ3qki-D-qFWWUB.mjs +1 -0
- package/dist/sha1sum-VJPNLNU6-CAg7QQIj.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-CFFtkep9.mjs +1 -0
- package/dist/sleep-VZFPZFWA-D3Ph1Gn6.mjs +1 -0
- package/dist/sort-DCNRDA7U-BePJiuxU.mjs +1 -0
- package/dist/split-SITCSYCZ-COiAX9LF.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-B0OUvEvJ.mjs +1 -0
- package/dist/src-Cc0yKmd-.mjs +2 -0
- package/dist/start-0fqf2-7A.mjs +3 -0
- package/dist/start-CMujpqWk.mjs +1 -0
- package/dist/stat-BT5A227F-NmZL1hMB.mjs +1 -0
- package/dist/strings-7PLOGTPD-CUJSASTo.mjs +1 -0
- package/dist/tac-SJGXQ4T2-B-fSXHB1.mjs +1 -0
- package/dist/tail-S5ULNTJU-CG1c0Pxf.mjs +1 -0
- package/dist/tar-ANUBEFJY-DH18Zmoc.mjs +1 -0
- package/dist/tee-O7VXZDCO-D_NgfJcm.mjs +1 -0
- package/dist/time-DEUO3QV2-DdyaxseS.mjs +1 -0
- package/dist/timeout-VRKMCG72-LxpBVg0M.mjs +1 -0
- package/dist/touch-DX2IJOQ4-BdSZnvQi.mjs +1 -0
- package/dist/tr-2HXZRDSW-QjngBhOg.mjs +1 -0
- package/dist/tree-LYXBS7DC-CsfD1mRM.mjs +1 -0
- package/dist/true-WHJNXCHG-DJUeGOw7.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-gIXCkWyw.mjs +1 -0
- package/dist/uniq-SUNANL47-CiH7i9-p.mjs +1 -0
- package/dist/wc-TQB3VNOX-D1U1S7L6.mjs +1 -0
- package/dist/which-XZHEH76L-CRVfCXCP.mjs +1 -0
- package/dist/whoami-DGKU3D2X-COB3yQf8.mjs +1 -0
- package/dist/{write-project-skill-VpMfcqZu.mjs → write-project-skill-BKowG4Lg.mjs} +2 -2
- package/dist/xan-BXDXYEIB-iFQjU_f2.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-BGX-rpom.mjs +1 -0
- package/dist/xargs-I6EZUCYF-CqFBjjSK.mjs +1 -0
- package/dist/yq-MJMAR36V-B5nTz8YA.mjs +1 -0
- package/package.json +1 -1
- package/dist/alias-JE7RI5QX-CAVgalv7.mjs +0 -1
- package/dist/awk2-POPGKRAI-DSmUTUD5.mjs +0 -1
- package/dist/base64-4YMZCVJ5-BwzgfP6J.mjs +0 -1
- package/dist/basename-AA2KJYZQ-CTXbUPI9.mjs +0 -1
- package/dist/bash-IJWYRKFO-CSBfp75s.mjs +0 -1
- package/dist/build-B4ZT2GMK.mjs +0 -1
- package/dist/cat-RDUMLXKC-BA4E-6jM.mjs +0 -1
- package/dist/chmod-SYMGL4JA-DqrztDS_.mjs +0 -1
- package/dist/clear-5CZ5X4YR-BEwl4_C9.mjs +0 -1
- package/dist/colors-t2HkW8lF.mjs +0 -1
- package/dist/column-WLPMMSTS-D0xWkTwB.mjs +0 -1
- package/dist/comm-5SLSESQG-xUt6OU03.mjs +0 -1
- package/dist/constants-BiJje4bk.mjs +0 -2
- package/dist/cp-XOYR4ABJ-X7H6YMBY.mjs +0 -1
- package/dist/cut-OPC3VAGB-CwS5RcsW.mjs +0 -1
- package/dist/date-DD7FVA2V-Dbk2XkK5.mjs +0 -1
- package/dist/diff-HJF2MPDN-fNt2f91n.mjs +0 -1
- package/dist/dirname-LEMTZZFS-BT_ZAIuL.mjs +0 -1
- package/dist/dist-bundle-BmF5_Mcp.mjs +0 -1
- package/dist/du-WO2ENHXQ-VqOjFaSA.mjs +0 -1
- package/dist/echo-O45JWWI2-C-3bei5r.mjs +0 -1
- package/dist/env-5EPCWSXR-DoYioOMQ.mjs +0 -1
- package/dist/expand-DTNXU4LQ-DBWQTk0V.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-DRm2UiGT.mjs +0 -1
- package/dist/expr-5T3UU5KE-BhfN9y59.mjs +0 -1
- package/dist/file-ZIGAJ4YS-DJbeP4p1.mjs +0 -1
- package/dist/find-TPUOAIUQ-CczmrVYd.mjs +0 -1
- package/dist/flag-coverage-QT4N2Z44-CRPgxYXl.mjs +0 -2
- package/dist/fold-LDSORVYE-DA4LkSBA.mjs +0 -1
- package/dist/git-handle-CjyGVy33-DVACqhWk.mjs +0 -1
- package/dist/grep-3AIAIJVR-BNFrRnPp.mjs +0 -1
- package/dist/gzip-AQXSGOVS-Ch_VPnFG.mjs +0 -1
- package/dist/head-HT2B6D2J-SGgQuBJe.mjs +0 -1
- package/dist/help-VVWX7SA5-9Ykrc3HE.mjs +0 -1
- package/dist/history-J4QRNGRO-CaZeA5kN.mjs +0 -1
- package/dist/hostname-BK6HG2DE-JGVS1ppF.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-BG8DWXFH.mjs +0 -1
- package/dist/init-CsZTRPuJ.mjs +0 -1
- package/dist/join-GG2LDHE5-JRj0ouRV.mjs +0 -1
- package/dist/jq-ODXZBPLY-DHB9kbWU.mjs +0 -1
- package/dist/ln-4TRFBYAT-oOs-iS2Z.mjs +0 -1
- package/dist/loader-CNw2Azdv.mjs +0 -1
- package/dist/ls-KSXFZCWH-CQHD37jl.mjs +0 -1
- package/dist/md5sum-INMIK4DX-BDAIIDt4.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-Lwjy9N0j.mjs +0 -1
- package/dist/mv-Z6MORUFL-DgTIQxj0.mjs +0 -1
- package/dist/nl-U5YJDM32-DeUWi7jL.mjs +0 -1
- package/dist/od-VJEF2UR5-5IUCoJ8z.mjs +0 -1
- package/dist/paste-7N6AFSDS-BnArAq5a.mjs +0 -1
- package/dist/preview-C69wz7B6.mjs +0 -1
- package/dist/printf-CX64KX2P-BByztiUk.mjs +0 -1
- package/dist/public/assets/SettingsDialogBody-Cs-Oet1Z.js +0 -7
- package/dist/public/assets/config-validation-events-D7jOmIYr.js +0 -12
- package/dist/public/assets/index-C5PBW8hb.css +0 -1
- package/dist/public/assets/index-KA716ryA.js +0 -1914
- package/dist/pwd-D4OZ7N27-CEyHiqxC.mjs +0 -1
- package/dist/readlink-MI4GCHJF-DrjzDETr.mjs +0 -1
- package/dist/repair-skills-B8s2RCRZ.mjs +0 -1
- package/dist/rev-XOSYPP45-BrX3RY1o.mjs +0 -1
- package/dist/rg-FOQSCCX3-COS6uwJc.mjs +0 -1
- package/dist/rm-RTZG23RL-CVB8AHY5.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-BPMg1E7n.mjs +0 -1
- package/dist/sed-VFTTATXJ-DbqskjHs.mjs +0 -1
- package/dist/seq-RN5ZUASB-xObuoCwd.mjs +0 -1
- package/dist/server-lock-BniQ3qki-DjKtnzVr.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-CtzyEkCD.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-CXUzEmYp.mjs +0 -1
- package/dist/sleep-VZFPZFWA-By_skETk.mjs +0 -1
- package/dist/sort-DCNRDA7U-DEjrctZD.mjs +0 -1
- package/dist/split-SITCSYCZ-C3JRw7ww.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-DaCjOzpq.mjs +0 -1
- package/dist/src-Djbfl0-M.mjs +0 -2
- package/dist/start-BLsxlRlU.mjs +0 -1
- package/dist/start-CtkG7xr7.mjs +0 -3
- package/dist/stat-BT5A227F-DTrBFTFt.mjs +0 -1
- package/dist/strings-7PLOGTPD-jFq6v5Kd.mjs +0 -1
- package/dist/tac-SJGXQ4T2-CSwW7a_8.mjs +0 -1
- package/dist/tail-S5ULNTJU-EJIXiVsh.mjs +0 -1
- package/dist/tar-ANUBEFJY-BIVb0c7i.mjs +0 -1
- package/dist/tee-O7VXZDCO-7YBB40m-.mjs +0 -1
- package/dist/time-DEUO3QV2-DL-cn0eZ.mjs +0 -1
- package/dist/timeout-VRKMCG72-Vpzd_EzJ.mjs +0 -1
- package/dist/touch-DX2IJOQ4-BsGLHPhC.mjs +0 -1
- package/dist/tr-2HXZRDSW-CQc1dvVn.mjs +0 -1
- package/dist/tree-LYXBS7DC-BKP2eqPA.mjs +0 -1
- package/dist/true-WHJNXCHG-DuLihQOR.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-8kSHk86g.mjs +0 -1
- package/dist/uniq-SUNANL47--vTI7SnC.mjs +0 -1
- package/dist/wc-TQB3VNOX-DiOuiJK4.mjs +0 -1
- package/dist/which-XZHEH76L-Di_vxpS1.mjs +0 -1
- package/dist/whoami-DGKU3D2X-BDh4nuof.mjs +0 -1
- package/dist/xan-BXDXYEIB-xeeBU-41.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-Bp_uMGUB.mjs +0 -1
- package/dist/xargs-I6EZUCYF-Xyb7Erje.mjs +0 -1
- package/dist/yq-MJMAR36V-BM8HTxRY.mjs +0 -1
|
@@ -497,4 +497,4 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
497
497
|
|
|
498
498
|
`:`
|
|
499
499
|
`;return l.join(f)},table(e,t,n,r){let i=n.enter(`table`),a=[],o=[],s=e.children??[];for(let e of s){let t=e.children??[],i=[],s=[];for(let e of t){let t=n.enter(`tableCell`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,{...r,before:` `,after:` `});a(),t(),i.push(o);let c=e.data?.sourcePadding;s.push(c&&typeof c.left==`number`&&typeof c.right==`number`?{left:c.left,right:c.right}:null)}a.push(i),o.push(s)}i();let c=e.align??[],l=e.data?.sourceDashCounts,u=a[0]?.length??0,d=a.slice(1).reduce((e,t)=>Math.max(e,t.length),0),f=Math.max(u,d,c.length),p=[];for(let e=0;e<f;e++){let t=c[e],n=``,r=``;t===`center`?(n=`:`,r=`:`):t===`left`?n=`:`:t===`right`&&(r=`:`);let i=l?.[e],a=typeof i==`number`&&i>=1?i:1;p.push(n+`-`.repeat(a)+r)}let m=(e,t)=>{let n=[];for(let r=0;r<f;r++){let i=e[r]??``,a=t[r]??{left:1,right:1};n.push(` `.repeat(a.left)+i+` `.repeat(a.right))}return`|${n.join(`|`)}|`},h=Array.from({length:f},()=>null);if(a.length===0)return m(p,h);let g=[];g.push(m(a[0],o[0]??[])),g.push(m(p,h));for(let e=1;e<a.length;e++)g.push(m(a[e],o[e]??[]));return g.join(`
|
|
500
|
-
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=J8(i.attributes??[]);if(!i.children||i.children.length===0)return s?c?`<${s} ${c} />`:`<${s} />`:``;let l=c?`<${s} ${c}>`:`<${s}>`,u=`</${s}>`;return`${l}\n\n${n.containerFlow({type:`root`,children:i.children},r)}\n\n${u}`},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),o+=i.move(`==`),a(),o},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=J8(e.attributes??[]);return r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>n?`>`:s?.[c++]===`none`?`>${e}`:`> ${e}`)}};function J8(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){if(n.value.includes(`"`)){let r=n.value.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`);t.push(`${e}={"${r}"}`)}else t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function Y8(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function X8(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function are(e){return e.replace(/(?<!\\)&(?=[A-Za-z][A-Za-z0-9]*;|#[0-9]+;|#[xX][0-9A-Fa-f]+;)/g,`\\&`)}function Z8(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character==="`"));let i;try{i=e.safe(t,n)}finally{e.unsafe=r}return are(i)}function Q8(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var ore=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};constructor(e){this.schema=qy(e.extensions),this.handlers=fre(this.schema,this.parseCtx);let{nodeHandlers:t,markHandlers:n}=pre(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=R8({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=z8({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers,toMarkdownHandlers:q8})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return B8(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?V8(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?X4(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return H8(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}},$8=O4();function sre(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function cre(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function lre(e){return e.attrs.sourceDirty||cre(e)}function ure(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function e5(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),Object.keys(n).length===0?e:{...e,data:n}}function t5(e,t){if(e.length===0)return e5({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return e5({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[t5(n.children,t)]}}return e5({type:`inlineCode`,value:n5(e)},t)}function n5(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=n5(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var dre=x$;function fre(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=GH(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=GH(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null;return n.table.createAndFill({sourceDashCounts:s},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=K8(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i){let t=n.replaceAll(`\xA0`,` `);return r.sourceLiteral?e.text(t,[r.sourceLiteral.create({sourceRaw:i})]):e.text(t)}let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n.replaceAll(`\xA0`,` `));let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[],l=0;for(let t of s){if(t.offset>l){let r=n.slice(l,t.offset).replaceAll(`\xA0`,` `);r&&c.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length).replaceAll(`\xA0`,` `);i&&(t.kind===`escape`?c.push(e.text(i,[r.escapeMark.create()])):r.sourceLiteral?c.push(e.text(i,[r.sourceLiteral.create({sourceRaw:t.raw})])):c.push(e.text(i))),l=t.offset+t.length}}if(l<n.length){let t=n.slice(l).replaceAll(`\xA0`,` `);t&&c.push(e.text(t))}return c.length===1?c[0]:c}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1})]));let a=r.strike??r.delete;if(a&&(i.delete=KH(a)),r.highlight&&(i.mark=KH(r.highlight)),r.comment&&(i.comment=KH(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=GH(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=KH(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=KH(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=GH(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),n.list&&(i.list=GH(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=GH(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=$8.getOrWildcard(o),c=sre(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=K8(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=z1(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&dre.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&S$.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&w$.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&T$.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:Q8(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(k$.has(l)&&r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}if(r.link){let t=r.link.create({href:o,title:null,linkStyle:`inline`,refLabel:null});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=GH(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function pre(e){let t={},n={},r=e.nodes,i=e.marks;r.paragraph&&(t.paragraph=ZH(`paragraph`)),r.blockquote&&(t.blockquote=ZH(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),r.heading&&(t.heading=ZH(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0}}))),r.codeBlock&&(t.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t}}}),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=ZH(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&ure(r[0])?r.slice(1):r;return{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,children:i}}),r.table&&(t.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c=Array.isArray(s)&&s.length>0?{sourceDashCounts:s}:void 0,l={type:`table`,align:i,children:o};return c&&(l.data=c),l}),r.tableRow&&(t.tableRow=ZH(`tableRow`));let a=e=>{let t=e.attrs.sourcePadding,n={};return typeof t==`object`&&t&&typeof t.left==`number`&&typeof t.right==`number`&&(n.sourcePadding=t),Object.keys(n).length>0?{data:n}:{}};if(r.tableCell&&(t.tableCell=ZH(`tableCell`,a)),r.tableHeader&&(t.tableHeader=ZH(`tableCell`,a)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.imageReference&&(t.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(r.jsxComponent&&(t.jsxComponent=(e,t,n)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let r=e.attrs.componentName||null,i=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!lre(e)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:r,attributes:i,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:$8.getOrWildcard(r??`*`).serialize(e,{all:e=>n.all(e),registry:$8,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.mathInline&&(t.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;return typeof n==`string`&&n.length>0?{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]}:{type:`inlineMath`,value:t}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),r.tag&&(t.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),r.wikiLinkEmbed&&(t.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=QH(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=QH(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return t5(n,{sourceFenceChar:r,sourceFenceLength:i})}),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=QH(`delete`)}return i.highlight&&(n.highlight=QH(`mark`)),i.comment&&(n.comment=QH(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),r.commentBlock&&(t.commentBlock=ZH(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),r.footnoteReference&&(t.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),r.footnoteDefinition&&(t.footnoteDefinition=ZH(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),i.link&&(n.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,n=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,r=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data=t.data??{},t.data.escapedChars=t.data.escapedChars??[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),i.sourceLiteral&&(n.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return D1(t,e.value)&&(e.data=e.data??{},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:t,markHandlers:n}}var mre=/\p{M}+/gu,hre=/[^\p{L}\p{N}]+/gu,gre=/^-+|-+$/g;function r5(e){return e.trim().normalize(`NFKD`).replace(mre,``).toLowerCase().replace(hre,`-`).replace(gre,``)}function _re(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function vre(e,t){let n=r5(e);return n?_re(n,t):``}function i5(e,t){let n=r5(e);return t?`#${n}-${r5(t)}`:`#${n}`}var yre=new Set([`img`,`video`,`audio`,`mark`]);function a5(e){let t=e.name;if(!t||!yre.has(t))return null;let n={};for(let t of e.attributes){if(t.type!==`mdxJsxAttribute`)return null;let e=t.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(t.value===null)n[t.name]=!0;else if(typeof t.value==`string`)n[t.name]=t.value;else return null}return{type:`element`,tagName:t,properties:n,children:[]}}var bre=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:i5(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},xre=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:i5(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Sre=(e,t)=>{let n=t,r=a5(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,i),e.applyData(t,i)},Cre=(e,t)=>{let n=t,r=a5(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,i),e.applyData(t,i)},wre=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},Tre=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)};function o5(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(o5).join(``):``}var s5={wikiLink:bre,wikiLinkEmbed:xre,mdxJsxFlowElement:Sre,mdxJsxTextElement:Cre,rawMdxFallback:wre,mark:Tre,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:o5(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:o5(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Ere=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Dre=/\bexpression\s*\(/i,Ore=1e4;function kre(e){return!(e.length>Ore||Ere.test(e)||Dre.test(e))}function c5(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!n1(e.split(/\s+/)[0]??``))return!1}return!0}var l5=()=>e=>{jP(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!n1(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!n1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!n1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!c5(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!c5(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!n1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!kre(r)&&delete n.style})};function Are(e){let t=SH().use(Kq,{handlers:s5}).use(l5).use(aq),n=t.runSync(e);return String(t.stringify(n))}function jre(e){let t=SH().use(bW).use(yU,[`yaml`]).use(u8).use(pH).use(F8).use(Kq,{handlers:s5}).use(l5).use(aq);return String(t.processSync(e))}sK(),bG(),xG(),P({docName:_0,summary:y0,content:j().optional(),...v0}).loose(),P({docName:_0,summary:y0,markdown:j().min(1),position:to([`append`,`prepend`,`replace`]).optional(),...v0}).loose(),P({docName:_0,summary:y0,find:j().min(1),replace:j(),offset:M().int().nonnegative().optional(),...v0}).loose(),P({docName:_0,connectionId:j().min(1),scope:to([`last`,`session`,`file`]).optional(),...v0}).loose();var u5=P({value:j(),truncatedFrom:M().int().nonnegative().optional(),hint:j().optional()}).loose(),Mre=P({type:F(`orphan`),parentCandidates:N(j()),message:j()}).loose();P({timestamp:j().min(1),summary:u5.optional()}).loose(),P({timestamp:j().min(1),subscriberCount:M().int().nonnegative(),systemSubscriberCount:M().int().nonnegative(),hints:N(Mre).optional(),summary:u5.optional()}).loose(),P({timestamp:j().min(1),subscriberCount:M().int().nonnegative(),systemSubscriberCount:M().int().nonnegative(),summary:u5.optional()}).loose(),P({docName:j().min(1),scope:to([`last`,`session`]),undone:Ba()}).loose(),P({docName:_0,patch:$a(j(),Za([LZ,Ha()])),types:$a(j(),to(IZ)).optional(),summary:y0,...v0}).loose(),P({timestamp:j().min(1),subscriberCount:M().int().nonnegative(),systemSubscriberCount:M().int().nonnegative(),appliedKeys:N(j()),summary:u5.optional()}).loose();var Nre=P({status:j().min(1),reason:j()}).loose();P({docName:j().min(1),content:j(),lifecycle:Nre.nullable()}).loose();var Pre=P({documents:N(P({kind:to([`document`,`asset`,`folder`]).default(`document`),docName:j().min(1).optional(),docExt:j().min(1).default(`.md`),size:M().int().nonnegative(),modified:j().min(1),isSymlink:Ba().default(!1),canonicalDocName:j().nullable().default(null),targetPath:j().nullable().default(null),path:j().min(1).optional(),assetExt:j().min(1).optional(),mediaKind:to([`image`,`video`,`audio`,`pdf`,`text`]).nullable().optional(),referencedBy:N(j().min(1)).optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0,{message:`document/asset/folder kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName)`}))}).loose(),Fre=P({source:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),Ire=P({docName:j().min(1),backlinks:N(Fre)}).loose();P({counts:$a(j().min(1),M().int().nonnegative())}).loose();var Lre=Qa(`kind`,[P({kind:F(`doc`),docName:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),P({kind:F(`external`),url:j().min(1),title:j(),snippet:j().nullable()}).loose()]),Rre=P({docName:j().min(1),forwardLinks:N(Lre)}).loose(),zre=Qa(`kind`,[P({id:j().min(1),kind:F(`doc`),docName:j().min(1),anchor:j().nullable(),label:j(),cluster:j().nullable(),category:j().nullable(),tags:N(j()).nullable()}).loose(),P({id:j().min(1),kind:F(`external`),url:j().min(1),label:j()}).loose()]),Bre=P({source:j().min(1),target:j().min(1)}).loose(),Vre=P({nodes:N(zre),links:N(Bre)}).loose();P({writers:N(P({id:j().min(1),name:j().optional(),email:j().optional()}).loose()).optional(),...v0}).loose(),P({checkpointRef:j().min(1)}).loose();var Hre=P({v:M().int().optional(),id:j().min(1),name:j().min(1),colorSeed:j().optional(),docs:N(j()),summaries:N(j()).optional()}).loose();P({entries:N(P({sha:j().min(1),timestamp:j().min(1),author:j(),authorEmail:j(),type:to([`checkpoint`,`wip`,`upstream`,`park`]),message:j(),contributors:N(Hre),checkpoint:Wa().nullable()}).loose()),total:M().int().nonnegative().optional(),truncated:Ba().optional()}).loose(),P({sha:j().regex(/^[0-9a-f]{40}$/i),content:j(),timestamp:j(),author:j()}).loose(),P({lines:N(P({type:to([`added`,`removed`,`unchanged`]),text:j()}).loose()),additions:M().int().nonnegative(),deletions:M().int().nonnegative()}).loose();var Ure=P({contentDir:j().min(1),pathSeparator:to([`/`,`\\`]),symlinkResolved:Ba()}).loose();N(Qa(`source`,[P({docName:j().min(1),timestamp:j().min(1),size:M().int().nonnegative(),source:F(`flat`)}).loose(),P({docName:j().min(1),timestamp:j().min(1),source:F(`timeline`),sha:j().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Wre=P({orphans:N(P({docName:j().min(1),title:j()}).loose())}).loose(),Gre=P({hubs:N(P({docName:j().min(1),title:j(),count:M().int().nonnegative()}).loose())}).loose(),Kre=P({source:j().min(1),title:j(),snippet:j().nullable()}).loose();P({deadLinks:N(P({target:j().min(1),sources:N(Kre)}).loose())}).loose(),P({target:P({docName:j().min(1),title:j(),aliases:N(j())}).loose(),mentions:N(P({source:j().min(1),excerpt:j(),offset:M().int().nonnegative()}).loose()),truncated:Ba()}).loose(),P({dir:j().min(1)}).loose(),P({port:M().int().positive()}).loose(),P({host:j().min(1).optional()}).loose(),P({pat:j().min(1),host:j().min(1).optional()}).loose(),P({name:j().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:j().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),P({identity:P({name:j().min(1),email:j().min(1)}).loose().nullable()}).loose(),P({authenticated:Ba()}).loose(),P({type:F(`complete`).optional(),login:j().min(1).optional()}).loose(),P({}).loose();var qre=P({stackIndex:M().int().min(0),ts:M().int().min(0),additions:M().int().min(0),deletions:M().int().min(0)}).loose(),Jre=P({docName:j().min(1),additionsTotal:M().int().min(0),deletionsTotal:M().int().min(0),lastTs:M().int().min(0),bursts:N(qre)}).loose(),Yre=P({displayName:j().min(1),color:j().min(1),icon:j().optional(),connectionId:j().min(1)}).loose(),Xre=P({sessionAlive:Ba(),agent:Yre.nullable(),files:N(Jre)}).loose(),Zre=P({diff:j(),generatedAt:M().int().min(0)}).loose();P({}).loose(),P({}).loose(),P({}).loose(),P({}).loose(),P({}).loose();var Qre=P({displayName:j().min(1),icon:j(),color:j().min(1),currentDoc:j().nullable(),mode:to([`idle`,`writing`]),ts:M().int().min(0)}).loose();P({presence:$a(j().min(1),Qre)}).loose(),$a(j().min(1),Ba()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),P({path:j().min(1,`path must be non-empty`)}).loose(),P({}).loose();var d5=P({fromDocName:j().min(1),toDocName:j().min(1)}).loose();P({}).loose(),P({path:j().min(1),...v0,summary:y0}).loose();var $re=P({docName:j().min(1)}).loose();P({path:j().min(1),...v0,summary:y0}).loose();var eie=P({path:j().min(1)}).loose();P({kind:to([`file`,`folder`]),path:j().min(1),...v0,summary:y0}).loose();var tie=P({kind:to([`file`,`folder`]),path:j().min(1),duplicatedDocNames:N(j().min(1))}).loose(),nie=P({pages:N(P({docName:j().min(1),title:j(),docExt:j().min(1),size:M().int().nonnegative(),modified:j().min(1),icon:j().min(1).max(2048).optional()}).loose())}).loose(),rie=P({level:M().int().min(1).max(6),text:j(),slug:j()}).loose(),iie=P({docName:j().min(1),headings:N(rie)}).loose();P({docName:j().min(1),newDocName:j().min(1),summary:y0,...v0}).loose();var f5=P({docName:j().min(1),rewrites:M().int().nonnegative()}).loose();P({renamed:N(d5),rewrittenDocs:N(f5),summary:u5.optional()}).loose(),P({kind:to([`file`,`folder`]),fromPath:j().min(1),toPath:j().min(1),...v0,summary:y0}).loose();var aie=P({renamed:N(d5),rewrittenDocs:N(f5).optional(),summary:u5.optional()}).loose();P({kind:to([`file`,`folder`]),path:j().min(1),...v0}).loose();var oie=P({deletedDocNames:N(j().min(1))}).loose();P({kind:to([`file`,`folder`]),path:j().min(1),...v0,summary:y0}).loose();var sie=P({deletedDocNames:N(j().min(1))}).loose();P({docName:j().min(1),commitSha:j().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:y0,...v0}).loose(),P({restoredFrom:j().min(1),timestamp:j().min(1),summary:u5.optional()}).loose();var cie=to([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),lie=P({label:j().min(1),webUrl:ba().nullable()}).loose();P({state:cie,lastSyncUtc:j().nullable(),lastFetchUtc:j().nullable(),lastPushedSha:j().nullable(),ahead:M().int().min(0),behind:M().int().min(0),consecutiveFailures:M().int().min(0),conflictCount:M().int().min(0),hasRemote:Ba(),syncEnabled:Ba(),identityUnresolved:Ba(),remote:lie.nullable().optional(),error:j().optional(),pausedReason:j().optional()}).loose(),P({op:to([`sync`,`push`,`pull`]).optional()}).loose(),P({op:to([`sync`,`push`,`pull`])}).loose(),P({conflicts:N(P({file:j().min(1),detectedAt:j().min(1),oursSha:j().optional(),theirsSha:j().optional(),baseSha:j().optional()}).loose())}).loose(),P({file:j().min(1),strategy:to([`mine`,`theirs`,`content`]),content:j().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content is required when strategy is 'content'`,path:[`content`]}),P({}).loose(),P({file:j().min(1),base:j(),ours:j(),theirs:j(),lifecycleStatus:j().nullable()}).loose(),P({}).loose(),P({plan:To(e=>e!==void 0,{message:`plan is required`})}).loose(),P({plan:To(e=>e!==void 0,{message:`plan is required`})}).loose(),P({result:To(e=>e!==void 0,{message:`result is required`})}).loose();var uie=P({path:j().min(1),summary:j().min(1)}).loose(),die=P({files:M().int().nonnegative(),folders:M().int().nonnegative()}).loose();P({packs:N(P({id:j().min(1),name:j().min(1),description:j().min(1),defaultSubfolder:j().optional(),folders:N(uie),entryCounts:die}).loose())}).loose(),P({noOpen:Ba().optional(),out:j().min(1).optional()}).loose();var fie=P({reason:to([`unsupported-platform`,`spawn-error`]),message:j()}).loose();Qa(`status`,[P({status:F(`installed`),outputPath:j(),size:M().int().nonnegative(),sha256:j(),skillVersion:j()}).loose(),P({status:F(`built`),outputPath:j(),size:M().int().nonnegative(),sha256:j(),skillVersion:j(),handoffError:fie.optional()}).loose(),P({status:F(`failed`),buildError:j()}).loose(),P({status:F(`skip-current`),skillVersion:j(),recordedAt:j().optional()}).loose()]),P({tags:N(P({name:j().min(1),count:M().int().nonnegative(),isLeaf:Ba()}).loose())}).loose();var pie=P({docName:j().min(1),title:j(),matchingTags:N(j().min(1)),snippet:j().nullable()}).loose();P({name:j().min(1),docs:N(pie)}).loose(),P({folder:Wa(),frontmatter_local:$a(j(),Wa()).nullable()}).loose(),P({path:j(),frontmatter:$a(j(),Wa()).optional()}).loose(),P({applied:Wa()}).loose();var p5=$a(j(),Wa()).meta({description:`Free-form frontmatter map embedded in template payloads.`});P({template:P({name:j().min(1),folder:j(),scope:to([`local`,`inherited`]),path:j().min(1),frontmatter:p5,body:j()}).strict()}).strict(),P({folder:j(),name:j(),body:j().optional(),frontmatter:p5.optional()}).strict(),P({path:j().min(1),created:Ba(),warnings:N(j())}).strict(),P({existed:Ba(),path:j().min(1)}).strict(),P({query:j().optional(),intent:to([`autocomplete`,`full_text`,`omnibar`]).optional(),scopes:N(to([`page`,`folder`,`content`])).optional(),scope:j().optional(),limit:M().int().nonnegative().optional()}).loose();var mie=P({kind:to([`page`,`folder`,`content`]),path:j().min(1),title:j(),score:M(),signals:$a(j(),Wa()),snippet:j().optional()}).loose();P({query:j(),intent:to([`autocomplete`,`full_text`,`omnibar`]),results:N(mie),elapsedMs:M().nonnegative()}).loose();var hie=P({version:j().min(1),recordedAt:j().min(1)}).loose();P({currentVersion:j().min(1),targets:$a(j(),hie.nullable())}).loose();var gie=`server-info`,_ie=`branch-switched`,vie=`disk-ack`,yie=`config-validation-rejected`,bie=`config-ignore-nested-error`,m5=to([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),xie=P({v:F(1),ch:F(gie),seq:M(),serverInstanceId:j().min(1),currentBranch:j().min(1).optional()}).loose(),Sie=P({v:F(1),ch:F(_ie),seq:M(),branch:j().min(1)}).loose(),Cie=P({v:F(1),ch:m5,seq:M()}).loose(),wie=P({v:F(1),ch:F(vie),seq:M(),docName:j().min(1),sv:j().min(1)}).loose(),Tie=P({v:F(1),ch:F(yie),seq:M(),docName:j().min(1),error:GQ}).loose(),Eie=P({v:F(1),ch:F(bie),seq:M(),path:j().min(1),error:j().min(1)}).loose(),Die={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},h5=new WeakMap;function Oie(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function g5(e){return e.trim().toLowerCase()}function _5(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function kie(e){return e.split(`/`).filter(Boolean).join(` `)}function Aie(e){let t=_5(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0;return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:kie(e.path),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function v5(e){let t=HX({schema:Die});return e.length>0&&$X(t,e),t}function jie(e){let t={documents:e};return h5.set(t,v5(e)),t}function Mie(e){let t=h5.get(e);if(t)return t;let n=v5(e.documents);return h5.set(e,n),n}function Nie(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`]:[`page`,`folder`]}function y5(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function b5(e,t){let n=g5(t);if(!n)return 0;let r=g5(e.title),i=g5(e.name),a=g5(e.path),o=a.split(`/`);return r===n||i===n?700:a===n?650:r.startsWith(n)||i.startsWith(n)?600:o.some(e=>e.startsWith(n))?550:r.includes(n)||i.includes(n)?500:a.includes(n)?450:-1}function Pie(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Fie(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Iie(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function Lie(e,t){return g5(t).length<4?0:+(e===`full_text`)}function Rie(e,t,n={}){let r=n.intent??`omnibar`,i=Oie(n.limit),a=new Set(n.scopes??Nie(r)),o=e.documents.filter(e=>y5(e,a)),s=g5(t);if(!s)return o.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,i).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let c=kZ(Mie(e),{term:s,properties:Fie(r),boost:Iie(r),tolerance:Lie(r,s),limit:Math.max(i*4,40)}),l=new Map(c.hits.filter(e=>y5(e.document,a)).map(e=>[e.document.id,e.score])),u=Pie(o),d=new Map;for(let e of o)b5(e,s)>=0&&d.set(e.id,e);for(let e of c.hits)y5(e.document,a)&&d.set(e.document.id,e.document);return[...d.values()].map(e=>{let t=Math.max(0,b5(e,s)),n=l.get(e.id)??0,r=u.get(e.id)??0;return{document:e,score:t+n*20+r,signals:{lexical:t,fullText:n,recency:r}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score).slice(0,i)}var x5=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),S5=globalThis;S5[x5]===void 0&&(S5[x5]=Fr());var C5=S5[x5],w5=Ya({version:j().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(C5,{description:`Recorded skill version for this target.`}),recordedAt:Gi().register(C5,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:to([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(C5,{description:`Install-source surface that recorded this entry.`}).optional()});Ya({schema:F(1).register(C5,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:Ya({"claude-cowork":w5.optional(),"cli-hosts":w5.optional()}).register(C5,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({})});var T5=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function zie(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??Bie,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new T5(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function Bie(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Vie(){let e=!1,t=``,n=0;return r=>{let i=Hie(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function Hie(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}var Uie=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Wie={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Gie={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},E5=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function Kie(e,t=Uie){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function qie(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function Jie(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var Yie={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function Xie(e){return e?Yie[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function Zie(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function Qie(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function $ie(e){let[t]=Zie(e);return Qie(t,45,32)}var eae=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],tae=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],D5=`ok-user-name-v3`,O5=`ok-user-color-v3`;function k5(e){return e[Math.floor(Math.random()*e.length)]}function nae(){return`${k5(eae)} ${k5(tae)}`}function rae(){return k5(E5)}function A5(e){try{return localStorage.getItem(e)}catch{return null}}function j5(e,t){try{localStorage.setItem(e,t)}catch{}}function iae(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=A5(D5),r=A5(O5);return n||(n=nae(),j5(D5,n)),r||(r=rae(),j5(O5,r)),{name:n,color:r,coeditor:e,tabId:t}}function aae(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`/`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of l.split(`/`))if(e===`..`){if(u.length===0)return null;u.pop()}else e!==`.`&&e!==``&&u.push(e);return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function oae(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var M5=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function N5(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function P5(e){return e.split(`/`).filter(Boolean)}function F5(e){let t=e.trim();return M5.test(t)||t.startsWith(`//`)}function sae(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}let r=aae(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};if(F5(n)||n.startsWith(`/`))return{kind:`external`,url:n};let i=N5(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function cae(e,t){let n=e.trim();if(!n)return null;if(F5(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=N5(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function lae(e,t){let n=e.trim();if(!n||M5.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function uae(e,t,n=null){let r=P5(e);r.pop();let i=P5(t),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a+=1;let o=r.slice(a).map(()=>`..`),s=i.slice(a),c=[...o,...s].join(`/`);return c||=i.at(-1)??t,!c.startsWith(`./`)&&!c.startsWith(`../`)&&(c=`./${c}`),`${c}.md${n?`#${n}`:``}`}function dae(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}function fae(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}var I5=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),pae=`VisuallyHidden`,L5=D.forwardRef((e,t)=>(0,Oo.jsx)(h.span,{...e,ref:t,style:{...I5,...e.style}}));L5.displayName=pae;var mae=L5;function hae(e){let t=e+`CollectionProvider`,[n,r]=_(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,Oo.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,l=c(s),d=D.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,Oo.jsx)(l,{ref:u(t,a(s,n).collectionRef),children:r})});d.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=c(f),h=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=u(t,o),c=a(f,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,Oo.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:d,ItemSlot:h},g,r]}var gae=D.createContext(void 0);function _ae(e){let t=D.useContext(gae);return e||t||`ltr`}var R5=[`top`,`right`,`bottom`,`left`],z5=[`start`,`end`],B5=R5.reduce((e,t)=>e.concat(t,t+`-`+z5[0],t+`-`+z5[1]),[]),V5=Math.min,H5=Math.max,U5=Math.round,W5=Math.floor,G5=e=>({x:e,y:e}),vae={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function K5(e,t,n){return H5(e,V5(t,n))}function q5(e,t){return typeof e==`function`?e(t):e}function J5(e){return e.split(`-`)[0]}function Y5(e){return e.split(`-`)[1]}function X5(e){return e===`x`?`y`:`x`}function Z5(e){return e===`y`?`height`:`width`}function Q5(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $5(e){return X5(Q5(e))}function e7(e,t,n){n===void 0&&(n=!1);let r=Y5(e),i=$5(e),a=Z5(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=i7(o)),[o,i7(o)]}function yae(e){let t=i7(e);return[t7(e),t,t7(t)]}function t7(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var n7=[`left`,`right`],r7=[`right`,`left`],bae=[`top`,`bottom`],xae=[`bottom`,`top`];function Sae(e,t,n){switch(e){case`top`:case`bottom`:return n?t?r7:n7:t?n7:r7;case`left`:case`right`:return t?bae:xae;default:return[]}}function Cae(e,t,n,r){let i=Y5(e),a=Sae(J5(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(t7)))),a}function i7(e){let t=J5(e);return vae[t]+e.slice(t.length)}function wae(e){return{top:0,right:0,bottom:0,left:0,...e}}function a7(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:wae(e)}function o7(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function s7(e,t,n){let{reference:r,floating:i}=e,a=Q5(t),o=$5(t),s=Z5(o),c=J5(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Y5(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Tae(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=q5(t,e),p=a7(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=o7(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=o7(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Eae=50,Dae=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Tae},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=s7(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Eae&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=s7(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Oae=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=q5(e,t)||{};if(l==null)return{};let d=a7(u),f={x:n,y:r},p=$5(i),m=Z5(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=V5(d[_],T),D=V5(d[v],T),ee=E,te=C-h[m]-D,ne=C/2-h[m]/2+w,re=K5(ee,ne,te),ie=!c.arrow&&Y5(i)!=null&&ne!==re&&a.reference[m]/2-(ne<ee?E:D)-h[m]/2<0,O=ie?ne<ee?ne-ee:ne-te:0;return{[p]:f[p]+O,data:{[p]:re,centerOffset:ne-re-O,...ie&&{alignmentOffset:O}},reset:ie}}});function kae(e,t,n){return(e?[...n.filter(t=>Y5(t)===e),...n.filter(t=>Y5(t)!==e)]:n.filter(e=>J5(e)===e)).filter(n=>e?Y5(n)===e||(t?t7(n)!==n:!1):!0)}var Aae=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=B5,autoAlignment:u=!0,...d}=q5(e,t),f=c!==void 0||l===B5?kae(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=e7(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[J5(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Y5(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Y5(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},jae=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=q5(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=J5(r),_=Q5(o),v=J5(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[i7(o)]:yae(o)),x=p!==`none`;!d&&x&&b.push(...Cae(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=e7(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Q5(t))||T.every(e=>Q5(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Q5(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function c7(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function l7(e){return R5.some(t=>e[t]>=0)}var Mae=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=q5(e,t);switch(i){case`referenceHidden`:{let e=c7(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:l7(e)}}}case`escaped`:{let e=c7(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:l7(e)}}}default:return{}}}}};function u7(e){let t=V5(...e.map(e=>e.left)),n=V5(...e.map(e=>e.top)),r=H5(...e.map(e=>e.right)),i=H5(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Nae(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>o7(u7(e)))}var Pae=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=q5(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=Nae(u),f=o7(u7(u)),p=a7(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(Q5(n)===`y`){let e=d[0],t=d[d.length-1],r=J5(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=J5(n)===`left`,t=H5(...d.map(e=>e.right)),r=V5(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},d7=new Set([`left`,`top`]);async function Fae(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=J5(n),s=Y5(n),c=Q5(n)===`y`,l=d7.has(o)?-1:1,u=a&&c?-1:1,d=q5(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Iae=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Fae(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lae=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=q5(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Q5(J5(i)),p=X5(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=K5(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=K5(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Rae=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=q5(e,t),u={x:n,y:r},d=Q5(i),f=X5(d),p=u[f],m=u[d],h=q5(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=d7.has(J5(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zae=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=q5(e,t),u=await o.detectOverflow(t,l),d=J5(i),f=Y5(i),p=Q5(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=V5(h-u[g],v),x=V5(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=H5(u.left,0),t=H5(u.right,0),n=H5(u.top,0),r=H5(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:H5(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:H5(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function f7(){return typeof window<`u`}function p7(e){return g7(e)?(e.nodeName||``).toLowerCase():`#document`}function m7(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function h7(e){return((g7(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function g7(e){return f7()?e instanceof Node||e instanceof m7(e).Node:!1}function _7(e){return f7()?e instanceof Element||e instanceof m7(e).Element:!1}function v7(e){return f7()?e instanceof HTMLElement||e instanceof m7(e).HTMLElement:!1}function y7(e){return!f7()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof m7(e).ShadowRoot}function b7(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=D7(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Bae(e){return/^(table|td|th)$/.test(p7(e))}function x7(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Vae=/transform|translate|scale|rotate|perspective|filter/,Hae=/paint|layout|strict|content/,S7=e=>!!e&&e!==`none`,C7;function w7(e){let t=_7(e)?D7(e):e;return S7(t.transform)||S7(t.translate)||S7(t.scale)||S7(t.rotate)||S7(t.perspective)||!T7()&&(S7(t.backdropFilter)||S7(t.filter))||Vae.test(t.willChange||``)||Hae.test(t.contain||``)}function Uae(e){let t=k7(e);for(;v7(t)&&!E7(t);){if(w7(t))return t;if(x7(t))return null;t=k7(t)}return null}function T7(){return C7??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),C7}function E7(e){return/^(html|body|#document)$/.test(p7(e))}function D7(e){return m7(e).getComputedStyle(e)}function O7(e){return _7(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k7(e){if(p7(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||y7(e)&&e.host||h7(e);return y7(t)?t.host:t}function A7(e){let t=k7(e);return E7(t)?e.ownerDocument?e.ownerDocument.body:e.body:v7(t)&&b7(t)?t:A7(t)}function j7(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=A7(e),i=r===e.ownerDocument?.body,a=m7(r);if(i){let e=M7(a);return t.concat(a,a.visualViewport||[],b7(r)?r:[],e&&n?j7(e):[])}else return t.concat(r,j7(r,[],n))}function M7(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N7(e){let t=D7(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=v7(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=U5(n)!==a||U5(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function P7(e){return _7(e)?e:e.contextElement}function F7(e){let t=P7(e);if(!v7(t))return G5(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=N7(t),o=(a?U5(n.width):n.width)/r,s=(a?U5(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Wae=G5(0);function I7(e){let t=m7(e);return!T7()||!t.visualViewport?Wae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gae(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==m7(e)?!1:t}function L7(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=P7(e),o=G5(1);t&&(r?_7(r)&&(o=F7(r)):o=F7(e));let s=Gae(a,n,r)?I7(a):G5(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=m7(a),t=r&&_7(r)?m7(r):r,n=e,i=M7(n);for(;i&&r&&t!==n;){let e=F7(i),t=i.getBoundingClientRect(),r=D7(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=m7(i),i=M7(n)}}return o7({width:u,height:d,x:c,y:l})}function R7(e,t){let n=O7(e).scrollLeft;return t?t.left+n:L7(h7(e)).left+n}function z7(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-R7(e,n),y:n.top+t.scrollTop}}function Kae(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=h7(r),s=t?x7(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=G5(1),u=G5(0),d=v7(r);if((d||!d&&!a)&&((p7(r)!==`body`||b7(o))&&(c=O7(r)),d)){let e=L7(r);l=F7(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?z7(o,c):G5(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function qae(e){return Array.from(e.getClientRects())}function Jae(e){let t=h7(e),n=O7(e),r=e.ownerDocument.body,i=H5(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=H5(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+R7(e),s=-n.scrollTop;return D7(r).direction===`rtl`&&(o+=H5(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var B7=25;function Yae(e,t){let n=m7(e),r=h7(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=T7();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=R7(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=B7&&(a-=o)}else l<=B7&&(a+=l);return{width:a,height:o,x:s,y:c}}function Xae(e,t){let n=L7(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=v7(e)?F7(e):G5(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function V7(e,t,n){let r;if(t===`viewport`)r=Yae(e,n);else if(t===`document`)r=Jae(h7(e));else if(_7(t))r=Xae(t,n);else{let n=I7(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return o7(r)}function H7(e,t){let n=k7(e);return n===t||!_7(n)||E7(n)?!1:D7(n).position===`fixed`||H7(n,t)}function Zae(e,t){let n=t.get(e);if(n)return n;let r=j7(e,[],!1).filter(e=>_7(e)&&p7(e)!==`body`),i=null,a=D7(e).position===`fixed`,o=a?k7(e):e;for(;_7(o)&&!E7(o);){let t=D7(o),n=w7(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||b7(o)&&!n&&H7(e,o))?r=r.filter(e=>e!==o):i=t,o=k7(o)}return t.set(e,r),r}function Qae(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?x7(t)?[]:Zae(t,this._c):[].concat(n),r],o=V7(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=V7(t,a[e],i);s=H5(n.top,s),c=V5(n.right,c),l=V5(n.bottom,l),u=H5(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function $ae(e){let{width:t,height:n}=N7(e);return{width:t,height:n}}function eoe(e,t,n){let r=v7(t),i=h7(t),a=n===`fixed`,o=L7(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=G5(0);function l(){c.x=R7(i)}if(r||!r&&!a)if((p7(t)!==`body`||b7(i))&&(s=O7(t)),r){let e=L7(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?z7(i,s):G5(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function U7(e){return D7(e).position===`static`}function W7(e,t){if(!v7(e)||D7(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return h7(e)===n&&(n=n.ownerDocument.body),n}function G7(e,t){let n=m7(e);if(x7(e))return n;if(!v7(e)){let t=k7(e);for(;t&&!E7(t);){if(_7(t)&&!U7(t))return t;t=k7(t)}return n}let r=W7(e,t);for(;r&&Bae(r)&&U7(r);)r=W7(r,t);return r&&E7(r)&&U7(r)&&!w7(r)?n:r||Uae(e)||n}var toe=async function(e){let t=this.getOffsetParent||G7,n=this.getDimensions,r=await n(e.floating);return{reference:eoe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function noe(e){return D7(e).direction===`rtl`}var roe={convertOffsetParentRelativeRectToViewportRelativeRect:Kae,getDocumentElement:h7,getClippingRect:Qae,getOffsetParent:G7,getElementRects:toe,getClientRects:qae,getDimensions:$ae,getScale:F7,isElement:_7,isRTL:noe};function K7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ioe(e,t){let n=null,r,i=h7(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=W5(d),h=W5(i.clientWidth-(u+f)),g=W5(i.clientHeight-(d+p)),_=W5(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:H5(0,V5(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!K7(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function q7(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=P7(e),u=i||a?[...l?j7(l):[],...t?j7(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ioe(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?L7(e):null;c&&g();function g(){let t=L7(e);h&&!K7(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var J7=Iae,aoe=Aae,Y7=Lae,X7=jae,Z7=zae,Q7=Mae,$7=Oae,ooe=Pae,soe=Rae,e9=(e,t,n)=>{let r=new Map,i={platform:roe,...n},a={...i.platform,_c:r};return Dae(e,t,{...i,platform:a})},t9=typeof document<`u`?D.useLayoutEffect:function(){};function n9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!n9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!n9(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function r9(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function i9(e,t){let n=r9(e);return Math.round(t*n)/n}function a9(e){let t=D.useRef(e);return t9(()=>{t.current=e}),t}function coe(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=D.useState(r);n9(f,r)||p(r);let[m,h]=D.useState(null),[g,_]=D.useState(null),v=D.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=D.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=D.useRef(null),C=D.useRef(null),w=D.useRef(u),T=c!=null,E=a9(c),ee=a9(i),te=a9(l),ne=D.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),e9(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};re.current&&!n9(w.current,t)&&(w.current=t,ko.flushSync(()=>{d(t)}))})},[f,t,n,ee,te]);t9(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=D.useRef(!1);t9(()=>(re.current=!0,()=>{re.current=!1}),[]),t9(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ne);ne()}},[b,x,ne,E,T]);let ie=D.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),O=D.useMemo(()=>({reference:b,floating:x}),[b,x]),ae=D.useMemo(()=>{let e={position:n,left:0,top:0};if(!O.floating)return e;let t=i9(O.floating,u.x),r=i9(O.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...r9(O.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,O.floating,u.x,u.y]);return D.useMemo(()=>({...u,update:ne,refs:ie,elements:O,floatingStyles:ae}),[u,ne,ie,O,ae])}var loe=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:$7({element:r.current,padding:i}).fn(n):r?$7({element:r,padding:i}).fn(n):{}}}},uoe=(e,t)=>{let n=J7(e);return{name:n.name,fn:n.fn,options:[e,t]}},doe=(e,t)=>{let n=Y7(e);return{name:n.name,fn:n.fn,options:[e,t]}},foe=(e,t)=>({fn:soe(e).fn,options:[e,t]}),poe=(e,t)=>{let n=X7(e);return{name:n.name,fn:n.fn,options:[e,t]}},moe=(e,t)=>{let n=Z7(e);return{name:n.name,fn:n.fn,options:[e,t]}},hoe=(e,t)=>{let n=Q7(e);return{name:n.name,fn:n.fn,options:[e,t]}},goe=(e,t)=>{let n=loe(e);return{name:n.name,fn:n.fn,options:[e,t]}},_oe=`Arrow`,o9=D.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,Oo.jsx)(h.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,Oo.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});o9.displayName=_oe;var voe=o9,s9=`Popper`,[c9,l9]=_(s9),[yoe,u9]=c9(s9),d9=e=>{let{__scopePopper:t,children:n}=e,[r,i]=D.useState(null);return(0,Oo.jsx)(yoe,{scope:t,anchor:r,onAnchorChange:i,children:n})};d9.displayName=s9;var f9=`PopperAnchor`,p9=D.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=u9(f9,n),o=D.useRef(null),s=u(t,o),c=D.useRef(null);return D.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,Oo.jsx)(h.div,{...i,ref:s})});p9.displayName=f9;var m9=`PopperContent`,[boe,xoe]=c9(m9),h9=D.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:_,...y}=e,x=u9(m9,n),[S,C]=D.useState(null),w=u(t,e=>C(e)),[T,E]=D.useState(null),ee=v(T),te=ee?.width??0,ne=ee?.height??0,re=r+(a===`center`?``:`-`+a),ie=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(l)?l:[l],ae=O.length>0,oe={padding:ie,boundary:O.filter(Coe),altBoundary:ae},{refs:se,floatingStyles:ce,placement:le,isPositioned:ue,middlewareData:de}=coe({strategy:`fixed`,placement:re,whileElementsMounted:(...e)=>q7(...e,{animationFrame:m===`always`}),elements:{reference:x.anchor},middleware:[uoe({mainAxis:i+ne,alignmentAxis:o}),c&&doe({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?foe():void 0,...oe}),c&&poe({...oe}),moe({...oe,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&goe({element:T,padding:s}),woe({arrowWidth:te,arrowHeight:ne}),p&&hoe({strategy:`referenceHidden`,...oe})]}),[fe,pe]=v9(le),me=g(_);b(()=>{ue&&me?.()},[ue,me]);let he=de.arrow?.x,ge=de.arrow?.y,_e=de.arrow?.centerOffset!==0,[ve,ye]=D.useState();return b(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),(0,Oo.jsx)(`div`,{ref:se.setFloating,"data-radix-popper-content-wrapper":``,style:{...ce,transform:ue?ce.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ve,"--radix-popper-transform-origin":[de.transformOrigin?.x,de.transformOrigin?.y].join(` `),...de.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,Oo.jsx)(boe,{scope:n,placedSide:fe,onArrowChange:E,arrowX:he,arrowY:ge,shouldHideArrow:_e,children:(0,Oo.jsx)(h.div,{"data-side":fe,"data-align":pe,...y,ref:w,style:{...y.style,animation:ue?void 0:`none`}})})})});h9.displayName=m9;var g9=`PopperArrow`,Soe={top:`bottom`,right:`left`,bottom:`top`,left:`right`},_9=D.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=xoe(g9,n),a=Soe[i.placedSide];return(0,Oo.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,Oo.jsx)(voe,{...r,ref:t,style:{...r.style,display:`block`}})})});_9.displayName=g9;function Coe(e){return e!==null}var woe=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=v9(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function v9(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var y9=d9,b9=p9,x9=h9,S9=_9,[C9,Toe]=_(`Tooltip`,[l9]),w9=l9(),T9=`TooltipProvider`,Eoe=700,E9=`tooltip.open`,[Doe,D9]=C9(T9),O9=e=>{let{__scopeTooltip:t,delayDuration:n=Eoe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=D.useRef(!0),s=D.useRef(!1),c=D.useRef(0);return D.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,Oo.jsx)(Doe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:D.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};O9.displayName=T9;var k9=`Tooltip`,[Ooe,A9]=C9(k9),j9=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=D9(k9,e.__scopeTooltip),l=w9(t),[u,d]=D.useState(null),f=y(),p=D.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,_=D.useRef(!1),[v,b]=m({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(E9))):c.onClose(),a?.(e)},caller:k9}),x=D.useMemo(()=>v?_.current?`delayed-open`:`instant-open`:`closed`,[v]),S=D.useCallback(()=>{window.clearTimeout(p.current),p.current=0,_.current=!1,b(!0)},[b]),C=D.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),w=D.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{_.current=!0,b(!0),p.current=0},g)},[g,b]);return D.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,Oo.jsx)(y9,{...l,children:(0,Oo.jsx)(Ooe,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:D.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:D.useCallback(()=>{h?C():(window.clearTimeout(p.current),p.current=0)},[C,h]),onOpen:S,onClose:C,disableHoverableContent:h,children:n})})};j9.displayName=k9;var M9=`TooltipTrigger`,N9=D.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=A9(M9,n),a=D9(M9,n),o=w9(n),s=u(t,D.useRef(null),i.onTriggerChange),c=D.useRef(!1),l=D.useRef(!1),d=D.useCallback(()=>c.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,Oo.jsx)(b9,{asChild:!0,...o,children:(0,Oo.jsx)(h.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:f(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:f(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:f(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:f(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:f(e.onBlur,i.onClose),onClick:f(e.onClick,i.onClose)})})});N9.displayName=M9;var P9=`TooltipPortal`,[koe,Aoe]=C9(P9,{forceMount:void 0}),F9=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=A9(P9,t);return(0,Oo.jsx)(koe,{scope:t,forceMount:n,children:(0,Oo.jsx)(d,{present:n||a.open,children:(0,Oo.jsx)(p,{asChild:!0,container:i,children:r})})})};F9.displayName=P9;var I9=`TooltipContent`,L9=D.forwardRef((e,t)=>{let n=Aoe(I9,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=A9(I9,e.__scopeTooltip);return(0,Oo.jsx)(d,{present:r||o.open,children:o.disableHoverableContent?(0,Oo.jsx)(R9,{side:i,...a,ref:t}):(0,Oo.jsx)(joe,{side:i,...a,ref:t})})}),joe=D.forwardRef((e,t)=>{let n=A9(I9,e.__scopeTooltip),r=D9(I9,e.__scopeTooltip),i=D.useRef(null),a=u(t,i),[o,s]=D.useState(null),{trigger:c,onClose:l}=n,d=i.current,{onPointerInTransitChange:f}=r,p=D.useCallback(()=>{s(null),f(!1)},[f]),m=D.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Ioe(r,Foe(r,n.getBoundingClientRect())),a=Loe(t.getBoundingClientRect());s(zoe([...i,...a])),f(!0)},[f]);return D.useEffect(()=>()=>p(),[p]),D.useEffect(()=>{if(c&&d){let e=e=>m(e,d),t=e=>m(e,c);return c.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[c,d,m,p]),D.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),i=!Roe(n,o);r?p():i&&(p(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,d,o,l,p]),(0,Oo.jsx)(R9,{...e,ref:a})}),[Moe,Noe]=C9(k9,{isInside:!1}),Poe=x(`TooltipContent`),R9=D.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=A9(I9,n),u=w9(n),{onClose:d}=c;return D.useEffect(()=>(document.addEventListener(E9,d),()=>document.removeEventListener(E9,d)),[d]),D.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&d()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,d]),(0,Oo.jsx)(l,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,Oo.jsxs)(x9,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,Oo.jsx)(Poe,{children:r}),(0,Oo.jsx)(Moe,{scope:n,isInside:!0,children:(0,Oo.jsx)(mae,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});L9.displayName=I9;var z9=`TooltipArrow`,B9=D.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=w9(n);return Noe(z9,n).isInside?null:(0,Oo.jsx)(S9,{...i,...r,ref:t})});B9.displayName=z9;function Foe(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Ioe(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Loe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Roe(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function zoe(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Boe(t)}function Boe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Voe=O9,Hoe=j9,Uoe=N9,Woe=F9,Goe=L9,Koe=B9;function qoe(e){let t=(0,Ao.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delayDuration:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,Oo.jsx)(Voe,{"data-slot":`tooltip-provider`,delayDuration:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function Joe(e){let t=(0,Ao.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Oo.jsx)(Hoe,{"data-slot":`tooltip`,...n}),t[2]=n,t[3]=r),r}function Yoe(e){let t=(0,Ao.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Oo.jsx)(Uoe,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Xoe(e){let t=(0,Ao.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,sideOffset:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?0:a,c;t[5]===r?c=t[6]:(c=s(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:data-[state=delayed-open]:animate-none motion-reduce:duration-0`,r),t[5]=r,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Oo.jsx)(Koe,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`}),t[7]=l):l=t[7];let u;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==c?(u=(0,Oo.jsx)(Woe,{children:(0,Oo.jsxs)(Goe,{"data-slot":`tooltip-content`,sideOffset:o,className:c,...i,children:[n,l]})}),t[8]=n,t[9]=i,t[10]=o,t[11]=c,t[12]=u):u=t[12],u}function V9(e){if(typeof e!=`object`||!e)return;let t=e;if(typeof t.title==`string`&&t.title.length>0)return t.title}function Zoe(e){return e.kind===`asset`}function Qoe(e){return e.kind===`document`}function $oe(e){return e.kind===`folder`}function ese(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function tse(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function nse(e,t=!1){return e.filter(e=>{let n=e.docName??e.path??``;return n===``?!1:t?!0:!n.split(`/`).some(e=>e.startsWith(`.`))})}var H9=null,U9=new Set;function W9(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function rse(e,t){return e===null?!1:e===t?!0:W9(e.pages,t.pages)&&W9(e.folderPaths,t.folderPaths)&&W9(e.assetPaths??new Set,t.assetPaths??new Set)&&ise(e.pageIcons,t.pageIcons)}function ise(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function ase(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function ose(e,t){let n=new Map,r=[...e].sort((e,t)=>e.localeCompare(t));for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function sse(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function cse(){return H9}function lse(e){if(!rse(H9,e)){H9=e;for(let t of[...U9])try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function use(e){if(U9.add(e),H9!==null)try{e(H9)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{U9.delete(e)}}var G9=`open-knowledge:documents-changed`,dse=new Set(m5.options);function K9(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>dse.has(e)))]}function fse(e=[`files`]){window.dispatchEvent(new CustomEvent(G9,{detail:{channels:K9(e)}}))}function q9(e){let t=t=>{e(K9(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(G9,t),()=>window.removeEventListener(G9,t)}var J9=`open-knowledge:templates-changed`;function pse(){window.dispatchEvent(new CustomEvent(J9))}function mse(e){let t=()=>e();return window.addEventListener(J9,t),()=>window.removeEventListener(J9,t)}function Y9(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function hse(e){let t=Y9(e);return t?`${t}.md`:`untitled.md`}function gse(e){let t=Y9(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function _se(e){let t=e.trim();return{normalizedTarget:Y9(t).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function X9(e){let t=new Set;for(let n of e)for(let e of ese(n))t.add(e);return t}function vse(e,t){if(!t)return;let n=r5(e);if(n)return t.get(n)}function yse(e,t){if(!t||e.includes(`/`))return;let n=r5(e);if(n)return t.get(n)}function bse(e,t){let{normalizedTarget:n,expectsFolder:r}=_se(e);if(!n)return{kind:`missing`,target:n};if(!r&&t.pages.has(n))return{kind:`doc`,target:n,docName:n};if(!r){let e=vse(n,t.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let i=`${n}/index`;if(t.pages.has(i))return{kind:`folder-index`,target:n,folderPath:n,docName:i,noteKind:`canonical-index`};let a=n.split(`/`).pop(),o=a?`${n}/${a}`:null;if(o&&t.pages.has(o))return{kind:`folder-index`,target:n,folderPath:n,docName:o,noteKind:`legacy-folder-note`};if(!r){let e=yse(n,t.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(t.folderPaths??X9(t.pages)).has(n)?{kind:`folder`,target:n,folderPath:n}:{kind:`missing`,target:n}}function xse(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function Z9(e,t,n=s$){return typeof t!=`number`||!c$(t,n)?null:{kind:`large-file`,target:e,docName:e,size:t,limit:n}}function Sse(e,t,n=s$){return e.kind!==`doc`&&e.kind!==`folder-index`?e:Z9(e.docName,t.get(e.docName)?.size,n)??e}function Cse(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`folder`:return null}}var Q9=(0,D.createContext)(null);function wse(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function Tse(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function Ese(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function Dse(){let e=await fetch(`/api/pages`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(V9(t)??`/api/pages responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}async function Ose(){let e=await fetch(`/api/documents`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(V9(t)??`/api/documents responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.documents)?{assetPaths:t.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),folderPaths:t.documents.filter(e=>e.kind===`folder`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path)}:{assetPaths:[],folderPaths:[]}}function kse(e){console.error(`[PageListContext] Failed to load pages:`,e)}function Ase(e){console.warn(`[PageListContext] Failed to load referenced assets:`,e)}function jse(e){let t=(0,Ao.c)(49),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,D.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,D.useState)(o),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=new Map,t[2]=l):l=t[2];let[u,d]=(0,D.useState)(l),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[3]=f):f=t[3];let[p,m]=(0,D.useState)(f),h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[4]=h):h=t[4];let[g,_]=(0,D.useState)(h),v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=new Set,t[5]=v):v=t[5];let[y,b]=(0,D.useState)(v),[x,S]=(0,D.useState)(!0),[C,w]=(0,D.useState)(null),T=(0,D.useRef)(0),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(){let e=T.current+=1;Promise.all([Dse(),Ose().catch(Fse)]).then(t=>{let[n,r]=t;if(e!==T.current)return;let i=new Set(n.map(Pse));a(i),c(new Map(n.map(Nse))),d(new Map(n.map(Mse))),m(new Set(r.assetPaths)),_(new Set(r.folderPaths)),b(e=>Tse(e,i)),w(null)}).catch(t=>{e===T.current&&(kse(t),w(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===T.current&&S(!1)})},t[6]=E):E=t[6];let ee=E,te;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(te=function(e){b(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),w(null)},t[7]=te):te=t[7];let ne=te,re,ie;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>{ee();let e=()=>{document.visibilityState===`visible`&&ee()};window.addEventListener(`focus`,e),window.addEventListener(`visibilitychange`,e);let t=q9(e=>{e.includes(`files`)&&ee()});return()=>{window.removeEventListener(`focus`,e),window.removeEventListener(`visibilitychange`,e),t()}},re=[],t[8]=re,t[9]=ie):(re=t[8],ie=t[9]),(0,D.useEffect)(ie,re);let O,ae,oe,se,ce,le,ue;if(t[10]!==y||t[11]!==p||t[12]!==g||t[13]!==u||t[14]!==s||t[15]!==i){ce=wse(i,y);let e;t[23]!==y||t[24]!==s?(e=Ese(s,y),t[23]=y,t[24]=s,t[25]=e):e=t[25],se=e,oe=u,O=p,ae=new Set([...X9(ce),...g]),le=ase(ce,r5),ue=ose(ce,r5),t[10]=y,t[11]=p,t[12]=g,t[13]=u,t[14]=s,t[15]=i,t[16]=O,t[17]=ae,t[18]=oe,t[19]=se,t[20]=ce,t[21]=le,t[22]=ue}else O=t[16],ae=t[17],oe=t[18],se=t[19],ce=t[20],le=t[21],ue=t[22];let de=ue,fe;t[26]===u?fe=t[27]:(fe=sse(u),t[26]=u,t[27]=fe);let pe=fe,me,he;t[28]!==O||t[29]!==ae||t[30]!==pe||t[31]!==ce||t[32]!==de||t[33]!==le?(me=()=>{lse({pages:ce,folderPaths:ae,pagesBySlug:le,pagesByBasename:de,assetPaths:O,pageIcons:pe})},he=[ce,ae,le,de,O,pe],t[28]=O,t[29]=ae,t[30]=pe,t[31]=ce,t[32]=de,t[33]=le,t[34]=me,t[35]=he):(me=t[34],he=t[35]),(0,D.useEffect)(me,he);let ge;t[36]!==O||t[37]!==C||t[38]!==ae||t[39]!==x||t[40]!==oe||t[41]!==se||t[42]!==ce||t[43]!==de||t[44]!==le?(ge={pages:ce,pagesBySlug:le,pagesByBasename:de,pageTitles:se,pageMeta:oe,folderPaths:ae,assetPaths:O,loading:x,error:C,refetch:ee,addPage:ne},t[36]=O,t[37]=C,t[38]=ae,t[39]=x,t[40]=oe,t[41]=se,t[42]=ce,t[43]=de,t[44]=le,t[45]=ge):ge=t[45];let _e;return t[46]!==n||t[47]!==ge?(_e=(0,Oo.jsx)(Q9,{value:ge,children:n}),t[46]=n,t[47]=ge,t[48]=_e):_e=t[48],_e}function Mse(e){return[e.docName,{size:e.size,modified:e.modified,docExt:e.docExt,icon:e.icon}]}function Nse(e){return[e.docName,e.title]}function Pse(e){return e.docName}function Fse(e){return Ase(e),{assetPaths:[],folderPaths:[]}}function Ise(){let e=(0,D.use)(Q9);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}function Lse(e){if(e.startsWith($9)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=Hse(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function Rse(e){if(e.startsWith($9)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`?`),r=t.indexOf(`#`);if(n>=0&&(r<0||n<r)){let e=r>=0?r:t.length,i=new URLSearchParams(t.slice(n+1,e)).get(`anchor`);if(i)return i}if(r<0)return null;let i=t.slice(r+1);if(!i)return null;try{return decodeURIComponent(i)}catch{return i}}function zse(e,t){let n=`#/${e}`;return t?`${n}?anchor=${encodeURIComponent(t)}`:n}function Bse(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function Vse(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}?anchor=${encodeURIComponent(t)}`:r}var $9=`#/__asset__/`;function Hse(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function Use(e){if(!e.startsWith($9))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function Wse(e){return`${$9}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var Gse=n(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Kse=n(((e,t)=>{var n=Gse();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),qse=n(((e,t)=>{t.exports=Kse()()}));export{Wie as $,H4 as $n,Xy as $r,$$ as $t,V9 as A,me as Ai,t0 as An,ZZ as Ar,G1 as At,$7 as B,z1 as Bn,gne as Br,Vre as Bt,cse as C,uu as Ci,uae as Cn,JQ as Cr,D$ as Ct,Zoe as D,j as Di,Kie as Dn,dae as Dr,u$ as Dt,nse as E,P as Ei,cae as En,G2 as Er,tie as Et,b9 as F,jie as Fn,WZ as Fr,Gre as Ft,Q7 as G,vre as Gn,hb as Gr,h$ as Gt,q7 as H,FZ as Hn,aT as Hr,_1 as Ht,S9 as I,Aie as In,Y$ as Ir,x$ as It,Y7 as J,e$ as Jn,jx as Jr,nie as Jt,ooe as K,iae as Kn,qx as Kr,g$ as Kt,x9 as L,$ie as Ln,r5 as Lr,X$ as Lt,Xoe as M,oe as Mi,qie as Mn,fae as Mr,Rre as Mt,qoe as N,ae as Ni,Vie as Nn,Rie as Nr,E5 as Nt,Qoe as O,Ie as Oi,n0 as On,$2 as Or,T$ as Ot,Yoe as P,O4 as Pn,H1 as Pr,N2 as Pt,I5 as Q,V4 as Qn,Yy as Qr,aie as Qt,y9 as R,f$ as Rn,i5 as Rr,Z$ as Rt,mse as S,pu as Si,Y1 as Sn,V$ as Sr,O$ as St,tse as T,F as Ti,sae as Tn,I1 as Tr,Pre as Tt,e9 as U,Q8 as Un,Cx as Ur,p$ as Ut,aoe as V,N5 as Vn,fne as Vr,ore as Vt,X7 as W,Jie as Wn,cx as Wr,Wre as Wt,_ae as X,qQ as Xn,Ry as Xr,L0 as Xt,Z7 as Y,I2 as Yn,sne as Yr,I0 as Yt,hae as Z,Xie as Zn,qy as Zr,v1 as Zt,hse as _,df as _i,wQ as _n,W1 as _r,o$ as _t,Bse as a,vb as ai,E0 as an,F4 as ar,Zre as at,pse as b,td as bi,K1 as bn,Are as br,eie as bt,Vse as c,O_ as ci,sie as cn,R4 as cr,Eie as ct,Cse as d,B as di,k$ as dn,F5 as dr,wie as dt,gb as ei,t1 as en,N4 as er,Gie as et,xse as f,Np as fi,R1 as fn,KQ as fr,xie as ft,gse as g,z as gi,MQ as gn,n1 as gr,r$ as gt,Sse as h,mp as hi,oae as hn,r1 as hr,i$ as ht,Lse as i,Ly as ii,D0 as in,z4 as ir,Xre as it,Joe as j,pe as ji,g0 as jn,lae as jr,U1 as jt,$oe as k,he as ki,e0 as kn,QZ as kr,QQ as kt,jse as l,cv as li,R0 as ln,BZ as lr,Tie as lt,bse as m,R as mi,Ure as mn,m$ as mr,n$ as mt,Rse as n,yy as ni,F0 as nn,B4 as nr,l$ as nt,Wse as o,Ux as oi,A0 as on,M4 as or,Ire as ot,Z9 as p,Ip as pi,V1 as pn,K2 as pr,a$ as pt,J7 as q,L1 as qn,Wx as qr,iie as qt,Use as r,Xv as ri,S0 as rn,I4 as rr,w$ as rt,zse as s,T_ as si,M1 as sn,L4 as sr,Sie as st,qse as t,Mx as ti,t$ as tn,P4 as tr,_$ as tt,Ise as u,yp as ui,S$ as un,c$ as ur,Cie as ut,Y9 as v,Kd as vi,RQ as vn,J2 as vr,T5 as vt,use as w,vu as wi,zie as wn,K8 as wr,oie as wt,q9 as x,L as xi,q1 as xn,L2 as xr,$re as xt,fse as y,I as yi,z0 as yn,jre as yr,H$ as yt,l9 as z,$Q as zn,_5 as zr,s1 as zt};
|
|
500
|
+
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=J8(i.attributes??[]);if(!i.children||i.children.length===0)return s?c?`<${s} ${c} />`:`<${s} />`:``;let l=c?`<${s} ${c}>`:`<${s}>`,u=`</${s}>`;return`${l}\n\n${n.containerFlow({type:`root`,children:i.children},r)}\n\n${u}`},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),o+=i.move(`==`),a(),o},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=J8(e.attributes??[]);return r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>n?`>`:s?.[c++]===`none`?`>${e}`:`> ${e}`)}};function J8(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){if(n.value.includes(`"`)){let r=n.value.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`);t.push(`${e}={"${r}"}`)}else t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function Y8(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function X8(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function are(e){return e.replace(/(?<!\\)&(?=[A-Za-z][A-Za-z0-9]*;|#[0-9]+;|#[xX][0-9A-Fa-f]+;)/g,`\\&`)}function Z8(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character==="`"));let i;try{i=e.safe(t,n)}finally{e.unsafe=r}return are(i)}function Q8(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var ore=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};constructor(e){this.schema=qy(e.extensions),this.handlers=fre(this.schema,this.parseCtx);let{nodeHandlers:t,markHandlers:n}=pre(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=R8({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=z8({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers,toMarkdownHandlers:q8})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return B8(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?V8(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?X4(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return H8(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}},$8=O4();function sre(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function cre(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function lre(e){return e.attrs.sourceDirty||cre(e)}function ure(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function e5(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),Object.keys(n).length===0?e:{...e,data:n}}function t5(e,t){if(e.length===0)return e5({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return e5({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[t5(n.children,t)]}}return e5({type:`inlineCode`,value:n5(e)},t)}function n5(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=n5(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var dre=x$;function fre(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=GH(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=GH(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null;return n.table.createAndFill({sourceDashCounts:s},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=K8(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i){let t=n.replaceAll(`\xA0`,` `);return r.sourceLiteral?e.text(t,[r.sourceLiteral.create({sourceRaw:i})]):e.text(t)}let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n.replaceAll(`\xA0`,` `));let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[],l=0;for(let t of s){if(t.offset>l){let r=n.slice(l,t.offset).replaceAll(`\xA0`,` `);r&&c.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length).replaceAll(`\xA0`,` `);i&&(t.kind===`escape`?c.push(e.text(i,[r.escapeMark.create()])):r.sourceLiteral?c.push(e.text(i,[r.sourceLiteral.create({sourceRaw:t.raw})])):c.push(e.text(i))),l=t.offset+t.length}}if(l<n.length){let t=n.slice(l).replaceAll(`\xA0`,` `);t&&c.push(e.text(t))}return c.length===1?c[0]:c}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1})]));let a=r.strike??r.delete;if(a&&(i.delete=KH(a)),r.highlight&&(i.mark=KH(r.highlight)),r.comment&&(i.comment=KH(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=GH(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=KH(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=KH(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=GH(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),n.list&&(i.list=GH(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=GH(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=$8.getOrWildcard(o),c=sre(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=K8(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=z1(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&dre.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&S$.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&w$.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&T$.has(l)&&n.jsxComponent&&$8.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:Q8(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(k$.has(l)&&r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}if(r.link){let t=r.link.create({href:o,title:null,linkStyle:`inline`,refLabel:null});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=GH(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function pre(e){let t={},n={},r=e.nodes,i=e.marks;r.paragraph&&(t.paragraph=ZH(`paragraph`)),r.blockquote&&(t.blockquote=ZH(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),r.heading&&(t.heading=ZH(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0}}))),r.codeBlock&&(t.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t}}}),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=ZH(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&ure(r[0])?r.slice(1):r;return{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,children:i}}),r.table&&(t.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c=Array.isArray(s)&&s.length>0?{sourceDashCounts:s}:void 0,l={type:`table`,align:i,children:o};return c&&(l.data=c),l}),r.tableRow&&(t.tableRow=ZH(`tableRow`));let a=e=>{let t=e.attrs.sourcePadding,n={};return typeof t==`object`&&t&&typeof t.left==`number`&&typeof t.right==`number`&&(n.sourcePadding=t),Object.keys(n).length>0?{data:n}:{}};if(r.tableCell&&(t.tableCell=ZH(`tableCell`,a)),r.tableHeader&&(t.tableHeader=ZH(`tableCell`,a)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.imageReference&&(t.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(r.jsxComponent&&(t.jsxComponent=(e,t,n)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let r=e.attrs.componentName||null,i=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!lre(e)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:r,attributes:i,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:$8.getOrWildcard(r??`*`).serialize(e,{all:e=>n.all(e),registry:$8,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.mathInline&&(t.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;return typeof n==`string`&&n.length>0?{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]}:{type:`inlineMath`,value:t}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),r.tag&&(t.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),r.wikiLinkEmbed&&(t.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=QH(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=QH(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return t5(n,{sourceFenceChar:r,sourceFenceLength:i})}),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=QH(`delete`)}return i.highlight&&(n.highlight=QH(`mark`)),i.comment&&(n.comment=QH(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),r.commentBlock&&(t.commentBlock=ZH(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),r.footnoteReference&&(t.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),r.footnoteDefinition&&(t.footnoteDefinition=ZH(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),i.link&&(n.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,n=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,r=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data=t.data??{},t.data.escapedChars=t.data.escapedChars??[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),i.sourceLiteral&&(n.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return D1(t,e.value)&&(e.data=e.data??{},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:t,markHandlers:n}}var mre=/\p{M}+/gu,hre=/[^\p{L}\p{N}]+/gu,gre=/^-+|-+$/g;function r5(e){return e.trim().normalize(`NFKD`).replace(mre,``).toLowerCase().replace(hre,`-`).replace(gre,``)}function _re(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function vre(e,t){let n=r5(e);return n?_re(n,t):``}function i5(e,t){let n=r5(e);return t?`#${n}-${r5(t)}`:`#${n}`}var yre=new Set([`img`,`video`,`audio`,`mark`]);function a5(e){let t=e.name;if(!t||!yre.has(t))return null;let n={};for(let t of e.attributes){if(t.type!==`mdxJsxAttribute`)return null;let e=t.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(t.value===null)n[t.name]=!0;else if(typeof t.value==`string`)n[t.name]=t.value;else return null}return{type:`element`,tagName:t,properties:n,children:[]}}var bre=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:i5(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},xre=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:i5(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Sre=(e,t)=>{let n=t,r=a5(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,i),e.applyData(t,i)},Cre=(e,t)=>{let n=t,r=a5(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,i),e.applyData(t,i)},wre=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},Tre=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)};function o5(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(o5).join(``):``}var s5={wikiLink:bre,wikiLinkEmbed:xre,mdxJsxFlowElement:Sre,mdxJsxTextElement:Cre,rawMdxFallback:wre,mark:Tre,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:o5(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:o5(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Ere=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Dre=/\bexpression\s*\(/i,Ore=1e4;function kre(e){return!(e.length>Ore||Ere.test(e)||Dre.test(e))}function c5(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!n1(e.split(/\s+/)[0]??``))return!1}return!0}var l5=()=>e=>{jP(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!n1(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!n1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!n1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!c5(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!c5(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!n1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!kre(r)&&delete n.style})};function Are(e){let t=SH().use(Kq,{handlers:s5}).use(l5).use(aq),n=t.runSync(e);return String(t.stringify(n))}function jre(e){let t=SH().use(bW).use(yU,[`yaml`]).use(u8).use(pH).use(F8).use(Kq,{handlers:s5}).use(l5).use(aq);return String(t.processSync(e))}sK(),bG(),xG(),P({docName:_0,summary:y0,content:j().optional(),...v0}).loose(),P({docName:_0,summary:y0,markdown:j().min(1),position:to([`append`,`prepend`,`replace`]).optional(),...v0}).loose(),P({docName:_0,summary:y0,find:j().min(1),replace:j(),offset:M().int().nonnegative().optional(),...v0}).loose(),P({docName:_0,connectionId:j().min(1),scope:to([`last`,`session`,`file`]).optional(),...v0}).loose();var u5=P({value:j(),truncatedFrom:M().int().nonnegative().optional(),hint:j().optional()}).loose(),Mre=P({type:F(`orphan`),parentCandidates:N(j()),message:j()}).loose();P({timestamp:j().min(1),summary:u5.optional()}).loose(),P({timestamp:j().min(1),subscriberCount:M().int().nonnegative(),systemSubscriberCount:M().int().nonnegative(),hints:N(Mre).optional(),summary:u5.optional()}).loose(),P({timestamp:j().min(1),subscriberCount:M().int().nonnegative(),systemSubscriberCount:M().int().nonnegative(),summary:u5.optional()}).loose(),P({docName:j().min(1),scope:to([`last`,`session`]),undone:Ba()}).loose(),P({docName:_0,patch:$a(j(),Za([LZ,Ha()])),types:$a(j(),to(IZ)).optional(),summary:y0,...v0}).loose(),P({timestamp:j().min(1),subscriberCount:M().int().nonnegative(),systemSubscriberCount:M().int().nonnegative(),appliedKeys:N(j()),summary:u5.optional()}).loose();var Nre=P({status:j().min(1),reason:j()}).loose();P({docName:j().min(1),content:j(),lifecycle:Nre.nullable()}).loose();var Pre=P({documents:N(P({kind:to([`document`,`asset`,`folder`]).default(`document`),docName:j().min(1).optional(),docExt:j().min(1).default(`.md`),size:M().int().nonnegative(),modified:j().min(1),isSymlink:Ba().default(!1),canonicalDocName:j().nullable().default(null),targetPath:j().nullable().default(null),path:j().min(1).optional(),assetExt:j().min(1).optional(),mediaKind:to([`image`,`video`,`audio`,`pdf`,`text`]).nullable().optional(),referencedBy:N(j().min(1)).optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0,{message:`document/asset/folder kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName)`}))}).loose(),Fre=P({source:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),Ire=P({docName:j().min(1),backlinks:N(Fre)}).loose();P({counts:$a(j().min(1),M().int().nonnegative())}).loose();var Lre=Qa(`kind`,[P({kind:F(`doc`),docName:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),P({kind:F(`external`),url:j().min(1),title:j(),snippet:j().nullable()}).loose()]),Rre=P({docName:j().min(1),forwardLinks:N(Lre)}).loose(),zre=Qa(`kind`,[P({id:j().min(1),kind:F(`doc`),docName:j().min(1),anchor:j().nullable(),label:j(),cluster:j().nullable(),category:j().nullable(),tags:N(j()).nullable()}).loose(),P({id:j().min(1),kind:F(`external`),url:j().min(1),label:j()}).loose()]),Bre=P({source:j().min(1),target:j().min(1)}).loose(),Vre=P({nodes:N(zre),links:N(Bre)}).loose();P({writers:N(P({id:j().min(1),name:j().optional(),email:j().optional()}).loose()).optional(),...v0}).loose(),P({checkpointRef:j().min(1)}).loose();var Hre=P({v:M().int().optional(),id:j().min(1),name:j().min(1),colorSeed:j().optional(),docs:N(j()),summaries:N(j()).optional()}).loose();P({entries:N(P({sha:j().min(1),timestamp:j().min(1),author:j(),authorEmail:j(),type:to([`checkpoint`,`wip`,`upstream`,`park`]),message:j(),contributors:N(Hre),checkpoint:Wa().nullable()}).loose()),total:M().int().nonnegative().optional(),truncated:Ba().optional()}).loose(),P({sha:j().regex(/^[0-9a-f]{40}$/i),content:j(),timestamp:j(),author:j()}).loose(),P({lines:N(P({type:to([`added`,`removed`,`unchanged`]),text:j()}).loose()),additions:M().int().nonnegative(),deletions:M().int().nonnegative()}).loose();var Ure=P({contentDir:j().min(1),pathSeparator:to([`/`,`\\`]),symlinkResolved:Ba()}).loose();N(Qa(`source`,[P({docName:j().min(1),timestamp:j().min(1),size:M().int().nonnegative(),source:F(`flat`)}).loose(),P({docName:j().min(1),timestamp:j().min(1),source:F(`timeline`),sha:j().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Wre=P({orphans:N(P({docName:j().min(1),title:j()}).loose())}).loose(),Gre=P({hubs:N(P({docName:j().min(1),title:j(),count:M().int().nonnegative()}).loose())}).loose(),Kre=P({source:j().min(1),title:j(),snippet:j().nullable()}).loose();P({deadLinks:N(P({target:j().min(1),sources:N(Kre)}).loose())}).loose(),P({target:P({docName:j().min(1),title:j(),aliases:N(j())}).loose(),mentions:N(P({source:j().min(1),excerpt:j(),offset:M().int().nonnegative()}).loose()),truncated:Ba()}).loose(),P({dir:j().min(1)}).loose(),P({port:M().int().positive()}).loose(),P({host:j().min(1).optional()}).loose(),P({pat:j().min(1),host:j().min(1).optional()}).loose(),P({name:j().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:j().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),P({identity:P({name:j().min(1),email:j().min(1)}).loose().nullable()}).loose(),P({authenticated:Ba()}).loose(),P({type:F(`complete`).optional(),login:j().min(1).optional()}).loose(),P({}).loose();var qre=P({stackIndex:M().int().min(0),ts:M().int().min(0),additions:M().int().min(0),deletions:M().int().min(0)}).loose(),Jre=P({docName:j().min(1),additionsTotal:M().int().min(0),deletionsTotal:M().int().min(0),lastTs:M().int().min(0),bursts:N(qre)}).loose(),Yre=P({displayName:j().min(1),color:j().min(1),icon:j().optional(),connectionId:j().min(1)}).loose(),Xre=P({sessionAlive:Ba(),agent:Yre.nullable(),files:N(Jre)}).loose(),Zre=P({diff:j(),generatedAt:M().int().min(0)}).loose();P({}).loose(),P({}).loose(),P({}).loose(),P({}).loose(),P({}).loose();var Qre=P({displayName:j().min(1),icon:j(),color:j().min(1),currentDoc:j().nullable(),mode:to([`idle`,`writing`]),ts:M().int().min(0)}).loose();P({presence:$a(j().min(1),Qre)}).loose(),$a(j().min(1),Ba()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),P({path:j().min(1,`path must be non-empty`)}).loose(),P({}).loose();var d5=P({fromDocName:j().min(1),toDocName:j().min(1)}).loose();P({}).loose(),P({path:j().min(1),...v0,summary:y0}).loose();var $re=P({docName:j().min(1)}).loose();P({path:j().min(1),...v0,summary:y0}).loose();var eie=P({path:j().min(1)}).loose();P({kind:to([`file`,`folder`]),path:j().min(1),...v0,summary:y0}).loose();var tie=P({kind:to([`file`,`folder`]),path:j().min(1),duplicatedDocNames:N(j().min(1))}).loose(),nie=P({pages:N(P({docName:j().min(1),title:j(),docExt:j().min(1),size:M().int().nonnegative(),modified:j().min(1),icon:j().min(1).max(2048).optional()}).loose())}).loose(),rie=P({level:M().int().min(1).max(6),text:j(),slug:j()}).loose(),iie=P({docName:j().min(1),headings:N(rie)}).loose();P({docName:j().min(1),newDocName:j().min(1),summary:y0,...v0}).loose();var f5=P({docName:j().min(1),rewrites:M().int().nonnegative()}).loose();P({renamed:N(d5),rewrittenDocs:N(f5),summary:u5.optional()}).loose(),P({kind:to([`file`,`folder`]),fromPath:j().min(1),toPath:j().min(1),...v0,summary:y0}).loose();var aie=P({renamed:N(d5),rewrittenDocs:N(f5).optional(),summary:u5.optional()}).loose();P({kind:to([`file`,`folder`]),path:j().min(1),...v0}).loose();var oie=P({deletedDocNames:N(j().min(1))}).loose();P({kind:to([`file`,`folder`]),path:j().min(1),...v0,summary:y0}).loose();var sie=P({deletedDocNames:N(j().min(1))}).loose();P({docName:j().min(1),commitSha:j().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:y0,...v0}).loose(),P({restoredFrom:j().min(1),timestamp:j().min(1),summary:u5.optional()}).loose();var cie=to([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),lie=P({label:j().min(1),webUrl:ba().nullable()}).loose(),uie=Qa(`checkStatus`,[P({checkStatus:F(`allowed`)}).loose(),P({checkStatus:F(`denied`),deniedReason:to([`no-collaborator`,`private-no-access`,`repo-not-found`])}).loose(),P({checkStatus:F(`unknown`),unknownError:to([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`]).optional()}).loose()]);P({state:cie,lastSyncUtc:j().nullable(),lastFetchUtc:j().nullable(),lastPushedSha:j().nullable(),ahead:M().int().min(0),behind:M().int().min(0),consecutiveFailures:M().int().min(0),conflictCount:M().int().min(0),hasRemote:Ba(),syncEnabled:Ba(),identityUnresolved:Ba(),remote:lie.nullable().optional(),error:j().optional(),errorCode:to([`auth-403`,`auth-401`,`auth-scope-mismatch`,`semantic-protected-branch`]).optional(),pausedReason:j().optional(),pushPermission:uie.optional()}).loose(),P({op:to([`sync`,`push`,`pull`]).optional()}).loose(),P({op:to([`sync`,`push`,`pull`])}).loose(),P({conflicts:N(P({file:j().min(1),detectedAt:j().min(1),oursSha:j().optional(),theirsSha:j().optional(),baseSha:j().optional()}).loose())}).loose(),P({file:j().min(1),strategy:to([`mine`,`theirs`,`content`,`delete`]),content:j().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),P({}).loose(),P({file:j().min(1),base:j(),ours:j(),theirs:j(),kind:to([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:j().nullable()}).loose(),P({}).loose(),P({plan:To(e=>e!==void 0,{message:`plan is required`})}).loose(),P({plan:To(e=>e!==void 0,{message:`plan is required`})}).loose(),P({result:To(e=>e!==void 0,{message:`result is required`})}).loose();var die=P({path:j().min(1),summary:j().min(1)}).loose(),fie=P({files:M().int().nonnegative(),folders:M().int().nonnegative()}).loose();P({packs:N(P({id:j().min(1),name:j().min(1),description:j().min(1),defaultSubfolder:j().optional(),folders:N(die),entryCounts:fie}).loose())}).loose(),P({noOpen:Ba().optional(),out:j().min(1).optional()}).loose();var pie=P({reason:to([`unsupported-platform`,`spawn-error`]),message:j()}).loose();Qa(`status`,[P({status:F(`installed`),outputPath:j(),size:M().int().nonnegative(),sha256:j(),skillVersion:j()}).loose(),P({status:F(`built`),outputPath:j(),size:M().int().nonnegative(),sha256:j(),skillVersion:j(),handoffError:pie.optional()}).loose(),P({status:F(`failed`),buildError:j()}).loose(),P({status:F(`skip-current`),skillVersion:j(),recordedAt:j().optional()}).loose()]),P({tags:N(P({name:j().min(1),count:M().int().nonnegative(),isLeaf:Ba()}).loose())}).loose();var mie=P({docName:j().min(1),title:j(),matchingTags:N(j().min(1)),snippet:j().nullable()}).loose();P({name:j().min(1),docs:N(mie)}).loose(),P({folder:Wa(),frontmatter_local:$a(j(),Wa()).nullable()}).loose(),P({path:j(),frontmatter:$a(j(),Wa()).optional()}).loose(),P({applied:Wa()}).loose();var p5=$a(j(),Wa()).meta({description:`Free-form frontmatter map embedded in template payloads.`});P({template:P({name:j().min(1),folder:j(),scope:to([`local`,`inherited`]),path:j().min(1),frontmatter:p5,body:j()}).strict()}).strict(),P({folder:j(),name:j(),body:j().optional(),frontmatter:p5.optional()}).strict(),P({path:j().min(1),created:Ba(),warnings:N(j())}).strict(),P({existed:Ba(),path:j().min(1)}).strict(),P({query:j().optional(),intent:to([`autocomplete`,`full_text`,`omnibar`]).optional(),scopes:N(to([`page`,`folder`,`content`])).optional(),scope:j().optional(),limit:M().int().nonnegative().optional()}).loose();var hie=P({kind:to([`page`,`folder`,`content`]),path:j().min(1),title:j(),score:M(),signals:$a(j(),Wa()),snippet:j().optional()}).loose();P({query:j(),intent:to([`autocomplete`,`full_text`,`omnibar`]),results:N(hie),elapsedMs:M().nonnegative()}).loose();var gie=P({version:j().min(1),recordedAt:j().min(1)}).loose();P({currentVersion:j().min(1),targets:$a(j(),gie.nullable())}).loose();var _ie=`server-info`,vie=`branch-switched`,yie=`disk-ack`,bie=`config-validation-rejected`,xie=`config-ignore-nested-error`,m5=to([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),Sie=P({v:F(1),ch:F(_ie),seq:M(),serverInstanceId:j().min(1),currentBranch:j().min(1).optional()}).loose(),Cie=P({v:F(1),ch:F(vie),seq:M(),branch:j().min(1)}).loose(),wie=P({v:F(1),ch:m5,seq:M()}).loose(),Tie=P({v:F(1),ch:F(yie),seq:M(),docName:j().min(1),sv:j().min(1)}).loose(),Eie=P({v:F(1),ch:F(bie),seq:M(),docName:j().min(1),error:GQ}).loose(),Die=P({v:F(1),ch:F(xie),seq:M(),path:j().min(1),error:j().min(1)}).loose(),Oie={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},h5=new WeakMap;function kie(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function g5(e){return e.trim().toLowerCase()}function _5(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Aie(e){return e.split(`/`).filter(Boolean).join(` `)}function jie(e){let t=_5(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0;return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:Aie(e.path),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function v5(e){let t=HX({schema:Oie});return e.length>0&&$X(t,e),t}function Mie(e){let t={documents:e};return h5.set(t,v5(e)),t}function Nie(e){let t=h5.get(e);if(t)return t;let n=v5(e.documents);return h5.set(e,n),n}function Pie(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`]:[`page`,`folder`]}function y5(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function b5(e,t){let n=g5(t);if(!n)return 0;let r=g5(e.title),i=g5(e.name),a=g5(e.path),o=a.split(`/`);return r===n||i===n?700:a===n?650:r.startsWith(n)||i.startsWith(n)?600:o.some(e=>e.startsWith(n))?550:r.includes(n)||i.includes(n)?500:a.includes(n)?450:-1}function Fie(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Iie(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Lie(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function Rie(e,t){return g5(t).length<4?0:+(e===`full_text`)}function zie(e,t,n={}){let r=n.intent??`omnibar`,i=kie(n.limit),a=new Set(n.scopes??Pie(r)),o=e.documents.filter(e=>y5(e,a)),s=g5(t);if(!s)return o.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,i).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let c=kZ(Nie(e),{term:s,properties:Iie(r),boost:Lie(r),tolerance:Rie(r,s),limit:Math.max(i*4,40)}),l=new Map(c.hits.filter(e=>y5(e.document,a)).map(e=>[e.document.id,e.score])),u=Fie(o),d=new Map;for(let e of o)b5(e,s)>=0&&d.set(e.id,e);for(let e of c.hits)y5(e.document,a)&&d.set(e.document.id,e.document);return[...d.values()].map(e=>{let t=Math.max(0,b5(e,s)),n=l.get(e.id)??0,r=u.get(e.id)??0;return{document:e,score:t+n*20+r,signals:{lexical:t,fullText:n,recency:r}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score).slice(0,i)}var x5=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),S5=globalThis;S5[x5]===void 0&&(S5[x5]=Fr());var C5=S5[x5],w5=Ya({version:j().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(C5,{description:`Recorded skill version for this target.`}),recordedAt:Gi().register(C5,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:to([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(C5,{description:`Install-source surface that recorded this entry.`}).optional()});Ya({schema:F(1).register(C5,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:Ya({"claude-cowork":w5.optional(),"cli-hosts":w5.optional()}).register(C5,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({})});var T5=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function Bie(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??Vie,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new T5(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function Vie(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Hie(){let e=!1,t=``,n=0;return r=>{let i=Uie(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function Uie(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}var Wie=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Gie={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Kie={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},E5=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function qie(e,t=Wie){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Jie(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function Yie(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var Xie={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function Zie(e){return e?Xie[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function Qie(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function $ie(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function eae(e){let[t]=Qie(e);return $ie(t,45,32)}var tae=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],nae=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],D5=`ok-user-name-v3`,O5=`ok-user-color-v3`;function k5(e){return e[Math.floor(Math.random()*e.length)]}function rae(){return`${k5(tae)} ${k5(nae)}`}function iae(){return k5(E5)}function A5(e){try{return localStorage.getItem(e)}catch{return null}}function j5(e,t){try{localStorage.setItem(e,t)}catch{}}function aae(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=A5(D5),r=A5(O5);return n||(n=rae(),j5(D5,n)),r||(r=iae(),j5(O5,r)),{name:n,color:r,coeditor:e,tabId:t}}function oae(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`/`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of l.split(`/`))if(e===`..`){if(u.length===0)return null;u.pop()}else e!==`.`&&e!==``&&u.push(e);return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function sae(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var M5=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function N5(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function P5(e){return e.split(`/`).filter(Boolean)}function F5(e){let t=e.trim();return M5.test(t)||t.startsWith(`//`)}function cae(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}let r=oae(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};if(F5(n)||n.startsWith(`/`))return{kind:`external`,url:n};let i=N5(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function lae(e,t){let n=e.trim();if(!n)return null;if(F5(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=N5(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function uae(e,t){let n=e.trim();if(!n||M5.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function dae(e,t,n=null){let r=P5(e);r.pop();let i=P5(t),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a+=1;let o=r.slice(a).map(()=>`..`),s=i.slice(a),c=[...o,...s].join(`/`);return c||=i.at(-1)??t,!c.startsWith(`./`)&&!c.startsWith(`../`)&&(c=`./${c}`),`${c}.md${n?`#${n}`:``}`}function fae(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}function pae(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}var I5=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),mae=`VisuallyHidden`,L5=D.forwardRef((e,t)=>(0,Oo.jsx)(h.span,{...e,ref:t,style:{...I5,...e.style}}));L5.displayName=mae;var hae=L5;function gae(e){let t=e+`CollectionProvider`,[n,r]=_(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,Oo.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,l=c(s),d=D.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,Oo.jsx)(l,{ref:u(t,a(s,n).collectionRef),children:r})});d.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=c(f),h=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=u(t,o),c=a(f,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,Oo.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:d,ItemSlot:h},g,r]}var _ae=D.createContext(void 0);function vae(e){let t=D.useContext(_ae);return e||t||`ltr`}var R5=[`top`,`right`,`bottom`,`left`],z5=[`start`,`end`],B5=R5.reduce((e,t)=>e.concat(t,t+`-`+z5[0],t+`-`+z5[1]),[]),V5=Math.min,H5=Math.max,U5=Math.round,W5=Math.floor,G5=e=>({x:e,y:e}),yae={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function K5(e,t,n){return H5(e,V5(t,n))}function q5(e,t){return typeof e==`function`?e(t):e}function J5(e){return e.split(`-`)[0]}function Y5(e){return e.split(`-`)[1]}function X5(e){return e===`x`?`y`:`x`}function Z5(e){return e===`y`?`height`:`width`}function Q5(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $5(e){return X5(Q5(e))}function e7(e,t,n){n===void 0&&(n=!1);let r=Y5(e),i=$5(e),a=Z5(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=i7(o)),[o,i7(o)]}function bae(e){let t=i7(e);return[t7(e),t,t7(t)]}function t7(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var n7=[`left`,`right`],r7=[`right`,`left`],xae=[`top`,`bottom`],Sae=[`bottom`,`top`];function Cae(e,t,n){switch(e){case`top`:case`bottom`:return n?t?r7:n7:t?n7:r7;case`left`:case`right`:return t?xae:Sae;default:return[]}}function wae(e,t,n,r){let i=Y5(e),a=Cae(J5(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(t7)))),a}function i7(e){let t=J5(e);return yae[t]+e.slice(t.length)}function Tae(e){return{top:0,right:0,bottom:0,left:0,...e}}function a7(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Tae(e)}function o7(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function s7(e,t,n){let{reference:r,floating:i}=e,a=Q5(t),o=$5(t),s=Z5(o),c=J5(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Y5(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Eae(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=q5(t,e),p=a7(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=o7(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=o7(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Dae=50,Oae=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Eae},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=s7(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Dae&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=s7(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},kae=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=q5(e,t)||{};if(l==null)return{};let d=a7(u),f={x:n,y:r},p=$5(i),m=Z5(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=V5(d[_],T),D=V5(d[v],T),ee=E,te=C-h[m]-D,ne=C/2-h[m]/2+w,re=K5(ee,ne,te),ie=!c.arrow&&Y5(i)!=null&&ne!==re&&a.reference[m]/2-(ne<ee?E:D)-h[m]/2<0,O=ie?ne<ee?ne-ee:ne-te:0;return{[p]:f[p]+O,data:{[p]:re,centerOffset:ne-re-O,...ie&&{alignmentOffset:O}},reset:ie}}});function Aae(e,t,n){return(e?[...n.filter(t=>Y5(t)===e),...n.filter(t=>Y5(t)!==e)]:n.filter(e=>J5(e)===e)).filter(n=>e?Y5(n)===e||(t?t7(n)!==n:!1):!0)}var jae=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=B5,autoAlignment:u=!0,...d}=q5(e,t),f=c!==void 0||l===B5?Aae(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=e7(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[J5(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Y5(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Y5(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},Mae=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=q5(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=J5(r),_=Q5(o),v=J5(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[i7(o)]:bae(o)),x=p!==`none`;!d&&x&&b.push(...wae(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=e7(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Q5(t))||T.every(e=>Q5(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Q5(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function c7(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function l7(e){return R5.some(t=>e[t]>=0)}var Nae=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=q5(e,t);switch(i){case`referenceHidden`:{let e=c7(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:l7(e)}}}case`escaped`:{let e=c7(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:l7(e)}}}default:return{}}}}};function u7(e){let t=V5(...e.map(e=>e.left)),n=V5(...e.map(e=>e.top)),r=H5(...e.map(e=>e.right)),i=H5(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Pae(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>o7(u7(e)))}var Fae=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=q5(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=Pae(u),f=o7(u7(u)),p=a7(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(Q5(n)===`y`){let e=d[0],t=d[d.length-1],r=J5(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=J5(n)===`left`,t=H5(...d.map(e=>e.right)),r=V5(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},d7=new Set([`left`,`top`]);async function Iae(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=J5(n),s=Y5(n),c=Q5(n)===`y`,l=d7.has(o)?-1:1,u=a&&c?-1:1,d=q5(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Lae=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Iae(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Rae=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=q5(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Q5(J5(i)),p=X5(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=K5(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=K5(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},zae=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=q5(e,t),u={x:n,y:r},d=Q5(i),f=X5(d),p=u[f],m=u[d],h=q5(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=d7.has(J5(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Bae=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=q5(e,t),u=await o.detectOverflow(t,l),d=J5(i),f=Y5(i),p=Q5(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=V5(h-u[g],v),x=V5(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=H5(u.left,0),t=H5(u.right,0),n=H5(u.top,0),r=H5(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:H5(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:H5(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function f7(){return typeof window<`u`}function p7(e){return g7(e)?(e.nodeName||``).toLowerCase():`#document`}function m7(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function h7(e){return((g7(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function g7(e){return f7()?e instanceof Node||e instanceof m7(e).Node:!1}function _7(e){return f7()?e instanceof Element||e instanceof m7(e).Element:!1}function v7(e){return f7()?e instanceof HTMLElement||e instanceof m7(e).HTMLElement:!1}function y7(e){return!f7()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof m7(e).ShadowRoot}function b7(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=D7(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Vae(e){return/^(table|td|th)$/.test(p7(e))}function x7(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Hae=/transform|translate|scale|rotate|perspective|filter/,Uae=/paint|layout|strict|content/,S7=e=>!!e&&e!==`none`,C7;function w7(e){let t=_7(e)?D7(e):e;return S7(t.transform)||S7(t.translate)||S7(t.scale)||S7(t.rotate)||S7(t.perspective)||!T7()&&(S7(t.backdropFilter)||S7(t.filter))||Hae.test(t.willChange||``)||Uae.test(t.contain||``)}function Wae(e){let t=k7(e);for(;v7(t)&&!E7(t);){if(w7(t))return t;if(x7(t))return null;t=k7(t)}return null}function T7(){return C7??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),C7}function E7(e){return/^(html|body|#document)$/.test(p7(e))}function D7(e){return m7(e).getComputedStyle(e)}function O7(e){return _7(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k7(e){if(p7(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||y7(e)&&e.host||h7(e);return y7(t)?t.host:t}function A7(e){let t=k7(e);return E7(t)?e.ownerDocument?e.ownerDocument.body:e.body:v7(t)&&b7(t)?t:A7(t)}function j7(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=A7(e),i=r===e.ownerDocument?.body,a=m7(r);if(i){let e=M7(a);return t.concat(a,a.visualViewport||[],b7(r)?r:[],e&&n?j7(e):[])}else return t.concat(r,j7(r,[],n))}function M7(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N7(e){let t=D7(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=v7(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=U5(n)!==a||U5(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function P7(e){return _7(e)?e:e.contextElement}function F7(e){let t=P7(e);if(!v7(t))return G5(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=N7(t),o=(a?U5(n.width):n.width)/r,s=(a?U5(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Gae=G5(0);function I7(e){let t=m7(e);return!T7()||!t.visualViewport?Gae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kae(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==m7(e)?!1:t}function L7(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=P7(e),o=G5(1);t&&(r?_7(r)&&(o=F7(r)):o=F7(e));let s=Kae(a,n,r)?I7(a):G5(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=m7(a),t=r&&_7(r)?m7(r):r,n=e,i=M7(n);for(;i&&r&&t!==n;){let e=F7(i),t=i.getBoundingClientRect(),r=D7(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=m7(i),i=M7(n)}}return o7({width:u,height:d,x:c,y:l})}function R7(e,t){let n=O7(e).scrollLeft;return t?t.left+n:L7(h7(e)).left+n}function z7(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-R7(e,n),y:n.top+t.scrollTop}}function qae(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=h7(r),s=t?x7(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=G5(1),u=G5(0),d=v7(r);if((d||!d&&!a)&&((p7(r)!==`body`||b7(o))&&(c=O7(r)),d)){let e=L7(r);l=F7(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?z7(o,c):G5(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Jae(e){return Array.from(e.getClientRects())}function Yae(e){let t=h7(e),n=O7(e),r=e.ownerDocument.body,i=H5(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=H5(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+R7(e),s=-n.scrollTop;return D7(r).direction===`rtl`&&(o+=H5(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var B7=25;function Xae(e,t){let n=m7(e),r=h7(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=T7();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=R7(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=B7&&(a-=o)}else l<=B7&&(a+=l);return{width:a,height:o,x:s,y:c}}function Zae(e,t){let n=L7(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=v7(e)?F7(e):G5(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function V7(e,t,n){let r;if(t===`viewport`)r=Xae(e,n);else if(t===`document`)r=Yae(h7(e));else if(_7(t))r=Zae(t,n);else{let n=I7(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return o7(r)}function H7(e,t){let n=k7(e);return n===t||!_7(n)||E7(n)?!1:D7(n).position===`fixed`||H7(n,t)}function Qae(e,t){let n=t.get(e);if(n)return n;let r=j7(e,[],!1).filter(e=>_7(e)&&p7(e)!==`body`),i=null,a=D7(e).position===`fixed`,o=a?k7(e):e;for(;_7(o)&&!E7(o);){let t=D7(o),n=w7(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||b7(o)&&!n&&H7(e,o))?r=r.filter(e=>e!==o):i=t,o=k7(o)}return t.set(e,r),r}function $ae(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?x7(t)?[]:Qae(t,this._c):[].concat(n),r],o=V7(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=V7(t,a[e],i);s=H5(n.top,s),c=V5(n.right,c),l=V5(n.bottom,l),u=H5(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function eoe(e){let{width:t,height:n}=N7(e);return{width:t,height:n}}function toe(e,t,n){let r=v7(t),i=h7(t),a=n===`fixed`,o=L7(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=G5(0);function l(){c.x=R7(i)}if(r||!r&&!a)if((p7(t)!==`body`||b7(i))&&(s=O7(t)),r){let e=L7(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?z7(i,s):G5(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function U7(e){return D7(e).position===`static`}function W7(e,t){if(!v7(e)||D7(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return h7(e)===n&&(n=n.ownerDocument.body),n}function G7(e,t){let n=m7(e);if(x7(e))return n;if(!v7(e)){let t=k7(e);for(;t&&!E7(t);){if(_7(t)&&!U7(t))return t;t=k7(t)}return n}let r=W7(e,t);for(;r&&Vae(r)&&U7(r);)r=W7(r,t);return r&&E7(r)&&U7(r)&&!w7(r)?n:r||Wae(e)||n}var noe=async function(e){let t=this.getOffsetParent||G7,n=this.getDimensions,r=await n(e.floating);return{reference:toe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function roe(e){return D7(e).direction===`rtl`}var ioe={convertOffsetParentRelativeRectToViewportRelativeRect:qae,getDocumentElement:h7,getClippingRect:$ae,getOffsetParent:G7,getElementRects:noe,getClientRects:Jae,getDimensions:eoe,getScale:F7,isElement:_7,isRTL:roe};function K7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aoe(e,t){let n=null,r,i=h7(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=W5(d),h=W5(i.clientWidth-(u+f)),g=W5(i.clientHeight-(d+p)),_=W5(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:H5(0,V5(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!K7(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function q7(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=P7(e),u=i||a?[...l?j7(l):[],...t?j7(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?aoe(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?L7(e):null;c&&g();function g(){let t=L7(e);h&&!K7(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var J7=Lae,ooe=jae,Y7=Rae,X7=Mae,Z7=Bae,Q7=Nae,$7=kae,soe=Fae,coe=zae,e9=(e,t,n)=>{let r=new Map,i={platform:ioe,...n},a={...i.platform,_c:r};return Oae(e,t,{...i,platform:a})},t9=typeof document<`u`?D.useLayoutEffect:function(){};function n9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!n9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!n9(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function r9(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function i9(e,t){let n=r9(e);return Math.round(t*n)/n}function a9(e){let t=D.useRef(e);return t9(()=>{t.current=e}),t}function loe(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=D.useState(r);n9(f,r)||p(r);let[m,h]=D.useState(null),[g,_]=D.useState(null),v=D.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=D.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=D.useRef(null),C=D.useRef(null),w=D.useRef(u),T=c!=null,E=a9(c),ee=a9(i),te=a9(l),ne=D.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),e9(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};re.current&&!n9(w.current,t)&&(w.current=t,ko.flushSync(()=>{d(t)}))})},[f,t,n,ee,te]);t9(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=D.useRef(!1);t9(()=>(re.current=!0,()=>{re.current=!1}),[]),t9(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ne);ne()}},[b,x,ne,E,T]);let ie=D.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),O=D.useMemo(()=>({reference:b,floating:x}),[b,x]),ae=D.useMemo(()=>{let e={position:n,left:0,top:0};if(!O.floating)return e;let t=i9(O.floating,u.x),r=i9(O.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...r9(O.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,O.floating,u.x,u.y]);return D.useMemo(()=>({...u,update:ne,refs:ie,elements:O,floatingStyles:ae}),[u,ne,ie,O,ae])}var uoe=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:$7({element:r.current,padding:i}).fn(n):r?$7({element:r,padding:i}).fn(n):{}}}},doe=(e,t)=>{let n=J7(e);return{name:n.name,fn:n.fn,options:[e,t]}},foe=(e,t)=>{let n=Y7(e);return{name:n.name,fn:n.fn,options:[e,t]}},poe=(e,t)=>({fn:coe(e).fn,options:[e,t]}),moe=(e,t)=>{let n=X7(e);return{name:n.name,fn:n.fn,options:[e,t]}},hoe=(e,t)=>{let n=Z7(e);return{name:n.name,fn:n.fn,options:[e,t]}},goe=(e,t)=>{let n=Q7(e);return{name:n.name,fn:n.fn,options:[e,t]}},_oe=(e,t)=>{let n=uoe(e);return{name:n.name,fn:n.fn,options:[e,t]}},voe=`Arrow`,o9=D.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,Oo.jsx)(h.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,Oo.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});o9.displayName=voe;var yoe=o9,s9=`Popper`,[c9,l9]=_(s9),[boe,u9]=c9(s9),d9=e=>{let{__scopePopper:t,children:n}=e,[r,i]=D.useState(null);return(0,Oo.jsx)(boe,{scope:t,anchor:r,onAnchorChange:i,children:n})};d9.displayName=s9;var f9=`PopperAnchor`,p9=D.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=u9(f9,n),o=D.useRef(null),s=u(t,o),c=D.useRef(null);return D.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,Oo.jsx)(h.div,{...i,ref:s})});p9.displayName=f9;var m9=`PopperContent`,[xoe,Soe]=c9(m9),h9=D.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:_,...y}=e,x=u9(m9,n),[S,C]=D.useState(null),w=u(t,e=>C(e)),[T,E]=D.useState(null),ee=v(T),te=ee?.width??0,ne=ee?.height??0,re=r+(a===`center`?``:`-`+a),ie=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(l)?l:[l],ae=O.length>0,oe={padding:ie,boundary:O.filter(woe),altBoundary:ae},{refs:se,floatingStyles:ce,placement:le,isPositioned:ue,middlewareData:de}=loe({strategy:`fixed`,placement:re,whileElementsMounted:(...e)=>q7(...e,{animationFrame:m===`always`}),elements:{reference:x.anchor},middleware:[doe({mainAxis:i+ne,alignmentAxis:o}),c&&foe({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?poe():void 0,...oe}),c&&moe({...oe}),hoe({...oe,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&_oe({element:T,padding:s}),Toe({arrowWidth:te,arrowHeight:ne}),p&&goe({strategy:`referenceHidden`,...oe})]}),[fe,pe]=v9(le),me=g(_);b(()=>{ue&&me?.()},[ue,me]);let he=de.arrow?.x,ge=de.arrow?.y,_e=de.arrow?.centerOffset!==0,[ve,ye]=D.useState();return b(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),(0,Oo.jsx)(`div`,{ref:se.setFloating,"data-radix-popper-content-wrapper":``,style:{...ce,transform:ue?ce.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ve,"--radix-popper-transform-origin":[de.transformOrigin?.x,de.transformOrigin?.y].join(` `),...de.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,Oo.jsx)(xoe,{scope:n,placedSide:fe,onArrowChange:E,arrowX:he,arrowY:ge,shouldHideArrow:_e,children:(0,Oo.jsx)(h.div,{"data-side":fe,"data-align":pe,...y,ref:w,style:{...y.style,animation:ue?void 0:`none`}})})})});h9.displayName=m9;var g9=`PopperArrow`,Coe={top:`bottom`,right:`left`,bottom:`top`,left:`right`},_9=D.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Soe(g9,n),a=Coe[i.placedSide];return(0,Oo.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,Oo.jsx)(yoe,{...r,ref:t,style:{...r.style,display:`block`}})})});_9.displayName=g9;function woe(e){return e!==null}var Toe=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=v9(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function v9(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var y9=d9,b9=p9,x9=h9,S9=_9,[C9,Eoe]=_(`Tooltip`,[l9]),w9=l9(),T9=`TooltipProvider`,Doe=700,E9=`tooltip.open`,[Ooe,D9]=C9(T9),O9=e=>{let{__scopeTooltip:t,delayDuration:n=Doe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=D.useRef(!0),s=D.useRef(!1),c=D.useRef(0);return D.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,Oo.jsx)(Ooe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:D.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};O9.displayName=T9;var k9=`Tooltip`,[koe,A9]=C9(k9),j9=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=D9(k9,e.__scopeTooltip),l=w9(t),[u,d]=D.useState(null),f=y(),p=D.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,_=D.useRef(!1),[v,b]=m({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(E9))):c.onClose(),a?.(e)},caller:k9}),x=D.useMemo(()=>v?_.current?`delayed-open`:`instant-open`:`closed`,[v]),S=D.useCallback(()=>{window.clearTimeout(p.current),p.current=0,_.current=!1,b(!0)},[b]),C=D.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),w=D.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{_.current=!0,b(!0),p.current=0},g)},[g,b]);return D.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,Oo.jsx)(y9,{...l,children:(0,Oo.jsx)(koe,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:D.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:D.useCallback(()=>{h?C():(window.clearTimeout(p.current),p.current=0)},[C,h]),onOpen:S,onClose:C,disableHoverableContent:h,children:n})})};j9.displayName=k9;var M9=`TooltipTrigger`,N9=D.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=A9(M9,n),a=D9(M9,n),o=w9(n),s=u(t,D.useRef(null),i.onTriggerChange),c=D.useRef(!1),l=D.useRef(!1),d=D.useCallback(()=>c.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,Oo.jsx)(b9,{asChild:!0,...o,children:(0,Oo.jsx)(h.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:f(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:f(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:f(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:f(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:f(e.onBlur,i.onClose),onClick:f(e.onClick,i.onClose)})})});N9.displayName=M9;var P9=`TooltipPortal`,[Aoe,joe]=C9(P9,{forceMount:void 0}),F9=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=A9(P9,t);return(0,Oo.jsx)(Aoe,{scope:t,forceMount:n,children:(0,Oo.jsx)(d,{present:n||a.open,children:(0,Oo.jsx)(p,{asChild:!0,container:i,children:r})})})};F9.displayName=P9;var I9=`TooltipContent`,L9=D.forwardRef((e,t)=>{let n=joe(I9,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=A9(I9,e.__scopeTooltip);return(0,Oo.jsx)(d,{present:r||o.open,children:o.disableHoverableContent?(0,Oo.jsx)(R9,{side:i,...a,ref:t}):(0,Oo.jsx)(Moe,{side:i,...a,ref:t})})}),Moe=D.forwardRef((e,t)=>{let n=A9(I9,e.__scopeTooltip),r=D9(I9,e.__scopeTooltip),i=D.useRef(null),a=u(t,i),[o,s]=D.useState(null),{trigger:c,onClose:l}=n,d=i.current,{onPointerInTransitChange:f}=r,p=D.useCallback(()=>{s(null),f(!1)},[f]),m=D.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Loe(r,Ioe(r,n.getBoundingClientRect())),a=Roe(t.getBoundingClientRect());s(Boe([...i,...a])),f(!0)},[f]);return D.useEffect(()=>()=>p(),[p]),D.useEffect(()=>{if(c&&d){let e=e=>m(e,d),t=e=>m(e,c);return c.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[c,d,m,p]),D.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),i=!zoe(n,o);r?p():i&&(p(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,d,o,l,p]),(0,Oo.jsx)(R9,{...e,ref:a})}),[Noe,Poe]=C9(k9,{isInside:!1}),Foe=x(`TooltipContent`),R9=D.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=A9(I9,n),u=w9(n),{onClose:d}=c;return D.useEffect(()=>(document.addEventListener(E9,d),()=>document.removeEventListener(E9,d)),[d]),D.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&d()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,d]),(0,Oo.jsx)(l,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,Oo.jsxs)(x9,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,Oo.jsx)(Foe,{children:r}),(0,Oo.jsx)(Noe,{scope:n,isInside:!0,children:(0,Oo.jsx)(hae,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});L9.displayName=I9;var z9=`TooltipArrow`,B9=D.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=w9(n);return Poe(z9,n).isInside?null:(0,Oo.jsx)(S9,{...i,...r,ref:t})});B9.displayName=z9;function Ioe(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Loe(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Roe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function zoe(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Boe(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Voe(t)}function Voe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Hoe=O9,Uoe=j9,Woe=N9,Goe=F9,Koe=L9,qoe=B9;function Joe(e){let t=(0,Ao.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delayDuration:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,Oo.jsx)(Hoe,{"data-slot":`tooltip-provider`,delayDuration:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function Yoe(e){let t=(0,Ao.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Oo.jsx)(Uoe,{"data-slot":`tooltip`,...n}),t[2]=n,t[3]=r),r}function Xoe(e){let t=(0,Ao.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Oo.jsx)(Woe,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Zoe(e){let t=(0,Ao.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,sideOffset:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?0:a,c;t[5]===r?c=t[6]:(c=s(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:data-[state=delayed-open]:animate-none motion-reduce:duration-0`,r),t[5]=r,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Oo.jsx)(qoe,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`}),t[7]=l):l=t[7];let u;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==c?(u=(0,Oo.jsx)(Goe,{children:(0,Oo.jsxs)(Koe,{"data-slot":`tooltip-content`,sideOffset:o,className:c,...i,children:[n,l]})}),t[8]=n,t[9]=i,t[10]=o,t[11]=c,t[12]=u):u=t[12],u}function V9(e){if(typeof e!=`object`||!e)return;let t=e;if(typeof t.title==`string`&&t.title.length>0)return t.title}function Qoe(e){return e.kind===`asset`}function $oe(e){return e.kind===`document`}function ese(e){return e.kind===`folder`}function tse(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function nse(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function rse(e,t=!1){return e.filter(e=>{let n=e.docName??e.path??``;return n===``?!1:t?!0:!n.split(`/`).some(e=>e.startsWith(`.`))})}var H9=null,U9=new Set;function W9(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ise(e,t){return e===null?!1:e===t?!0:W9(e.pages,t.pages)&&W9(e.folderPaths,t.folderPaths)&&W9(e.assetPaths??new Set,t.assetPaths??new Set)&&ase(e.pageIcons,t.pageIcons)}function ase(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function ose(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function sse(e,t){let n=new Map,r=[...e].sort((e,t)=>e.localeCompare(t));for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function cse(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function lse(){return H9}function use(e){if(!ise(H9,e)){H9=e;for(let t of[...U9])try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function dse(e){if(U9.add(e),H9!==null)try{e(H9)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{U9.delete(e)}}var G9=`open-knowledge:documents-changed`,fse=new Set(m5.options);function K9(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>fse.has(e)))]}function pse(e=[`files`]){window.dispatchEvent(new CustomEvent(G9,{detail:{channels:K9(e)}}))}function q9(e){let t=t=>{e(K9(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(G9,t),()=>window.removeEventListener(G9,t)}var J9=`open-knowledge:templates-changed`;function mse(){window.dispatchEvent(new CustomEvent(J9))}function hse(e){let t=()=>e();return window.addEventListener(J9,t),()=>window.removeEventListener(J9,t)}function Y9(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function gse(e){let t=Y9(e);return t?`${t}.md`:`untitled.md`}function _se(e){let t=Y9(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function vse(e){let t=e.trim();return{normalizedTarget:Y9(t).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function X9(e){let t=new Set;for(let n of e)for(let e of tse(n))t.add(e);return t}function yse(e,t){if(!t)return;let n=r5(e);if(n)return t.get(n)}function bse(e,t){if(!t||e.includes(`/`))return;let n=r5(e);if(n)return t.get(n)}function xse(e,t){let{normalizedTarget:n,expectsFolder:r}=vse(e);if(!n)return{kind:`missing`,target:n};if(!r&&t.pages.has(n))return{kind:`doc`,target:n,docName:n};if(!r){let e=yse(n,t.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let i=`${n}/index`;if(t.pages.has(i))return{kind:`folder-index`,target:n,folderPath:n,docName:i,noteKind:`canonical-index`};let a=n.split(`/`).pop(),o=a?`${n}/${a}`:null;if(o&&t.pages.has(o))return{kind:`folder-index`,target:n,folderPath:n,docName:o,noteKind:`legacy-folder-note`};if(!r){let e=bse(n,t.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(t.folderPaths??X9(t.pages)).has(n)?{kind:`folder`,target:n,folderPath:n}:{kind:`missing`,target:n}}function Sse(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function Z9(e,t,n=s$){return typeof t!=`number`||!c$(t,n)?null:{kind:`large-file`,target:e,docName:e,size:t,limit:n}}function Cse(e,t,n=s$){return e.kind!==`doc`&&e.kind!==`folder-index`?e:Z9(e.docName,t.get(e.docName)?.size,n)??e}function wse(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`folder`:return null}}var Q9=(0,D.createContext)(null);function Tse(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function Ese(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function Dse(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function Ose(){let e=await fetch(`/api/pages`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(V9(t)??`/api/pages responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}async function kse(){let e=await fetch(`/api/documents`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(V9(t)??`/api/documents responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.documents)?{assetPaths:t.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),folderPaths:t.documents.filter(e=>e.kind===`folder`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path)}:{assetPaths:[],folderPaths:[]}}function Ase(e){console.error(`[PageListContext] Failed to load pages:`,e)}function jse(e){console.warn(`[PageListContext] Failed to load referenced assets:`,e)}function Mse(e){let t=(0,Ao.c)(49),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,D.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,D.useState)(o),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=new Map,t[2]=l):l=t[2];let[u,d]=(0,D.useState)(l),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[3]=f):f=t[3];let[p,m]=(0,D.useState)(f),h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[4]=h):h=t[4];let[g,_]=(0,D.useState)(h),v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=new Set,t[5]=v):v=t[5];let[y,b]=(0,D.useState)(v),[x,S]=(0,D.useState)(!0),[C,w]=(0,D.useState)(null),T=(0,D.useRef)(0),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(){let e=T.current+=1;Promise.all([Ose(),kse().catch(Ise)]).then(t=>{let[n,r]=t;if(e!==T.current)return;let i=new Set(n.map(Fse));a(i),c(new Map(n.map(Pse))),d(new Map(n.map(Nse))),m(new Set(r.assetPaths)),_(new Set(r.folderPaths)),b(e=>Ese(e,i)),w(null)}).catch(t=>{e===T.current&&(Ase(t),w(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===T.current&&S(!1)})},t[6]=E):E=t[6];let ee=E,te;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(te=function(e){b(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),w(null)},t[7]=te):te=t[7];let ne=te,re,ie;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>{ee();let e=()=>{document.visibilityState===`visible`&&ee()};window.addEventListener(`focus`,e),window.addEventListener(`visibilitychange`,e);let t=q9(e=>{e.includes(`files`)&&ee()});return()=>{window.removeEventListener(`focus`,e),window.removeEventListener(`visibilitychange`,e),t()}},re=[],t[8]=re,t[9]=ie):(re=t[8],ie=t[9]),(0,D.useEffect)(ie,re);let O,ae,oe,se,ce,le,ue;if(t[10]!==y||t[11]!==p||t[12]!==g||t[13]!==u||t[14]!==s||t[15]!==i){ce=Tse(i,y);let e;t[23]!==y||t[24]!==s?(e=Dse(s,y),t[23]=y,t[24]=s,t[25]=e):e=t[25],se=e,oe=u,O=p,ae=new Set([...X9(ce),...g]),le=ose(ce,r5),ue=sse(ce,r5),t[10]=y,t[11]=p,t[12]=g,t[13]=u,t[14]=s,t[15]=i,t[16]=O,t[17]=ae,t[18]=oe,t[19]=se,t[20]=ce,t[21]=le,t[22]=ue}else O=t[16],ae=t[17],oe=t[18],se=t[19],ce=t[20],le=t[21],ue=t[22];let de=ue,fe;t[26]===u?fe=t[27]:(fe=cse(u),t[26]=u,t[27]=fe);let pe=fe,me,he;t[28]!==O||t[29]!==ae||t[30]!==pe||t[31]!==ce||t[32]!==de||t[33]!==le?(me=()=>{use({pages:ce,folderPaths:ae,pagesBySlug:le,pagesByBasename:de,assetPaths:O,pageIcons:pe})},he=[ce,ae,le,de,O,pe],t[28]=O,t[29]=ae,t[30]=pe,t[31]=ce,t[32]=de,t[33]=le,t[34]=me,t[35]=he):(me=t[34],he=t[35]),(0,D.useEffect)(me,he);let ge;t[36]!==O||t[37]!==C||t[38]!==ae||t[39]!==x||t[40]!==oe||t[41]!==se||t[42]!==ce||t[43]!==de||t[44]!==le?(ge={pages:ce,pagesBySlug:le,pagesByBasename:de,pageTitles:se,pageMeta:oe,folderPaths:ae,assetPaths:O,loading:x,error:C,refetch:ee,addPage:ne},t[36]=O,t[37]=C,t[38]=ae,t[39]=x,t[40]=oe,t[41]=se,t[42]=ce,t[43]=de,t[44]=le,t[45]=ge):ge=t[45];let _e;return t[46]!==n||t[47]!==ge?(_e=(0,Oo.jsx)(Q9,{value:ge,children:n}),t[46]=n,t[47]=ge,t[48]=_e):_e=t[48],_e}function Nse(e){return[e.docName,{size:e.size,modified:e.modified,docExt:e.docExt,icon:e.icon}]}function Pse(e){return[e.docName,e.title]}function Fse(e){return e.docName}function Ise(e){return jse(e),{assetPaths:[],folderPaths:[]}}function Lse(){let e=(0,D.use)(Q9);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}function Rse(e){if(e.startsWith($9)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=Use(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function zse(e){if(e.startsWith($9)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`?`),r=t.indexOf(`#`);if(n>=0&&(r<0||n<r)){let e=r>=0?r:t.length,i=new URLSearchParams(t.slice(n+1,e)).get(`anchor`);if(i)return i}if(r<0)return null;let i=t.slice(r+1);if(!i)return null;try{return decodeURIComponent(i)}catch{return i}}function Bse(e,t){let n=`#/${e}`;return t?`${n}?anchor=${encodeURIComponent(t)}`:n}function Vse(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function Hse(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}?anchor=${encodeURIComponent(t)}`:r}var $9=`#/__asset__/`;function Use(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function Wse(e){if(!e.startsWith($9))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function Gse(e){return`${$9}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var Kse=n(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),qse=n(((e,t)=>{var n=Kse();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Jse=n(((e,t)=>{t.exports=qse()()}));export{Gie as $,H4 as $n,Xy as $r,$$ as $t,V9 as A,me as Ai,t0 as An,ZZ as Ar,G1 as At,$7 as B,z1 as Bn,gne as Br,Vre as Bt,lse as C,uu as Ci,dae as Cn,JQ as Cr,D$ as Ct,Qoe as D,j as Di,qie as Dn,fae as Dr,u$ as Dt,rse as E,P as Ei,lae as En,G2 as Er,tie as Et,b9 as F,Mie as Fn,WZ as Fr,Gre as Ft,Q7 as G,vre as Gn,hb as Gr,h$ as Gt,q7 as H,FZ as Hn,aT as Hr,_1 as Ht,S9 as I,jie as In,Y$ as Ir,x$ as It,Y7 as J,e$ as Jn,jx as Jr,nie as Jt,soe as K,aae as Kn,qx as Kr,g$ as Kt,x9 as L,eae as Ln,r5 as Lr,X$ as Lt,Zoe as M,oe as Mi,Jie as Mn,pae as Mr,Rre as Mt,Joe as N,ae as Ni,Hie as Nn,zie as Nr,E5 as Nt,$oe as O,Ie as Oi,n0 as On,$2 as Or,T$ as Ot,Xoe as P,O4 as Pn,H1 as Pr,N2 as Pt,I5 as Q,V4 as Qn,Yy as Qr,aie as Qt,y9 as R,f$ as Rn,i5 as Rr,Z$ as Rt,hse as S,pu as Si,Y1 as Sn,V$ as Sr,O$ as St,nse as T,F as Ti,cae as Tn,I1 as Tr,Pre as Tt,e9 as U,Q8 as Un,Cx as Ur,p$ as Ut,ooe as V,N5 as Vn,fne as Vr,ore as Vt,X7 as W,Yie as Wn,cx as Wr,Wre as Wt,vae as X,qQ as Xn,Ry as Xr,L0 as Xt,Z7 as Y,I2 as Yn,sne as Yr,I0 as Yt,gae as Z,Zie as Zn,qy as Zr,v1 as Zt,gse as _,df as _i,wQ as _n,W1 as _r,o$ as _t,Vse as a,vb as ai,E0 as an,F4 as ar,Zre as at,mse as b,td as bi,K1 as bn,Are as br,eie as bt,Hse as c,O_ as ci,sie as cn,R4 as cr,Die as ct,wse as d,B as di,k$ as dn,F5 as dr,Tie as dt,gb as ei,t1 as en,N4 as er,Kie as et,Sse as f,Np as fi,R1 as fn,KQ as fr,Sie as ft,_se as g,z as gi,MQ as gn,n1 as gr,r$ as gt,Cse as h,mp as hi,sae as hn,r1 as hr,i$ as ht,Rse as i,Ly as ii,D0 as in,z4 as ir,Xre as it,Yoe as j,pe as ji,g0 as jn,uae as jr,U1 as jt,ese as k,he as ki,e0 as kn,QZ as kr,QQ as kt,Mse as l,cv as li,R0 as ln,BZ as lr,Eie as lt,xse as m,R as mi,Ure as mn,m$ as mr,n$ as mt,zse as n,yy as ni,F0 as nn,B4 as nr,l$ as nt,Gse as o,Ux as oi,A0 as on,M4 as or,Ire as ot,Z9 as p,Ip as pi,V1 as pn,K2 as pr,a$ as pt,J7 as q,L1 as qn,Wx as qr,iie as qt,Wse as r,Xv as ri,S0 as rn,I4 as rr,w$ as rt,Bse as s,T_ as si,M1 as sn,L4 as sr,Cie as st,Jse as t,Mx as ti,t$ as tn,P4 as tr,_$ as tt,Lse as u,yp as ui,S$ as un,c$ as ur,wie as ut,Y9 as v,Kd as vi,RQ as vn,J2 as vr,T5 as vt,dse as w,vu as wi,Bie as wn,K8 as wr,oie as wt,q9 as x,L as xi,q1 as xn,L2 as xr,$re as xt,pse as y,I as yi,z0 as yn,jre as yr,H$ as yt,l9 as z,$Q as zn,_5 as zr,s1 as zt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./prop-types-
|
|
1
|
+
import{m as e}from"./prop-types-CGu0ru1E.js";function t(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function n(n,r){let i=e(n,r);return{resolvedTarget:i,hashDocName:i.target,displayState:t(i)}}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,o as n,t as r}from"./compiler-runtime-Cs91PcD2.js";import{X as i}from"./prop-types-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,o as n,t as r}from"./compiler-runtime-Cs91PcD2.js";import{X as i}from"./prop-types-CGu0ru1E.js";import{C as a,S as o,d as s,l as c,m as l,p as u,x as d}from"./button-DenIdY-r.js";import{n as f,r as p,t as m}from"./dist-CtVt9wZe.js";var h=a(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),g=e(t(),1),_=n(),v=`Toggle`,y=g.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,u]=c({prop:n,onChange:i,defaultProp:r??!1,caller:v});return(0,_.jsx)(l.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:s(e.onClick,()=>{e.disabled||u(!o)})})});y.displayName=v;var b=y,x=`ToggleGroup`,[S,C]=u(x,[p]),w=p(),T=g.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,_.jsx)(O,{...r,ref:t});if(n===`multiple`)return(0,_.jsx)(k,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${x}\``)});T.displayName=x;var[E,D]=S(x),O=g.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=c({prop:n,defaultProp:r??``,onChange:i,caller:x});return(0,_.jsx)(E,{scope:e.__scopeToggleGroup,type:`single`,value:g.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:g.useCallback(()=>s(``),[s]),children:(0,_.jsx)(M,{...a,ref:t})})}),k=g.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=c({prop:n,defaultProp:r??[],onChange:i,caller:x}),l=g.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=g.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,_.jsx)(E,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:l,onItemDeactivate:u,children:(0,_.jsx)(M,{...a,ref:t})})});T.displayName=x;var[A,j]=S(x),M=g.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:o,dir:s,loop:c=!0,...u}=e,d=w(n),p=i(s),m={role:`group`,dir:p,...u};return(0,_.jsx)(A,{scope:n,rovingFocus:a,disabled:r,children:a?(0,_.jsx)(f,{asChild:!0,...d,orientation:o,dir:p,loop:c,children:(0,_.jsx)(l.div,{...m,ref:t})}):(0,_.jsx)(l.div,{...m,ref:t})})}),N=`ToggleGroupItem`,P=g.forwardRef((e,t)=>{let n=D(N,e.__scopeToggleGroup),r=j(N,e.__scopeToggleGroup),i=w(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=g.useRef(null);return r.rovingFocus?(0,_.jsx)(m,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,_.jsx)(F,{...s,ref:t})}):(0,_.jsx)(F,{...s,ref:t})});P.displayName=N;var F=g.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=D(N,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,_.jsx)(y,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),I=T,L=P,R=r(),z=d(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`,segmented:`text-muted-foreground hover:bg-muted-foreground/10 data-[state=on]:bg-background data-[state=on]:shadow-sm data-[state=on]:text-foreground dark:data-[state=on]:bg-muted`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}});function B(e){let t=(0,R.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,c=a===void 0?`default`:a,l;t[5]!==n||t[6]!==c||t[7]!==s?(l=o(z({variant:s,size:c,className:n})),t[5]=n,t[6]=c,t[7]=s,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==c||t[11]!==l||t[12]!==s?(u=(0,_.jsx)(b,{"data-slot":`toggle`,"data-variant":s,"data-size":c,className:l,...r}),t[9]=r,t[10]=c,t[11]=l,t[12]=s,t[13]=u):u=t[13],u}var V=g.createContext({size:`default`,variant:`default`,spacing:0,orientation:`horizontal`});function H(e){let t=(0,R.c)(29),n,r,i,a,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6],l=t[7]):({className:r,variant:l,size:a,spacing:s,orientation:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s,t[6]=c,t[7]=l);let u=s===void 0?0:s,d=c===void 0?`horizontal`:c,f;t[8]===u?f=t[9]:(f={"--gap":u},t[8]=u,t[9]=f);let p=f,m;t[10]===r?m=t[11]:(m=o(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch`,r),t[10]=r,t[11]=m);let h;t[12]!==d||t[13]!==a||t[14]!==u||t[15]!==l?(h={variant:l,size:a,spacing:u,orientation:d},t[12]=d,t[13]=a,t[14]=u,t[15]=l,t[16]=h):h=t[16];let g;t[17]!==n||t[18]!==h?(g=(0,_.jsx)(V.Provider,{value:h,children:n}),t[17]=n,t[18]=h,t[19]=g):g=t[19];let v;return t[20]!==d||t[21]!==i||t[22]!==a||t[23]!==u||t[24]!==p||t[25]!==m||t[26]!==g||t[27]!==l?(v=(0,_.jsx)(I,{"data-slot":`toggle-group`,"data-variant":l,"data-size":a,"data-spacing":u,"data-orientation":d,style:p,className:m,...i,children:g}),t[20]=d,t[21]=i,t[22]=a,t[23]=u,t[24]=p,t[25]=m,t[26]=g,t[27]=l,t[28]=v):v=t[28],v}function U(e){let t=(0,R.c)(19),n,r,i,a,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5]):({className:r,children:n,variant:a,size:s,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s);let c=a===void 0?`default`:a,l=s===void 0?`default`:s,u=g.use(V),d=u.variant||c,f=u.size||l,p=u.spacing,m;t[6]!==r||t[7]!==u.size||t[8]!==u.variant||t[9]!==l||t[10]!==c?(m=o(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t text-muted-foreground data-[state=on]:text-foreground`,z({variant:u.variant||c,size:u.size||l}),r),t[6]=r,t[7]=u.size,t[8]=u.variant,t[9]=l,t[10]=c,t[11]=m):m=t[11];let h;return t[12]!==n||t[13]!==u.spacing||t[14]!==i||t[15]!==d||t[16]!==f||t[17]!==m?(h=(0,_.jsx)(L,{"data-slot":`toggle-group-item`,"data-variant":d,"data-size":f,"data-spacing":p,className:m,...i,children:n}),t[12]=n,t[13]=u.spacing,t[14]=i,t[15]=d,t[16]=f,t[17]=m,t[18]=h):h=t[18],h}export{h as i,U as n,B as r,H as t};
|