@mistriwork/mistri 1.0.0-rc.12 → 1.0.0-rc.13
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/README.md +4 -3
- package/dist/client/assets/LayoutBuilder-MPzkVU2e.js.map +1 -1
- package/dist/client/assets/index-D2dHI6hR.js.map +1 -1
- package/dist/client/assets/shell-TreN_uLs.js.map +1 -1
- package/dist/docs/access-model.md +1 -1
- package/dist/docs/build-and-deploy.md +0 -1
- package/dist/docs/cli.md +1 -1
- package/dist/docs/glossary.md +3 -3
- package/dist/docs/query.md +9 -21
- package/dist/docs/status.md +3 -3
- package/dist/embed/react/chunks/LayoutBuilder-Cbxa_wve.js.map +1 -1
- package/dist/embed/react/chunks/app-0UZ1Re1k.js.map +1 -1
- package/dist/embed/react/chunks/page-Bx4o1kpQ.js.map +1 -1
- package/dist/embed/react/chunks/palette-Bb7Lf6eo.js.map +1 -1
- package/dist/embed/react/chunks/shell-DZRACiB9.js.map +1 -1
- package/dist/embed/react/chunks/write-BQO4CFc9.js.map +1 -1
- package/dist/embed/react/index.js +1 -1
- package/dist/server/build/dockerfile.js +1 -1
- package/dist/server/cli/usage.js +2 -2
- package/dist/ui/index.js +2 -2
- package/dist/ui/page.js +2 -2
- package/dist/ui/{shared-N4Ej8yRD.js → shared-1PD7TOTJ.js} +5 -5
- package/dist/ui/{shared-N4Ej8yRD.js.map → shared-1PD7TOTJ.js.map} +1 -1
- package/dist/ui/{shared-D5m86-4o.js → shared-1gMnOu9J.js} +6 -6
- package/dist/ui/{shared-D5m86-4o.js.map → shared-1gMnOu9J.js.map} +1 -1
- package/dist/ui/{shared-Ctaj8mR2.js → shared-5RQMi4BR.js} +3 -3
- package/dist/ui/{shared-Ctaj8mR2.js.map → shared-5RQMi4BR.js.map} +1 -1
- package/dist/ui/{shared-DpLeIATZ.js → shared-B-BUF9fx.js} +2 -2
- package/dist/ui/{shared-DpLeIATZ.js.map → shared-B-BUF9fx.js.map} +1 -1
- package/dist/ui/{shared-DWYnjItP.js → shared-B-MhiPIN.js} +9 -9
- package/dist/ui/{shared-DWYnjItP.js.map → shared-B-MhiPIN.js.map} +1 -1
- package/dist/ui/{shared-0fNuhSbG.js → shared-B07qIMlE.js} +5 -5
- package/dist/ui/{shared-0fNuhSbG.js.map → shared-B07qIMlE.js.map} +1 -1
- package/dist/ui/{shared-lYtMadRU.js → shared-B1SAS_J-.js} +3 -3
- package/dist/ui/{shared-lYtMadRU.js.map → shared-B1SAS_J-.js.map} +1 -1
- package/dist/ui/{shared-CpI0Y8M5.js → shared-B4jgU8h9.js} +6 -6
- package/dist/ui/{shared-CpI0Y8M5.js.map → shared-B4jgU8h9.js.map} +1 -1
- package/dist/ui/{shared-Cxu1c35l.js → shared-B5aBCUi7.js} +30 -30
- package/dist/ui/{shared-Cxu1c35l.js.map → shared-B5aBCUi7.js.map} +1 -1
- package/dist/ui/{shared-CAe-US1q.js → shared-B9H7_Pji.js} +5 -5
- package/dist/ui/{shared-CAe-US1q.js.map → shared-B9H7_Pji.js.map} +1 -1
- package/dist/ui/{shared-Q2bgBaYo.js → shared-BAXr20S-.js} +4 -4
- package/dist/ui/{shared-Q2bgBaYo.js.map → shared-BAXr20S-.js.map} +1 -1
- package/dist/ui/{shared-CyEefFFb.js → shared-BDDUzH-f.js} +19 -19
- package/dist/ui/{shared-CyEefFFb.js.map → shared-BDDUzH-f.js.map} +1 -1
- package/dist/ui/{shared-BdhPI6dq.js → shared-BGmkeDeW.js} +3 -3
- package/dist/ui/{shared-BdhPI6dq.js.map → shared-BGmkeDeW.js.map} +1 -1
- package/dist/ui/{shared-DONIpq2q.js → shared-BHCQ60yN.js} +2 -2
- package/dist/ui/{shared-DONIpq2q.js.map → shared-BHCQ60yN.js.map} +1 -1
- package/dist/ui/{shared-CNmaAv64.js → shared-BHsjawAG.js} +8 -8
- package/dist/ui/{shared-CNmaAv64.js.map → shared-BHsjawAG.js.map} +1 -1
- package/dist/ui/{shared-DgjU9kOy.js → shared-BIQuK_nq.js} +4 -4
- package/dist/ui/{shared-DgjU9kOy.js.map → shared-BIQuK_nq.js.map} +1 -1
- package/dist/ui/{shared-icSQAj21.js → shared-BOe4W2FI.js} +3 -3
- package/dist/ui/{shared-icSQAj21.js.map → shared-BOe4W2FI.js.map} +1 -1
- package/dist/ui/{shared-BlxoOJSk.js → shared-BPpC08ip.js} +3 -3
- package/dist/ui/{shared-BlxoOJSk.js.map → shared-BPpC08ip.js.map} +1 -1
- package/dist/ui/{shared-BtiFL37J.js → shared-BdA3LPCB.js} +2 -2
- package/dist/ui/{shared-BtiFL37J.js.map → shared-BdA3LPCB.js.map} +1 -1
- package/dist/ui/{shared-CvR94vn4.js → shared-Be3nbWsd.js} +11 -11
- package/dist/ui/{shared-CvR94vn4.js.map → shared-Be3nbWsd.js.map} +1 -1
- package/dist/ui/{shared-Bl_nF_IH.js → shared-Bf30ZLoS.js} +8 -4
- package/dist/ui/shared-Bf30ZLoS.js.map +1 -0
- package/dist/ui/{shared-DijrJ_V-.js → shared-BguP_BaR.js} +7 -7
- package/dist/ui/{shared-DijrJ_V-.js.map → shared-BguP_BaR.js.map} +1 -1
- package/dist/ui/{shared-DPAVoWY0.js → shared-BoLbc2WD.js} +17 -2
- package/dist/ui/{shared-DPAVoWY0.js.map → shared-BoLbc2WD.js.map} +1 -1
- package/dist/ui/{shared-BkdBTYwx.js → shared-BttyOW4W.js} +3 -3
- package/dist/ui/{shared-BkdBTYwx.js.map → shared-BttyOW4W.js.map} +1 -1
- package/dist/ui/{shared-CQWLz8uT.js → shared-BumxsBlA.js} +10 -10
- package/dist/ui/{shared-CQWLz8uT.js.map → shared-BumxsBlA.js.map} +1 -1
- package/dist/ui/{shared-Dzu7tFiC.js → shared-Bw73ktBk.js} +3 -3
- package/dist/ui/{shared-Dzu7tFiC.js.map → shared-Bw73ktBk.js.map} +1 -1
- package/dist/ui/{shared-BhAYErSx.js → shared-C1B0GH0e.js} +4 -4
- package/dist/ui/{shared-BhAYErSx.js.map → shared-C1B0GH0e.js.map} +1 -1
- package/dist/ui/{shared-BQJQcGgj.js → shared-C2FsyYr7.js} +4 -4
- package/dist/ui/{shared-BQJQcGgj.js.map → shared-C2FsyYr7.js.map} +1 -1
- package/dist/ui/{shared-B9lw2Ryh.js → shared-C2RU1qjv.js} +4 -4
- package/dist/ui/{shared-B9lw2Ryh.js.map → shared-C2RU1qjv.js.map} +1 -1
- package/dist/ui/{shared-DQYNI9wO.js → shared-C42f07hJ.js} +5 -5
- package/dist/ui/{shared-DQYNI9wO.js.map → shared-C42f07hJ.js.map} +1 -1
- package/dist/ui/{shared-CqCZ8wMY.js → shared-C4LkPCU4.js} +3 -3
- package/dist/ui/{shared-CqCZ8wMY.js.map → shared-C4LkPCU4.js.map} +1 -1
- package/dist/ui/{shared-BhtpgOpa.js → shared-C4wSfz6k.js} +9 -9
- package/dist/ui/{shared-BhtpgOpa.js.map → shared-C4wSfz6k.js.map} +1 -1
- package/dist/ui/{shared-BHc2Izkj.js → shared-C9DZtSFH.js} +2 -2
- package/dist/ui/{shared-BHc2Izkj.js.map → shared-C9DZtSFH.js.map} +1 -1
- package/dist/ui/{shared-DW1YuiNS.js → shared-CA52ClGo.js} +2 -2
- package/dist/ui/{shared-DW1YuiNS.js.map → shared-CA52ClGo.js.map} +1 -1
- package/dist/ui/{shared-BbSbilkh.js → shared-CBciTwm6.js} +9 -9
- package/dist/ui/{shared-BbSbilkh.js.map → shared-CBciTwm6.js.map} +1 -1
- package/dist/ui/{shared-C-J32eBn.js → shared-CL3RLKDA.js} +16 -16
- package/dist/ui/{shared-C-J32eBn.js.map → shared-CL3RLKDA.js.map} +1 -1
- package/dist/ui/{shared-Ck8S4OxW.js → shared-CLq3-_hW.js} +3 -3
- package/dist/ui/{shared-Ck8S4OxW.js.map → shared-CLq3-_hW.js.map} +1 -1
- package/dist/ui/{shared-Q5WefT7G.js → shared-CMjK-Ucd.js} +3 -3
- package/dist/ui/{shared-Q5WefT7G.js.map → shared-CMjK-Ucd.js.map} +1 -1
- package/dist/ui/{shared-D3MAuEA3.js → shared-CPjpSFGh.js} +2 -2
- package/dist/ui/{shared-D3MAuEA3.js.map → shared-CPjpSFGh.js.map} +1 -1
- package/dist/ui/{shared-VshXGwXP.js → shared-CSPhENq3.js} +2 -2
- package/dist/ui/{shared-VshXGwXP.js.map → shared-CSPhENq3.js.map} +1 -1
- package/dist/ui/{shared-DJrJaE73.js → shared-CZJE4Bmp.js} +3 -3
- package/dist/ui/{shared-DJrJaE73.js.map → shared-CZJE4Bmp.js.map} +1 -1
- package/dist/ui/{shared-D7ONOwI7.js → shared-C_BhUL2I.js} +7 -7
- package/dist/ui/{shared-D7ONOwI7.js.map → shared-C_BhUL2I.js.map} +1 -1
- package/dist/ui/{shared-j-2peBIB.js → shared-CbeujwdU.js} +4 -4
- package/dist/ui/{shared-j-2peBIB.js.map → shared-CbeujwdU.js.map} +1 -1
- package/dist/ui/{shared-D5GrOEa2.js → shared-Cbf-o4Dt.js} +4 -4
- package/dist/ui/{shared-D5GrOEa2.js.map → shared-Cbf-o4Dt.js.map} +1 -1
- package/dist/ui/{shared-HwiPIajr.js → shared-CdNmeNHh.js} +3 -3
- package/dist/ui/{shared-HwiPIajr.js.map → shared-CdNmeNHh.js.map} +1 -1
- package/dist/ui/{shared-ZCFt-CPb.js → shared-CdQOMD8J.js} +3 -3
- package/dist/ui/{shared-ZCFt-CPb.js.map → shared-CdQOMD8J.js.map} +1 -1
- package/dist/ui/{shared-ClhXSGGK.js → shared-CdiPYlTh.js} +2 -2
- package/dist/ui/{shared-ClhXSGGK.js.map → shared-CdiPYlTh.js.map} +1 -1
- package/dist/ui/{shared-DA8_pVRZ.js → shared-CepLAhwm.js} +2 -2
- package/dist/ui/{shared-DA8_pVRZ.js.map → shared-CepLAhwm.js.map} +1 -1
- package/dist/ui/{shared-BrYKjrnM.js → shared-Ch82h_Fu.js} +6 -6
- package/dist/ui/{shared-BrYKjrnM.js.map → shared-Ch82h_Fu.js.map} +1 -1
- package/dist/ui/{shared-C4UrE8Fb.js → shared-Chp88all.js} +3 -3
- package/dist/ui/{shared-C4UrE8Fb.js.map → shared-Chp88all.js.map} +1 -1
- package/dist/ui/{shared-CWa80DTO.js → shared-Ci16s2rN.js} +9 -9
- package/dist/ui/{shared-CWa80DTO.js.map → shared-Ci16s2rN.js.map} +1 -1
- package/dist/ui/{shared-tksTLD6Q.js → shared-CiqNkoE1.js} +5 -5
- package/dist/ui/{shared-tksTLD6Q.js.map → shared-CiqNkoE1.js.map} +1 -1
- package/dist/ui/{shared-yt7DjSrq.js → shared-CpMhOq8F.js} +2 -2
- package/dist/ui/{shared-yt7DjSrq.js.map → shared-CpMhOq8F.js.map} +1 -1
- package/dist/ui/{shared-Dm0z5WUl.js → shared-CrWv5JKH.js} +6 -6
- package/dist/ui/{shared-Dm0z5WUl.js.map → shared-CrWv5JKH.js.map} +1 -1
- package/dist/ui/{shared-CQL3FGHc.js → shared-Csfi3Pti.js} +2 -2
- package/dist/ui/{shared-CQL3FGHc.js.map → shared-Csfi3Pti.js.map} +1 -1
- package/dist/ui/{shared-BKNRbm-V.js → shared-CuZt26rm.js} +2 -2
- package/dist/ui/{shared-BKNRbm-V.js.map → shared-CuZt26rm.js.map} +1 -1
- package/dist/ui/{shared-Guq3upiR.js → shared-Cws_z-TS.js} +2 -2
- package/dist/ui/{shared-Guq3upiR.js.map → shared-Cws_z-TS.js.map} +1 -1
- package/dist/ui/{shared-Bw_qZeIj.js → shared-D1KWuCg6.js} +2 -2
- package/dist/ui/{shared-Bw_qZeIj.js.map → shared-D1KWuCg6.js.map} +1 -1
- package/dist/ui/{shared-CuCZKwXW.js → shared-D66ju_Cb.js} +23 -23
- package/dist/ui/{shared-CuCZKwXW.js.map → shared-D66ju_Cb.js.map} +1 -1
- package/dist/ui/{shared-DYfX7NSM.js → shared-DGaQZXnw.js} +2 -2
- package/dist/ui/{shared-DYfX7NSM.js.map → shared-DGaQZXnw.js.map} +1 -1
- package/dist/ui/{shared-B3Hp8tOv.js → shared-DHy41sET.js} +6 -6
- package/dist/ui/{shared-B3Hp8tOv.js.map → shared-DHy41sET.js.map} +1 -1
- package/dist/ui/{shared-CXyd7IKi.js → shared-DKEOMQ6l.js} +2 -2
- package/dist/ui/{shared-CXyd7IKi.js.map → shared-DKEOMQ6l.js.map} +1 -1
- package/dist/ui/{shared-Ccmc8YO0.js → shared-DSUICuaJ.js} +33 -33
- package/dist/ui/{shared-Ccmc8YO0.js.map → shared-DSUICuaJ.js.map} +1 -1
- package/dist/ui/{shared-CL2iw_js.js → shared-DUPMRoO0.js} +13 -13
- package/dist/ui/{shared-CL2iw_js.js.map → shared-DUPMRoO0.js.map} +1 -1
- package/dist/ui/{shared-Dtp4eRul.js → shared-DVfdm6ah.js} +2 -2
- package/dist/ui/{shared-Dtp4eRul.js.map → shared-DVfdm6ah.js.map} +1 -1
- package/dist/ui/{shared-BJ5Ex32G.js → shared-DXM7d7lJ.js} +3 -3
- package/dist/ui/{shared-BJ5Ex32G.js.map → shared-DXM7d7lJ.js.map} +1 -1
- package/dist/ui/{shared-BFr6ld0e.js → shared-DXbMlcev.js} +2 -2
- package/dist/ui/{shared-BFr6ld0e.js.map → shared-DXbMlcev.js.map} +1 -1
- package/dist/ui/{shared-BUp3jv-N.js → shared-D_SkPtJ9.js} +6 -6
- package/dist/ui/{shared-BUp3jv-N.js.map → shared-D_SkPtJ9.js.map} +1 -1
- package/dist/ui/{shared-CdNomVzH.js → shared-Dd21k2ic.js} +4 -4
- package/dist/ui/{shared-CdNomVzH.js.map → shared-Dd21k2ic.js.map} +1 -1
- package/dist/ui/{shared-gRMbxmpu.js → shared-Dh0nHtLZ.js} +8 -8
- package/dist/ui/{shared-gRMbxmpu.js.map → shared-Dh0nHtLZ.js.map} +1 -1
- package/dist/ui/{shared-BKGJgjog.js → shared-DkOdSpSK.js} +3 -3
- package/dist/ui/{shared-BKGJgjog.js.map → shared-DkOdSpSK.js.map} +1 -1
- package/dist/ui/{shared-BMsh72Uq.js → shared-Dkph5ckT.js} +2 -2
- package/dist/ui/{shared-BMsh72Uq.js.map → shared-Dkph5ckT.js.map} +1 -1
- package/dist/ui/{shared-Be1HpDOB.js → shared-Dl1_Nx--.js} +3 -3
- package/dist/ui/{shared-Be1HpDOB.js.map → shared-Dl1_Nx--.js.map} +1 -1
- package/dist/ui/{shared-BQIZWOoJ.js → shared-Dm0IGbAf.js} +2 -2
- package/dist/ui/{shared-BQIZWOoJ.js.map → shared-Dm0IGbAf.js.map} +1 -1
- package/dist/ui/{shared-DSUtcU5S.js → shared-DnIkTpPr.js} +5 -5
- package/dist/ui/{shared-DSUtcU5S.js.map → shared-DnIkTpPr.js.map} +1 -1
- package/dist/ui/{shared-DsxGbYlV.js → shared-Docl_0tq.js} +3 -3
- package/dist/ui/{shared-DsxGbYlV.js.map → shared-Docl_0tq.js.map} +1 -1
- package/dist/ui/{shared-DZskrV26.js → shared-DprrHC72.js} +2 -2
- package/dist/ui/{shared-DZskrV26.js.map → shared-DprrHC72.js.map} +1 -1
- package/dist/ui/{shared-Bmw43Hwf.js → shared-DyKsJTZs.js} +2 -2
- package/dist/ui/{shared-Bmw43Hwf.js.map → shared-DyKsJTZs.js.map} +1 -1
- package/dist/ui/{shared-BLG88Pya.js → shared-FO7vfI3F.js} +4 -4
- package/dist/ui/{shared-BLG88Pya.js.map → shared-FO7vfI3F.js.map} +1 -1
- package/dist/ui/{shared-DLSd80D1.js → shared-HalAVHjv.js} +3 -3
- package/dist/ui/{shared-DLSd80D1.js.map → shared-HalAVHjv.js.map} +1 -1
- package/dist/ui/{shared-D1mMBLdj.js → shared-JvcI-LWp.js} +15 -15
- package/dist/ui/{shared-D1mMBLdj.js.map → shared-JvcI-LWp.js.map} +1 -1
- package/dist/ui/{shared-C6Hv_4O0.js → shared-K7Ym27yg.js} +2 -2
- package/dist/ui/{shared-C6Hv_4O0.js.map → shared-K7Ym27yg.js.map} +1 -1
- package/dist/ui/{shared-B39ln7oi.js → shared-SzlnwfJO.js} +3 -3
- package/dist/ui/{shared-B39ln7oi.js.map → shared-SzlnwfJO.js.map} +1 -1
- package/dist/ui/{shared-DgPn_Jll.js → shared-TrGbd1FY.js} +3 -3
- package/dist/ui/{shared-DgPn_Jll.js.map → shared-TrGbd1FY.js.map} +1 -1
- package/dist/ui/{shared-DrFb-XtA.js → shared-WhbuObEW.js} +2 -2
- package/dist/ui/{shared-DrFb-XtA.js.map → shared-WhbuObEW.js.map} +1 -1
- package/dist/ui/{shared-DiFQljcq.js → shared-XcSKDp6N.js} +11 -11
- package/dist/ui/{shared-DiFQljcq.js.map → shared-XcSKDp6N.js.map} +1 -1
- package/dist/ui/{shared-CMAg58rY.js → shared-Z4uBJU6I.js} +7 -6
- package/dist/ui/shared-Z4uBJU6I.js.map +1 -0
- package/dist/ui/{shared-BnUptuUp.js → shared-bAgeiRa5.js} +2 -2
- package/dist/ui/{shared-BnUptuUp.js.map → shared-bAgeiRa5.js.map} +1 -1
- package/dist/ui/{shared-BxMvSjey.js → shared-cgXG7OgZ.js} +5 -5
- package/dist/ui/{shared-BxMvSjey.js.map → shared-cgXG7OgZ.js.map} +1 -1
- package/dist/ui/{shared-u4CG2kQJ.js → shared-eZ0SB_zm.js} +2 -2
- package/dist/ui/{shared-u4CG2kQJ.js.map → shared-eZ0SB_zm.js.map} +1 -1
- package/dist/ui/{shared-L90bWW8e.js → shared-frKFb79C.js} +2 -2
- package/dist/ui/{shared-L90bWW8e.js.map → shared-frKFb79C.js.map} +1 -1
- package/dist/ui/{shared-Dd34nhkw.js → shared-hAayNSRA.js} +3 -3
- package/dist/ui/{shared-Dd34nhkw.js.map → shared-hAayNSRA.js.map} +1 -1
- package/dist/ui/{shared-DzC64cpp.js → shared-j_J16p2B.js} +2 -2
- package/dist/ui/{shared-DzC64cpp.js.map → shared-j_J16p2B.js.map} +1 -1
- package/dist/ui/{shared-DX7HRIV-.js → shared-tqpl5N3g.js} +6 -6
- package/dist/ui/{shared-DX7HRIV-.js.map → shared-tqpl5N3g.js.map} +1 -1
- package/dist/ui/{shared-BS5dBMpA.js → shared-y-6_ZDts.js} +2 -2
- package/dist/ui/{shared-BS5dBMpA.js.map → shared-y-6_ZDts.js.map} +1 -1
- package/dist/ui/{shared-Cv5v_MP1.js → shared-zG6e1Rhz.js} +13 -13
- package/dist/ui/{shared-Cv5v_MP1.js.map → shared-zG6e1Rhz.js.map} +1 -1
- package/dist/ui/testing.js +1 -1
- package/package.json +4 -4
- package/dist/docs/cli-browser.md +0 -232
- package/dist/docs/database-browser.md +0 -115
- package/dist/docs/keyboard.md +0 -63
- package/dist/docs/mcp.md +0 -86
- package/dist/ui/shared-Bl_nF_IH.js.map +0 -1
- package/dist/ui/shared-CMAg58rY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-CNmaAv64.js","names":["React","platform.os.mac","platform.engine.webkit","React","REASONS.triggerFocus","React","_formatErrorMessage","React","_formatErrorMessage","React","_formatErrorMessage","React","REASONS.itemPress","platform.os.mac","React","React","_formatErrorMessage","React","React","_formatErrorMessage","React","REASONS.siblingOpen","React","_formatErrorMessage","selectors","React","React","useId","REASONS.imperativeAction","listNavigation","React","React","_formatErrorMessage","React","REASONS.cancelOpen","squeeze","say","say","say","findTable","squeeze","say","React","_formatErrorMessage","_formatErrorMessage","React","REASONS.inputClear","REASONS.inputChange","REASONS.itemPress","REASONS.none","REASONS.inputPress","REASONS.keyboard","REASONS.pointer","React","CommonTriggerDataAttributes.popupOpen","CommonTriggerDataAttributes.pressed","ComboboxInputDataAttributes.popupSide","ComboboxInputDataAttributes.listEmpty","React","React","_formatErrorMessage","REASONS.closePress","React","REASONS.none","REASONS.keyboard","REASONS.pointer","platform.os.android","REASONS.inputChange","REASONS.inputClear","platform.engine.gecko","REASONS.escapeKey","React","React","React","React","platform.os.ios","React","_formatErrorMessage","React","React","React","Autocomplete.Root","Autocomplete.Input","Autocomplete.Portal","Autocomplete.Positioner","Autocomplete.Popup","Autocomplete.List","Autocomplete.Empty","Autocomplete.Item","Menu.Root","Menu.Trigger","Menu.Portal","Menu.Positioner","Menu.Popup","Menu.Group","Menu.GroupLabel","Menu.Item","referenceNames","subtitleColumns","editedReferences","listReferenceNames","showClause","appListQuery","say","sharedReferenceNames","say","sharedSubtitleColumns","sharedEditedReferences","labelPath","sharedShowClause","sharedListReferenceNames","sharedAppListQuery","findTable","squeeze","say","say","findTable","useSyncExternalStoreWithSelector"],"sources":["../../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../engine/src/shared/subtitlePath.ts","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs","../../../../node_modules/@base-ui/react/menu/positioner/MenuPositionerContext.mjs","../../../../node_modules/@base-ui/react/menu/root/MenuRootContext.mjs","../../../../node_modules/@base-ui/react/context-menu/root/ContextMenuRootContext.mjs","../../../../node_modules/@base-ui/react/menu/item/useMenuItemCommonProps.mjs","../../../../node_modules/@base-ui/react/menu/item/useMenuItem.mjs","../../../../node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs","../../../../node_modules/@base-ui/react/menu/group/MenuGroup.mjs","../../../../node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs","../../../../node_modules/@base-ui/react/menu/item/MenuItem.mjs","../../../../node_modules/@base-ui/react/menu/popup/MenuPopup.mjs","../../../../node_modules/@base-ui/react/menu/portal/MenuPortalContext.mjs","../../../../node_modules/@base-ui/react/menu/portal/MenuPortal.mjs","../../../../node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs","../../../../node_modules/@base-ui/react/menubar/MenubarContext.mjs","../../../../node_modules/@base-ui/react/menu/store/MenuStore.mjs","../../../../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRootContext.mjs","../../../../node_modules/@base-ui/react/menu/root/MenuRoot.mjs","../../../../node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs","../../../../node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs","../../../../node_modules/@base-ui/react/menu/utils/findRootOwnerId.mjs","../../../../node_modules/@base-ui/react/utils/useMixedToggleClickHandler.mjs","../../../../node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs","../../../kit/src/client/conditions.js","../../../kit/src/client/copy/shell/prompt.ts","../../../kit/src/client/prompt.js","../../../kit/src/client/copy/workbench/filterbar.ts","../../../kit/src/client/filterbar.js","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/gridNavigation.mjs","../../../../node_modules/@base-ui/react/combobox/root/ComboboxRootContext.mjs","../../../../node_modules/@base-ui/react/combobox/store.mjs","../../../../node_modules/@base-ui/react/combobox/root/utils/index.mjs","../../../../node_modules/@base-ui/utils/stringifyLocale.mjs","../../../../node_modules/@base-ui/react/internals/filter.mjs","../../../../node_modules/@base-ui/react/combobox/root/utils/useFilter.mjs","../../../../node_modules/@base-ui/react/utils/scrollable.mjs","../../../../node_modules/@base-ui/react/combobox/root/utils/constants.mjs","../../../../node_modules/@base-ui/react/combobox/items/itemCollection.mjs","../../../../node_modules/@base-ui/react/combobox/root/AriaCombobox.mjs","../../../../node_modules/@base-ui/react/autocomplete/root/AutocompleteRoot.mjs","../../../../node_modules/@base-ui/react/combobox/input/ComboboxInputDataAttributes.mjs","../../../../node_modules/@base-ui/react/combobox/utils/stateAttributesMapping.mjs","../../../../node_modules/@base-ui/react/combobox/utils/parts.mjs","../../../../node_modules/@base-ui/react/combobox/chips/ComboboxChipsContext.mjs","../../../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositionerContext.mjs","../../../../node_modules/@base-ui/react/combobox/utils/ComboboxInternalDismissButton.mjs","../../../../node_modules/@base-ui/react/combobox/input/ComboboxInput.mjs","../../../../node_modules/@base-ui/react/combobox/collection/GroupCollectionContext.mjs","../../../../node_modules/@base-ui/react/combobox/collection/ComboboxCollection.mjs","../../../../node_modules/@base-ui/react/combobox/list/ComboboxList.mjs","../../../../node_modules/@base-ui/react/combobox/utils/useInitialLiveRegionTextMutation.mjs","../../../../node_modules/@base-ui/react/combobox/portal/ComboboxPortalContext.mjs","../../../../node_modules/@base-ui/react/combobox/portal/ComboboxPortal.mjs","../../../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.mjs","../../../../node_modules/@base-ui/react/combobox/popup/ComboboxPopup.mjs","../../../../node_modules/@base-ui/react/combobox/item/ComboboxItemContext.mjs","../../../../node_modules/@base-ui/react/combobox/row/ComboboxRowContext.mjs","../../../../node_modules/@base-ui/react/combobox/item/ComboboxItem.mjs","../../../../node_modules/@base-ui/react/autocomplete/item/AutocompleteItem.mjs","../../../../node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.mjs","../../../ui/src/Typeahead.tsx","../../../ui/src/DropMenu.tsx","../../../kit/src/client/liveState.ts","../../../engine/src/shared/listQuestion.ts","../../../kit/src/client/copy/lists/components/appListModel.ts","../../../kit/src/client/components/appListModel.ts","../../../kit/src/client/deeplink.js","../../../engine/src/shared/breakdowntext.ts","../../../kit/src/client/url.js","../../../kit/src/client/copy/forms/components/useRecordInsert.ts","../../../kit/src/client/components/useRecordInsert.ts","../../../kit/src/client/recordDrafts.ts","../../../kit/src/client/components/navCounts.ts","../../../kit/src/client/copy/record/insert.ts","../../../kit/src/client/insert.js","../../../../node_modules/@tanstack/store/dist/alien.js","../../../../node_modules/@tanstack/store/dist/atom.js","../../../../node_modules/@tanstack/react-store/dist/useSelector.js"],"sourcesContent":[null,null,"/**\n * The path a shown column's second line reads, or undefined for none. A\n * rule's `subtitle` names a column of the table the value was read from, so\n * `employee_id.name` shown on a timesheet reads `employee_id.title` — the\n * employee's title, never the timesheet's own column of that name. Its own\n * module: the cell draws it (client valueModel.ts) and a list's question\n * fetches it (listQuestion.ts), and a public page's cells carry nothing else.\n */\nexport function subtitlePath(rule: { subtitle?: string } | null | undefined, column: string): string | undefined {\n if (!rule?.subtitle) return undefined;\n const hop = column.lastIndexOf('.');\n return hop < 0 ? rule.subtitle : `${column.slice(0, hop + 1)}${rule.subtitle}`;\n}\n\n/**\n * The path a shown column's lead icon reads its tone from, or undefined for\n * none: like a second line, a column of the table the value was read from.\n */\nexport function leadTonePath(rule: { icon?: { toneOf?: string } } | null | undefined, column: string): string | undefined {\n if (!rule?.icon?.toneOf) return undefined;\n const hop = column.lastIndexOf('.');\n return hop < 0 ? rule.icon.toneOf : `${column.slice(0, hop + 1)}${rule.icon.toneOf}`;\n}\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * Simple conditions, read and written through the real clause machinery.\n *\n * The filter boxes speak in single conditions — `status = open`,\n * `shipped_on is empty` — and this is the one place that reads them out of\n * a query and writes them back in. It sits on clauses.js rather than on\n * regexes of its own, because a second lexer for the language is a mirror\n * that drifts: the first cut of this file missed `last month`, split\n * quoted values on their own words, and orphaned half of an or-group. The\n * clause splitter is quote-aware, paren-aware and between-aware already;\n * everything here is set arithmetic on what it returns.\n *\n * Pure on purpose — imports clauses.js and nothing else — so the grammar\n * these boxes assume is pinned by tests that run in node.\n */\nimport { joinQuery, maskQuoted, splitConditions, splitQuery } from './clauses.js';\n\nexport const squeeze = (text) =>\n String(text ?? '')\n .replace(/\\s+/g, ' ')\n .trim();\n\n/* The texts these helpers take have no leading table name — the list's\n heading already says it — but splitQuery expects one. A throwaway token\n stands in and never comes back out (joinQuery drops the empty table). */\nconst parse = (text) => {\n const parts = splitQuery(`q ${squeeze(text)}`);\n return { parts, conditions: splitConditions(parts.filter) };\n};\n\nconst rebuild = (parts, conditions) => squeeze(joinQuery({ ...parts, table: '', filter: conditions.join(' and ') }));\n\n/** A single outer paren pair says grouping, not meaning; peel it. */\nconst ungroup = (condition) => {\n const text = squeeze(condition);\n if (!text.startsWith('(') || !text.endsWith(')')) return text;\n // Only when the parens are one pair around the whole thing.\n const inner = text.slice(1, -1);\n let depth = 0;\n for (const ch of maskQuoted(inner)) {\n if (ch === '(') depth += 1;\n if (ch === ')') depth -= 1;\n if (depth < 0) return text;\n }\n return squeeze(inner);\n};\n\n/**\n * Does this top-level condition belong to `col`, simply? An or-group is one\n * thing you either want or do not — no box owns half of it, so a column\n * that only appears inside one reads as unset and stays untouched.\n */\nconst owns = (condition, col) => {\n const text = squeeze(condition);\n const lower = text.toLowerCase();\n const name = col.toLowerCase();\n /* A filter that is a whole condition — the rows that point at the record, asked by one of their segments\n (`any opportunity where open`, shared/listFilters.ts) — owns itself, with no tail. */\n if (!(lower === name || lower.startsWith(`${name} `) || lower.startsWith(`${name}=`))) return false;\n if (/\\bor\\b/i.test(maskQuoted(text))) return false;\n return true;\n};\n\n/** The condition tail this text holds for a column — `= open`,\n `= last 30 days`, `contains \"no show\"`, `is empty` — or ''. */\nexport function conditionTail(text, col) {\n const mine = parse(text).conditions.find((condition) => owns(condition, col));\n if (!mine) return '';\n const tail = squeeze(squeeze(mine).slice(col.length));\n if (/^is\\b/i.test(tail)) return tail.toLowerCase();\n if (/^contains\\b/i.test(tail)) return `contains ${squeeze(tail.replace(/^contains/i, ''))}`;\n return tail.replace(/^=\\s*/, '= ');\n}\n\n/**\n * Every owned tail for the column, in order — a two-condition column\n * (`stage != a and stage != b`) is two tails, and a chip that showed only\n * the first was a chip lying by half.\n */\nexport function ownedTails(text, col) {\n return parse(text)\n .conditions.filter((condition) => owns(condition, col))\n .map((condition) => {\n const tail = squeeze(squeeze(condition).slice(col.length));\n if (/^is\\b/i.test(tail)) return tail.toLowerCase();\n if (/^contains\\b/i.test(tail)) return `contains ${squeeze(tail.replace(/^contains/i, ''))}`;\n return tail.replace(/^=\\s*/, '= ');\n });\n}\n\n/** Whether the text holds a condition this column owns: a whole-condition filter's has no tail to read. */\nexport function holdsCondition(text, col) {\n return parse(text).conditions.some((condition) => owns(condition, col));\n}\n\n/** The text with any owned `col …` condition removed, seams sewn up. */\nexport function stripCondition(text, col) {\n const { parts, conditions } = parse(text);\n return rebuild(\n parts,\n conditions.filter((condition) => !owns(condition, col)),\n );\n}\n\n/**\n * The tail that sets a filter which is a whole condition — the rows that\n * point at the record, asked by a segment of theirs (`any opportunity where\n * open`, shared/listFilters.ts) — with nothing after it. A facet hands it to\n * the same `set` every tail goes through, so the rail, a bar's picker and a\n * sheet's draft write it as they write any other.\n */\nexport const WHOLE = '\\u0000whole';\n\n/**\n * The text with this column's condition set, replaced, or ('' tail)\n * removed. `and` binds tighter than `or`, so any surviving or-group is\n * parenthesised first — narrowing it must narrow the whole alternative,\n * not quietly attach to its last arm.\n */\nexport function withCondition(text, col, tail) {\n const said = tail === WHOLE ? col : tail ? `${col} ${tail}` : '';\n const { parts, conditions } = parse(text);\n const kept = conditions.filter((condition) => !owns(condition, col));\n if (!said) return rebuild(parts, kept);\n const wrapped = kept.map((condition) => {\n const bare = squeeze(condition);\n return /\\bor\\b/i.test(maskQuoted(bare)) && ungroup(bare) === bare ? `(${bare})` : bare;\n });\n return rebuild(parts, [...wrapped, said]);\n}\n\n/**\n * One spelling for one question, so two texts that ask the same thing\n * compare equal: whitespace squeezed and redundant outer parens peeled —\n * `(a or b)` and `a or b` are the same alternative.\n */\nexport function canonicalize(text) {\n const { parts, conditions } = parse(text);\n return rebuild(parts, conditions.map(ungroup));\n}\n\n/** Whether the text carries a show clause of its own. Quote-aware: a value\n that merely contains the word does not count. */\nexport const hasShowClause = (text) => Boolean(splitQuery(`q ${squeeze(text)}`).show);\n\n/**\n * Does any condition in the text involve this column — including inside an\n * or-group that no box owns? The guard for \"this tab speaks for that\n * column\", where conditionTail's simple-conditions-only answer was too\n * narrow: a stale box tail folded into an or-group tab ANDed the old tab's\n * state into the new one and showed zero rows.\n */\nexport function mentionsColumn(text, col) {\n const safe = String(col).replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return new RegExp(`(^|[^\\\\w.])${safe}\\\\s*(=|!=|>|<|contains\\\\b|has\\\\b|is\\\\b|between\\\\b)`, 'i').test(maskQuoted(squeeze(text)));\n}\n","/** What prompt says, in the shell room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({});\n","/**\n * A themed replacement for `window.prompt`.\n *\n * The native one cannot be styled at all: it is drawn by the browser, says\n * \"localhost:4111 says\" above whatever you asked, and appears in the system\n * font on the system chrome regardless of the page. It also blocks the main\n * thread, which is why it is the one dialog that cannot animate or be\n * dismissed by clicking away.\n *\n * `<dialog>` gives back everything that matters — modal focus trapping,\n * Escape to close, backdrop — so this only has to supply the shape.\n */\nimport { createElement } from 'react';\nimport { mount, unmount } from './components/mount.js';\nimport { ConfirmDialog, PromptDialog, RangeDialog } from './components/Prompt.js';\nimport { say } from './copy/shell/prompt.js';\nimport { portalRoot } from './shellHost.js';\n\n/** Mount a dialog component on the body and resolve with its one answer. */\nexport function ask(Dialog, props) {\n return new Promise((resolve) => {\n const host = document.createElement('div');\n host.className = 'host-contents';\n portalRoot().append(host);\n mount(\n host,\n createElement(Dialog, {\n ...props,\n onDone: (result) => {\n resolve(result);\n unmount(host);\n host.remove();\n },\n }),\n );\n });\n}\n\n/**\n * One question, one field. Resolves the trimmed answer, or null if cancelled.\n * `date` uses the themed date-only picker; `datetime-local` uses the same\n * calendar for a date and a wall-clock time, answering what the browser's\n * control did (`YYYY-MM-DDTHH:MM`, no zone). Other inputs keep their type.\n * @param {Omit<import('./components/Prompt.js').PromptProps, 'onDone'>} options\n * @returns {Promise<string | null>}\n */\nexport function promptFor({\n title,\n label,\n value = '',\n hint,\n confirmLabel = say('common.save'),\n placeholder,\n type = 'text',\n multiline = false,\n}) {\n return /** @type {Promise<string | null>} */ (\n ask(PromptDialog, { title, label, value, hint, confirmLabel, placeholder, type, multiline })\n );\n}\n\n/**\n * Two values at once, for `between`. A range asked as two separate prompts\n * is two chances to cancel halfway; it is one question, so it is one dialog.\n * Resolves `{ from, to }`, or null if cancelled.\n *\n * @param {Omit<import('./components/Prompt.js').RangeProps, 'onDone'>} options\n * @returns {Promise<{from: string, to: string}|null>}\n */\nexport function promptForRange({ title, fromLabel, toLabel, hint, type = 'text', placeholder }) {\n return ask(RangeDialog, { title, fromLabel, toLabel, hint, type, placeholder });\n}\n\n/** A yes-or-no with the consequence spelled out. Resolves true only on the confirming button.\n * @param {Omit<import('./components/Prompt.js').ConfirmProps, 'onDone'>} options\n */\nexport function confirmFor({ title, body, confirmLabel = 'OK' }) {\n return ask(ConfirmDialog, { title, body, confirmLabel });\n}\n","/** What filterbar says, in the Workbench room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n filtered: 'Filtered',\n copiedPasteTheView: 'Copied. Paste the view into your App\\'s \"views\", its resource into \"resources\", and name the view in \"nav\".',\n copyThisIntoYourApp: 'Copy this into your App',\n listView: 'List view',\n});\n","/**\n * Named filter boxes over a table — one grammar, two modes.\n *\n * The boxes are components (components/FilterBoxes.tsx, drawn by the table\n * room); the rules they share —\n * what kind of box a column deserves, which columns get one, how a tail is\n * spelled and unspelled — live here, with the authoring bridge.\n *\n * A box's state is a condition *tail*: `= open`, `= last 30 days`,\n * `is empty`, or '' for none. Tails rather than bare values, because a\n * column's type decides what a condition even looks like — a flag is\n * true/false, a date is a relative phrase or an emptiness, an enum is its\n * vocabulary — and the tail is the part of the language that carries that.\n */\nimport { findTable, labelColumn, looksLikeDateColumn, quote, state, toast } from './core.js';\nimport { isFlagColumn } from '@mistriwork/engine/shared/schema.js';\n\nimport { conditionTail, squeeze, withCondition } from './conditions.js';\nimport { joinQuery, splitQuery } from './clauses.js';\nimport { promptFor } from './prompt.js';\nimport { humanName } from '@mistriwork/engine/shared/model.js';\nimport { slug } from '@mistriwork/engine/shared/slug.js';\nimport { say } from './copy/workbench/filterbar.js';\n\n/* The condition grammar lives in conditions.js, on the real clause\n splitter — quote-, paren- and between-aware. This module re-exports it\n so the list pages keep one import site. */\nexport {\n canonicalize,\n conditionTail,\n hasShowClause,\n holdsCondition,\n mentionsColumn,\n ownedTails,\n squeeze,\n stripCondition,\n withCondition,\n WHOLE,\n} from './conditions.js';\n\n/** An equality tail for a typed value, through the one quoter the server\n mirrors — an embedded quote written raw terminated the string early and\n could swallow the plumbing clause behind it. */\nexport const equalsTail = (value) => (value ? `= ${quote(value)}` : '');\n\n/* The exact inverse of quote: strip a wrapping quote pair and unescape what\n quote escaped, so a value round-trips box → text → box unchanged. */\nexport const unquote = (value) => {\n const t = value.trim();\n if ((t.startsWith('\"') && t.endsWith('\"') && t.length > 1) || (t.startsWith(\"'\") && t.endsWith(\"'\") && t.length > 1)) {\n return t.slice(1, -1).replace(/\\\\([\"'\\\\])/g, '$1');\n }\n return t;\n};\n\n/** A named integer that is really a yes/no. */\nconst flaggish = (c) => /^(is|has|can|should|was|allow)_/.test(c.name) && /int|bool/i.test(c.type);\n\n/** What kind of box a column deserves: its type decides, not its position. */\nexport function boxKind(meta, tableId) {\n if (!meta) return 'text';\n // A record's tags (tagLists.ts): a checklist of its tags, asked with `has`.\n if (meta.type === 'tags') return 'tags';\n if (meta.allowed?.length) return 'enum';\n if (isFlagColumn(meta) || flaggish(meta)) return 'flag';\n if (looksLikeDateColumn(meta)) return 'date';\n /* A whole single-column reference whose target has a label column gets a\n typeahead: the grid beside the box shows \"Nia Andersen\", and a box that\n demanded her id was the review's \"quietly zero rows\" finding. A member\n of a composite key is half a hop and stays a plain box. */\n /* Not over an API: its filter takes the whole key, and the picker would ask\n the target for names by `contains`, which an API refuses. */\n if (meta.references && tableId && !findTable(tableId)?.filterable) {\n const whole = (state.schema?.foreignKeys ?? []).some(\n (fk) => fk.from.table === tableId && fk.from.columns.length === 1 && fk.from.columns[0] === meta.name,\n );\n const target = whole && findTable(meta.references.table);\n if (target && labelColumn(target)) return 'ref';\n }\n return 'text';\n}\n\n/**\n * Which columns get boxes when nobody chose: the typed ones first — enum\n * vocabularies, flags, dates are what an operational list is filtered by —\n * topped up with leading columns so a table of plain ids and numbers still\n * gets named boxes rather than nothing.\n *\n * A source that can filter only some columns (an API, whose catalog says\n * which in `filterable`) gets boxes for those alone: a box the source would\n * refuse is a control that lies.\n *\n * @param {{ id?: string, filterable?: string[], columns: Array<{name: string, type: string, primaryKey?: boolean, allowed?: string[]}> }} table\n */\nexport function deriveFilterNames(table) {\n const candidates = table.columns.filter((c) => !c.primaryKey && (!table.filterable || table.filterable.includes(c.name)));\n const typed = candidates.filter((c) => boxKind(c, table.id) !== 'text').map((c) => c.name);\n const rest = candidates.filter((c) => !typed.includes(c.name)).map((c) => c.name);\n /* Up to four typed boxes — every enum, flag and date earns its place —\n and leading columns top the row up to three so a table of plain ids\n still gets named boxes rather than nothing. */\n const names = typed.slice(0, 4);\n for (const name of rest) {\n if (names.length >= 3) break;\n names.push(name);\n }\n return names;\n}\n\n/* The relative windows people actually ask operational questions in. The\n phrases are the language's own — unquoted on purpose. */\nexport const DATE_OPTIONS = [\n ['today', '= today'],\n ['last 7 days', '= last 7 days'],\n ['last 30 days', '= last 30 days'],\n ['this month', '= this month'],\n ['this year', '= this year'],\n ['next 30 days', '= next 30 days'],\n ['empty', 'is empty'],\n ['not empty', 'is not empty'],\n];\n\n/**\n * The list on screen, spelled as an App list view — the authoring bridge:\n * refine any list in the workbench, copy, paste into an App.\n *\n * The pieces map exactly: the show clause becomes the view's `show`, the\n * conditions and sort become a tab beside \"All\", and the table goes by name\n * so the view travels between connections the way a manifest should. A\n * column the grammar renamed with `as` keeps its words as the resource's\n * caption (`resources.<table>.labels`), which is where an App says what a\n * column is called. The same contract as the page builder's Copy layout:\n * what this emits, the parser reads.\n * @param {{ table: string, query?: string }} entry\n * @param {string} tableName\n */\nexport function listViewFragment(entry, tableName) {\n const parts = splitQuery(squeeze(entry.query ?? ''));\n const show = (parts.show ?? '').replace(/^show\\s+/i, '');\n const query = squeeze(joinQuery({ table: '', filter: parts.filter }));\n const sort = (parts.sort ?? '').replace(/^(sort|order\\s+by)\\s+/i, '').trim();\n const columns = [];\n /** @type {Record<string, string>} */\n const labels = {};\n for (const piece of show\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean)) {\n const m = /^(.*?)\\s+as\\s+(.+)$/i.exec(piece);\n const column = m ? m[1].trim() : piece;\n columns.push(column);\n if (m) labels[column] = m[2].trim();\n }\n /* The question is a segment the resource declares and the list's first tab names, All after it, as the\n scaffold writes one (a tab says no query of its own); a sort alone is the list's own. */\n const label = say('filtered');\n const segment = query ? { filtered: label === humanName('filtered') ? query : { query, label } } : undefined;\n const view = {\n kind: 'list',\n from: tableName,\n ...(columns.length ? { show: columns } : {}),\n ...(segment ? { tabs: [sort ? { segment: 'filtered', sort } : 'filtered', { label: say('common.all') }] } : sort ? { sort } : {}),\n };\n const resource = { ...(Object.keys(labels).length ? { labels } : {}), ...(segment ? { segments: segment } : {}) };\n return {\n views: { [slug(tableName, 'list').slice(0, 64)]: view },\n /* A view shows a declared resource, so the resource comes with it. */\n resources: { [tableName]: resource },\n };\n}\n\nexport async function copyListView(entry) {\n const table = findTable(entry.table);\n const text = JSON.stringify(listViewFragment(entry, table?.name ?? entry.table), null, 2);\n try {\n await navigator.clipboard.writeText(text);\n toast(say('copiedPasteTheView'), 'ok');\n } catch {\n /* Clipboard access can be refused; the text is the point. */\n await promptFor({ title: say('copyThisIntoYourApp'), label: say('listView'), value: text, multiline: true });\n }\n}\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * A box you type into and a list that answers, over Base UI's Autocomplete.\n *\n * Three surfaces here are this shape — the record picker, the table picker\n * on the diagram, the reference filter box — and each walked its own list\n * with arrow keys, placed it by hand and closed it on a blur timer. Base UI\n * owns that now: the combobox roles, arrows and Home/End, Enter on the\n * highlighted row, Tab and a click outside to leave, the first row lit as\n * you type. The caller ranks and fetches the items — `filteredItems` says\n * the list is already the answer — draws each row in its own classes, and\n * hears one `onPick`.\n *\n * The text is the caller's: Base UI is told the item's label to fill the\n * box with on a pick, and that fill is ignored here, so a picker that wants\n * the box emptied (a multi-select) or named (a single one) decides itself.\n * Escape closes only this layer, stopped, so the panel underneath does not\n * take the same key. The list is anchored on the zoom-aware ruler, fixed\n * to the viewport so a scrolling drawer cannot clip it, and drawn inside\n * the enclosing dialog when there is one.\n */\nimport { useEffect, useLayoutEffect, useRef, useState, type InputHTMLAttributes, type ReactNode, type Ref, type RefObject } from 'react';\nimport { Autocomplete } from '@base-ui/react/autocomplete';\nimport { viewportBox } from './internal/ruler.js';\nimport { layoutViewport, zoomAnchor } from './internal/anchor.js';\nimport { popupContainer } from './internal/popups.js';\n\ninterface TypeaheadProps<T> {\n text: string;\n onText: (text: string) => void;\n /** Already ranked and bounded; drawn in this order. */\n items: T[];\n itemKey: (item: T) => string;\n itemLabel: (item: T) => string;\n itemClassName: (item: T, highlighted: boolean) => string;\n renderItem: (item: T) => ReactNode;\n onPick: (item: T) => void;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** The `<input>`'s own attributes — class, label, placeholder, title, the caller's keys. */\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n inputRef?: Ref<HTMLInputElement>;\n /** The actual popup, including when it is portalled outside the input's parent. */\n popupRef?: Ref<HTMLDivElement>;\n /** The element the list is sized and placed against; the input by default. */\n anchorRef?: RefObject<HTMLElement | null>;\n /** `width` matches the anchor exactly; `min-width` lets a long name widen the list. */\n fit?: 'width' | 'min-width';\n popupClassName: string;\n listClassName: string;\n /** Shown in the list when nothing matches; nothing at all when omitted. */\n empty?: ReactNode;\n emptyClassName?: string;\n /**\n * Where the list is drawn: inside the enclosing dialog (the default), or\n * the body. A popover is a dialog too, but its positioner is placed by a\n * transform, which makes it the containing block of a fixed list inside\n * it — measured there on the unzoomed ruler, the list landed a zoom's\n * worth away from its box. Drawn to the body, Base UI's floating tree\n * still counts the list as the popover's, so a pick does not dismiss it.\n */\n portal?: 'dialog' | 'body';\n /** Light the first row as the reader types (the default), or nothing until they arrow in: a search box's Enter is its own. */\n autoHighlight?: boolean;\n /** Hears the row lit by the keys or the pointer, and undefined when none is. */\n onHighlight?: (item: T | undefined) => void;\n}\n\nexport function Typeahead<T>({\n text,\n onText,\n items,\n itemKey,\n itemLabel,\n itemClassName,\n renderItem,\n onPick,\n open,\n onOpenChange,\n inputProps,\n inputRef,\n popupRef,\n anchorRef,\n fit = 'min-width',\n popupClassName,\n listClassName,\n empty,\n emptyClassName,\n portal = 'dialog',\n autoHighlight = true,\n onHighlight,\n}: TypeaheadProps<T>) {\n const input = useRef<HTMLInputElement | null>(null);\n const [container, setContainer] = useState<HTMLElement | null>(null);\n useEffect(() => {\n setContainer(portal === 'body' ? null : (input.current?.closest('dialog, [role=\"dialog\"]') as HTMLElement | null));\n }, [portal]);\n /* A fixed-fit list takes its width from the anchor alone. Base UI's\n --anchor-width is recomputed on every positioner update, snapped against\n the anchor's position, so a list growing as its options arrived flipped\n between two widths inside one ResizeObserver frame (\"loop completed with\n undelivered notifications\"). Measured here on the house ruler, and again\n only when the anchor itself resizes, the list's own size cannot move it. */\n const [anchorWidth, setAnchorWidth] = useState<number | null>(null);\n useLayoutEffect(() => {\n const anchor = anchorRef?.current ?? input.current;\n if (!open || fit !== 'width' || !anchor) return;\n const measure = () => {\n const width = (viewportBox(anchor) as { width: number }).width;\n setAnchorWidth(width > 0 ? width : null);\n };\n measure();\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(anchor);\n return () => observer.disconnect();\n }, [open, fit, anchorRef]);\n const setInput = (node: HTMLInputElement | null) => {\n input.current = node;\n if (typeof inputRef === 'function') inputRef(node);\n else if (inputRef) (inputRef as { current: HTMLInputElement | null }).current = node;\n };\n const { onKeyDown, onFocus, ...rest } = inputProps;\n return (\n <Autocomplete.Root\n items={items}\n filteredItems={items}\n itemToStringValue={itemLabel}\n value={text}\n onValueChange={(next, details) => {\n // Selection fills the input too; it is not a new search or a cleared key.\n if (details.reason !== 'item-press') onText(String(next ?? ''));\n }}\n open={open}\n onOpenChange={onOpenChange}\n openOnInputClick\n autoHighlight={autoHighlight}\n onItemHighlighted={onHighlight && ((item) => onHighlight(item))}\n >\n <Autocomplete.Input\n {...rest}\n ref={setInput}\n onFocus={onFocus}\n onKeyDown={(e) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n /* Only this layer: a drawer under the list listens for Escape too. */\n if (e.key === 'Escape' && open) {\n e.preventDefault();\n e.stopPropagation();\n onOpenChange(false);\n }\n }}\n />\n <Autocomplete.Portal container={container ?? popupContainer()}>\n <Autocomplete.Positioner\n anchor={() => {\n const el = anchorRef?.current ?? input.current;\n return el ? zoomAnchor(el) : null;\n }}\n positionMethod=\"fixed\"\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n collisionBoundary={layoutViewport()}\n collisionPadding={8}\n style={{\n zIndex: 40,\n // Fixed-fit lists size the observed positioner itself; the child\n // should not determine its intrinsic width while options arrive.\n ...(fit === 'width'\n ? { width: anchorWidth === null ? 'var(--anchor-width)' : `${anchorWidth}px`, maxWidth: 'var(--available-width)' }\n : {}),\n }}\n >\n <Autocomplete.Popup\n ref={popupRef}\n className={popupClassName}\n style={{\n ...(fit === 'width' ? { width: '100%' } : { minWidth: 'var(--anchor-width)', maxWidth: 'var(--available-width)' }),\n }}\n >\n <Autocomplete.List className={listClassName}>\n {empty !== undefined ? <Autocomplete.Empty className={emptyClassName}>{empty}</Autocomplete.Empty> : null}\n {items.map((item) => (\n <Autocomplete.Item\n key={itemKey(item)}\n value={item}\n className={(s) => itemClassName(item, s.highlighted)}\n onClick={() => onPick(item)}\n >\n {renderItem(item)}\n </Autocomplete.Item>\n ))}\n </Autocomplete.List>\n </Autocomplete.Popup>\n </Autocomplete.Positioner>\n </Autocomplete.Portal>\n </Autocomplete.Root>\n );\n}\n","/**\n * A button that opens a menu, over Base UI's Menu — what the `<details>`\n * menus here did with a summary and a hook (react to a click, close on\n * Escape or a click outside, hand focus back), plus what they never did:\n * arrows between the items, Home and End, typeahead, and the roles a\n * screen reader expects of a menu.\n *\n * The wrapper keeps the caller's class (`export`, `pb-picker`) because the\n * stylesheet places the control by it; the trigger and the popup wear the\n * classes the summary and the panel wore. The popup is anchored on the\n * zoom-aware ruler (anchor.ts) and fixed to the viewport, so a scrolling\n * panel cannot clip it. The open state can be the caller's, for a menu\n * that has to stay up while a click inside it fetches.\n */\nimport { useEffect, useRef, useState, type ReactNode, type Ref } from 'react';\nimport { Menu } from '@base-ui/react/menu';\nimport { layoutViewport, zoomAnchor } from './internal/anchor.js';\nimport { popupContainer } from './internal/popups.js';\nimport { buttonClass } from './Button.js';\n\ninterface DropMenuProps {\n /** The wrapper's class — where the stylesheet places the control. */\n className?: string;\n /** The trigger's classes; a secondary button's by default. */\n triggerClassName?: string;\n triggerTitle?: string;\n /** The trigger's accessible name, when its visible label is shared with another menu on the page. */\n triggerLabel?: string;\n label: ReactNode;\n /** The popup's classes; the house listbox surface (`dd-list`) by default. */\n popupClassName?: string;\n side?: 'top' | 'bottom';\n align?: 'start' | 'end';\n sideOffset?: number;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Where the focus goes when the menu closes; absent, back to the trigger. */\n finalFocus?: Menu.Popup.Props['finalFocus'];\n children: ReactNode;\n}\n\nexport function DropMenu({\n className,\n triggerClassName = buttonClass(),\n triggerTitle,\n triggerLabel,\n label,\n popupClassName = 'dd-list',\n side = 'bottom',\n align = 'end',\n sideOffset = 4,\n open,\n onOpenChange,\n finalFocus,\n children,\n}: DropMenuProps) {\n const trigger = useRef<HTMLButtonElement>(null);\n /* Inside a dialog the popup is drawn into that dialog, so it shares its\n stacking context rather than landing behind it; elsewhere it goes to\n the body the way every floating surface here does. */\n const [container, setContainer] = useState<HTMLElement | null>(null);\n useEffect(() => {\n setContainer(trigger.current?.closest('dialog, [role=\"dialog\"]') as HTMLElement | null);\n }, []);\n const [own, setOwn] = useState(false);\n const isOpen = open ?? own;\n const change = (next: boolean, details: Menu.Root.ChangeEventDetails) => {\n // Return focus before unmount so a containing dialog does not reclaim it — unless the caller says where it goes.\n if (!next && details.reason === 'escape-key' && finalFocus === undefined) trigger.current?.focus({ preventScroll: true });\n setOwn(next);\n onOpenChange?.(next);\n };\n return (\n <div className={className || undefined}>\n <Menu.Root open={isOpen} onOpenChange={change}>\n <Menu.Trigger\n render={<button type=\"button\" className={triggerClassName} title={triggerTitle} aria-label={triggerLabel} ref={trigger} />}\n >\n {label}\n </Menu.Trigger>\n <Menu.Portal container={container ?? popupContainer()}>\n <Menu.Positioner\n anchor={() => (trigger.current ? zoomAnchor(trigger.current) : null)}\n positionMethod=\"fixed\"\n side={side}\n align={align}\n sideOffset={sideOffset}\n collisionBoundary={layoutViewport()}\n collisionPadding={8}\n style={{ zIndex: 90 }}\n >\n <Menu.Popup className={popupClassName} finalFocus={finalFocus}>\n {children}\n </Menu.Popup>\n </Menu.Positioner>\n </Menu.Portal>\n </Menu.Root>\n </div>\n );\n}\n\n/** A labelled run of items: a menu that changes several things says which each item changes. */\nexport function DropGroup({\n className,\n labelClassName,\n label,\n children,\n}: {\n className?: string;\n labelClassName?: string;\n label: string;\n children: ReactNode;\n}) {\n return (\n <Menu.Group className={className}>\n <Menu.GroupLabel className={labelClassName}>{label}</Menu.GroupLabel>\n {children}\n </Menu.Group>\n );\n}\n\n/** A rule between two runs of items, a separator to a screen reader. */\nexport function DropSeparator({ className = 'dd-divider' }: { className?: string }) {\n return <Menu.Separator className={className} />;\n}\n\n/** An item drawn as a button, so `disabled` and the button styles hold. Closes the menu unless told not to. */\nexport function DropItem({\n className = 'dd-option',\n disabled,\n closeOnClick,\n onClick,\n title,\n children,\n ref,\n}: {\n className?: string;\n disabled?: boolean;\n closeOnClick?: boolean;\n onClick: () => void;\n title?: string;\n children: ReactNode;\n ref?: Ref<HTMLButtonElement>;\n}) {\n return (\n <Menu.Item\n render={<button type=\"button\" className={className} title={title} ref={ref} />}\n nativeButton\n disabled={disabled}\n closeOnClick={closeOnClick}\n onClick={onClick}\n >\n {children}\n </Menu.Item>\n );\n}\n","/**\n * What live sync tells the components, and what they tell it.\n *\n * The stream, the rules and the screens that draw a notice are a part of\n * their own (liveSync.ts, loaded when an App is shown); a list, a record and\n * a grid need only this, which is small: a row that another person changed\n * (`useChangedRows`), a list that is held while its reader works in it\n * (`useListHold`), a record that changed under an open draft, and the last\n * time a record changed. Nothing here fetches.\n */\nimport { useEffect, useMemo, useRef, useSyncExternalStore } from 'react';\nimport { canonicalText } from '@mistriwork/engine/shared/recordReadKeys.js';\n\n/** A key as text. A number and its string are one key: an id past 2^53 is a string on the wire, and a number in a query's key. */\nexport const liveKeyText = (key: Readonly<Record<string, unknown>>): string =>\n canonicalText(Object.fromEntries(Object.entries(key).map(([column, value]) => [column, value == null ? null : String(value)])));\n\nfunction store<T>(initial: T) {\n let value = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => value,\n set(next: T) {\n if (Object.is(next, value)) return;\n value = next;\n for (const listener of [...listeners]) listener();\n },\n subscribe(listener: () => void) {\n listeners.add(listener);\n return () => void listeners.delete(listener);\n },\n };\n}\n\n/* ---------- whether the page follows changes at all ---------- */\n\nconst active = store(false);\n/* The App's tables that stay out of live sync (a resource's `live: false`), as `hello` names them: never followed. */\nconst off = store<ReadonlySet<string>>(new Set());\nexport const setLiveActive = (on: boolean): void => active.set(on);\n/** Whether the page follows changes now, outside React (a query's refetch interval asks it), and, given a table, its. */\nexport const liveFollowing = (table?: string): boolean => active.get() && !(table !== undefined && off.get().has(table));\nexport const setLiveOff = (tables: readonly string[]): void => off.set(new Set(tables));\n/** Whether the page follows changes, and, given a table, whether it follows that table's. */\nexport const useLiveActive = (table?: string): boolean => {\n const on = useSyncExternalStore(active.subscribe, active.get, active.get);\n const kept = useSyncExternalStore(off.subscribe, off.get, off.get);\n return on && !(table !== undefined && kept.has(table));\n};\n\n/* ---------- rows another person changed ---------- */\n\n/** A change just announced: per table, the keys (as text) it named, or every key. */\ninterface Pulse {\n readonly id: number;\n readonly at: number;\n readonly tables: ReadonlyMap<string, ReadonlySet<string> | 'many'>;\n}\n/** How long after a change an answer still counts as its answer: a refetch waits for the rate limit (liveInvalidate.ts) and the network. */\nconst PULSE_LIFE = 8_000;\nlet pulse: Pulse | undefined;\nexport const announcePulse = (next: Pulse): void => {\n pulse = next;\n};\n\nconst NONE: ReadonlyMap<unknown, 1 | 2> = new Map();\n\n/**\n * The rows of an answer that differ from the answer before it, while a change to their table has just been announced:\n * each row to which of two alternating tints it wears, so a row changed twice in a row restarts its fade. Judged once\n * for each answer (by identity) against the answer before it. The first answer a list has tints nothing, and neither\n * does a row no change named (a page turned to, a sort), since only the keys a change named can. A list that draws a\n * new array of the same rows (a board gathers its lanes on each render) keeps the tint that change gave them, so the\n * fade is not cut short by a render that changed nothing.\n */\nexport function useChangedRows<R extends object>(\n table: string | undefined,\n rows: readonly R[] | undefined,\n keyOf: (row: R) => Readonly<Record<string, unknown>> | null | undefined,\n): ReadonlyMap<R, 1 | 2> {\n const memo = useRef<\n { rows: unknown; changed: ReadonlyMap<R, 1 | 2>; seen: ReadonlyMap<string, string>; tinted: ReadonlyMap<string, number> } | undefined\n >(undefined);\n if (!rows || !table) return NONE as ReadonlyMap<R, 1 | 2>;\n if (memo.current?.rows === rows) return memo.current.changed;\n const seen = new Map<string, string>();\n const changed = new Map<R, 1 | 2>();\n /* Each tinted key, by the change that tinted it. */\n const tinted = new Map<string, number>();\n const fresh = pulse && Date.now() - pulse.at < PULSE_LIFE ? pulse : undefined;\n const named = fresh?.tables.get(table);\n for (const row of rows) {\n const key = keyOf(row);\n if (!key) continue;\n const text = liveKeyText(key);\n const signature = JSON.stringify(row);\n seen.set(text, signature);\n const before = memo.current?.seen.get(text);\n const differs = named && memo.current && (named === 'many' || named.has(text)) && before !== signature;\n const kept = fresh && before === signature && memo.current?.tinted.get(text) === fresh.id;\n if (differs || kept) {\n changed.set(row, (fresh!.id % 2 ? 1 : 2) as 1 | 2);\n tinted.set(text, fresh!.id);\n }\n }\n memo.current = { rows, changed: changed.size ? changed : (NONE as ReadonlyMap<R, 1 | 2>), seen, tinted };\n return memo.current.changed;\n}\n\n/* ---------- a list that holds still while its reader works in it ---------- */\n\n/**\n * A list on screen that live sync may hold: what it reads, and the changes it has been told of and not shown. The\n * engagement rules (liveEngagement.ts) decide whether it is held; the invalidation (liveInvalidate.ts) asks.\n */\nexport interface Hold {\n readonly table: string;\n owns(queryKey: readonly unknown[]): boolean;\n /** Queries to ask again when the list is shown, by hash. */\n readonly queries: Set<string>;\n /** Distinct keys changed since the hold began; 'many' once any change named none. */\n keys: Set<string> | 'many';\n count(): number | 'many';\n}\nconst holds = new Set<Hold>();\n/** The lists holding changes the reader has not been shown. */\nexport const heldHolds = (): Hold[] => [...holds].filter((hold) => hold.queries.size > 0);\nexport const holdFor = (queryKey: readonly unknown[]): Hold | undefined => [...holds].find((hold) => hold.owns(queryKey));\n\n/** Whether the reader is working in a list now (set by liveEngagement.ts). */\nlet engaged: () => boolean = () => false;\nexport const setEngagement = (test: () => boolean): void => {\n engaged = test;\n};\nexport const isEngaged = (): boolean => engaged();\n\n/** Asked ones the hold has kept, to show them (set by liveInvalidate.ts). */\nlet release: (hold: Hold) => void = () => {};\nexport const setHoldRelease = (fn: (hold: Hold) => void): void => {\n release = fn;\n};\nconst releaseHold = (hold: Hold): void => release(hold);\n\nconst holdSignals = store(0);\nexport const heldChanged = (): void => holdSignals.set(holdSignals.get() + 1);\nexport const clearHold = (hold: Hold): void => {\n hold.queries.clear();\n hold.keys = new Set();\n heldChanged();\n};\n\n/**\n * Register a list as one live sync may hold, while it is on screen and the page follows changes. Returns the number of\n * changes it holds (0 when none), and a way to show them.\n */\nexport function useListHold(spec: { table: string; owns: (queryKey: readonly unknown[]) => boolean } | undefined): {\n held: number | 'many';\n show(): void;\n} {\n const on = useLiveActive(spec?.table);\n const owns = useRef(spec?.owns);\n owns.current = spec?.owns;\n const table = spec?.table;\n const hold = useMemo<Hold | undefined>(\n () =>\n on && table\n ? {\n table,\n queries: new Set(),\n keys: new Set(),\n owns: (queryKey) => owns.current?.(queryKey) ?? false,\n count() {\n return this.keys === 'many' ? 'many' : this.keys.size;\n },\n }\n : undefined,\n [on, table],\n );\n useEffect(() => {\n if (!hold) return;\n holds.add(hold);\n return () => void holds.delete(hold);\n }, [hold]);\n useSyncExternalStore(holdSignals.subscribe, holdSignals.get, holdSignals.get);\n return { held: hold?.count() ?? 0, show: () => hold && releaseHold(hold) };\n}\n\n/* ---------- a record that changed under an open draft ---------- */\n\ninterface EditNotice {\n readonly table: string;\n readonly key: string;\n readonly kind: 'update' | 'delete';\n /** The reader's own write, in another tab. */\n readonly self: boolean;\n /** When it was said: each change is its own, and who made it is asked again for each (LiveNotices.tsx). */\n readonly at: number;\n}\nconst notices = store<ReadonlyMap<string, EditNotice>>(new Map());\nconst noticeId = (table: string, key: string) => `${table}|${key}`;\nexport function raiseEditNotice(raised: Omit<EditNotice, 'at'> & { at?: number }): void {\n const notice: EditNotice = { ...raised, at: raised.at ?? Date.now() };\n const next = new Map(notices.get());\n const id = noticeId(notice.table, notice.key);\n // A delete is the last word on a record.\n if (next.get(id)?.kind === 'delete' && notice.kind !== 'delete') return;\n next.set(id, notice);\n notices.set(next);\n}\nexport function dismissEditNotice(table: string, key: string): void {\n const next = new Map(notices.get());\n if (next.delete(noticeId(table, key))) notices.set(next);\n}\n/** Whether the record's own draft is open over this record (set by liveInvalidate.ts, which reads write.js). */\nlet drafted: (table: string, key: string) => boolean = () => false;\nexport const setDraftedTest = (test: (table: string, key: string) => boolean): void => {\n drafted = test;\n};\n/** A form that raised a notice closes: the notice goes with it, unless the record's draft still owns it. */\nexport function releaseEditNotice(table: string, key: string): void {\n if (!drafted(table, key)) dismissEditNotice(table, key);\n}\nexport const useEditNotice = (table: string, key: string): EditNotice | undefined => {\n const read = () => notices.get().get(noticeId(table, key));\n return useSyncExternalStore(notices.subscribe, read, read);\n};\n\n/* ---------- when a record last changed ---------- */\n\ninterface RecentChange {\n readonly at: number;\n readonly self: boolean;\n}\nconst recents = store<ReadonlyMap<string, RecentChange>>(new Map());\nconst RECENTS_MOST = 500;\nexport function noteRecentChanges(table: string, keys: Iterable<string>, self: boolean, at = Date.now()): void {\n const next = new Map(recents.get());\n for (const key of keys) {\n next.delete(noticeId(table, key));\n next.set(noticeId(table, key), { at, self });\n }\n while (next.size > RECENTS_MOST) next.delete(next.keys().next().value!);\n recents.set(next);\n}\n/* Read by the record's own id, so a page re-draws for a change to its record and not for every change. */\nexport const useRecentChange = (table: string, key: string): RecentChange | undefined => {\n const read = () => recents.get().get(noticeId(table, key));\n return useSyncExternalStore(recents.subscribe, read, read);\n};\n\n/** Forget everything, as the page does when its session or connection changes. */\nexport function resetLiveState(): void {\n pulse = undefined;\n off.set(new Set());\n holds.clear();\n notices.set(new Map());\n recents.set(new Map());\n}\n\n/* ---------- forms that hold something typed ---------- */\n\n/** A form with input a change must not overwrite, other than the record draft (write.js): a command form on a record. */\nexport interface Editing {\n readonly table: string;\n readonly key: Readonly<Record<string, unknown>>;\n}\n/* Each open form's own reading of what it holds: nothing while it is untouched (its starting values may still follow\n the record), the records it acts on once something is typed. */\nconst editing = new Set<() => Editing | readonly Editing[] | undefined>();\nexport const editingRecords = (): Editing[] => [...editing].flatMap((read) => read() ?? []);\n/**\n * Register a form holding typed input: while `read` names a record, a change to it is not read over the form (its\n * record, its fields, its prepared starting values) and raises the notice instead (liveInvalidate.ts). Returns the\n * way to let go, which the form calls when it closes.\n */\nexport function registerEditing(read: () => Editing | readonly Editing[] | undefined): () => void {\n editing.add(read);\n return () => void editing.delete(read);\n}\n","/**\n * The question an App's list asks, as its first page sends it: the table,\n * the view's standing condition and a tab's, the order the view keeps, and\n * the plumbing — the show clause that fetches its columns, the names its\n * references are read by, the keys a row needs to open, its page size.\n *\n * The client's list builds its question by these rules\n * (client/components/appListModel.ts), and the server builds a first page's\n * the same way (server/http/firstPaintRooms.ts) so the answer it carries in\n * the page is the answer to the request the list then makes. One rule on\n * both sides: a copy would drift, and a drifted copy is a request the page\n * did not carry.\n */\nimport { andQuery } from './query.js';\nimport { splitQuery } from './clauses.js';\nimport { listPresentationColumns } from './appListColumns.js';\nimport { findTable, labelPath, primaryKey, type DatabaseSchema, type TableMeta } from './schema.js';\nimport { referenceProjection } from './referenceModel.js';\nimport { tableAtPrefix } from './viewPaths.js';\nimport type { ServedResource } from './servedApp.js';\nimport type { AppListEmpty, AppListPresentation } from './listPresentations.js';\nimport { leadTonePath, subtitlePath } from './subtitlePath.js';\nimport { currencyPath } from './money.js';\n\n/** What a list's question is read over: the schema, and the App's resources — their record labels and display rules. */\nexport interface ListRules {\n readonly schema: DatabaseSchema;\n readonly resources: Readonly<Record<string, Pick<ServedResource, 'recordLabel' | 'display'>>>;\n}\n\n/** One of a list's tabs: its label and the condition it adds. */\nexport interface ListTab {\n label: string;\n query?: string;\n /** Its word in an address where the label is said in another language (addressParams.ts `tabKey`). */\n slug?: string;\n /** What it says while it holds no row and nothing narrows it past its own condition. */\n empty?: AppListEmpty;\n}\n\n/** What of a list view its question is made from. */\nexport interface ListQuestionSpec {\n table: string;\n query?: string;\n tabs?: ListTab[];\n show?: string[];\n presentation?: AppListPresentation;\n sort?: string;\n order?: string;\n limit?: number;\n editable?: true | string[];\n /** The reference column whose record a row opens (a view's `opens`): fetched, as the row's key is, to open it. */\n opens?: string;\n}\n\nconst squeeze = (text: unknown): string =>\n String(text ?? '')\n .replace(/\\s+/g, ' ')\n .trim();\n\nconst resource = (rules: ListRules, tableId: string) => (Object.hasOwn(rules.resources, tableId) ? rules.resources[tableId] : undefined);\n\n/** A table's record label, where its resource names one (false: a projection that withholds it). */\nconst recordLabelOf = (rules: ListRules, table: TableMeta): string | false | undefined => resource(rules, table.id)?.recordLabel;\n\n/** Where a row's name lives, as a view path (schema.ts labelPath), by the App's record label. */\nconst labelPathOf = (rules: ListRules, table: TableMeta): string | undefined => labelPath(rules.schema, table, recordLabelOf(rules, table));\n\n/**\n * The references among a list's columns, each with the path its record's\n * name is read from: `partner_id` → `partner_id.code` where the partner's\n * resource says `recordLabel: 'code'`, else the name the record page would\n * give it. A target with nothing better than its key keeps the key.\n */\nexport function referenceNames(rules: ListRules, tableId: string, names: readonly string[]): Record<string, string> {\n const base = findTable(rules.schema, tableId);\n if (!base) return {};\n const naming = (target: TableMeta) => {\n const path = labelPathOf(rules, target);\n return path && !primaryKey(target).includes(path) ? path : undefined;\n };\n return Object.fromEntries(referenceProjection(rules.schema, base, names, true, naming).labels);\n}\n\n/** The columns a shown column's second line reads: fetched with the row, drawn under it. */\nexport function subtitleColumns(rules: ListRules, tableId: string, shown: readonly string[]): string[] {\n return [\n ...new Set(\n shown.flatMap((name) => {\n /* A dotted column wears the rule of the table it was read from, and its\n second line is read from that table too. */\n const hop = name.lastIndexOf('.');\n const owner = hop < 0 ? tableId : tableAtPrefix(rules.schema, tableId, name.slice(0, hop))?.id;\n const rule = owner ? resource(rules, owner)?.display?.[name.slice(hop + 1)] : undefined;\n /* A lead icon's tone is read with the row too: a failed run's square says so without a second column. */\n return [\n subtitlePath(rule as { subtitle?: string } | undefined, name),\n leadTonePath(rule as { icon?: { toneOf?: string } }, name),\n /* A money column whose currency is each row's own reads that code with it. */\n currencyPath(rule as { currencyColumn?: string } | undefined, name),\n ].filter((path): path is string => path !== undefined);\n }),\n ),\n ];\n}\n\n/** The references an editable list shows by name (`owner_id.name`): their keys ride along\n with the row, so a cell edits the reference and says what it replaces. */\nexport function editedReferences(rules: ListRules, spec: Pick<ListQuestionSpec, 'table' | 'show' | 'editable' | 'presentation'>): string[] {\n const t = findTable(rules.schema, spec.table);\n if (!t || !spec.editable || spec.presentation) return [];\n return [\n ...new Set(\n (spec.show ?? []).flatMap((name) => {\n const hop = name.indexOf('.');\n const head = name.slice(0, hop);\n return hop > 0 &&\n name.indexOf('.', hop + 1) < 0 &&\n (spec.editable === true || spec.editable!.includes(head)) &&\n t.columns.some((column) => column.name === head && column.references)\n ? [head]\n : [];\n }),\n ),\n ];\n}\n\n/** The references a list draws — its `show`, its presentation's columns, or every column — by the path each is named from (referenceNames). */\nexport function listReferenceNames(\n rules: ListRules,\n spec: Pick<ListQuestionSpec, 'table' | 'show' | 'presentation'>,\n): Record<string, string> {\n const t = findTable(rules.schema, spec.table);\n if (!t) return {};\n const drawn = [...(spec.show ?? []), ...(spec.presentation ? listPresentationColumns(spec.presentation) : [])];\n return referenceNames(rules, spec.table, drawn.length ? drawn : t.columns.map((column) => column.name));\n}\n\n/** The show clause that fetches the app's columns plus the keys a row needs to open.\n A presentation names the columns it draws, so a view of cards needs no `show`. */\nexport function showClause(rules: ListRules, spec: ListQuestionSpec): string {\n const t = findTable(rules.schema, spec.table);\n const names = spec.show ?? [];\n const listNames = spec.presentation ? listPresentationColumns(spec.presentation) : [];\n if (!t) return '';\n const naming = recordLabelOf(rules, t) === undefined ? undefined : labelPathOf(rules, t);\n const named = Object.values(listReferenceNames(rules, spec));\n if (!names.length && !listNames.length && !naming && !named.length) return '';\n const shown = names.length || listNames.length ? names : t.columns.map((column) => column.name);\n return `show ${[\n ...new Set([\n ...shown,\n ...listNames,\n ...(naming ? [naming] : []),\n ...named,\n ...(spec.order ? [spec.order] : []),\n ...subtitleColumns(rules, spec.table, names),\n ...editedReferences(rules, spec),\n ...(spec.opens ? [spec.opens] : []),\n ...primaryKey(t),\n ]),\n ].join(', ')}`;\n}\n\n/* The authored page size, as the question writes it after the show clause. */\nexport const limitClause = (spec: Pick<ListQuestionSpec, 'limit'>): string => (spec.limit ? `limit ${spec.limit}` : '');\n\n/* A view's hand order is plumbing too: \"sort position\" is how the list is\n kept, not a sort anyone chose, so it is asked wherever nothing else sorts\n the question — a tab's own sort, a header's, the reader's own win — and\n folded out of what the bar shows. A view's default `sort` is the same\n reading, said in the query bar's words. */\nexport const orderClause = (spec: Pick<ListQuestionSpec, 'order' | 'sort'>): string =>\n spec.order ? `sort ${spec.order}` : spec.sort ? `sort ${spec.sort}` : '';\n\nexport function withOrder(spec: Pick<ListQuestionSpec, 'table' | 'order' | 'sort'>, question: string): string {\n const order = orderClause(spec);\n return order && !splitQuery(`${spec.table} ${question}`).sort ? squeeze(`${question} ${order}`) : question;\n}\n\n/** The full query text one of the app's tabs stands for. A module's\n standing conditions come first; a tab refines on top of them. */\nexport function appListQuery(rules: ListRules, spec: ListQuestionSpec, index = 0): string {\n const tab: Partial<ListTab> = (spec.tabs?.length ? spec.tabs : [{}])[index] ?? {};\n const where = withOrder(spec, andQuery(spec.query, tab.query) ?? '');\n return [spec.table, where, showClause(rules, spec), limitClause(spec)].filter(Boolean).join(' ');\n}\n","/** What appListModel says, in the lists and grid room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../../messages.js';\n\nexport const say = defineMessages({\n filtersCount: { one: '{count} filter', other: '{count} filters' },\n});\n","/**\n * What an app's list page is, before anything is drawn.\n *\n * Which spec dresses a table, the query text each tab stands for, which\n * tab a query text *is*, what the breadcrumb calls it, and how the app's\n * plumbing (the show clause that fetches its columns and the keys a row\n * needs to open) is folded out of the visible question and back in on the\n * way out. Pure, so the component and the walk read one rule.\n *\n * There is one source of truth for what the list is showing: the entry's\n * query text, exactly as in DB mode. A tab click writes the tab's query\n * into it; the boxes edit it; a header menu appends to it; the URL carries\n * it. Which tab is lit is *derived* from the text, so a refined tab\n * honestly shows as a filter rather than pretending to still be the tab\n * it started from.\n */\nimport { andQuery, expandSegments, splitClauseTail } from '@mistriwork/engine/shared/query.js';\nimport { humanName, type AppNoun } from '@mistriwork/engine/shared/model.js';\nimport { recordNoun } from '@mistriwork/engine/shared/appNoun.js';\nimport { labelColumn, labelPath as schemaLabelPath, type DatabaseSchema, type TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { findTable, labelPath, recordLabel, state } from '../core.js';\nimport { referenceProjection } from '@mistriwork/engine/shared/referenceModel.js';\nimport { LABEL_SEGMENT } from '@mistriwork/engine/shared/recordLabel.js';\nimport {\n appListQuery as sharedAppListQuery,\n editedReferences as sharedEditedReferences,\n limitClause,\n listReferenceNames as sharedListReferenceNames,\n orderClause,\n referenceNames as sharedReferenceNames,\n showClause as sharedShowClause,\n subtitleColumns as sharedSubtitleColumns,\n withOrder,\n type ListRules,\n type ListTab,\n} from '@mistriwork/engine/shared/listQuestion.js';\nimport { shell } from '../shellMode.js';\nimport { canonicalize, conditionTail, hasShowClause, squeeze, stripCondition } from '../filterbar.js';\nimport { maskQuoted, splitConditions, splitQuery } from '../clauses.js';\nimport { appRooms, isListRoom, offeredBy, resourceOf, viewRoom } from './appRooms.js';\nimport type { AppAction } from '@mistriwork/engine/schema/model.js';\nimport type { AppForm } from '@mistriwork/engine/shared/servedApp.js';\nimport type { AppListPresentation, AppSplitListDetail } from '@mistriwork/engine/shared/listPresentations.js';\nimport { say } from '../copy/lists/components/appListModel.js';\n\n/* The question's rules live in shared/listQuestion.ts, where a first page's\n is built by the server too; these read them over the App on screen. */\nconst rules = (): ListRules | undefined => (state.schema ? { schema: state.schema, resources: shell().app()?.resources ?? {} } : undefined);\n\n/** One of the App's list views, with what its resource lets it offer — or the stand-in for a table it has no view of. */\nexport interface ListSpec {\n /** The view's key, when the App has a view of this list: which view\n opened a room rides the walk as `view` and wins over table and query. */\n id?: string;\n /** How the rows are drawn; a `split` is the list/detail workspace. */\n presentation?: AppListPresentation;\n empty?: import('@mistriwork/engine/shared/listPresentations.js').AppListEmpty;\n quickAdd?: true;\n /** The view carries a Favorites star. */\n favorite?: true;\n /** The menu's mark for the view, one of the App icons. */\n icon?: string;\n /** Columns summed in the grid's footer, over the whole query. */\n totals?: string[];\n /** Row height; 'comfortable' is the default. */\n density?: 'comfortable' | 'compact';\n /** A ⋯ menu at the end of each row with the record's own actions. */\n rowActions?: true;\n /** Cells edited in place, and a selection's \"Set field…\": every shown writable column, or those named. */\n editable?: true | string[];\n /** 'none' hides the filter form; 'rail' draws the filters as facets beside the rows. */\n filterBar?: import('@mistriwork/engine/shared/listPresentations.js').FilterBar;\n /** A text filter's suggestions: the columns whose values it offers as the reader types. */\n suggest?: Record<string, readonly string[]>;\n advancedFilters?: boolean;\n /** A split's single keys: a key → the id of an action of the picked record. */\n keys?: Record<string, string>;\n /** false draws the list without its title; it stays for a screen reader. */\n heading?: false;\n sizing?: import('@mistriwork/engine/shared/tableSizing.js').TableSizing;\n table: string;\n /** The list's own name, its heading. The menu may call it something else. */\n label: string;\n query?: string;\n tabs?: ListTab[];\n /** The server's word for what the menu counts, where it is not `query`: a saved form's drafts left out. */\n countQuery?: string;\n /** The author's say on the menu's count, over the rule (shared/menuCounts.ts). */\n count?: boolean;\n /** Columns or label paths the list shows, in order. */\n show?: string[];\n filters?: string[];\n /** The orders a reader may choose from the list's Sort menu. */\n sorts?: Array<{ label: string; sort: string }>;\n /** The order the list reads in when nothing else says one: the view's, kept out of the bar as `order` is. */\n sort?: string;\n /** The numeric column holding each row's place: the list reads in it, and an editor puts rows in place (useListOrder.tsx). */\n order?: string;\n /** The resource's New form. */\n form?: AppForm<string>;\n /** What the list offers: its resource's actions, narrowed by a queue's or a board's selector. */\n actions?: AppAction[];\n /** What one of its records is called, and several: its resource's noun. */\n noun?: AppNoun;\n error?: string;\n open?: 'page' | 'drawer' | 'modal';\n /** A reference column whose record a row opens instead of the row (rowOpens.ts). */\n opens?: string;\n /** A split list's authored page size: the view's, like its show clause —\n written into its question, never offered back as a filter. */\n limit?: number;\n}\n\n/** The split workspace a list's presentation is, or undefined. */\nexport const splitOf = (spec: Pick<ListSpec, 'presentation'> | undefined): AppSplitListDetail | undefined =>\n spec?.presentation?.kind === 'split' ? spec.presentation : undefined;\n\n/** The list half of a split workspace: the view's own list, at the split's page size.\n The presentation stays: a split that chose its rows draws them, and one that did not is the plain grid.\n Here rather than beside the room, because an address says the list's question too. */\nexport function splitListSpec(spec: ListSpec): ListSpec {\n const limit = splitOf(spec)?.limit;\n return { ...spec, ...(limit ? { limit } : {}) };\n}\n\n/** A list on the walk. `view` is the key of the view that opened it. */\nexport interface ListEntry {\n table: string;\n query: string;\n tab?: string;\n view?: string;\n}\n\nconst table = (id: string) => findTable(id) as TableMeta | undefined;\n\n/**\n * The app's list spec behind a table: one of its views when the app has\n * one, and a synthesized stand-in — the humanized name, derived filter\n * boxes, no tabs, the resource's form and actions — when it does not.\n * Tables without a view used to fall through to the explorer's grid, but\n * every drill from a page lands on one, and each landing swapped the room's\n * dress for raw chrome. The dress is a property of the mode, not of being listed.\n *\n * A table may have several views — the plain list and its modules (\"Work\n * orders\", \"Urgent orders\"). The view the room was opened from says which,\n * when the walk carries its key (`view`): a split beside a plain list asks\n * the same question of the same rows, and nothing else can tell them apart;\n * and a list view only a dashboard embeds is reached by its key alone.\n * Without one the walk's own query decides among the rooms the App lists,\n * as it always did: the view one of whose tabs *is* this query, else the\n * module whose standing conditions lead it, else the plain list, else the\n * first.\n */\nexport function appListFor(tableId: string, query?: string, view?: string): ListSpec {\n const app = shell().app();\n /* A key that names no view over this table — a link from before a view\n was renamed or removed — falls back rather than failing. */\n const own = app && view ? viewRoom(app, view) : undefined;\n if (own && isListRoom(own) && own.table === tableId && !own.error) return own;\n const candidates = (app ? appRooms(app) : []).filter(\n (e): e is ListSpec & { id: string } => isListRoom(e) && e.table === tableId && !e.error,\n );\n if (candidates.length) {\n if (query !== undefined) {\n const exact = candidates.find((e) => activeTab(e, query) >= 0);\n if (exact) return exact;\n const want = squeeze(query);\n const leads = candidates.find((e) => e.query && want.startsWith(squeeze(`${e.table} ${e.query}`)));\n if (leads) return leads;\n }\n return candidates.find((e) => !e.query) ?? candidates[0];\n }\n const base = table(tableId);\n const name = base?.name ?? tableId;\n return {\n table: tableId,\n label: humanName(name) || name,\n ...(base ? { show: defaultListShow(state.schema, base) } : {}),\n ...offeredBy(resourceOf(app, tableId)),\n };\n}\n\n/** Only synthesized lists use these defaults; authored projections remain authoritative. */\nexport function defaultListShow(schema: DatabaseSchema, base: TableMeta): string[] {\n const paths = base.columns.map((column) => column.name);\n const { labels } = referenceProjection(schema, base, paths, true, (target) => schemaLabelPath(schema, target, recordLabel(target)));\n return base.columns.map((column) => (column.primaryKey ? column.name : (labels.get(column.name) ?? column.name)));\n}\n\n/**\n * The references among a list's columns, each with the path its record's\n * name is read from (shared/listQuestion.ts): the name rides the row,\n * fetched in the list's own statement, and the key stays the column's value.\n */\nexport function referenceNames(tableId: string, names: readonly string[]): Record<string, string> {\n const over = rules();\n return over ? sharedReferenceNames(over, tableId, names) : {};\n}\n\nexport const specTabs = (spec: ListSpec): ListTab[] => (spec.tabs?.length ? spec.tabs : [{ label: say('common.all') }]);\n\n/** The columns a shown column's second line reads: fetched with the row, drawn under it. */\nexport function subtitleColumns(tableId: string, shown: readonly string[]): string[] {\n const over = rules();\n return over ? sharedSubtitleColumns(over, tableId, shown) : [];\n}\n\n/** The references an editable list shows by name (`owner_id.name`): their keys ride along\n with the row, so a cell edits the reference and says what it replaces (GridCellEditor.tsx). */\nexport function editedReferences(spec: Pick<ListSpec, 'table' | 'show' | 'editable' | 'presentation'>): string[] {\n const over = rules();\n return over ? sharedEditedReferences(over, spec) : [];\n}\n\n/** The column a list's search box searches: the one its records are named by,\n where a filter box can read it — not a templated name (`$label`), which is\n computed, nor a column an API cannot filter by. The list draws that box and\n its address says it as `search=` (publicAddress.ts), by this one rule. */\nexport function searchColumn(t: TableMeta | undefined): string | undefined {\n if (!t) return undefined;\n const label = recordLabel(t) === undefined ? labelColumn(t) : labelPath(t);\n return label && label !== LABEL_SEGMENT && (!t.filterable || t.filterable.includes(label)) ? label : undefined;\n}\n\n/** The show clause that fetches the app's columns plus the keys a row needs to open. */\nfunction showClause(spec: ListSpec): string {\n const over = rules();\n return over ? sharedShowClause(over, spec) : '';\n}\n\n/** The references a list draws — its `show`, its presentation's columns, or every column — by the path each is named from (referenceNames). */\nexport function listReferenceNames(spec: Pick<ListSpec, 'table' | 'show' | 'presentation'>): Record<string, string> {\n const over = rules();\n return over ? sharedListReferenceNames(over, spec) : {};\n}\n\n/** The full query text one of the app's tabs stands for. A module's\n standing conditions come first; a tab refines on top of them. */\nexport function appListQuery(spec: ListSpec, index = 0): string {\n const over = rules();\n return over\n ? sharedAppListQuery(over, spec, index)\n : [spec.table, withOrder(spec, andQuery(spec.query, specTabs(spec)[index]?.query) ?? ''), limitClause(spec)].filter(Boolean).join(' ');\n}\n\n/** The tabs as the bar reads them: each tab's question as the list asks it, less what the view always asks — its\n standing conditions, its show, and its order. A tab whose own sort is the view's order is said without it, as\n the question it opens is, so it lights on arrival and is never a chip (\"Offered is Offered\"). */\nexport function shownTabs(spec: ListSpec): ListTab[] {\n return specTabs(spec).map((tab, i) => {\n const query = tabQuestion(spec, i);\n const { query: _authored, ...rest } = tab;\n return query ? { ...rest, query } : rest;\n });\n}\n\n/** Which tab the entry's query text is, or -1 when refined away. Canonical on\n both sides, as the tabs light (litTabFor): a tab clicked asks its `a or b`\n bare, and its question as composed brackets it, `(a or b)` — the same tab,\n which the crumb called by its query instead of its name. */\nfunction activeTab(spec: ListSpec, query: string): number {\n /* The question hides the view's standing conditions, so a query that never\n asked them (the bare table) reads as empty, as an untabbed view's own\n does: without this, a table's plain address was the first filtered view\n over it (Urgent orders for work_order), its conditions and all. */\n const standing = standingHead(spec);\n if (standing && !unplumbed(spec, query).startsWith(standing)) return -1;\n const want = canonicalize(visibleQuestion(spec, query));\n return specTabs(spec).findIndex((_, i) => kept(spec, `\\u0001${i}`, () => canonicalize(tabQuestion(spec, i))) === want);\n}\n\n/** What the breadcrumb calls this list: the app's label, with the tab or\n what the refinement narrows to — never the raw query text. */\nexport function appCrumbLabel(entry: ListEntry): string {\n const spec = appListFor(entry.table, entry.query, entry.view);\n if (squeeze(entry.query) === entry.table) return spec.label;\n const tab = activeTab(spec, entry.query);\n if (tab === 0) return spec.label;\n if (tab > 0) return `${spec.label} · ${specTabs(spec)[tab].label}`;\n const words = refinementWords(visibleQuestion(spec, entry.query));\n return words ? `${spec.label} · ${words}` : spec.label;\n}\n\nconst unquoted = (value: string) => {\n const text = value.trim();\n return /^([\"']).*\\1$/.test(text) ? text.slice(1, -1) : text;\n};\n\n/**\n * A refinement as the crumb says it: the values it narrows to — \"Sedan,\n * Toyota\" — when every condition is a plain equality, up to three; the first\n * two and how many more when some are; the number of filters when none are.\n * A sort or a column list narrows nothing and says nothing. \"· filtered\" told\n * a reader that something was hidden and not what.\n */\nexport function refinementWords(refinement: string): string {\n const { filter } = splitQuery(`list ${refinement}`) as { filter: string };\n const conditions = (splitConditions(filter) as string[]).map(squeeze).filter(Boolean);\n if (!conditions.length) return '';\n /* A word says itself (\"Sedan\"); a number alone says nothing, so it\n carries its column's name (\"Priority 2\"). */\n const plain = conditions.flatMap((condition) => {\n const m = /^([A-Za-z_][\\w.]*)\\s*=\\s*(.+)$/.exec(condition);\n // An either-or is no one value: \"a or status = b\" is the query, not a word.\n if (!m || /\\sor\\s/i.test(maskQuoted(condition))) return [];\n const value = unquoted(m[2]);\n return [/^-?\\d+(?:\\.\\d+)?$/.test(value) ? `${humanName(m[1].split('.').pop() ?? m[1])} ${value}` : value];\n });\n if (plain.length === conditions.length && plain.length <= 3) return plain.join(', ');\n if (plain.length) {\n const said = plain.slice(0, 2);\n return `${said.join(', ')} +${conditions.length - said.length}`;\n }\n return say('filtersCount', { count: conditions.length });\n}\n\n/**\n * The bar shows the question without the table name — the heading already\n * says which table this is — and without the app's show clause, which is\n * plumbing, not part of anyone's question.\n */\nexport function visibleQuestion(spec: ListSpec, query: string): string {\n return kept(spec, query, () => inTabWords(spec, standingless(spec, query)));\n}\n\n/** A tab's question as the bar reads it: the whole question it opens (appListQuery), less the view's plumbing. */\nexport const tabQuestion = (spec: ListSpec, index: number): string =>\n kept(spec, `\\u0000${index}`, () => visibleQuestion(spec, appListQuery(spec, index)));\n\n/* A view's questions as read, kept per view while the schema and the App stand: both are replaced when they change,\n never edited in place. The list, its crumb, its room, its address and the nav each ask them several times a paint,\n every tab's composed and read again for each; a sort asked them all again inside its click\n (test/built-client-vitals.mjs). */\nlet read = new WeakMap<ListSpec, Map<string, string>>();\nlet readOver: unknown[] = [];\nfunction kept(spec: ListSpec, key: string, ask: () => string): string {\n const over = [state.schema, shell().app()];\n if (over[0] !== readOver[0] || over[1] !== readOver[1]) [read, readOver] = [new WeakMap(), over];\n const said = read.get(spec) ?? new Map<string, string>();\n read.set(spec, said);\n if (!said.has(key)) {\n if (said.size > 99) said.clear();\n said.set(key, ask());\n }\n return said.get(key)!;\n}\n\n/**\n * A question that spells out a tab's segment, said in the tab's word: a dashboard's drill into Incidents asks\n * `status != resolved and status != closed and priority = critical`, which is the Active tab (`active`) and the\n * priority's box. A tab names its segment (appSegments.ts), so without this the drill lit no tab and its address\n * was the whole question; where several tabs fit, the one that accounts for the most conditions.\n */\nfunction inTabWords(spec: ListSpec, question: string): string {\n const segments = (findTable(spec.table) as TableMeta | undefined)?.segments;\n if (!segments || !question) return question;\n const { head, tail } = splitClauseTail(question);\n const said: string[] = splitConditions(head);\n if (!said.length) return question;\n const heard = said.map((condition) => canonicalize(condition));\n let best: { word: string; taken: Set<number> } | undefined;\n for (const tab of specTabs(spec)) {\n const word = tab.query?.trim();\n if (!word || !Object.hasOwn(segments, word)) continue;\n const own: string[] = splitConditions(unwrapped(expandSegments(segments[word]!, segments).text));\n const taken = new Set<number>();\n for (const condition of own) {\n const at = heard.findIndex((candidate, i) => !taken.has(i) && candidate === canonicalize(condition));\n if (at < 0) break;\n taken.add(at);\n }\n if (own.length && taken.size === own.length && (!best || taken.size > best.taken.size)) best = { word, taken };\n }\n if (!best) return question;\n const filter = [best.word, ...said.filter((_, i) => !best!.taken.has(i))].join(' and ');\n return tail ? `${filter} ${tail}` : filter;\n}\n\n/** A condition text without the parentheses a segment's expansion stands in. */\nfunction unwrapped(text: string): string {\n const trimmed = text.trim();\n if (!trimmed.startsWith('(') || !trimmed.endsWith(')')) return trimmed;\n let depth = 0;\n for (let i = 0; i < trimmed.length; i++) {\n if (trimmed[i] === '(') depth++;\n else if (trimmed[i] === ')' && --depth === 0 && i < trimmed.length - 1) return trimmed;\n }\n return trimmed.slice(1, -1).trim();\n}\n\nfunction standingless(spec: ListSpec, query: string): string {\n const asked = unplumbed(spec, query);\n /* A view's standing condition leads every question it asks (appListQuery).\n It is the view's, not the reader's: the bar, the tabs and the chips see\n only what follows it, and wholeQuery puts it back. A link that arrives\n without it shows the whole of what it asks. */\n const standing = standingHead(spec);\n if (!standing || !asked.startsWith(standing)) return asked;\n const rest = asked.slice(standing.length).trim();\n if (!rest) return '';\n if (rest.startsWith('and ')) return rest.slice(4).trim();\n return splitClauseTail(rest).head ? asked : rest;\n}\n\n/** The query without the table name and the view's own show, page size and order. */\nfunction unplumbed(spec: ListSpec, query: string): string {\n const plumbing = squeeze(showClause(spec));\n const whole = squeeze(query);\n const bare = whole.startsWith(spec.table) ? whole.slice(spec.table.length).trim() : whole;\n const shown = plumbing && bare.includes(plumbing) ? squeeze(bare.replace(plumbing, ' ')) : bare;\n /* The authored page size is the view's too: \"limit 25\" was a chip with a ×\n on every split list, a filter nobody had set. */\n const paged = limitClause(spec);\n const limited = paged && new RegExp(`(^|\\\\s)${paged}$`).test(shown) ? squeeze(shown.slice(0, -paged.length)) : shown;\n const order = orderClause(spec);\n return order && new RegExp(`(^|\\\\s)${order.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}$`).test(limited)\n ? squeeze(limited.slice(0, -order.length))\n : limited;\n}\n\n/** The conditions a view always asks, as appListQuery writes them first. */\nfunction standingHead(spec: ListSpec): string {\n const head = spec.query ? splitClauseTail(spec.query).head : '';\n return head ? squeeze(andQuery(head)) : '';\n}\n\n/** The plumbing folded back in on the way out — unless the reader wrote a\n show of their own, which wins and stays visible. */\nexport function wholeQuery(spec: ListSpec, typed: string): string {\n const plumbing = squeeze(showClause(spec));\n // The view's hand order, unless the reader sorts the list another way.\n const kept = withOrder(spec, squeeze(typed));\n const shown = plumbing && !hasShowClause(typed) ? `${kept} ${plumbing}` : kept;\n // The authored page size goes back on too, unless the reader wrote a limit of their own.\n const paged = limitClause(spec);\n const question = paged && !/(^|\\s)limit\\s+\\d+/.test(squeeze(typed)) ? `${shown} ${paged}` : shown;\n // The view's standing condition first, unless the reader wrote it out themselves.\n const standing = standingHead(spec);\n const asked = standing && !squeeze(typed).startsWith(standing) ? andQuery(spec.query, question) : question;\n return squeeze(`${spec.table} ${asked}`);\n}\n\n/**\n * Which tab the state is, boxes aside. A box column can also be a tab's\n * own dimension — status is both, on many lists — so each tab is compared\n * with only the *other* box columns stripped: the tab's own condition\n * keeps its value, and \"Open\" does not light up for a state that says\n * in_progress. Canonical on both sides: narrowing an or-tab wrapped its\n * group in parens, and `(a or b)` still *is* the \"a or b\" tab.\n */\nexport function litTabFor(tabs: ListTab[], refinement: string, boxColumns: string[]): number {\n /* Several tabs can match once box columns are stripped — an \"All\" tab\n with no conditions matches anything the boxes account for — so the\n most specific match wins: the tab that says the most itself. \"Open\"\n lights for `status = open and priority = 2` even where status is also\n a box, and \"All\" only when no other tab explains the text. */\n let best = -1;\n let said = -1;\n tabs.forEach((tab, i) => {\n const tq = canonicalize(tab.query ?? '');\n let r = refinement;\n for (const name of boxColumns) {\n if (!conditionTail(tab.query ?? '', name)) r = stripCondition(r, name);\n }\n if (canonicalize(r) !== tq) return;\n if (tq.length > said) {\n best = i;\n said = tq.length;\n }\n });\n return best;\n}\n\n/** The refinement with every box column's conditions taken out. */\nexport function residueOf(refinement: string, boxColumns: string[]): string {\n return boxColumns.reduce((out, name) => stripCondition(out, name), squeeze(refinement));\n}\n\n/** What the New button makes: one of the table's records, by its resource's\n noun (\"New issue\", \"New update\"), else by the table's own name. Never the\n list's label, which may name a layout (\"Task calendar\") or a workspace\n (\"Inbox\"), and never a label singularised by rule (\"Statuses\" made\n \"New statuse\"). */\nexport function newRecordNoun(spec: Pick<ListSpec, 'noun'>, tableName: string): string {\n return recordNoun(spec.noun, tableName);\n}\n\n/**\n * Which menu entry over a table the walk is on — the row to light. A table\n * may sit in the menu more than once, the plain list and its modules: the\n * view whose standing conditions lead the query wins, preferring the most\n * specific; a bare table query lights the plain list. -1 for none. The\n * view the walk says opened the room (`view`) wins over all of that.\n */\nexport function currentNavIndex(\n entries: Array<Pick<ListSpec, 'table' | 'query' | 'id'>>,\n tableId: string,\n query: string,\n view?: string,\n): number {\n if (view) {\n const own = entries.findIndex((entry) => entry.table === tableId && entry.id === view);\n if (own >= 0) return own;\n }\n const want = query.replace(/\\s+/g, ' ').trim();\n let best = -1;\n let bestLen = -1;\n entries.forEach((entry, i) => {\n if (entry.table !== tableId) return;\n const navq = entry.query ?? '';\n const base = navq ? `${tableId} ${navq}`.replace(/\\s+/g, ' ') : tableId;\n const leads = navq ? want === base || want.startsWith(`${base} `) : true;\n const len = navq ? base.length : 0;\n if (leads && len > bestLen) {\n best = i;\n bestLen = len;\n }\n });\n return best;\n}\n","/**\n * Deep links: the pure half.\n *\n * No DOM and no state, so it can be tested directly. The stateful half —\n * reading `window.location`, deciding when to write it — lives in url.js.\n *\n * The design decision that matters: **the trail goes in the URL, not just the\n * current position.** A link to a row you reached by walking should arrive\n * with the walk intact, so whoever you send it to can go back the way you\n * came. That is the tool's whole idea, and a link that dropped it would hand\n * them a dead end.\n *\n * The hash is used rather than the path because tablewalk serves a static\n * client from a small server with no router. A path-based URL would need the\n * server to know every route; a hash never reaches it.\n *\n * Compactness matters, because these get pasted into chat. A table view is\n * its query text, already short and human-readable; a row is its key:\n *\n * /demo/customer/~4/invoice%20customer_id%20=%204/~1004\n */\n\n/** A table view. Mirrors core.js — kept here so this module imports nothing. */\n/* The tabs a table view can be on — see the tab strip in table.js — and\n `new`, which is not a tab of the grid but the app's New drawer open over\n the list; it rides the same slot so a half-filled form survives a reload.\n A segment ends in one of these or it does not end in a tab at all. */\nconst TABS = new Set(['rows', 'ddl', 'api', 'diagram', 'new']);\n/* A composer session is a tab too (composerTab.js): a bare `view`, a saved\n one as `view:<id>`, an unsaved one as `view+<its text, encoded>`. */\nconst isTableTab = (suffix) => TABS.has(suffix) || suffix === 'view' || /^view[:+]./.test(suffix);\n\n/**\n * A query, safe to put after a `!` separator.\n *\n * `encodeURIComponent` leaves `!` alone — it is an unreserved character — so\n * a query containing `!=` wrote a second separator into its own segment.\n */\nfunction encodeQuery(query) {\n return encodeURIComponent(query).replace(/!/g, '%21');\n}\n\n/**\n * A key, as it appears in a link.\n *\n * Single-column keys — nearly all of them — are just the value, so the common\n * case stays readable; composite keys name their columns, because position\n * alone would not survive a column being added.\n *\n * Shared by rows and pages so the two cannot spell the same key differently.\n */\nfunction keyBody(key) {\n const columns = Object.keys(key);\n return columns.length === 1 ? String(key[columns[0]]) : columns.map((c) => `${c}=${key[c]}`).join(',');\n}\n\nfunction tableView(tableId, query, tab, view) {\n return { kind: 'table', table: tableId, query: query ?? tableId, tab: tab ?? 'rows', ...(view ? { view } : {}) };\n}\n\n/* A view's key — the letters a view key allows. Only these ride a\n link as `{id}:` before a list's question, which keeps the prefix\n decidable: an encoded query never carries a raw `:`, and no table's name\n is followed by one. */\nconst VIEW_KEY = /^[a-z0-9][a-z0-9-]*$/;\n\n/**\n * Serialise a connection id and a stack into a hash.\n *\n * `pageToken` turns a page's id into the text a link should carry — its name,\n * where that names it unambiguously. Passed in rather than imported: this\n * module deliberately depends on nothing, which is what lets the link format\n * be tested without a browser, and the page list it would need to consult\n * lives three modules away. The default writes the id, which is what every\n * link did before and still resolves.\n *\n * `listParams` says a list one of the App's views opened in words — its key,\n * its question as the address's parameters (publicAddress.ts) — and answers\n * undefined for a list it cannot say that way, which is written as ever. The\n * default says none, which is what the Workbench writes.\n */\nexport function hashFor(connectionId, stack, options = {}) {\n const pageToken = options.pageToken ?? ((id) => id);\n const listParams = options.listParams ?? (() => undefined);\n const parts = [encodeURIComponent(connectionId ?? '')];\n /* The lists said in words, and the one whose parameters are the search:\n an address has one search, so it is the last such list's, and an earlier\n list is said in words only where it stands as authored. */\n const said = stack.map((entry) => (entry.kind === 'table' && VIEW_KEY.test(entry.view ?? '') ? listParams(entry) : undefined));\n let asks = -1;\n said.forEach((params, index) => {\n if (params !== undefined) asks = index;\n });\n let search = '';\n stack.forEach((entry, index) => {\n if (entry.kind === 'page') {\n /* `@page-id` for the page, and the root — when one has been chosen —\n written exactly as a row's key is, so the two agree about composite\n keys instead of inventing a second spelling for them. A page with no\n root is a link to the front door, which is a real place to send\n someone: \"open the customer page and pick one\". */\n /* `rootBody` is the unresolved form a link arrives with, and it is\n written back when the key has not been resolved yet. Boot renders —\n and stamps the hash — before the page has looked up which column a\n bare key belongs to, so without this the first paint dropped the root\n out of the address bar and the reader lost it by reloading. */\n const body = entry.key ? keyBody(entry.key) : (entry.rootBody ?? '');\n /* The open tab rides with the page rather than after the key: a key is\n arbitrary text and may contain a `!`, while a page token is a slug or\n an id and never does. \"Look at the parts tab\" is a thing people send\n each other, and a link that always lands on the first tab loses the\n point of sending it. */\n const tab = entry.tab ? `!${encodeURIComponent(entry.tab)}` : '';\n parts.push(`@${encodeURIComponent(pageToken(entry.pageId))}${tab}${body ? `~${encodeURIComponent(body)}` : ''}`);\n return;\n }\n if (entry.kind === 'table' || entry.kind === 'breakdown') {\n /* A list in words: its key — `/thread/board`, the New drawer after it\n as ever, `/crm/leads!new` — and its question in the search. */\n const params = said[index];\n if (params !== undefined && (index === asks || params === '')) {\n const suffix = entry.tab && entry.tab !== 'rows' ? `!${entry.tab}` : '';\n parts.push(`${entry.view}${suffix}`);\n if (index === asks) search = params;\n return;\n }\n /* A breakdown carries no tab — it has none — and is otherwise the same\n segment as a table query, because it is the same language. Which kind\n it comes back as is decided by `isBreakdown` in `fromHash`. */\n const tab = entry.kind === 'table' && entry.tab && entry.tab !== 'rows' ? `!${entry.tab}` : '';\n /* Which of the App's views opened the list, by its key: `inbox:issue…`.\n Two views over one table — a plain list and a split — ask the same\n question of the same rows, so the text alone cannot say which room\n to draw. A row after it inherits the view and writes nothing.\n Absent, the view is found by table and query, as every link written\n before keys existed still is. */\n const view = entry.kind === 'table' && VIEW_KEY.test(entry.view ?? '') ? `${entry.view}:` : '';\n parts.push(view + encodeQuery(entry.query) + tab);\n } else {\n /* A row is `~` plus its key. Single-column keys — nearly all of them —\n are just the value, so the common case stays readable; composite keys\n name their columns because position alone would not survive a schema\n change.\n\n The table is named whenever it differs from the entry before, which\n is exactly what following a foreign key from one row to another does.\n Without it `work_order/~8/~636` claims 636 is a work_order when it is\n a customer, and the link restores the wrong row — or no row. */\n const body = keyBody(entry.key);\n const previous = stack[index - 1];\n const prefix = previous && previous.table === entry.table ? '' : `${entry.table}:`;\n /* And which related table is open, if one is — the record view's rail\n is a tablist, and \"look at its notes\" is as worth linking to on a\n record as it is on a page. `!` is escaped inside the key for the\n same reason the query encoder escapes it: it is an unreserved\n character that `encodeURIComponent` leaves alone, so a value\n containing one would otherwise write a second separator. */\n const tab = entry.tab ? `!${encodeURIComponent(entry.tab)}` : '';\n parts.push(`~${encodeQuery(prefix + body)}${tab}`);\n }\n });\n return `/${parts.join('/')}${search ? `?${search}` : ''}`;\n}\n\n/**\n * The address a public visitor sees: the one thing on screen, not the walk\n * that reached it.\n *\n * The walk is the tool's idea of a link, and it is right for the people who\n * work in it; a marketplace's visitor shares a car, and a car's address that\n * carried `vehicles:vehicle status != sold and body_type = Sedan show title,\n * price…` before it leaked the list's plumbing into every message it was\n * pasted in. So a page is its own segment alone, and a list the App names is\n * its view key with its question as address parameters — `listParams`\n * returns them, '' for the view as it stands, or undefined when the question\n * cannot be said that way, and then the list is written as ever — hashFor's\n * words, for a walk of one. The walk itself rides in history state (url.js),\n * so Back and the crumbs still know it.\n */\nexport function publicPathFor(connectionId, stack, options = {}) {\n const last = stack[stack.length - 1];\n if (!last) return `/${encodeURIComponent(connectionId ?? '')}`;\n return hashFor(connectionId, [last], options);\n}\n\n/**\n * The connection a hash names, without parsing the rest of it.\n *\n * Needed because parsing the trail requires the *right* schema: a link into\n * another database mentions tables the current one has never heard of, so\n * every row segment fails to resolve and is dropped. The connection has to be\n * switched before the rest can be read.\n */\n/**\n * Take the leading `/` off a link — or the leading `#/` off one written\n * before these were paths.\n *\n * Both spellings are read for as long as it costs one regex to do so. A link\n * is the thing people paste into a ticket and come back to a year later, and\n * the day the old ones stop resolving should not be the day this changed.\n */\nfunction stripPrefix(link) {\n return String(link ?? '')\n .replace(/^#/, '')\n .replace(/^\\//, '');\n}\n\n/* A segment as the person typed it. A link pasted through a mailer or a linkifier arrives with a lone `%` or a cut\n escape (`%zz`, `%E0%A4%A`), and `decodeURIComponent` throws on those: at boot that stops the App from starting at\n all, and in a click it kills the navigation. The raw segment is returned instead, which names nothing and so lands on\n the same not-found as any other address nobody made. */\nfunction unescapeSegment(segment) {\n try {\n return decodeURIComponent(segment);\n } catch {\n return segment;\n }\n}\n\nexport function connectionFromHash(hash) {\n // A public list's address carries its question after `?`; the connection is before it.\n const raw = stripPrefix(hash).split('?')[0];\n if (!raw) return null;\n const first = raw.split('/').filter(Boolean)[0];\n return first ? unescapeSegment(first) : null;\n}\n\n/**\n * Parse a hash into a stack. Returns null when there is nothing to restore.\n *\n * Rows need the table they belong to, which is the entry before them — so a\n * row segment that opens the trail is dropped rather than guessed at.\n */\nexport function fromHash(hash, findTableById, options = {}) {\n /* Read off `options` rather than destructured with a default in the\n signature: `check-client-imports` cannot see a parameter list once a\n default inside it has parentheses of its own, and reads every name in it\n as undefined. The tool is right that this file must import nothing, so it\n is the signature that gives way. */\n const isBreakdown = options.isBreakdown ?? (() => false);\n /* A view the App names, as a public address spells it — its key, its\n question as parameters — is resolved by the caller, which knows the\n App's views: this module imports nothing. */\n const viewEntry = options.viewEntry ?? (() => null);\n const [raw, search = ''] = stripPrefix(hash).split(/\\?(.*)/s);\n if (!raw) return null;\n const segments = raw.split('/').filter(Boolean);\n if (!segments.length) return null;\n\n const connection = unescapeSegment(segments[0]);\n const stack = [];\n /* A bare view key — a list said in words, its key and the New drawer if\n it is open — is the caller's to read. A table of that name wins, so no\n link written before this means something new. The search is the last\n such list's, as hashFor writes it. */\n const bareView = (segment) => {\n const m = /^([a-z0-9][a-z0-9-]*)(?:!([a-z]+))?$/.exec(segment);\n return m && !findTableById(m[1]) && (!m[2] || TABS.has(m[2])) ? { key: m[1], tab: m[2] } : null;\n };\n let asked = -1;\n segments.forEach((segment, index) => {\n if (index > 0 && bareView(segment)) asked = index;\n });\n\n for (let index = 1; index < segments.length; index += 1) {\n let segment = segments[index];\n if (segment.startsWith('@')) {\n /* A page, and its root if the link has one. The base table is not in\n the link: a page names it, and putting it in the URL as well would be\n a second copy to disagree with the config file the day someone\n re-points a page at another table. It is filled in when the page\n loads. */\n const [head, keyPart] = segment.slice(1).split('~');\n /* Page first, then the tab: split on the first `!`, which a page token\n cannot contain and a tab name is encoded past. */\n const bang = head.indexOf('!');\n const pageId = unescapeSegment(bang === -1 ? head : head.slice(0, bang));\n const tab = bang === -1 ? undefined : unescapeSegment(head.slice(bang + 1)) || undefined;\n if (!pageId) continue;\n const body = keyPart === undefined ? undefined : unescapeSegment(keyPart);\n /* Carried as text, not resolved here. A single-column key is written as\n a bare value, and turning `1181` back into `{ id: 1181 }` needs the\n page's base table — which the link deliberately does not name, since\n the page already does and two copies would disagree the day someone\n re-points it. The page resolves it when it knows its own base. */\n stack.push({ kind: 'page', pageId, table: undefined, rootBody: body, label: body, tab });\n continue;\n }\n if (segment.startsWith('~')) {\n const rest = segment.slice(1);\n const bang = rest.indexOf('!');\n const tab = bang === -1 ? undefined : unescapeSegment(rest.slice(bang + 1)) || undefined;\n let body = unescapeSegment(bang === -1 ? rest : rest.slice(0, bang));\n /* An explicit `table:` prefix wins. It is only written when the table\n changed, so its absence means \"same as the entry before\". The colon\n is found from the left and only counts before any `=`, so a composite\n key like `a=1,b=2` is never mistaken for a table prefix. */\n let tableId = null;\n const colon = body.indexOf(':');\n if (colon > 0 && (body.indexOf('=') === -1 || colon < body.indexOf('='))) {\n /* Only if it actually names a table. A key value can contain a colon\n — a time like `12:30`, a URN, a namespaced id — and treating that\n as a table prefix would drop the row entirely. Checking against the\n schema makes the ambiguity decidable instead of guessed. */\n const candidate = body.slice(0, colon);\n if (findTableById(candidate)) {\n tableId = candidate;\n body = body.slice(colon + 1);\n }\n }\n const previous = stack[stack.length - 1];\n if (!tableId && !previous) continue; // a row with no table means nothing\n const resolvedId = tableId ?? previous.table;\n const table = findTableById(resolvedId);\n if (!table) continue;\n const key = {};\n if (body.includes('=')) {\n for (const pair of body.split(',')) {\n const [column, ...rest] = pair.split('=');\n key[column] = rest.join('=');\n }\n } else {\n const pk = table.columns.filter((c) => c.primaryKey).map((c) => c.name);\n if (!pk.length) continue;\n key[pk[0]] = body;\n }\n /* A row read beside the list it was chosen from belongs to the same\n view; the link wrote it once, on the list. */\n const inherited = previous?.view && previous.table === table.id ? { view: previous.view } : {};\n stack.push({ kind: 'row', table: table.id, key, label: labelFor(body), tab, ...inherited });\n continue;\n }\n /* A bare view key, as an App's address writes a list: the caller reads\n the address's parameters into the list's question. */\n const bare = bareView(segment);\n if (bare) {\n const entry = viewEntry(bare.key, index === asked ? search : '');\n if (entry) {\n stack.push(bare.tab ? { ...entry, tab: bare.tab } : entry);\n continue;\n }\n }\n /* `{view key}:` before a list's question names the view that opened\n it. Only when what follows starts with a table: a hand-typed query is\n never mistaken for a prefix, the way a row's `table:` is checked. */\n let view;\n const marked = /^([a-z0-9][a-z0-9-]*):(.+)$/.exec(segment);\n if (marked && findTableById(unescapeSegment(marked[2].split('!')[0]).trim().split(/\\s+/)[0])) {\n view = marked[1];\n segment = marked[2];\n }\n /* Only a real tab name ends a segment.\n \n `lastIndexOf('!')` alone read the `!` of `!=` as the separator, so\n `invoice total != 0` came back as `invoice total ` with a tab of\n `%3D 0` — the condition silently gone, and a shared \"unpaid invoices\"\n link showing every invoice. Encoding fixes it going forward; checking\n the suffix against the tabs that exist also rescues every link already\n written and every one this app did not write. */\n const bang = segment.lastIndexOf('!');\n const suffix = bang > 0 ? segment.slice(bang + 1) : '';\n const hasTab = isTableTab(suffix);\n const tab = hasTab ? suffix : 'rows';\n const query = unescapeSegment(hasTab ? segment.slice(0, bang) : segment);\n const name = query.trim().split(/\\s+/)[0];\n const table = findTableById(name);\n /* A breakdown is written into the link exactly as a table query is — it is\n the same language and the same text — so which kind it is on the way back\n is read off the text itself. The rule is supplied rather than imported:\n this module deliberately depends on nothing, which is what lets the link\n format be tested without a browser, and it is the same arrangement\n `pageToken` uses on the way out. */\n stack.push(\n isBreakdown(query)\n ? { kind: 'breakdown', table: table ? table.id : name, query }\n : tableView(table ? table.id : name, query, tab, view),\n );\n }\n\n return { connection, stack };\n}\n\nfunction labelFor(body) {\n // The real label needs the row, which has not been fetched yet. The key is\n // a truthful placeholder and gets replaced by resolveLabels below.\n return body.length > 24 ? `${body.slice(0, 23)}…` : body;\n}\n","/**\n * A breakdown, written down.\n *\n * The same argument the view text form makes, and it applies harder here: a\n * breakdown is the shape most likely to be pasted into a conversation, saved\n * in a config file, or handed to an agent as a string. A grouping that can\n * only be expressed as JSON is one nobody writes by hand.\n *\n * invoice count by status\n * invoice count, sum total as billed by month invoice_date sort billed desc limit 12\n * invoice where total > 100 count by customer_id.country_code.name as country\n *\n * The grammar is the query language plus two clauses. Measures come first —\n * `count`, `count distinct sold_by`, `sum total`, each optionally `as name` —\n * then `by`, then the things to group by, each optionally cut down to a period\n * (`by month invoice_date`) and optionally named. Everything else in the line\n * is the ordinary language: `where`, `sort`, `limit`, parsed by\n * `parseViewQuery` exactly as the composer's filter box parses it. Two parsers\n * for one language is how a language starts disagreeing with itself.\n *\n * One deliberate asymmetry with a view: **`sort` names an output column**, not\n * a path. Every column of a breakdown is a key or a measure and both are in\n * the answer under a name, so there is nothing else it could mean — and `sort\n * total desc` on a grouped statement, where `total` is no longer a column,\n * should not quietly compile into something else.\n */\nimport { parseViewQuery, tryResolvePath, type ViewFilter } from './view.js';\nimport { findTable, type DatabaseSchema } from './schema.js';\nimport type { QueryError, QueryPerson } from './query.js';\nimport {\n DATE_UNITS,\n MEASURE_FUNCTIONS,\n type BreakdownDef,\n type BreakdownKey,\n type BreakdownOrder,\n MEASURE_OPS,\n measureName,\n measurePaths,\n measureRefusal,\n measureToText,\n type Measure,\n type MeasureFn,\n type MeasureOp,\n type MeasureTerm,\n} from './breakdown.js';\n\ninterface ParsedBreakdownText {\n breakdown?: BreakdownDef;\n /** The conditions half of the line, exactly as typed — everything\n before the measures. The section emitter's whole reason to exist\n here: only the parser knows where that boundary fell. */\n conditions?: string;\n errors: QueryError[];\n}\n\n/** Whether a line is asking for a breakdown at all. */\nexport function looksLikeBreakdown(text: string): boolean {\n /* The `by` keyword, standing alone and not the tail of `order by`. That is\n the whole tell: no other clause in the language uses it, which is why it\n was available to mean this. */\n return /(?<!\\border\\s)\\bby\\s+\\S/i.test(String(text ?? ''));\n}\n\nconst TERM_RE = new RegExp(\n String.raw`^(${MEASURE_FUNCTIONS.join('|')})` +\n String.raw`(\\s+distinct)?` +\n /* `+` for a composite hop (`invoice_id+line_no.qty`); an operator stands apart, between spaces. */\n String.raw`(?:\\s+([\\w.$+]+))?` +\n /* `count when [status = open]`, its brackets already lifted out (liftWhens): the mark of the n-th. */\n String.raw`(?:\\s+when\\s+\\uE000(\\d+)\\uE001)?$`,\n 'i',\n);\nconst NUMBER_RE = /^\\d+(?:\\.\\d+)?$/;\n\n/**\n * The conditions of every `when [...]` lifted out of the line and replaced by a mark with no spaces, commas or keywords\n * in it: a condition holds `in (a, b)`, `and`, even the word `by`, and the line is split on exactly those. Quotes are\n * respected, so a `]` in a value does not close it. Nested brackets are not a thing the language has.\n */\nfunction liftWhens(text: string): { text: string; whens: string[]; error?: string } {\n const whens: string[] = [];\n let out = '';\n let from = 0;\n for (const found of text.matchAll(/\\bwhen\\s*\\[/gi)) {\n const open = (found.index ?? 0) + found[0].length;\n if (open <= from) continue;\n let quote = '';\n let close = -1;\n for (let i = open; i < text.length; i++) {\n const c = text[i];\n if (quote) {\n if (c === '\\\\') i++;\n else if (c === quote) quote = '';\n } else if (c === '\"' || c === \"'\") quote = c;\n else if (c === ']') {\n close = i;\n break;\n }\n }\n if (close < 0) return { text, whens, error: '`when [` is not closed: end the conditions with `]`.' };\n out += `${text.slice(from, found.index)}when \\uE000${whens.length}\\uE001`;\n whens.push(text.slice(open, close).trim());\n from = close + 1;\n }\n return { text: out + text.slice(from), whens };\n}\n\n/**\n * One comma piece as a measure, or null when it is not one: an aggregate\n * (`sum total`), or aggregates and numbers joined by `+ - * /` — a\n * computed measure, `sum paid / sum total as rate`. The first term is an\n * aggregate, so a condition's trailing number is never read as one.\n */\nfunction measureFrom(piece: string, whens: readonly string[]): Measure | null {\n const aliased = /^(.*?)\\s+as\\s+([\\w$]+)$/i.exec(piece);\n const body = aliased ? aliased[1] : piece;\n const parts = body.trim().split(/\\s+([+\\-*/])\\s+/);\n const term = (text: string): MeasureTerm | null => {\n const m = TERM_RE.exec(text.trim());\n return m\n ? {\n fn: m[1].toLowerCase() as MeasureFn,\n ...(m[3] ? { path: m[3] } : {}),\n ...(m[2] ? { distinct: true } : {}),\n ...(m[4] !== undefined && whens[Number(m[4])] !== undefined ? { when: whens[Number(m[4])] } : {}),\n }\n : null;\n };\n const head = term(parts[0]);\n if (!head) return null;\n const steps: NonNullable<Measure['steps']> = [];\n for (let i = 1; i < parts.length; i += 2) {\n const op = parts[i] as MeasureOp;\n const text = parts[i + 1]?.trim() ?? '';\n const next = NUMBER_RE.test(text) ? Number(text) : term(text);\n if (!MEASURE_OPS.includes(op) || next === null) return null;\n steps.push({ op, term: next });\n }\n return { ...head, ...(steps.length ? { steps } : {}), ...(aliased ? { alias: aliased[2] } : {}) };\n}\n\nconst KEY_RE = new RegExp(String.raw`^(?:(${DATE_UNITS.join('|')})\\s+)?([\\w.$+]+)(?:\\s+as\\s+([\\w$]+))?$`, 'i');\n\n/** Where the clauses after the group keys begin. */\nconst TAIL_CLAUSE = /\\b(sort|order\\s+by|limit)\\b/i;\n\n/**\n * Split `a, b, c` on commas, dropping the empties a trailing comma leaves.\n */\nconst commas = (text: string): string[] =>\n text\n .split(',')\n .map((part) => part.trim())\n .filter(Boolean);\n\n/**\n * Find the `by` that pivots the line.\n *\n * The *first* standalone `by` not preceded by `order`, because a breakdown's\n * `sort` clause comes after the keys and may legitimately be written `order\n * by`. Searching from the front means `invoice count by status order by count`\n * splits where it should.\n */\nfunction pivot(text: string): number {\n for (const match of text.matchAll(/\\bby\\b/gi)) {\n const at = match.index ?? 0;\n if (/\\border\\s+$/i.test(text.slice(0, at))) continue;\n return at;\n }\n return -1;\n}\n\nexport function textToBreakdown(\n schema: DatabaseSchema,\n text: string,\n options: { now?: Date; me?: QueryPerson | null } = {},\n): ParsedBreakdownText {\n const errors: QueryError[] = [];\n const written = String(text ?? '').trim();\n if (!written) return { errors: [{ message: 'Start with a table name.' }] };\n const lifted = liftWhens(written);\n if (lifted.error) return { errors: [{ message: lifted.error }] };\n /* What the line is split on has no `when [...]` in it; `text` below keeps it as it was written. */\n const body = lifted.text;\n\n const baseName = body.split(/\\s+/)[0];\n const base = findTable(schema, baseName) ?? schema.tables.find((t) => t.name === baseName);\n if (!base) {\n return { errors: [{ message: `No table called \"${baseName}\" in this database.`, at: 0 }] };\n }\n\n const rest = body.slice(baseName.length);\n const at = pivot(rest);\n /* No `by` is one group: \"invoice sum total\" is the whole answer as one\n row. The head is then everything before the tail clauses, and the key\n list is empty — the compiler skips GROUP BY for exactly this shape.\n A line with no measures either still gets the needs-`by` guidance\n below, because that line was not a breakdown at all. */\n const head = at === -1 ? (rest.search(TAIL_CLAUSE) === -1 ? rest : rest.slice(0, rest.search(TAIL_CLAUSE))) : rest.slice(0, at);\n const afterBy = at === -1 ? (rest.search(TAIL_CLAUSE) === -1 ? '' : rest.slice(rest.search(TAIL_CLAUSE))) : rest.slice(at + 2);\n\n /* The keys run to the first clause that is not a key. Split here rather\n than by counting commas, because a key list and a sort clause are both\n comma-separated and only a keyword tells them apart. */\n const tailAt = afterBy.search(TAIL_CLAUSE);\n const keyText = tailAt === -1 ? afterBy : afterBy.slice(0, tailAt);\n const tail = tailAt === -1 ? '' : afterBy.slice(tailAt);\n\n /* The measures are the longest suffix of `head` that reads as a list of\n them; everything before that is the ordinary language, and is handed on\n untouched. Found by trying each word boundary from the left and keeping\n the first that works, which is what makes `invoice where total > 100\n count by status` split correctly without this module knowing what `where`\n means.\n\n Splitting on commas alone was the obvious version and it was wrong: `where\n total > 100 count` holds no comma at all, so the whole clause read as one\n piece, failed to match, and the line came back \"nothing to measure\" with\n a `count` plainly in it. */\n const words = [...head.matchAll(/\\S+/g)].map((m) => ({ text: m[0], at: m.index ?? 0 }));\n const measures: Measure[] = [];\n let prefix = head;\n for (const word of words) {\n const candidate = head.slice(word.at);\n const pieces = commas(candidate);\n const read = pieces.map((piece) => measureFrom(piece, lifted.whens));\n if (!pieces.length || read.some((m) => m === null)) continue;\n measures.push(...(read as Measure[]));\n prefix = head.slice(0, word.at);\n break;\n }\n if (!measures.length) {\n errors.push({\n message:\n at === -1\n ? 'A breakdown needs `by` — try `count by status` — or a bare measure for the whole answer: `sum total`.'\n : 'Nothing to measure before `by`. Try `count by …`, or `sum total by …`.',\n });\n }\n for (const measure of measures) {\n if (measure.when !== undefined) {\n if (measure.fn !== 'count' || measure.path || measure.distinct) {\n errors.push({ message: '`when` goes with a bare `count`: `count when [status = open]`.' });\n continue;\n }\n if (!measure.when) {\n errors.push({ message: '`when [` needs conditions before `]`, like `count when [status = open]`.' });\n continue;\n }\n /* The same parser, the same segments and the same clock as the line's own conditions. */\n const held = parseViewQuery(schema, base.id, measure.when, options.now, options.me !== undefined ? { me: options.me } : {});\n errors.push(...held.errors);\n if (!held.errors.length && (held.columns.length || held.orderBy.length || held.limit !== undefined))\n errors.push({ message: `\\`when [${measure.when}]\\` takes conditions only, not show, sort or limit.` });\n if (!held.errors.length) measure.where = held.filter as ViewFilter;\n }\n for (const fn of new Set([measure.fn, ...(measure.steps ?? []).flatMap(({ term }) => (typeof term === 'number' ? [] : [term.fn]))])) {\n /* Judged against the source's dialect here, so `check` names it at startup rather than a query failing at read. */\n const refused = measureRefusal(fn, schema.dialect);\n if (refused) errors.push({ message: refused });\n }\n for (const path of measurePaths(measure)) {\n const { error } = tryResolvePath(schema, base.id, path);\n if (error) errors.push({ message: error.message });\n }\n }\n\n const keys: BreakdownKey[] = [];\n for (const piece of commas(keyText)) {\n const match = KEY_RE.exec(piece);\n if (!match) {\n errors.push({\n message:\n `\"${piece}\" is not something to group by. A column, a path like customer_id.name, ` +\n `or a period like \\`month invoice_date\\` (day, week, month, quarter, year, weekday or hour).`,\n });\n continue;\n }\n const [, unit, path, alias] = match;\n /* Resolved here rather than left to the compiler. This runs on a\n keystroke and the compiler runs on a request, so a path caught here is\n a message under the caret and a path caught there is a failed call. */\n const { resolved, error } = tryResolvePath(schema, base.id, path);\n if (error) {\n errors.push({ message: error.message });\n continue;\n }\n /* The compiler refuses a bucket of a non-date too, but it refuses at\n request time; here is a keystroke, and an app manifest's startup,\n where \"errors name the fix\" is the contract. Same rule as the\n compiler's: the declared type, not the values. */\n if (unit && resolved && !/date|time/i.test(resolved.column.type ?? '')) {\n errors.push({\n message: `\"${path}\" is ${resolved.column.type || 'untyped'}, so it cannot be grouped by ${unit.toLowerCase()}. Pick a date column.`,\n });\n continue;\n }\n keys.push({\n path,\n bucket: unit ? (unit.toLowerCase() as BreakdownKey['bucket']) : undefined,\n alias: alias || undefined,\n });\n }\n /* With a `by` written, an empty key list is a mistake to name; with no\n `by` at all it is the one-group whole answer. */\n if (at !== -1 && !keys.length && !errors.length) {\n errors.push({ message: '`by` needs something after it — a column, or `month <date column>`.' });\n }\n\n /* The names this breakdown will answer under, so `sort billed desc` parses.\n Derived the same way the compiler derives them, because a sort that\n validates against one spelling and compiles against another is a sort\n that works until somebody adds an alias. */\n const names = [\n ...keys.map((k) => k.alias?.trim() || (k.bucket ? `${k.bucket}(${k.path})` : k.path)),\n ...measures.map((m) => measureName(m)),\n ];\n\n const parsed = parseViewQuery(schema, base.id, `${prefix} ${tail}`.trim(), options.now, {\n /* Every output name joins the synthetic table for the sort clause. A\n breakdown has no `show`, so nothing else here can reach them.\n\n Except a plain key: unbucketed, unaliased, its output name IS the\n base column, and shadowing it refused `invoice status = paid count\n by status` — the filter runs before the grouping exists, on the\n column that very much does. Only names that exist solely as\n aggregate outputs join the shadow list. */\n aggregateAliases: names.filter((name) => !keys.some((k) => !k.alias && !k.bucket && k.path === name)),\n ...(options.me !== undefined ? { me: options.me } : {}),\n });\n errors.push(...parsed.errors);\n\n if (parsed.columns.length) {\n errors.push({\n message: '`show` does not apply to a breakdown — its columns are the things it groups by and measures.',\n });\n }\n\n const orderBy: BreakdownOrder[] = parsed.orderBy.map((o) => ({ name: o.path, direction: o.direction }));\n\n const breakdown: BreakdownDef = {\n base: base.id,\n by: keys,\n measures,\n filter: parsed.filter.groups.length ? (parsed.filter as ViewFilter) : undefined,\n orderBy: orderBy.length ? orderBy : undefined,\n limit: parsed.limit,\n text: written,\n };\n\n return {\n breakdown: errors.length ? undefined : breakdown,\n conditions: prefix.trim() || undefined,\n errors,\n };\n}\n\n/**\n * The line as an authored dashboard section, or null when it is not one:\n * the workbench-to-config bridge. Compose in the query bar, copy the\n * section, paste it into a dashboard — the kind is read off the shape\n * (two keys cross a matrix, a bucketed key draws a chart, one plain key\n * ranks a breakdown, none is a metric), and the conditions half survives\n * exactly as typed, because only this parser knows where it ended.\n */\nexport function sectionFromText(schema: DatabaseSchema, text: string) {\n const parsed = textToBreakdown(schema, text);\n const def = parsed.breakdown;\n if (!def || parsed.errors.length) return null;\n const by = def.by.map((k) => `${k.bucket ? `${k.bucket} ` : ''}${k.path}${k.alias ? ` as ${k.alias}` : ''}`).join(', ');\n const m = def.measures[0];\n const measure = m && !(m.fn === 'count' && !m.path && !m.alias && !m.steps) ? measureToText(m) : undefined;\n const kind: 'matrix' | 'chart' | 'breakdown' | 'metric' =\n def.by.length === 2 ? 'matrix' : def.by.length === 1 ? (def.by[0].bucket ? 'chart' : 'breakdown') : 'metric';\n return {\n kind,\n table: def.base,\n ...(parsed.conditions ? { query: parsed.conditions } : {}),\n ...(measure ? { measure } : {}),\n ...(by ? { by } : {}),\n };\n}\n\n/**\n * Render a breakdown as text — the inverse, and the round trip is tested.\n *\n * One line, unlike a view. A breakdown is a phrase: two measures and a key is\n * the normal size of one, and the whole point of the form is that it fits in\n * a query bar.\n */\nexport function breakdownToText(schema: DatabaseSchema, def: BreakdownDef): string {\n const base = findTable(schema, def.base);\n const parts: string[] = [base?.name ?? def.base];\n\n const conditions = (def.filter?.groups ?? []).filter((g) => g.length);\n if (conditions.length) {\n parts.push('where');\n parts.push(conditions.map((group) => group.map(conditionToText).join(' and ')).join(' or '));\n }\n\n parts.push(def.measures.map(measureToText).join(', '));\n // One group has no `by` to write back — the bare measure is the spelling.\n if (def.by?.length) {\n parts.push('by');\n parts.push(def.by.map(keyToText).join(', '));\n }\n\n if (def.orderBy?.length) {\n parts.push('sort');\n parts.push(def.orderBy.map((o) => `${o.name}${o.direction === 'desc' ? ' desc' : ''}`).join(', '));\n }\n if (def.limit !== undefined) parts.push(`limit ${def.limit}`);\n\n return parts.join(' ');\n}\n\nconst keyToText = (k: BreakdownKey): string => {\n const words: string[] = [];\n if (k.bucket) words.push(k.bucket);\n words.push(k.path);\n if (k.alias) words.push('as', k.alias);\n return words.join(' ');\n};\n\n/**\n * One condition, back in words.\n *\n * Deliberately small: the operators a breakdown's filter uses are the ones the\n * query language spells the same way in both directions. Anything else is\n * rendered by its own name, which round-trips because that is how it parses.\n */\nfunction conditionToText(c: { path: string; op: string; value?: unknown; other?: string; any?: unknown }): string {\n // The rows that point at the record keep the words they were asked in (`any opportunity where …`, `no task`).\n if (c.any !== undefined) return c.path;\n if (c.op === 'isNull') return `${c.path} is null`;\n if (c.op === 'isNotNull') return `${c.path} is not null`;\n if (c.other !== undefined) return `${c.path} ${c.op} ${c.other}`;\n const value = Array.isArray(c.value) ? c.value.join(', ') : String(c.value ?? '');\n const spelled = c.op === '=' ? '=' : c.op;\n return `${c.path} ${spelled} ${value}`;\n}\n","/**\n * Deep links: the stateful half.\n *\n * Reads and writes `window.location`, and decides when. The serialisation\n * itself is in deeplink.js, which touches neither the DOM nor app state.\n */\nimport {\n allowMutationExit,\n api,\n captureNavigation,\n invalidateNavigation,\n labelPath,\n primaryKey,\n render,\n renderCrumbs,\n rowLabel,\n state,\n} from './core.js';\nimport { equalityFilter, pathEqualityFilter } from './resourceRequests.js';\nimport { pageToken } from './page.js';\nimport { connectionFromHash, fromHash, hashFor, publicPathFor } from './deeplink.js';\nimport { looksLikeBreakdown } from '@mistriwork/engine/shared/breakdowntext.js';\nimport { connectionTransitionPending } from './connectionTransition.js';\nimport { sessionIdentity } from './sessionIdentity.js';\nimport { shell } from './shellMode.js';\nimport { herePath, hereSearch, shown } from './addressMount.js';\nimport { navPush, navReplace, navState } from './shellHost.js';\n\n/** Rebuilding the URL while reacting to one would loop. */\nlet applying = false;\n\n/**\n * Nothing writes the address bar until boot says the incoming link has been\n * read.\n *\n * Boot renders once before applying the link — it has to, because the empty\n * state is what a plain visit should see — and that render called `syncHash`,\n * which wrote *the state it had* over the link that had not been applied yet.\n * Usually the link was re-applied a moment later and the bar corrected\n * itself; sometimes the reader was left on the wrong connection, and always\n * there was a window in which the address bar said something nobody asked\n * for. Opening an agent-supplied link in a fresh tab is exactly the case this\n * tool exists to serve, so it is exactly the case that must not race.\n */\nlet settled = false;\nexport function allowSync() {\n settled = true;\n}\n\nexport { connectionFromHash, fromHash, hashFor };\n\n/* An App's addresses and a tenant's links are the shell's (shellMode.ts):\n the Workbench has neither, and reads and writes the walk's own form. */\nconst inAppMode = () => shell().inApp();\n/** @param {string} trail @param {{ appId: string, tenantId: string }} tenant */\nconst qualifyTenantLink = (trail, tenant) => shell().tenantLinks?.qualify(trail, tenant.appId, tenant.tenantId) ?? trail;\n/** @param {string} hash @param {string} appId */\nfunction parseTenantLink(hash, appId) {\n /* A tenant's session has its links (app.js installs them with the tenant's\n flows); a link read without them names no tenant, and so is never taken\n as this one's. */\n return shell().tenantLinks?.parse(hash, appId) ?? { pathname: hash, search: '', tenantId: null };\n}\n/** @param {string} key @param {string} search */\nconst viewEntryFromAddress = (key, search) => shell().addresses?.viewEntry(key, search) ?? null;\n/** @param {{ table: string, query: string, view?: string }} entry */\nconst listParams = (entry) => shell().addresses?.listParams(entry);\n\n/** The whole walk, as the tool writes a link — the page half by name where\n the name identifies it (`pageToken`). The Workbench's address, and every\n App walk's history state. */\nfunction trailHash() {\n return hashFor(state.activeConnection, state.stack, { pageToken });\n}\n\n/* A signed-out visitor to an App's public side reads the same canonical\n addresses as staff, with a record's name after its id where the App\n asks for a slug. A tenant's walk is never a public one. */\nfunction publicAddress(owner) {\n return !owner.tenant && shell().publicVisitor();\n}\n\n/* The walk as history state keeps it: the tool's own whole-walk form, which\n reads back exactly. A tenant's carries its selector, as its address does. */\nfunction walkState(owner) {\n const trail = trailHash();\n /* The names the crumbs showed ride beside it: the trail's own form holds\n keys, and a page entry read back from it would otherwise say \"300\"\n where the reader saw a name, until something asked again. */\n const labels = state.stack.map((entry) => (typeof entry.label === 'string' ? entry.label : null));\n /* …and a natural key's value, which the trail's form (the primary key) cannot say. */\n const addresses = state.stack.map((entry) => (typeof entry.address === 'string' ? entry.address : null));\n return { trail: owner.tenant ? qualifyTenantLink(trail, owner.tenant) : trail, labels, addresses };\n}\n\n/** The walk read back from history state, with the names its crumbs had and its natural keys. */\nfunction withLabels(parsed) {\n const { labels, addresses } = navState() ?? {};\n if (!parsed) return parsed;\n parsed.stack.forEach((entry, i) => {\n if (Array.isArray(labels) && labels.length === parsed.stack.length && typeof labels[i] === 'string' && labels[i])\n entry.label = labels[i];\n if (Array.isArray(addresses) && addresses.length === parsed.stack.length && typeof addresses[i] === 'string')\n entry.address = addresses[i];\n });\n return parsed;\n}\n\n/**\n * The address bar's text for the walk as it stands.\n *\n * In an App it is the one thing on screen, canonically: `/compass/leads/127`,\n * `/compass/sales-dashboard?period=last-30-days`, `/compass/leads?tab=working`\n * (publicAddress.ts). Following a reference opens the target's own address\n * rather than growing a path, and the walk rides in history state\n * (`syncHash`), so Back and the crumbs know it and a shared link is clean.\n * What has no address in words — a breakdown, a list no view shows — is the\n * last entry in the walk's own form. A tenant's address is the same, its\n * `tenant=` or `realm=platform` selector after the App's own parameters\n * (tenantLink.ts). The Workbench is the database and keeps the whole\n * walk in the query language.\n */\nexport function toHash() {\n const owner = sessionIdentity();\n const path = inAppMode() ? appPath(state.activeConnection, state.stack) : trailHash();\n return owner.tenant ? qualifyTenantLink(path, owner.tenant) : path;\n}\n\n/** An App walk's address, before a tenant's selector: its canonical one, else its last entry in the walk's own form. */\nfunction appPath(connection, stack) {\n return shell().addresses?.address(connection, stack) ?? publicPathFor(connection, stack, { pageToken, listParams });\n}\n\n/**\n * Fetch readable names for every row in a restored trail.\n *\n * Only the last entry in a stack is rendered, so on a fresh load the earlier\n * crumbs would keep their raw keys — a shared link reading\n * `employee › 2 › invoice sold_by = 2` where the sender saw\n * `employee › Rina Petrova › …`. The trail is the thing being shared, so it\n * should arrive legible.\n *\n * One small query per row, in parallel, and only on restore. Failures are\n * ignored: a crumb showing its key is worse than one showing a name, and far\n * better than a page that fails to load because a label could not be read.\n */\nexport async function resolveLabels(stack, findTableById) {\n const isCurrent = captureNavigation();\n const rows = stack.filter((entry) => entry.kind === 'row');\n if (!rows.length) return;\n await Promise.allSettled(\n rows.map(async (entry) => {\n const table = findTableById(entry.table);\n if (!table) return;\n /* As a view rather than a plain query when the name lives a hop away —\n `party_id.display_name` — because a plain row cannot carry a joined\n column, and a restored trail through such a table read as keys. */\n const path = labelPath(table);\n /* …and when it is computed (`$label`, a record label template), which a\n plain row does not carry either. */\n const result =\n path && (path.includes('.') || path.startsWith('$'))\n ? await api('/api/view/run', {\n view: {\n id: `crumb:${entry.table}`,\n name: table.name,\n base: entry.table,\n columns: [...new Set([...primaryKey(table), path])].map((p) => ({ path: p })),\n filter: pathEqualityFilter(entry.key),\n limit: 1,\n },\n })\n : await api('/api/query', {\n table: entry.table,\n filter: equalityFilter(entry.key),\n limit: 1,\n offset: 0,\n });\n if (!isCurrent()) return;\n const row = result.rows?.[0];\n if (!row) return;\n const readable = rowLabel(table, row);\n if (readable) entry.label = readable;\n }),\n );\n if (isCurrent()) renderCrumbs();\n}\n\n/**\n * Write the current state into the address bar.\n *\n * Whether it adds a history entry depends on how you got here. A step in the\n * walk pushes, so the browser's Back button undoes it; a refinement of the\n * view you are already on — a sort toggle, a tab, a re-run of the same query\n * — replaces, so Back does not spend three presses undoing sorts.\n *\n * This started as replaceState for everything, on the reasoning that the\n * trail is already a back stack with its own affordance. That was wrong in a\n * way only using it revealed: with no history entries at all, pressing Back\n * leaves tablewalk entirely and takes the whole trail with it. Avoiding a\n * little history noise is not worth destroying someone's work.\n *\n * A public address carries its parameters in the search and the walk in\n * history state, so both are compared and written. An App's signed-in\n * address says its lists' parameters in the search too.\n */\nexport function syncHash() {\n if (applying || !settled) return;\n const owner = sessionIdentity();\n if (owner.tenantRequired && !owner.tenant) return;\n const next = toHash();\n const open = publicAddress(owner);\n const app = inAppMode();\n /* Tenant selectors are part of the walk's ownership. Ordinary development\n cache-busting queries are not navigation state and remain ignored in the\n Workbench; in an App the search is a list's question or a dashboard's window. */\n /* Compared in the inside form (addressMount.js): the bar may say the\n address under a base path, or without the App's id. */\n const here = herePath();\n const current = owner.tenant ? here + hereSearch() + window.location.hash : app || open ? here + hereSearch() : here;\n const walk = app || open ? walkState(owner) : null;\n writeAddress(next, current, walk);\n if (open) canonicalLink(next);\n const natural = shell().addresses?.needsNaturalKey(state.stack[state.stack.length - 1]);\n if (natural) void fillNaturalKey(state.stack[state.stack.length - 1], natural);\n}\n\n/** Push or replace the address, or — the same address — only the walk it stands for. */\nfunction writeAddress(next, current, walk) {\n if (next === current) {\n // One address can stand for a longer walk (a list, then its record): keep the walk current.\n if (\n walk &&\n (navState()?.trail !== walk.trail ||\n JSON.stringify(navState()?.labels) !== JSON.stringify(walk.labels) ||\n JSON.stringify(navState()?.addresses) !== JSON.stringify(walk.addresses))\n )\n navReplace(shown(next), walk);\n return;\n }\n if (state.navMode === 'push') navPush(shown(next), walk);\n else navReplace(shown(next), walk);\n // Anything that renders without going through go() is a refinement.\n state.navMode = 'replace';\n}\n\n/**\n * A public page names its canonical address for whoever indexes it: the\n * server writes it into the page it serves, and the walk keeps it current.\n */\nfunction canonicalLink(path) {\n let link = document.head.querySelector('link[rel=\"canonical\"]');\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('rel', 'canonical');\n document.head.append(link);\n }\n link.setAttribute('href', new URL(shown(path), window.location.origin).href);\n}\n\n/**\n * A record whose address is a natural key (`address: 'sku'`) opened by its\n * primary key — a click, a reference — is first written by that key, named\n * (`id=12`), which reads back without doubt; its natural value is read once\n * and the address rewritten in place. Never a history step of its own.\n */\n// Request ownership must not ride along when a row becomes a page entry: a\n// spread copy would inherit a pending marker that only the old request clears.\nconst naturalPending = new WeakSet();\nasync function fillNaturalKey(entry, { table, column }) {\n if (naturalPending.has(entry)) return;\n naturalPending.add(entry);\n const isCurrent = captureNavigation();\n try {\n const result = await api('/api/query', { table, filter: equalityFilter(entry.key), limit: 1, offset: 0 });\n const value = result.rows?.[0]?.[column];\n if (!isCurrent() || value === undefined || value === null || state.stack[state.stack.length - 1] !== entry) return;\n entry.address = String(value);\n state.navMode = 'replace';\n syncHash();\n } catch {\n // The primary-key address stands; it opens the same record.\n } finally {\n naturalPending.delete(entry);\n }\n}\n\n/** Rewrite the address in place: a record's name arrived, and a public page's slug is written from it. */\nexport function readdress() {\n if (!inAppMode() || !publicAddress(sessionIdentity())) return;\n state.navMode = 'replace';\n syncHash();\n}\n\n/**\n * Apply a hash to the app. Used on load and when someone edits the address\n * bar or uses the browser's Back button.\n */\nexport function applyHash(hash, { findTableById, selectConnection, walk = false }) {\n if (!allowMutationExit()) {\n navReplace(shown(toHash()));\n return false;\n }\n const owner = sessionIdentity();\n if (owner.tenantRequired) {\n if (!owner.tenant) return false;\n const link = parseTenantLink(hash, owner.tenant.appId);\n // A URL suggests a tenant; only verified explicit selection establishes it.\n // The host owns re-entry. Never parse its record under the previous schema.\n if (link.tenantId !== owner.tenant.tenantId) return 'tenant-selection';\n // The App's own address, its parameters included: the selector is not one of them.\n hash = link.search ? `${link.pathname}?${link.search}` : link.pathname;\n }\n /* The connection is read first and separately. Parsing the trail needs the\n schema it was written against — a link into another database names tables\n the current one has never heard of, so every row segment fails to resolve\n and is silently dropped. Switch first, parse second. */\n const target = connectionFromHash(hash);\n if (target && state.activeConnection && (target !== state.activeConnection || connectionTransitionPending())) {\n invalidateNavigation();\n // Handed the raw hash, not a parsed stack: it can only be parsed once\n // the new schema is loaded.\n void selectConnection(target, hash);\n /* Not `true`. The switch is asynchronous and renders the target itself\n when it lands; a caller that renders in the meantime paints the\n *outgoing* connection — which on a cold tab is whatever another tab left\n active on the server — into the address bar for a frame. That frame is a\n `/other-db` URL that can be copied or bookmarked, and it is exactly what\n the cold-link guarantee forbids. The sentinel tells the caller the\n render is not theirs to do. */\n return 'switching';\n }\n\n const parsed = readAddress(hash, findTableById, walk);\n if (!parsed) return false;\n invalidateNavigation();\n applying = true;\n try {\n state.stack = parsed.stack;\n state.page = 0;\n // Restoring from the address bar must not itself add an entry, or Back\n // would need two presses to get past the state it just restored.\n state.navMode = 'replace';\n render();\n void resolveLabels(parsed.stack, findTableById);\n return true;\n } finally {\n applying = false;\n }\n}\n\n/**\n * An address read into a walk. In an App, its canonical address first\n * (publicAddress.ts); anything else — a query-language path, the walk's\n * `@page~id` and `~id` forms, a list's `view:query` — the older way, which\n * every link written before still opens, and syncHash then rewrites to the\n * canonical one. `walk` is history state's own whole-walk form, read as\n * written. A reload keeps history state: the walk it holds is kept when it\n * ends where the address does, so the crumbs survive F5.\n */\nexport function readAddress(hash, findTableById, walk = false) {\n const older = (text) => fromHash(text, findTableById, { isBreakdown: looksLikeBreakdown, viewEntry: viewEntryFromAddress });\n if (walk) return withLabels(older(hash));\n if (!inAppMode()) return older(hash);\n const read = shell().addresses?.stackFrom(hash) ?? older(hash);\n if (!read) return read;\n const owner = sessionIdentity();\n let trail = navState()?.trail;\n if (typeof trail === 'string' && owner.tenant) {\n try {\n trail = parseTenantLink(trail, owner.tenant.appId).pathname;\n } catch {\n trail = undefined;\n }\n }\n const walked = typeof trail === 'string' ? withLabels(older(trail)) : null;\n /* Compared as written, so an address with no words of its own — a drill\n into a table no view shows — keeps its walk through a reload too. */\n if (\n walked?.stack.length &&\n walked.connection === read.connection &&\n appPath(walked.connection, unnamed(walked.stack)) === appPath(read.connection, unnamed(read.stack))\n )\n return walked;\n return read;\n}\n\n/* A walk compared by what it addresses, not by what its last record is\n called: a public slug is a name, and one side may not know it yet. */\nconst unnamed = (stack) => stack.map((entry, i) => (i === stack.length - 1 ? { ...entry, label: undefined } : entry));\n\n/** Suppress hash writes while a caller rebuilds state from one. */\nexport function whileApplying(fn) {\n applying = true;\n try {\n return fn();\n } finally {\n applying = false;\n }\n}\n","/** What useRecordInsert says, in the forms room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../../messages.js';\n\nexport const say = defineMessages({\n creationWasNotConfirmed: 'Creation was not confirmed. The row may already exist. Check the table before adding it again.',\n theRequestMayStill: '{problem} The request may still complete.',\n theServerReturnedAnInvalid: 'The server returned an invalid error response.',\n theServerDidNotReturn: '{problem} The server did not return a record key.',\n theRowWasAdded: 'The row was added, but its record could not be opened. Close this form and find it in the table.',\n});\n","import { useEffect, useRef, useState } from 'react';\nimport { shell } from '../shellMode.js';\nimport { safeFieldErrors, type FieldError } from '../fieldErrors.js';\nimport { say } from '../copy/forms/components/useRecordInsert.js';\nimport { addHostListener, removeHostListener } from '../shellHost.js';\n\nexport interface InsertResult {\n key: Record<string, unknown>;\n outcome?: 'applied';\n row?: Record<string, unknown>;\n /** The journal entry this creation made, for the confirmation's Undo. */\n undoId?: unknown;\n}\n\ninterface InsertFailure {\n errors: Array<{ message: string; field?: string; fields?: readonly { field: string; message: string }[] }>;\n outcome?: 'rejected' | 'unknown';\n}\n\ntype InsertFieldError = FieldError;\n\nexport type InsertResponse = InsertResult | InsertFailure;\n\n/** A refusal before sending a write, such as an obsolete form's connection. */\nexport class InsertRefusal extends Error {}\n\ntype Phase = 'idle' | 'pending' | 'uncertain' | 'succeeded';\nconst UNCONFIRMED = say('creationWasNotConfirmed');\n\n/** One attempt at a time; an unacknowledged insert is never automatically retried. */\n/** What a New form sends beside the row: the tags it carries, as keys of the tag table (tagLists.ts). */\nexport interface InsertExtra {\n tags?: string[];\n /** The record's lines, by child table: each row's values, inserted with it (FormLines.tsx). */\n lines?: Record<string, Array<{ values: Record<string, string | null> }>>;\n}\n\nexport function useRecordInsert(\n insert: (values: Record<string, unknown>, extra?: InsertExtra) => Promise<InsertResponse>,\n onAdded: (result: InsertResult) => void,\n onPendingChange?: (pending: boolean) => void,\n) {\n const [phase, setPhase] = useState<Phase>('idle');\n const [problem, setProblem] = useState('');\n const [fieldErrors, setFieldErrors] = useState<InsertFieldError[]>([]);\n const locked = useRef(false);\n const alive = useRef(true);\n const timeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n useEffect(() => {\n alive.current = true;\n return () => {\n alive.current = false;\n clearTimeout(timeout.current);\n };\n }, []);\n useEffect(() => {\n if (phase !== 'pending' && phase !== 'uncertain') return;\n const warn = (event: BeforeUnloadEvent) => {\n event.preventDefault();\n event.returnValue = '';\n };\n addHostListener(window, 'beforeunload', warn);\n return () => removeHostListener(window, 'beforeunload', warn);\n }, [phase]);\n\n const submit = async (values: Record<string, unknown>, extra?: InsertExtra) => {\n if (locked.current || !alive.current) return;\n locked.current = true;\n setProblem('');\n setFieldErrors([]);\n setPhase('pending');\n onPendingChange?.(true);\n const tracked = shell().mutations.start('insert');\n timeout.current = setTimeout(() => {\n shell().mutations.unknown(tracked);\n if (!alive.current) return;\n setPhase('uncertain');\n setProblem(say('theRequestMayStill', { problem: UNCONFIRMED }));\n onPendingChange?.(false);\n }, 30_000);\n\n let result: InsertResponse;\n try {\n result = await (extra ? insert(values, extra) : insert(values));\n } catch (error) {\n // These HTTP responses reject the request before the insert is executed.\n const status = (error as { status?: number } | null)?.status;\n const outcome = (error as { outcome?: string } | null)?.outcome;\n const refused =\n outcome !== 'unknown' &&\n (error instanceof InsertRefusal ||\n outcome === 'rejected' ||\n outcome === 'not_applied' ||\n (outcome === undefined && [400, 401, 403, 404, 409, 422, 501].includes(status ?? 0)));\n if (refused) shell().mutations.settle(tracked);\n else shell().mutations.unknown(tracked);\n if (!alive.current) return;\n locked.current = !refused;\n setPhase(refused ? 'idle' : 'uncertain');\n const detail = error instanceof Error ? error.message : String(error);\n setProblem(refused ? detail : `${UNCONFIRMED} ${detail}`);\n return;\n } finally {\n clearTimeout(timeout.current);\n if (alive.current) onPendingChange?.(false);\n }\n if (result && typeof result === 'object' && 'errors' in result) {\n const message =\n Array.isArray(result.errors) && typeof result.errors[0]?.message === 'string'\n ? result.errors[0].message\n : say('theServerReturnedAnInvalid');\n const rejected = Array.isArray(result.errors) && typeof result.errors[0]?.message === 'string' && result.outcome === 'rejected';\n const mapped = rejected ? safeFieldErrors(result.errors) : [];\n if (rejected) shell().mutations.settle(tracked);\n else shell().mutations.unknown(tracked);\n if (!alive.current) return;\n locked.current = !rejected;\n setPhase(rejected ? 'idle' : 'uncertain');\n // Keep the server's safe envelope available to the form. The form may\n // map some fields and must retain this summary for unknown targets.\n setProblem(rejected ? message : `${UNCONFIRMED} ${message}`);\n setFieldErrors(mapped);\n return;\n }\n if (result && typeof result === 'object' && 'outcome' in result && result.outcome !== undefined && result.outcome !== 'applied') {\n shell().mutations.unknown(tracked);\n if (!alive.current) return;\n setPhase('uncertain');\n setProblem(UNCONFIRMED);\n return;\n }\n if (\n !result ||\n typeof result !== 'object' ||\n !('key' in result) ||\n !result.key ||\n typeof result.key !== 'object' ||\n Array.isArray(result.key)\n ) {\n shell().mutations.unknown(tracked);\n if (!alive.current) return;\n setPhase('uncertain');\n setProblem(say('theServerDidNotReturn', { problem: UNCONFIRMED }));\n return;\n }\n shell().mutations.settle(tracked);\n if (!alive.current) return;\n setPhase('succeeded');\n setProblem('');\n try {\n onAdded(result);\n } catch {\n setProblem(say('theRowWasAdded'));\n }\n };\n return {\n submit,\n phase,\n problem,\n fieldErrors,\n clearProblem: () => {\n setProblem('');\n setFieldErrors([]);\n },\n locked: phase !== 'idle',\n };\n}\n","import type { TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { updateOwnerKey, type UpdateOwner } from './updateAttempts.js';\nimport type { RecordEditControlState } from './recordEditValidation.js';\n\ntype Value = string | number | boolean | null;\nexport interface RecordDraft extends UpdateOwner {\n schemaKey: string;\n needsReview: boolean;\n /** Resume only restores editing; it must not turn retained/rejected intent\n * into an automatic submission. Explicit Save or Discard clears this latch. */\n manualSaveRequired: boolean;\n values: Record<string, Value>;\n originals: Record<string, Value>;\n inputs: Record<string, { element: HTMLElement; onCommitted?: (value: Value) => void; readState?: () => RecordEditControlState }>;\n /** Each staged row-defined field (`specs.capacity`): its column, the object it was read in, and its box's text as a value. */\n folds?: Record<string, DefinedFold>;\n}\n\n/** How a row-defined field's edit becomes part of its column's object (DefinedFields.tsx, write.js). */\nexport interface DefinedFold {\n column: string;\n /** The definition's caption, which the field's editor is named by. */\n label: string;\n object: Readonly<Record<string, unknown>>;\n /** Undefined is empty: the key leaves the object. */\n toValue: (text: unknown) => unknown;\n}\n\n/** Presentation changes do not invalidate drafts; storage/validation and field policy changes do. */\nexport function draftSchemaKey(table: TableMeta): string {\n return JSON.stringify([\n table.id,\n table.isView,\n [...(table.columns ?? [])]\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((column) => [column.name, column.type, column.nullable, column.primaryKey, column.references, column.allowed, column.writable]),\n ]);\n}\n\n/** Tab-memory only. Suspending releases DOM callbacks without losing business values. */\nexport function createRecordDrafts() {\n const drafts = new Map<string, RecordDraft>();\n const acquire = (owner: UpdateOwner, schemaKey: string): RecordDraft => {\n const id = updateOwnerKey(owner);\n let draft = drafts.get(id);\n if (!draft) {\n draft = {\n ...owner,\n key: { ...owner.key },\n schemaKey,\n needsReview: false,\n manualSaveRequired: false,\n values: {},\n originals: {},\n inputs: {},\n };\n drafts.set(id, draft);\n }\n if (draft.schemaKey !== schemaKey && Object.keys(draft.values).length) {\n draft.needsReview = true;\n draft.manualSaveRequired = true;\n } else if (!Object.keys(draft.values).length) {\n draft.schemaKey = schemaKey;\n draft.needsReview = false;\n }\n return draft;\n };\n const suspend = (draft: RecordDraft) => {\n draft.inputs = {};\n if (Object.keys(draft.values).length) {\n draft.needsReview = true;\n draft.manualSaveRequired = true;\n } else if (!draft.manualSaveRequired) drafts.delete(updateOwnerKey(draft));\n };\n return {\n acquire,\n suspend,\n clear: () => drafts.clear(),\n drop: (owner: UpdateOwner) => drafts.delete(updateOwnerKey(owner)),\n hasPending: () => [...drafts.values()].some((draft) => Object.keys(draft.values).length > 0),\n };\n}\n","/**\n * The sidebar's counts, read live.\n *\n * A number beside a list reads as that list's size now. The catalog's\n * `approxRows` is a snapshot from when the schema was read, never\n * refreshed after a write — this browser's or another session's — so it\n * said 48 beside a list of 49 once an applicant had submitted through a\n * public form. An app's menu asks the server instead.\n *\n * What is counted is what the view stands for, its standing condition\n * included. A whole table goes to `/api/count`; a view with a condition\n * goes to `/api/run` with the condition as text, the request the list's\n * own tab badges make (AppList.tsx): the query language is parsed on the\n * server and only there, on the server's clock, so \"last 30 days\" is the\n * same days beside the menu row as in the list it opens. `limit: 1` keeps the\n * rows that ride along with the total to one.\n *\n * Every request carries `countLimit`, so the server reads at most\n * NAV_COUNT_LIMIT + 1 matching rows and answers `capped` past the bound,\n * and the row says 10,000+. Unbounded, each row on screen was a full\n * COUNT(*) per user per refresh — a scan of a large Postgres table. The\n * catalog's estimate is no substitute in an app: it is the whole table's\n * size, rows a role's row policy or scope keeps from it included. The\n * bounded count goes through the same policy and filter as the list.\n *\n * The rows that ask in the same moment ask together, in one request\n * (`/api/counts`, which a list's tab badges use too), and the server counts\n * them in one statement where it can: a menu of seventeen rows was seventeen\n * requests on every page load. A row that asks alone, or a batch the server\n * refuses, asks as a single row does.\n *\n * When: once per row on screen — a row scrolled out of the list, or a\n * sidebar folded away or not drawn, asks nothing — deduplicated by what is\n * counted; again every two minutes while the page is visible (Query stops the\n * clock in a hidden tab); on return to the window; and at once after this\n * browser's own writes. Saves, bulk actions, commands and undo already\n * invalidate the `count` family these keys sit in; `countsChanged` covers\n * the two paths that did not, create and delete.\n */\nimport { useEffect, useState, type RefObject } from 'react';\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { api, findTable, state } from '../core.js';\nimport { sessionIdentity } from '../sessionIdentity.js';\nimport { firstPaintItem } from '../firstPaint.js';\nimport { NAV_COUNT_LIMIT } from '@mistriwork/engine/shared/reads.js';\nimport { queryClient } from './mount.js';\nimport { sameReads } from '../liveReads.js';\nimport { addHostListener, removeHostListener } from '../shellHost.js';\n\nexport interface NavCountSpec {\n table: string;\n condition: string;\n}\n/** `capped`: the server stopped at the bound; `count` is the bound, and more match. */\nexport interface NavCount {\n count: number;\n exact: boolean;\n capped?: boolean;\n}\n\n/** How often a count on screen is asked again. */\nconst NAV_COUNT_INTERVAL = 120_000;\n\nconst activeConnection = (): string => (state as { activeConnection?: string | null }).activeConnection ?? '';\n\n/**\n * In the `count` family, so every invalidation of a connection's counts\n * reaches these; five parts, so it never shares a cache entry with a tab\n * badge (`['count', connection, query]`, which holds a bare number).\n */\nexport const navCountKey = (connection: string, spec: NavCountSpec) => ['count', connection, 'nav', spec.table, spec.condition] as const;\n\nconst isNavCountKey = (key: readonly unknown[]): boolean => key[0] === 'count' && key[2] === 'nav';\n\n/** The count, or null when the server gave none it stands behind. */\nfunction fetchNavCount(spec: NavCountSpec): Promise<NavCount | null> {\n // A source that reports no totals (an API) is not asked for one it would refuse.\n if ((findTable(spec.table) as { countable?: false } | undefined)?.countable === false) return Promise.resolve(null);\n /* A first page's menu comes with its counts (firstPaint.ts), each by what it counts. */\n const carried = firstPaintItem('count', activeConnection(), { q: countText(spec), countLimit: NAV_COUNT_LIMIT });\n if (carried !== undefined) return Promise.resolve(counted(carried as CountResult));\n return new Promise((resolve, reject) => {\n waiting.push({ spec, resolve, reject });\n if (waiting.length === 1) setTimeout(flush, 0);\n });\n}\n\n/* The rows of one paint: a macrotask, after every row's query has mounted. */\nlet waiting: Array<{ spec: NavCountSpec; resolve: (count: NavCount | null) => void; reject: (error: unknown) => void }> = [];\n/* The server's own ceiling on one batch (shared/reads.ts, COUNT_EACH_MAX). */\nconst BATCH = 64;\n\nfunction flush() {\n const asked = waiting;\n waiting = [];\n for (let at = 0; at < asked.length; at += BATCH) void send(asked.slice(at, at + BATCH));\n}\n\n/** What a row counts, as a batch item says it. */\nconst countText = (spec: NavCountSpec): string => (spec.condition ? `${spec.table} ${spec.condition}` : spec.table);\n\ntype CountResult = { total?: unknown; exactTotal?: unknown; cappedTotal?: unknown; errors?: unknown[] } | undefined;\n/** One item of a batch's answer, as the row says it. */\nconst counted = (said: CountResult): NavCount | null =>\n said && !said.errors?.length && typeof said.total === 'number'\n ? { count: said.total, exact: said.exactTotal !== false, ...(said.cappedTotal === true ? { capped: true } : {}) }\n : null;\n\nasync function send(batch: typeof waiting) {\n if (batch.length === 1) return fetchOne(batch[0].spec).then(batch[0].resolve, batch[0].reject);\n let results: CountResult[];\n let data: { results?: typeof results };\n try {\n data = (await api('/api/counts', { items: batch.map(({ spec }) => countText(spec)), countLimit: NAV_COUNT_LIMIT })) as {\n results?: typeof results;\n };\n if (!Array.isArray(data?.results) || data.results.length !== batch.length) throw new Error();\n results = data.results;\n } catch {\n // Whatever refused the batch, each row is owed its own answer.\n for (const { spec, resolve, reject } of batch) fetchOne(spec).then(resolve, reject);\n return;\n }\n batch.forEach(({ resolve }, index) => resolve(sameReads(counted(results[index]), data)));\n}\n\n/** One row's count, asked alone. */\nasync function fetchOne(spec: NavCountSpec): Promise<NavCount | null> {\n if (!spec.condition) {\n const data = await api('/api/count', { table: spec.table, countLimit: NAV_COUNT_LIMIT });\n return typeof data?.count === 'number'\n ? sameReads({ count: data.count, exact: data.exact !== false, ...(data.capped === true ? { capped: true } : {}) }, data)\n : null;\n }\n const data = await api('/api/run', { q: `${spec.table} ${spec.condition}`, limit: 1, countLimit: NAV_COUNT_LIMIT });\n return 'total' in data && !data.errors?.length && typeof data.total === 'number'\n ? sameReads(\n {\n count: data.total,\n exact: !('exactTotal' in data && data.exactTotal === false),\n ...('cappedTotal' in data && data.cappedTotal === true ? { capped: true } : {}),\n },\n data,\n )\n : null;\n}\n\n/**\n * A row's live count. A refused or failed read is absent — not zero, and\n * not the last number either, which may be one this role can no longer\n * see. The server's refusal is the whole answer; the sidebar says nothing.\n */\nexport function useNavCount(spec: NavCountSpec, visible: boolean): NavCount | null {\n const query = useQuery({\n queryKey: navCountKey(activeConnection(), spec),\n queryFn: () => fetchNavCount(spec),\n enabled: visible,\n refetchInterval: NAV_COUNT_INTERVAL,\n });\n return query.isError ? null : (query.data ?? null);\n}\n\n/**\n * Whether a row is on screen. One observer per row rather than a shared\n * one: a menu is tens of rows, and an observer that belongs to its row\n * goes when the row does. Without IntersectionObserver every row counts as\n * seen — the alternative is a menu with no numbers at all.\n */\nexport function useInView(ref: RefObject<Element | null>): boolean {\n const [seen, setSeen] = useState(() => typeof IntersectionObserver === 'undefined');\n useEffect(() => {\n const node = ref.current;\n if (!node || typeof IntersectionObserver === 'undefined') return;\n const observer = new IntersectionObserver((entries) => {\n const last = entries[entries.length - 1];\n if (last) setSeen(last.isIntersecting);\n });\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return seen;\n}\n\n/**\n * Coming back to the window asks again. Query's own focus refetch listens\n * for the tab turning visible, which a second window beside this one never\n * changes; the window's `focus` event does. Rows on screen only, counts\n * past the client's stale time only, and a refetch already on its way is\n * joined rather than restarted. A tenant session is left to lease renewal,\n * the way the client's defaults leave every other query (mount.tsx).\n */\nexport function useCountsOnFocus(): void {\n const client = useQueryClient();\n useEffect(() => {\n const refresh = () => {\n if (sessionIdentity().tenantRequired) return;\n void client.refetchQueries(\n { predicate: (query) => isNavCountKey(query.queryKey), type: 'active', stale: true },\n { cancelRefetch: false },\n );\n };\n addHostListener(window, 'focus', refresh);\n return () => removeHostListener(window, 'focus', refresh);\n }, [client]);\n}\n\n/**\n * After this browser's own create or delete: every count on the connection\n * — the menu's and the list tabs' — at once, joining a refetch the same\n * write already started elsewhere rather than asking twice.\n */\nexport function countsChanged(connection: string | null | undefined = activeConnection()): void {\n try {\n void queryClient.invalidateQueries({ queryKey: ['count', connection ?? ''] }, { cancelRefetch: false });\n } catch {\n /* A disposed cache has no counts to refresh. */\n }\n}\n","/** What insert says, in the record page room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n theConnectionOrView: 'The connection or view changed. Close this form and open a new one.',\n theTableDefinitionChangedClose: 'The table definition changed. Close this form and open a new one.',\n addingRecordsIsNoLonger: 'Adding records is no longer allowed.',\n added: 'Added {name} · {label}',\n});\n","/**\n * Adding a row, in a form the schema wrote.\n *\n * Nobody declares a form for this: the columns, their types, what is\n * required and what the database will fill are all in the catalog already.\n * Required is NOT NULL with no default and no auto-assigned key; everything\n * else is optional, and an empty box means \"leave it to the database\" — its\n * defaults are part of the schema's design and pre-filling them here would\n * turn every default into a value somebody appears to have chosen.\n *\n * Components own field state and feedback. This host owns the connection,\n * request, and navigation for the form's lifetime.\n */\nimport { ownedBy } from './requestIdentity.js';\nimport { createElement } from 'react';\nimport {\n allowMutationExit,\n api,\n columnDisplay,\n columnLabel,\n currentEntry,\n el,\n findTable,\n go,\n humanName,\n openRecord,\n prefersPages,\n rowLabel,\n state,\n toast,\n whenConnectionChanges,\n writeAllowed,\n} from './core.js';\n// The App through the bridge: appnav.js would pull the page's whole tangle of imports in here (uiBridge.ts).\nimport { pageBridge } from './uiBridge.js';\nimport { syncHash } from './url.js';\nimport { mount, unmount } from './components/mount.js';\nimport { onDemand } from './components/onDemand.js';\nimport { InsertRefusal } from './components/useRecordInsert.js';\nimport { draftSchemaKey } from './recordDrafts.js';\nimport { shell } from './shellMode.js';\nimport { countsChanged } from './components/navCounts.js';\nimport { writeValues } from './resourceRequests.js';\nimport { captureSessionIdentity, sessionIdentity } from './sessionIdentity.js';\nimport { say } from './copy/record/insert.js';\nimport { portalRoot } from './shellHost.js';\n\n/* The form and its field library load when a New is first opened; a reader\n who only reads never fetches them. */\nconst NewRecordDialog = onDemand(() => import('./components/NewRecord.js'), 'NewRecordDialog', { quiet: true });\nconst NewRecordDrawer = onDemand(() => import('./components/NewRecord.js'), 'NewRecordDrawer', { quiet: true });\n\n/** Inserts may supply a writable subset even when a complete delete snapshot is unavailable. */\nexport function canInsert(table, app = false) {\n if ((!app && !state.canWrite) || !table || table.isView || table.insertable === false || !writeAllowed(table.id)) return false;\n return Boolean(state.connections?.find((c) => c.id === state.activeConnection)?.writable);\n}\n\n/**\n * The New form as an app shows it: a drawer over the list, addressed by the\n * list's tab slot (`…!new`) so a link can reopen the form (not its unsaved\n * values). A modal hid the list you were on, fought the picker's\n * menu for room, and could not be linked to. The workbench keeps its dialog.\n */\nexport function openNewRecord(table, form, { reopen = false } = {}) {\n /* The list room drawing an address that says `…!new` again — the App's words\n asked for anew after a language pick or a save (app.js reloadAppInPlace)\n remount it — finds its form already open: that form, half filled, is kept. */\n if (reopen && drawerNow?.table === table.id && drawerNow.connection === state.activeConnection && drawerNow.host.isConnected) {\n /* Drawn again where it stands, so its captions are the App's new words; its draft is the root's state, kept. */\n drawerNow.redraw();\n return;\n }\n if (!allowMutationExit()) return;\n if (!prefersPages()) {\n openInsert(table, form);\n return;\n }\n drawerNow?.close();\n const here = currentEntry();\n const connection = state.activeConnection;\n if (here?.kind === 'table' && here.table === table.id && here.tab !== 'new') {\n here.tab = 'new';\n state.navMode = 'replace';\n syncHash();\n }\n openDrawer(table, form, () => {\n const now = currentEntry();\n if (state.activeConnection === connection && now === here && now?.kind === 'table' && now.table === table.id && now.tab === 'new') {\n now.tab = 'rows';\n state.navMode = 'replace';\n syncHash();\n }\n });\n}\n\n/* The frames are components (components/NewRecord.tsx); what stays here is the\n crossing — a host element on the body, taken down when the form is — and\n the navigation the form's outcome drives, which is the page's business. */\nlet drawerNow = null;\n\nfunction openDrawer(table, form, onClose, onAdded) {\n drawerNow?.close();\n const host = el('div', { class: 'newpanel-host' });\n portalRoot().append(host);\n const close = hostClose(host, () => {\n if (drawerNow?.host === host) drawerNow = null;\n onClose?.();\n });\n const props = formProps(table, form, host, close, onAdded);\n const redraw = () => mount(host, createElement(NewRecordDrawer, props));\n drawerNow = { host, close, redraw, table: table.id, connection: state.activeConnection };\n redraw();\n}\n\n/** Related forms retain their parent's route and existing field draft.\n * A modal supplies a renderer in its own React tree; ordinary pages keep the\n * existing drawer host. Both frames use the same request/authority owner.\n * @param {import('@mistriwork/engine/shared/schema.js').TableMeta} table\n * @param {import('./components/NewRecord.js').FormCuration} form\n * @param {(result: import('./components/NewRecord.js').InsertResult) => void} onAdded\n * @param {{ host: HTMLElement, isCurrent: () => boolean, close: () => void,\n * render: (props: import('./components/NewRecord.js').NewRecordProps) => void }} [surface]\n */\nexport function openRelatedRecord(table, form, onAdded, surface) {\n if (!allowMutationExit()) return;\n if (!canInsert(table)) return;\n if (surface) {\n try {\n if (!surface.host.isConnected || surface.isCurrent() !== true) return;\n } catch {\n return;\n }\n surface.render(formProps(table, form, surface.host, surface.close, onAdded, { isCurrent: surface.isCurrent }));\n return;\n }\n openDrawer(table, form, undefined, onAdded);\n}\n\n/**\n * @param {*} table\n * @param {{ show?: string[], defaults?: Record<string, unknown> } | undefined} [form]\n * The app's curation: which columns to ask for — the rest are left to\n * the database, or filled from `defaults` without being asked — and the\n * values a box starts with. Absent, the form is the schema's: every column.\n */\nexport function openInsert(table, form) {\n if (!allowMutationExit()) return;\n const host = el('div', { class: 'insert-host' });\n portalRoot().append(host);\n const close = hostClose(host);\n mount(host, createElement(NewRecordDialog, formProps(table, form, host, close)));\n}\n\n/** @param {HTMLElement} host @param {(() => void) | undefined} [onClose] */\nfunction hostClose(host, onClose) {\n let closed = false;\n const close = () => {\n if (closed) return;\n closed = true;\n stopWatching();\n unmount(host);\n host.remove();\n onClose?.();\n };\n const stopWatching = whenConnectionChanges(close);\n return close;\n}\n\n/** What every frame needs from the page: its words, its schema, its next step.\n * @param {import('@mistriwork/engine/shared/schema.js').TableMeta} table\n * @param {import('./components/NewRecord.js').FormCuration | undefined} form\n * @param {HTMLElement} host A connected element owned by this form instance.\n * @param {() => void} close\n * @param {((result: import('./components/NewRecord.js').InsertResult) => void) | undefined} [onAdded]\n * @param {{ app?: boolean, isCurrent?: () => boolean }} [options]\n * @returns {import('./components/NewRecord.js').NewRecordProps}\n */\nexport function formProps(table, form, host, close, onAdded, options = {}) {\n const app = options.app ?? prefersPages();\n const schemaKey = draftSchemaKey(table);\n const identity = captureSessionIdentity();\n const connection = state.activeConnection;\n const route = location.href;\n const entry = currentEntry();\n let closed = false;\n const current = () => {\n try {\n return (\n !closed &&\n host.isConnected &&\n identity === sessionIdentity() &&\n identity.mode !== 'locked' &&\n connection === state.activeConnection &&\n route === location.href &&\n entry === currentEntry() &&\n (options.isCurrent === undefined || options.isCurrent() === true)\n );\n } catch {\n return false;\n }\n };\n const finish = () => {\n if (!closed) {\n closed = true;\n close();\n }\n };\n return {\n table,\n form,\n app,\n /* The workbench reads the schema; an app's reader reads a form. */\n label: (column) => {\n if (!app) return column.name;\n return columnLabel(table.id, column.name) ?? humanName(column.name);\n },\n target: (id) => findTable(id),\n /* How the App dresses each column: a vocabulary's words, money's currency. */\n ...(app\n ? {\n display: (column) => columnDisplay(table.id, column.name),\n appName: /** @type {{ name?: string } | null} */ (pageBridge.activeApp())?.name,\n }\n : {}),\n insert: (values, extra) => {\n if (!connection || !current()) throw new InsertRefusal(say('theConnectionOrView'));\n const currentTable = findTable(table.id);\n if (!currentTable || draftSchemaKey(currentTable) !== schemaKey) throw new InsertRefusal(say('theTableDefinitionChangedClose'));\n if (!canInsert(currentTable, app)) throw new InsertRefusal(say('addingRecordsIsNoLonger'));\n let payload;\n try {\n payload = writeValues(values);\n } catch (error) {\n throw new InsertRefusal(error.message);\n }\n /* The record's tags and lines go with it, inserted in its transaction (tagLists.ts, FormLines.tsx). */\n const tags = extra?.tags?.length ? { tags: extra.tags } : {};\n /* Only when there are some: a tenant App's transport sends inert JSON and\n refuses a field that is present but undefined (tenantTransport.ts). */\n const lines = extra?.lines ? { lines: extra.lines } : {};\n return api('/api/insert', { ...ownedBy(connection), table: table.id, values: payload, ...tags, ...lines });\n },\n onCancel: () => {\n if (current() && allowMutationExit()) finish();\n },\n canClose: () => current() && allowMutationExit(),\n onAdded: (result) => {\n if (!current()) return;\n finish();\n // Creation can add an inverse or a non-revertible history barrier. Both\n // must replace the menu's previous editing history before the next Undo.\n void shell().undo.refresh();\n /* A new row changes every count on the connection — the menu's and\n the list tabs'. Asked after the caller's own refresh, so a count\n that caller already started is joined rather than asked twice. */\n if (onAdded) {\n onAdded(result);\n countsChanged(connection);\n return;\n }\n countsChanged(connection);\n const label = result.row ? rowLabel(table, result.row) : Object.values(result.key).join('/');\n /* Undo beside the confirmation, as a field edit has it: this is the\n moment the wrong record is noticed. Undone, the page of a record that\n is gone is no place to stand, so the reader goes back to its list. */\n const created = JSON.stringify(result.key);\n toast(\n say('added', { name: table.name, label }),\n 'ok',\n shell().undo.toast(result.undoId, () => {\n countsChanged(connection);\n const now = currentEntry();\n if (now?.table === table.id && JSON.stringify(now.key) === created)\n go({ kind: 'table', table: table.id, query: table.id, tab: 'rows' }, 'reset');\n }),\n );\n /* Straight to the new record: the form's answer is the row the database\n stored — defaults filled, key assigned — and the record page is where\n that answer is legible. */\n void openRecord(table.id, result.key, label);\n },\n };\n}\n",null,null,null],"ignoreList":[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,78,79,80],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,SAAS,WAAW,QAAQ,QAAQ;CACnC,MAAM,aAAa,IAAI,IAAI,MAAM;CACjC,OAAO,OAAO,QAAQ,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;AAC/C;AACA,IAAI,kBAAkB,cAAc,aAAa;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,mBAAmB,CAAC;CACpB,YAAY,QAAQ,SAAS,SAAS;EACrC,MAAM;EACN,KAAK,UAAU;EACf,KAAK,WAA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kBAAkB,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC;CAC5D,QAAA,GAAOC,qBAAAA,iCAAAA,CAAiC,WAAW,aAAa,aAAa,UAAU,OAAO;AAC/F"}
|
|
1
|
+
{"version":3,"file":"shared-BHsjawAG.js","names":["React","platform.os.mac","platform.engine.webkit","React","REASONS.triggerFocus","React","_formatErrorMessage","React","_formatErrorMessage","React","_formatErrorMessage","React","REASONS.itemPress","platform.os.mac","React","React","_formatErrorMessage","React","React","_formatErrorMessage","React","REASONS.siblingOpen","React","_formatErrorMessage","selectors","React","React","useId","REASONS.imperativeAction","listNavigation","React","React","_formatErrorMessage","React","REASONS.cancelOpen","squeeze","say","say","say","findTable","squeeze","say","React","_formatErrorMessage","_formatErrorMessage","React","REASONS.inputClear","REASONS.inputChange","REASONS.itemPress","REASONS.none","REASONS.inputPress","REASONS.keyboard","REASONS.pointer","React","CommonTriggerDataAttributes.popupOpen","CommonTriggerDataAttributes.pressed","ComboboxInputDataAttributes.popupSide","ComboboxInputDataAttributes.listEmpty","React","React","_formatErrorMessage","REASONS.closePress","React","REASONS.none","REASONS.keyboard","REASONS.pointer","platform.os.android","REASONS.inputChange","REASONS.inputClear","platform.engine.gecko","REASONS.escapeKey","React","React","React","React","platform.os.ios","React","_formatErrorMessage","React","React","React","Autocomplete.Root","Autocomplete.Input","Autocomplete.Portal","Autocomplete.Positioner","Autocomplete.Popup","Autocomplete.List","Autocomplete.Empty","Autocomplete.Item","Menu.Root","Menu.Trigger","Menu.Portal","Menu.Positioner","Menu.Popup","Menu.Group","Menu.GroupLabel","Menu.Item","referenceNames","subtitleColumns","editedReferences","listReferenceNames","showClause","appListQuery","say","sharedReferenceNames","say","sharedSubtitleColumns","sharedEditedReferences","labelPath","sharedShowClause","sharedListReferenceNames","sharedAppListQuery","findTable","squeeze","say","say","findTable","useSyncExternalStoreWithSelector"],"sources":["../../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../engine/src/shared/subtitlePath.ts","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs","../../../../node_modules/@base-ui/react/menu/positioner/MenuPositionerContext.mjs","../../../../node_modules/@base-ui/react/menu/root/MenuRootContext.mjs","../../../../node_modules/@base-ui/react/context-menu/root/ContextMenuRootContext.mjs","../../../../node_modules/@base-ui/react/menu/item/useMenuItemCommonProps.mjs","../../../../node_modules/@base-ui/react/menu/item/useMenuItem.mjs","../../../../node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs","../../../../node_modules/@base-ui/react/menu/group/MenuGroup.mjs","../../../../node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs","../../../../node_modules/@base-ui/react/menu/item/MenuItem.mjs","../../../../node_modules/@base-ui/react/menu/popup/MenuPopup.mjs","../../../../node_modules/@base-ui/react/menu/portal/MenuPortalContext.mjs","../../../../node_modules/@base-ui/react/menu/portal/MenuPortal.mjs","../../../../node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs","../../../../node_modules/@base-ui/react/menubar/MenubarContext.mjs","../../../../node_modules/@base-ui/react/menu/store/MenuStore.mjs","../../../../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRootContext.mjs","../../../../node_modules/@base-ui/react/menu/root/MenuRoot.mjs","../../../../node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs","../../../../node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs","../../../../node_modules/@base-ui/react/menu/utils/findRootOwnerId.mjs","../../../../node_modules/@base-ui/react/utils/useMixedToggleClickHandler.mjs","../../../../node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs","../../../kit/src/client/conditions.js","../../../kit/src/client/copy/shell/prompt.ts","../../../kit/src/client/prompt.js","../../../kit/src/client/copy/workbench/filterbar.ts","../../../kit/src/client/filterbar.js","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/gridNavigation.mjs","../../../../node_modules/@base-ui/react/combobox/root/ComboboxRootContext.mjs","../../../../node_modules/@base-ui/react/combobox/store.mjs","../../../../node_modules/@base-ui/react/combobox/root/utils/index.mjs","../../../../node_modules/@base-ui/utils/stringifyLocale.mjs","../../../../node_modules/@base-ui/react/internals/filter.mjs","../../../../node_modules/@base-ui/react/combobox/root/utils/useFilter.mjs","../../../../node_modules/@base-ui/react/utils/scrollable.mjs","../../../../node_modules/@base-ui/react/combobox/root/utils/constants.mjs","../../../../node_modules/@base-ui/react/combobox/items/itemCollection.mjs","../../../../node_modules/@base-ui/react/combobox/root/AriaCombobox.mjs","../../../../node_modules/@base-ui/react/autocomplete/root/AutocompleteRoot.mjs","../../../../node_modules/@base-ui/react/combobox/input/ComboboxInputDataAttributes.mjs","../../../../node_modules/@base-ui/react/combobox/utils/stateAttributesMapping.mjs","../../../../node_modules/@base-ui/react/combobox/utils/parts.mjs","../../../../node_modules/@base-ui/react/combobox/chips/ComboboxChipsContext.mjs","../../../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositionerContext.mjs","../../../../node_modules/@base-ui/react/combobox/utils/ComboboxInternalDismissButton.mjs","../../../../node_modules/@base-ui/react/combobox/input/ComboboxInput.mjs","../../../../node_modules/@base-ui/react/combobox/collection/GroupCollectionContext.mjs","../../../../node_modules/@base-ui/react/combobox/collection/ComboboxCollection.mjs","../../../../node_modules/@base-ui/react/combobox/list/ComboboxList.mjs","../../../../node_modules/@base-ui/react/combobox/utils/useInitialLiveRegionTextMutation.mjs","../../../../node_modules/@base-ui/react/combobox/portal/ComboboxPortalContext.mjs","../../../../node_modules/@base-ui/react/combobox/portal/ComboboxPortal.mjs","../../../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.mjs","../../../../node_modules/@base-ui/react/combobox/popup/ComboboxPopup.mjs","../../../../node_modules/@base-ui/react/combobox/item/ComboboxItemContext.mjs","../../../../node_modules/@base-ui/react/combobox/row/ComboboxRowContext.mjs","../../../../node_modules/@base-ui/react/combobox/item/ComboboxItem.mjs","../../../../node_modules/@base-ui/react/autocomplete/item/AutocompleteItem.mjs","../../../../node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.mjs","../../../ui/src/Typeahead.tsx","../../../ui/src/DropMenu.tsx","../../../kit/src/client/liveState.ts","../../../engine/src/shared/listQuestion.ts","../../../kit/src/client/copy/lists/components/appListModel.ts","../../../kit/src/client/components/appListModel.ts","../../../kit/src/client/deeplink.js","../../../engine/src/shared/breakdowntext.ts","../../../kit/src/client/url.js","../../../kit/src/client/copy/forms/components/useRecordInsert.ts","../../../kit/src/client/components/useRecordInsert.ts","../../../kit/src/client/recordDrafts.ts","../../../kit/src/client/components/navCounts.ts","../../../kit/src/client/copy/record/insert.ts","../../../kit/src/client/insert.js","../../../../node_modules/@tanstack/store/dist/alien.js","../../../../node_modules/@tanstack/store/dist/atom.js","../../../../node_modules/@tanstack/react-store/dist/useSelector.js"],"sourcesContent":[null,null,"/**\n * The path a shown column's second line reads, or undefined for none. A\n * rule's `subtitle` names a column of the table the value was read from, so\n * `employee_id.name` shown on a timesheet reads `employee_id.title` — the\n * employee's title, never the timesheet's own column of that name. Its own\n * module: the cell draws it (client valueModel.ts) and a list's question\n * fetches it (listQuestion.ts), and a public page's cells carry nothing else.\n */\nexport function subtitlePath(rule: { subtitle?: string } | null | undefined, column: string): string | undefined {\n if (!rule?.subtitle) return undefined;\n const hop = column.lastIndexOf('.');\n return hop < 0 ? rule.subtitle : `${column.slice(0, hop + 1)}${rule.subtitle}`;\n}\n\n/**\n * The path a shown column's lead icon reads its tone from, or undefined for\n * none: like a second line, a column of the table the value was read from.\n */\nexport function leadTonePath(rule: { icon?: { toneOf?: string } } | null | undefined, column: string): string | undefined {\n if (!rule?.icon?.toneOf) return undefined;\n const hop = column.lastIndexOf('.');\n return hop < 0 ? rule.icon.toneOf : `${column.slice(0, hop + 1)}${rule.icon.toneOf}`;\n}\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * Simple conditions, read and written through the real clause machinery.\n *\n * The filter boxes speak in single conditions — `status = open`,\n * `shipped_on is empty` — and this is the one place that reads them out of\n * a query and writes them back in. It sits on clauses.js rather than on\n * regexes of its own, because a second lexer for the language is a mirror\n * that drifts: the first cut of this file missed `last month`, split\n * quoted values on their own words, and orphaned half of an or-group. The\n * clause splitter is quote-aware, paren-aware and between-aware already;\n * everything here is set arithmetic on what it returns.\n *\n * Pure on purpose — imports clauses.js and nothing else — so the grammar\n * these boxes assume is pinned by tests that run in node.\n */\nimport { joinQuery, maskQuoted, splitConditions, splitQuery } from './clauses.js';\n\nexport const squeeze = (text) =>\n String(text ?? '')\n .replace(/\\s+/g, ' ')\n .trim();\n\n/* The texts these helpers take have no leading table name — the list's\n heading already says it — but splitQuery expects one. A throwaway token\n stands in and never comes back out (joinQuery drops the empty table). */\nconst parse = (text) => {\n const parts = splitQuery(`q ${squeeze(text)}`);\n return { parts, conditions: splitConditions(parts.filter) };\n};\n\nconst rebuild = (parts, conditions) => squeeze(joinQuery({ ...parts, table: '', filter: conditions.join(' and ') }));\n\n/** A single outer paren pair says grouping, not meaning; peel it. */\nconst ungroup = (condition) => {\n const text = squeeze(condition);\n if (!text.startsWith('(') || !text.endsWith(')')) return text;\n // Only when the parens are one pair around the whole thing.\n const inner = text.slice(1, -1);\n let depth = 0;\n for (const ch of maskQuoted(inner)) {\n if (ch === '(') depth += 1;\n if (ch === ')') depth -= 1;\n if (depth < 0) return text;\n }\n return squeeze(inner);\n};\n\n/**\n * Does this top-level condition belong to `col`, simply? An or-group is one\n * thing you either want or do not — no box owns half of it, so a column\n * that only appears inside one reads as unset and stays untouched.\n */\nconst owns = (condition, col) => {\n const text = squeeze(condition);\n const lower = text.toLowerCase();\n const name = col.toLowerCase();\n /* A filter that is a whole condition — the rows that point at the record, asked by one of their segments\n (`any opportunity where open`, shared/listFilters.ts) — owns itself, with no tail. */\n if (!(lower === name || lower.startsWith(`${name} `) || lower.startsWith(`${name}=`))) return false;\n if (/\\bor\\b/i.test(maskQuoted(text))) return false;\n return true;\n};\n\n/** The condition tail this text holds for a column — `= open`,\n `= last 30 days`, `contains \"no show\"`, `is empty` — or ''. */\nexport function conditionTail(text, col) {\n const mine = parse(text).conditions.find((condition) => owns(condition, col));\n if (!mine) return '';\n const tail = squeeze(squeeze(mine).slice(col.length));\n if (/^is\\b/i.test(tail)) return tail.toLowerCase();\n if (/^contains\\b/i.test(tail)) return `contains ${squeeze(tail.replace(/^contains/i, ''))}`;\n return tail.replace(/^=\\s*/, '= ');\n}\n\n/**\n * Every owned tail for the column, in order — a two-condition column\n * (`stage != a and stage != b`) is two tails, and a chip that showed only\n * the first was a chip lying by half.\n */\nexport function ownedTails(text, col) {\n return parse(text)\n .conditions.filter((condition) => owns(condition, col))\n .map((condition) => {\n const tail = squeeze(squeeze(condition).slice(col.length));\n if (/^is\\b/i.test(tail)) return tail.toLowerCase();\n if (/^contains\\b/i.test(tail)) return `contains ${squeeze(tail.replace(/^contains/i, ''))}`;\n return tail.replace(/^=\\s*/, '= ');\n });\n}\n\n/** Whether the text holds a condition this column owns: a whole-condition filter's has no tail to read. */\nexport function holdsCondition(text, col) {\n return parse(text).conditions.some((condition) => owns(condition, col));\n}\n\n/** The text with any owned `col …` condition removed, seams sewn up. */\nexport function stripCondition(text, col) {\n const { parts, conditions } = parse(text);\n return rebuild(\n parts,\n conditions.filter((condition) => !owns(condition, col)),\n );\n}\n\n/**\n * The tail that sets a filter which is a whole condition — the rows that\n * point at the record, asked by a segment of theirs (`any opportunity where\n * open`, shared/listFilters.ts) — with nothing after it. A facet hands it to\n * the same `set` every tail goes through, so the rail, a bar's picker and a\n * sheet's draft write it as they write any other.\n */\nexport const WHOLE = '\\u0000whole';\n\n/**\n * The text with this column's condition set, replaced, or ('' tail)\n * removed. `and` binds tighter than `or`, so any surviving or-group is\n * parenthesised first — narrowing it must narrow the whole alternative,\n * not quietly attach to its last arm.\n */\nexport function withCondition(text, col, tail) {\n const said = tail === WHOLE ? col : tail ? `${col} ${tail}` : '';\n const { parts, conditions } = parse(text);\n const kept = conditions.filter((condition) => !owns(condition, col));\n if (!said) return rebuild(parts, kept);\n const wrapped = kept.map((condition) => {\n const bare = squeeze(condition);\n return /\\bor\\b/i.test(maskQuoted(bare)) && ungroup(bare) === bare ? `(${bare})` : bare;\n });\n return rebuild(parts, [...wrapped, said]);\n}\n\n/**\n * One spelling for one question, so two texts that ask the same thing\n * compare equal: whitespace squeezed and redundant outer parens peeled —\n * `(a or b)` and `a or b` are the same alternative.\n */\nexport function canonicalize(text) {\n const { parts, conditions } = parse(text);\n return rebuild(parts, conditions.map(ungroup));\n}\n\n/** Whether the text carries a show clause of its own. Quote-aware: a value\n that merely contains the word does not count. */\nexport const hasShowClause = (text) => Boolean(splitQuery(`q ${squeeze(text)}`).show);\n\n/**\n * Does any condition in the text involve this column — including inside an\n * or-group that no box owns? The guard for \"this tab speaks for that\n * column\", where conditionTail's simple-conditions-only answer was too\n * narrow: a stale box tail folded into an or-group tab ANDed the old tab's\n * state into the new one and showed zero rows.\n */\nexport function mentionsColumn(text, col) {\n const safe = String(col).replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return new RegExp(`(^|[^\\\\w.])${safe}\\\\s*(=|!=|>|<|contains\\\\b|has\\\\b|is\\\\b|between\\\\b)`, 'i').test(maskQuoted(squeeze(text)));\n}\n","/** What prompt says, in the shell room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({});\n","/**\n * A themed replacement for `window.prompt`.\n *\n * The native one cannot be styled at all: it is drawn by the browser, says\n * \"localhost:4111 says\" above whatever you asked, and appears in the system\n * font on the system chrome regardless of the page. It also blocks the main\n * thread, which is why it is the one dialog that cannot animate or be\n * dismissed by clicking away.\n *\n * `<dialog>` gives back everything that matters — modal focus trapping,\n * Escape to close, backdrop — so this only has to supply the shape.\n */\nimport { createElement } from 'react';\nimport { mount, unmount } from './components/mount.js';\nimport { ConfirmDialog, PromptDialog, RangeDialog } from './components/Prompt.js';\nimport { say } from './copy/shell/prompt.js';\nimport { portalRoot } from './shellHost.js';\n\n/** Mount a dialog component on the body and resolve with its one answer. */\nexport function ask(Dialog, props) {\n return new Promise((resolve) => {\n const host = document.createElement('div');\n host.className = 'host-contents';\n portalRoot().append(host);\n mount(\n host,\n createElement(Dialog, {\n ...props,\n onDone: (result) => {\n resolve(result);\n unmount(host);\n host.remove();\n },\n }),\n );\n });\n}\n\n/**\n * One question, one field. Resolves the trimmed answer, or null if cancelled.\n * `date` uses the themed date-only picker; `datetime-local` uses the same\n * calendar for a date and a wall-clock time, answering what the browser's\n * control did (`YYYY-MM-DDTHH:MM`, no zone). Other inputs keep their type.\n * @param {Omit<import('./components/Prompt.js').PromptProps, 'onDone'>} options\n * @returns {Promise<string | null>}\n */\nexport function promptFor({\n title,\n label,\n value = '',\n hint,\n confirmLabel = say('common.save'),\n placeholder,\n type = 'text',\n multiline = false,\n}) {\n return /** @type {Promise<string | null>} */ (\n ask(PromptDialog, { title, label, value, hint, confirmLabel, placeholder, type, multiline })\n );\n}\n\n/**\n * Two values at once, for `between`. A range asked as two separate prompts\n * is two chances to cancel halfway; it is one question, so it is one dialog.\n * Resolves `{ from, to }`, or null if cancelled.\n *\n * @param {Omit<import('./components/Prompt.js').RangeProps, 'onDone'>} options\n * @returns {Promise<{from: string, to: string}|null>}\n */\nexport function promptForRange({ title, fromLabel, toLabel, hint, type = 'text', placeholder }) {\n return ask(RangeDialog, { title, fromLabel, toLabel, hint, type, placeholder });\n}\n\n/** A yes-or-no with the consequence spelled out. Resolves true only on the confirming button.\n * @param {Omit<import('./components/Prompt.js').ConfirmProps, 'onDone'>} options\n */\nexport function confirmFor({ title, body, confirmLabel = 'OK' }) {\n return ask(ConfirmDialog, { title, body, confirmLabel });\n}\n","/** What filterbar says, in the Workbench room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n filtered: 'Filtered',\n copiedPasteTheView: 'Copied. Paste the view into your App\\'s \"views\", its resource into \"resources\", and name the view in \"nav\".',\n copyThisIntoYourApp: 'Copy this into your App',\n listView: 'List view',\n});\n","/**\n * Named filter boxes over a table — one grammar, two modes.\n *\n * The boxes are components (components/FilterBoxes.tsx, drawn by the table\n * room); the rules they share —\n * what kind of box a column deserves, which columns get one, how a tail is\n * spelled and unspelled — live here, with the authoring bridge.\n *\n * A box's state is a condition *tail*: `= open`, `= last 30 days`,\n * `is empty`, or '' for none. Tails rather than bare values, because a\n * column's type decides what a condition even looks like — a flag is\n * true/false, a date is a relative phrase or an emptiness, an enum is its\n * vocabulary — and the tail is the part of the language that carries that.\n */\nimport { findTable, labelColumn, looksLikeDateColumn, quote, state, toast } from './core.js';\nimport { isFlagColumn } from '@mistriwork/engine/shared/schema.js';\n\nimport { conditionTail, squeeze, withCondition } from './conditions.js';\nimport { joinQuery, splitQuery } from './clauses.js';\nimport { promptFor } from './prompt.js';\nimport { humanName } from '@mistriwork/engine/shared/model.js';\nimport { slug } from '@mistriwork/engine/shared/slug.js';\nimport { say } from './copy/workbench/filterbar.js';\n\n/* The condition grammar lives in conditions.js, on the real clause\n splitter — quote-, paren- and between-aware. This module re-exports it\n so the list pages keep one import site. */\nexport {\n canonicalize,\n conditionTail,\n hasShowClause,\n holdsCondition,\n mentionsColumn,\n ownedTails,\n squeeze,\n stripCondition,\n withCondition,\n WHOLE,\n} from './conditions.js';\n\n/** An equality tail for a typed value, through the one quoter the server\n mirrors — an embedded quote written raw terminated the string early and\n could swallow the plumbing clause behind it. */\nexport const equalsTail = (value) => (value ? `= ${quote(value)}` : '');\n\n/* The exact inverse of quote: strip a wrapping quote pair and unescape what\n quote escaped, so a value round-trips box → text → box unchanged. */\nexport const unquote = (value) => {\n const t = value.trim();\n if ((t.startsWith('\"') && t.endsWith('\"') && t.length > 1) || (t.startsWith(\"'\") && t.endsWith(\"'\") && t.length > 1)) {\n return t.slice(1, -1).replace(/\\\\([\"'\\\\])/g, '$1');\n }\n return t;\n};\n\n/** A named integer that is really a yes/no. */\nconst flaggish = (c) => /^(is|has|can|should|was|allow)_/.test(c.name) && /int|bool/i.test(c.type);\n\n/** What kind of box a column deserves: its type decides, not its position. */\nexport function boxKind(meta, tableId) {\n if (!meta) return 'text';\n // A record's tags (tagLists.ts): a checklist of its tags, asked with `has`.\n if (meta.type === 'tags') return 'tags';\n if (meta.allowed?.length) return 'enum';\n if (isFlagColumn(meta) || flaggish(meta)) return 'flag';\n if (looksLikeDateColumn(meta)) return 'date';\n /* A whole single-column reference whose target has a label column gets a\n typeahead: the grid beside the box shows \"Nia Andersen\", and a box that\n demanded her id was the review's \"quietly zero rows\" finding. A member\n of a composite key is half a hop and stays a plain box. */\n /* Not over an API: its filter takes the whole key, and the picker would ask\n the target for names by `contains`, which an API refuses. */\n if (meta.references && tableId && !findTable(tableId)?.filterable) {\n const whole = (state.schema?.foreignKeys ?? []).some(\n (fk) => fk.from.table === tableId && fk.from.columns.length === 1 && fk.from.columns[0] === meta.name,\n );\n const target = whole && findTable(meta.references.table);\n if (target && labelColumn(target)) return 'ref';\n }\n return 'text';\n}\n\n/**\n * Which columns get boxes when nobody chose: the typed ones first — enum\n * vocabularies, flags, dates are what an operational list is filtered by —\n * topped up with leading columns so a table of plain ids and numbers still\n * gets named boxes rather than nothing.\n *\n * A source that can filter only some columns (an API, whose catalog says\n * which in `filterable`) gets boxes for those alone: a box the source would\n * refuse is a control that lies.\n *\n * @param {{ id?: string, filterable?: string[], columns: Array<{name: string, type: string, primaryKey?: boolean, allowed?: string[]}> }} table\n */\nexport function deriveFilterNames(table) {\n const candidates = table.columns.filter((c) => !c.primaryKey && (!table.filterable || table.filterable.includes(c.name)));\n const typed = candidates.filter((c) => boxKind(c, table.id) !== 'text').map((c) => c.name);\n const rest = candidates.filter((c) => !typed.includes(c.name)).map((c) => c.name);\n /* Up to four typed boxes — every enum, flag and date earns its place —\n and leading columns top the row up to three so a table of plain ids\n still gets named boxes rather than nothing. */\n const names = typed.slice(0, 4);\n for (const name of rest) {\n if (names.length >= 3) break;\n names.push(name);\n }\n return names;\n}\n\n/* The relative windows people actually ask operational questions in. The\n phrases are the language's own — unquoted on purpose. */\nexport const DATE_OPTIONS = [\n ['today', '= today'],\n ['last 7 days', '= last 7 days'],\n ['last 30 days', '= last 30 days'],\n ['this month', '= this month'],\n ['this year', '= this year'],\n ['next 30 days', '= next 30 days'],\n ['empty', 'is empty'],\n ['not empty', 'is not empty'],\n];\n\n/**\n * The list on screen, spelled as an App list view — the authoring bridge:\n * refine any list in the workbench, copy, paste into an App.\n *\n * The pieces map exactly: the show clause becomes the view's `show`, the\n * conditions and sort become a tab beside \"All\", and the table goes by name\n * so the view travels between connections the way a manifest should. A\n * column the grammar renamed with `as` keeps its words as the resource's\n * caption (`resources.<table>.labels`), which is where an App says what a\n * column is called. The same contract as the page builder's Copy layout:\n * what this emits, the parser reads.\n * @param {{ table: string, query?: string }} entry\n * @param {string} tableName\n */\nexport function listViewFragment(entry, tableName) {\n const parts = splitQuery(squeeze(entry.query ?? ''));\n const show = (parts.show ?? '').replace(/^show\\s+/i, '');\n const query = squeeze(joinQuery({ table: '', filter: parts.filter }));\n const sort = (parts.sort ?? '').replace(/^(sort|order\\s+by)\\s+/i, '').trim();\n const columns = [];\n /** @type {Record<string, string>} */\n const labels = {};\n for (const piece of show\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean)) {\n const m = /^(.*?)\\s+as\\s+(.+)$/i.exec(piece);\n const column = m ? m[1].trim() : piece;\n columns.push(column);\n if (m) labels[column] = m[2].trim();\n }\n /* The question is a segment the resource declares and the list's first tab names, All after it, as the\n scaffold writes one (a tab says no query of its own); a sort alone is the list's own. */\n const label = say('filtered');\n const segment = query ? { filtered: label === humanName('filtered') ? query : { query, label } } : undefined;\n const view = {\n kind: 'list',\n from: tableName,\n ...(columns.length ? { show: columns } : {}),\n ...(segment ? { tabs: [sort ? { segment: 'filtered', sort } : 'filtered', { label: say('common.all') }] } : sort ? { sort } : {}),\n };\n const resource = { ...(Object.keys(labels).length ? { labels } : {}), ...(segment ? { segments: segment } : {}) };\n return {\n views: { [slug(tableName, 'list').slice(0, 64)]: view },\n /* A view shows a declared resource, so the resource comes with it. */\n resources: { [tableName]: resource },\n };\n}\n\nexport async function copyListView(entry) {\n const table = findTable(entry.table);\n const text = JSON.stringify(listViewFragment(entry, table?.name ?? entry.table), null, 2);\n try {\n await navigator.clipboard.writeText(text);\n toast(say('copiedPasteTheView'), 'ok');\n } catch {\n /* Clipboard access can be refused; the text is the point. */\n await promptFor({ title: say('copyThisIntoYourApp'), label: say('listView'), value: text, multiline: true });\n }\n}\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * A box you type into and a list that answers, over Base UI's Autocomplete.\n *\n * Three surfaces here are this shape — the record picker, the table picker\n * on the diagram, the reference filter box — and each walked its own list\n * with arrow keys, placed it by hand and closed it on a blur timer. Base UI\n * owns that now: the combobox roles, arrows and Home/End, Enter on the\n * highlighted row, Tab and a click outside to leave, the first row lit as\n * you type. The caller ranks and fetches the items — `filteredItems` says\n * the list is already the answer — draws each row in its own classes, and\n * hears one `onPick`.\n *\n * The text is the caller's: Base UI is told the item's label to fill the\n * box with on a pick, and that fill is ignored here, so a picker that wants\n * the box emptied (a multi-select) or named (a single one) decides itself.\n * Escape closes only this layer, stopped, so the panel underneath does not\n * take the same key. The list is anchored on the zoom-aware ruler, fixed\n * to the viewport so a scrolling drawer cannot clip it, and drawn inside\n * the enclosing dialog when there is one.\n */\nimport { useEffect, useLayoutEffect, useRef, useState, type InputHTMLAttributes, type ReactNode, type Ref, type RefObject } from 'react';\nimport { Autocomplete } from '@base-ui/react/autocomplete';\nimport { viewportBox } from './internal/ruler.js';\nimport { layoutViewport, zoomAnchor } from './internal/anchor.js';\nimport { popupContainer } from './internal/popups.js';\n\ninterface TypeaheadProps<T> {\n text: string;\n onText: (text: string) => void;\n /** Already ranked and bounded; drawn in this order. */\n items: T[];\n itemKey: (item: T) => string;\n itemLabel: (item: T) => string;\n itemClassName: (item: T, highlighted: boolean) => string;\n renderItem: (item: T) => ReactNode;\n onPick: (item: T) => void;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** The `<input>`'s own attributes — class, label, placeholder, title, the caller's keys. */\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n inputRef?: Ref<HTMLInputElement>;\n /** The actual popup, including when it is portalled outside the input's parent. */\n popupRef?: Ref<HTMLDivElement>;\n /** The element the list is sized and placed against; the input by default. */\n anchorRef?: RefObject<HTMLElement | null>;\n /** `width` matches the anchor exactly; `min-width` lets a long name widen the list. */\n fit?: 'width' | 'min-width';\n popupClassName: string;\n listClassName: string;\n /** Shown in the list when nothing matches; nothing at all when omitted. */\n empty?: ReactNode;\n emptyClassName?: string;\n /**\n * Where the list is drawn: inside the enclosing dialog (the default), or\n * the body. A popover is a dialog too, but its positioner is placed by a\n * transform, which makes it the containing block of a fixed list inside\n * it — measured there on the unzoomed ruler, the list landed a zoom's\n * worth away from its box. Drawn to the body, Base UI's floating tree\n * still counts the list as the popover's, so a pick does not dismiss it.\n */\n portal?: 'dialog' | 'body';\n /** Light the first row as the reader types (the default), or nothing until they arrow in: a search box's Enter is its own. */\n autoHighlight?: boolean;\n /** Hears the row lit by the keys or the pointer, and undefined when none is. */\n onHighlight?: (item: T | undefined) => void;\n}\n\nexport function Typeahead<T>({\n text,\n onText,\n items,\n itemKey,\n itemLabel,\n itemClassName,\n renderItem,\n onPick,\n open,\n onOpenChange,\n inputProps,\n inputRef,\n popupRef,\n anchorRef,\n fit = 'min-width',\n popupClassName,\n listClassName,\n empty,\n emptyClassName,\n portal = 'dialog',\n autoHighlight = true,\n onHighlight,\n}: TypeaheadProps<T>) {\n const input = useRef<HTMLInputElement | null>(null);\n const [container, setContainer] = useState<HTMLElement | null>(null);\n useEffect(() => {\n setContainer(portal === 'body' ? null : (input.current?.closest('dialog, [role=\"dialog\"]') as HTMLElement | null));\n }, [portal]);\n /* A fixed-fit list takes its width from the anchor alone. Base UI's\n --anchor-width is recomputed on every positioner update, snapped against\n the anchor's position, so a list growing as its options arrived flipped\n between two widths inside one ResizeObserver frame (\"loop completed with\n undelivered notifications\"). Measured here on the house ruler, and again\n only when the anchor itself resizes, the list's own size cannot move it. */\n const [anchorWidth, setAnchorWidth] = useState<number | null>(null);\n useLayoutEffect(() => {\n const anchor = anchorRef?.current ?? input.current;\n if (!open || fit !== 'width' || !anchor) return;\n const measure = () => {\n const width = (viewportBox(anchor) as { width: number }).width;\n setAnchorWidth(width > 0 ? width : null);\n };\n measure();\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(anchor);\n return () => observer.disconnect();\n }, [open, fit, anchorRef]);\n const setInput = (node: HTMLInputElement | null) => {\n input.current = node;\n if (typeof inputRef === 'function') inputRef(node);\n else if (inputRef) (inputRef as { current: HTMLInputElement | null }).current = node;\n };\n const { onKeyDown, onFocus, ...rest } = inputProps;\n return (\n <Autocomplete.Root\n items={items}\n filteredItems={items}\n itemToStringValue={itemLabel}\n value={text}\n onValueChange={(next, details) => {\n // Selection fills the input too; it is not a new search or a cleared key.\n if (details.reason !== 'item-press') onText(String(next ?? ''));\n }}\n open={open}\n onOpenChange={onOpenChange}\n openOnInputClick\n autoHighlight={autoHighlight}\n onItemHighlighted={onHighlight && ((item) => onHighlight(item))}\n >\n <Autocomplete.Input\n {...rest}\n ref={setInput}\n onFocus={onFocus}\n onKeyDown={(e) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n /* Only this layer: a drawer under the list listens for Escape too. */\n if (e.key === 'Escape' && open) {\n e.preventDefault();\n e.stopPropagation();\n onOpenChange(false);\n }\n }}\n />\n <Autocomplete.Portal container={container ?? popupContainer()}>\n <Autocomplete.Positioner\n anchor={() => {\n const el = anchorRef?.current ?? input.current;\n return el ? zoomAnchor(el) : null;\n }}\n positionMethod=\"fixed\"\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n collisionBoundary={layoutViewport()}\n collisionPadding={8}\n style={{\n zIndex: 40,\n // Fixed-fit lists size the observed positioner itself; the child\n // should not determine its intrinsic width while options arrive.\n ...(fit === 'width'\n ? { width: anchorWidth === null ? 'var(--anchor-width)' : `${anchorWidth}px`, maxWidth: 'var(--available-width)' }\n : {}),\n }}\n >\n <Autocomplete.Popup\n ref={popupRef}\n className={popupClassName}\n style={{\n ...(fit === 'width' ? { width: '100%' } : { minWidth: 'var(--anchor-width)', maxWidth: 'var(--available-width)' }),\n }}\n >\n <Autocomplete.List className={listClassName}>\n {empty !== undefined ? <Autocomplete.Empty className={emptyClassName}>{empty}</Autocomplete.Empty> : null}\n {items.map((item) => (\n <Autocomplete.Item\n key={itemKey(item)}\n value={item}\n className={(s) => itemClassName(item, s.highlighted)}\n onClick={() => onPick(item)}\n >\n {renderItem(item)}\n </Autocomplete.Item>\n ))}\n </Autocomplete.List>\n </Autocomplete.Popup>\n </Autocomplete.Positioner>\n </Autocomplete.Portal>\n </Autocomplete.Root>\n );\n}\n","/**\n * A button that opens a menu, over Base UI's Menu — what the `<details>`\n * menus here did with a summary and a hook (react to a click, close on\n * Escape or a click outside, hand focus back), plus what they never did:\n * arrows between the items, Home and End, typeahead, and the roles a\n * screen reader expects of a menu.\n *\n * The wrapper keeps the caller's class (`export`, `pb-picker`) because the\n * stylesheet places the control by it; the trigger and the popup wear the\n * classes the summary and the panel wore. The popup is anchored on the\n * zoom-aware ruler (anchor.ts) and fixed to the viewport, so a scrolling\n * panel cannot clip it. The open state can be the caller's, for a menu\n * that has to stay up while a click inside it fetches.\n */\nimport { useEffect, useRef, useState, type ReactNode, type Ref } from 'react';\nimport { Menu } from '@base-ui/react/menu';\nimport { layoutViewport, zoomAnchor } from './internal/anchor.js';\nimport { popupContainer } from './internal/popups.js';\nimport { buttonClass } from './Button.js';\n\ninterface DropMenuProps {\n /** The wrapper's class — where the stylesheet places the control. */\n className?: string;\n /** The trigger's classes; a secondary button's by default. */\n triggerClassName?: string;\n triggerTitle?: string;\n /** The trigger's accessible name, when its visible label is shared with another menu on the page. */\n triggerLabel?: string;\n label: ReactNode;\n /** The popup's classes; the house listbox surface (`dd-list`) by default. */\n popupClassName?: string;\n side?: 'top' | 'bottom';\n align?: 'start' | 'end';\n sideOffset?: number;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Where the focus goes when the menu closes; absent, back to the trigger. */\n finalFocus?: Menu.Popup.Props['finalFocus'];\n children: ReactNode;\n}\n\nexport function DropMenu({\n className,\n triggerClassName = buttonClass(),\n triggerTitle,\n triggerLabel,\n label,\n popupClassName = 'dd-list',\n side = 'bottom',\n align = 'end',\n sideOffset = 4,\n open,\n onOpenChange,\n finalFocus,\n children,\n}: DropMenuProps) {\n const trigger = useRef<HTMLButtonElement>(null);\n /* Inside a dialog the popup is drawn into that dialog, so it shares its\n stacking context rather than landing behind it; elsewhere it goes to\n the body the way every floating surface here does. */\n const [container, setContainer] = useState<HTMLElement | null>(null);\n useEffect(() => {\n setContainer(trigger.current?.closest('dialog, [role=\"dialog\"]') as HTMLElement | null);\n }, []);\n const [own, setOwn] = useState(false);\n const isOpen = open ?? own;\n const change = (next: boolean, details: Menu.Root.ChangeEventDetails) => {\n // Return focus before unmount so a containing dialog does not reclaim it — unless the caller says where it goes.\n if (!next && details.reason === 'escape-key' && finalFocus === undefined) trigger.current?.focus({ preventScroll: true });\n setOwn(next);\n onOpenChange?.(next);\n };\n return (\n <div className={className || undefined}>\n <Menu.Root open={isOpen} onOpenChange={change}>\n <Menu.Trigger\n render={<button type=\"button\" className={triggerClassName} title={triggerTitle} aria-label={triggerLabel} ref={trigger} />}\n >\n {label}\n </Menu.Trigger>\n <Menu.Portal container={container ?? popupContainer()}>\n <Menu.Positioner\n anchor={() => (trigger.current ? zoomAnchor(trigger.current) : null)}\n positionMethod=\"fixed\"\n side={side}\n align={align}\n sideOffset={sideOffset}\n collisionBoundary={layoutViewport()}\n collisionPadding={8}\n style={{ zIndex: 90 }}\n >\n <Menu.Popup className={popupClassName} finalFocus={finalFocus}>\n {children}\n </Menu.Popup>\n </Menu.Positioner>\n </Menu.Portal>\n </Menu.Root>\n </div>\n );\n}\n\n/** A labelled run of items: a menu that changes several things says which each item changes. */\nexport function DropGroup({\n className,\n labelClassName,\n label,\n children,\n}: {\n className?: string;\n labelClassName?: string;\n label: string;\n children: ReactNode;\n}) {\n return (\n <Menu.Group className={className}>\n <Menu.GroupLabel className={labelClassName}>{label}</Menu.GroupLabel>\n {children}\n </Menu.Group>\n );\n}\n\n/** A rule between two runs of items, a separator to a screen reader. */\nexport function DropSeparator({ className = 'dd-divider' }: { className?: string }) {\n return <Menu.Separator className={className} />;\n}\n\n/** An item drawn as a button, so `disabled` and the button styles hold. Closes the menu unless told not to. */\nexport function DropItem({\n className = 'dd-option',\n disabled,\n closeOnClick,\n onClick,\n title,\n children,\n ref,\n}: {\n className?: string;\n disabled?: boolean;\n closeOnClick?: boolean;\n onClick: () => void;\n title?: string;\n children: ReactNode;\n ref?: Ref<HTMLButtonElement>;\n}) {\n return (\n <Menu.Item\n render={<button type=\"button\" className={className} title={title} ref={ref} />}\n nativeButton\n disabled={disabled}\n closeOnClick={closeOnClick}\n onClick={onClick}\n >\n {children}\n </Menu.Item>\n );\n}\n","/**\n * What live sync tells the components, and what they tell it.\n *\n * The stream, the rules and the screens that draw a notice are a part of\n * their own (liveSync.ts, loaded when an App is shown); a list, a record and\n * a grid need only this, which is small: a row that another person changed\n * (`useChangedRows`), a list that is held while its reader works in it\n * (`useListHold`), a record that changed under an open draft, and the last\n * time a record changed. Nothing here fetches.\n */\nimport { useEffect, useMemo, useRef, useSyncExternalStore } from 'react';\nimport { canonicalText } from '@mistriwork/engine/shared/recordReadKeys.js';\n\n/** A key as text. A number and its string are one key: an id past 2^53 is a string on the wire, and a number in a query's key. */\nexport const liveKeyText = (key: Readonly<Record<string, unknown>>): string =>\n canonicalText(Object.fromEntries(Object.entries(key).map(([column, value]) => [column, value == null ? null : String(value)])));\n\nfunction store<T>(initial: T) {\n let value = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => value,\n set(next: T) {\n if (Object.is(next, value)) return;\n value = next;\n for (const listener of [...listeners]) listener();\n },\n subscribe(listener: () => void) {\n listeners.add(listener);\n return () => void listeners.delete(listener);\n },\n };\n}\n\n/* ---------- whether the page follows changes at all ---------- */\n\nconst active = store(false);\n/* The App's tables that stay out of live sync (a resource's `live: false`), as `hello` names them: never followed. */\nconst off = store<ReadonlySet<string>>(new Set());\nexport const setLiveActive = (on: boolean): void => active.set(on);\n/** Whether the page follows changes now, outside React (a query's refetch interval asks it), and, given a table, its. */\nexport const liveFollowing = (table?: string): boolean => active.get() && !(table !== undefined && off.get().has(table));\nexport const setLiveOff = (tables: readonly string[]): void => off.set(new Set(tables));\n/** Whether the page follows changes, and, given a table, whether it follows that table's. */\nexport const useLiveActive = (table?: string): boolean => {\n const on = useSyncExternalStore(active.subscribe, active.get, active.get);\n const kept = useSyncExternalStore(off.subscribe, off.get, off.get);\n return on && !(table !== undefined && kept.has(table));\n};\n\n/* ---------- rows another person changed ---------- */\n\n/** A change just announced: per table, the keys (as text) it named, or every key. */\ninterface Pulse {\n readonly id: number;\n readonly at: number;\n readonly tables: ReadonlyMap<string, ReadonlySet<string> | 'many'>;\n}\n/** How long after a change an answer still counts as its answer: a refetch waits for the rate limit (liveInvalidate.ts) and the network. */\nconst PULSE_LIFE = 8_000;\nlet pulse: Pulse | undefined;\nexport const announcePulse = (next: Pulse): void => {\n pulse = next;\n};\n\nconst NONE: ReadonlyMap<unknown, 1 | 2> = new Map();\n\n/**\n * The rows of an answer that differ from the answer before it, while a change to their table has just been announced:\n * each row to which of two alternating tints it wears, so a row changed twice in a row restarts its fade. Judged once\n * for each answer (by identity) against the answer before it. The first answer a list has tints nothing, and neither\n * does a row no change named (a page turned to, a sort), since only the keys a change named can. A list that draws a\n * new array of the same rows (a board gathers its lanes on each render) keeps the tint that change gave them, so the\n * fade is not cut short by a render that changed nothing.\n */\nexport function useChangedRows<R extends object>(\n table: string | undefined,\n rows: readonly R[] | undefined,\n keyOf: (row: R) => Readonly<Record<string, unknown>> | null | undefined,\n): ReadonlyMap<R, 1 | 2> {\n const memo = useRef<\n { rows: unknown; changed: ReadonlyMap<R, 1 | 2>; seen: ReadonlyMap<string, string>; tinted: ReadonlyMap<string, number> } | undefined\n >(undefined);\n if (!rows || !table) return NONE as ReadonlyMap<R, 1 | 2>;\n if (memo.current?.rows === rows) return memo.current.changed;\n const seen = new Map<string, string>();\n const changed = new Map<R, 1 | 2>();\n /* Each tinted key, by the change that tinted it. */\n const tinted = new Map<string, number>();\n const fresh = pulse && Date.now() - pulse.at < PULSE_LIFE ? pulse : undefined;\n const named = fresh?.tables.get(table);\n for (const row of rows) {\n const key = keyOf(row);\n if (!key) continue;\n const text = liveKeyText(key);\n const signature = JSON.stringify(row);\n seen.set(text, signature);\n const before = memo.current?.seen.get(text);\n const differs = named && memo.current && (named === 'many' || named.has(text)) && before !== signature;\n const kept = fresh && before === signature && memo.current?.tinted.get(text) === fresh.id;\n if (differs || kept) {\n changed.set(row, (fresh!.id % 2 ? 1 : 2) as 1 | 2);\n tinted.set(text, fresh!.id);\n }\n }\n memo.current = { rows, changed: changed.size ? changed : (NONE as ReadonlyMap<R, 1 | 2>), seen, tinted };\n return memo.current.changed;\n}\n\n/* ---------- a list that holds still while its reader works in it ---------- */\n\n/**\n * A list on screen that live sync may hold: what it reads, and the changes it has been told of and not shown. The\n * engagement rules (liveEngagement.ts) decide whether it is held; the invalidation (liveInvalidate.ts) asks.\n */\nexport interface Hold {\n readonly table: string;\n owns(queryKey: readonly unknown[]): boolean;\n /** Queries to ask again when the list is shown, by hash. */\n readonly queries: Set<string>;\n /** Distinct keys changed since the hold began; 'many' once any change named none. */\n keys: Set<string> | 'many';\n count(): number | 'many';\n}\nconst holds = new Set<Hold>();\n/** The lists holding changes the reader has not been shown. */\nexport const heldHolds = (): Hold[] => [...holds].filter((hold) => hold.queries.size > 0);\nexport const holdFor = (queryKey: readonly unknown[]): Hold | undefined => [...holds].find((hold) => hold.owns(queryKey));\n\n/** Whether the reader is working in a list now (set by liveEngagement.ts). */\nlet engaged: () => boolean = () => false;\nexport const setEngagement = (test: () => boolean): void => {\n engaged = test;\n};\nexport const isEngaged = (): boolean => engaged();\n\n/** Asked ones the hold has kept, to show them (set by liveInvalidate.ts). */\nlet release: (hold: Hold) => void = () => {};\nexport const setHoldRelease = (fn: (hold: Hold) => void): void => {\n release = fn;\n};\nconst releaseHold = (hold: Hold): void => release(hold);\n\nconst holdSignals = store(0);\nexport const heldChanged = (): void => holdSignals.set(holdSignals.get() + 1);\nexport const clearHold = (hold: Hold): void => {\n hold.queries.clear();\n hold.keys = new Set();\n heldChanged();\n};\n\n/**\n * Register a list as one live sync may hold, while it is on screen and the page follows changes. Returns the number of\n * changes it holds (0 when none), and a way to show them.\n */\nexport function useListHold(spec: { table: string; owns: (queryKey: readonly unknown[]) => boolean } | undefined): {\n held: number | 'many';\n show(): void;\n} {\n const on = useLiveActive(spec?.table);\n const owns = useRef(spec?.owns);\n owns.current = spec?.owns;\n const table = spec?.table;\n const hold = useMemo<Hold | undefined>(\n () =>\n on && table\n ? {\n table,\n queries: new Set(),\n keys: new Set(),\n owns: (queryKey) => owns.current?.(queryKey) ?? false,\n count() {\n return this.keys === 'many' ? 'many' : this.keys.size;\n },\n }\n : undefined,\n [on, table],\n );\n useEffect(() => {\n if (!hold) return;\n holds.add(hold);\n return () => void holds.delete(hold);\n }, [hold]);\n useSyncExternalStore(holdSignals.subscribe, holdSignals.get, holdSignals.get);\n return { held: hold?.count() ?? 0, show: () => hold && releaseHold(hold) };\n}\n\n/* ---------- a record that changed under an open draft ---------- */\n\ninterface EditNotice {\n readonly table: string;\n readonly key: string;\n readonly kind: 'update' | 'delete';\n /** The reader's own write, in another tab. */\n readonly self: boolean;\n /** When it was said: each change is its own, and who made it is asked again for each (LiveNotices.tsx). */\n readonly at: number;\n}\nconst notices = store<ReadonlyMap<string, EditNotice>>(new Map());\nconst noticeId = (table: string, key: string) => `${table}|${key}`;\nexport function raiseEditNotice(raised: Omit<EditNotice, 'at'> & { at?: number }): void {\n const notice: EditNotice = { ...raised, at: raised.at ?? Date.now() };\n const next = new Map(notices.get());\n const id = noticeId(notice.table, notice.key);\n // A delete is the last word on a record.\n if (next.get(id)?.kind === 'delete' && notice.kind !== 'delete') return;\n next.set(id, notice);\n notices.set(next);\n}\nexport function dismissEditNotice(table: string, key: string): void {\n const next = new Map(notices.get());\n if (next.delete(noticeId(table, key))) notices.set(next);\n}\n/** Whether the record's own draft is open over this record (set by liveInvalidate.ts, which reads write.js). */\nlet drafted: (table: string, key: string) => boolean = () => false;\nexport const setDraftedTest = (test: (table: string, key: string) => boolean): void => {\n drafted = test;\n};\n/** A form that raised a notice closes: the notice goes with it, unless the record's draft still owns it. */\nexport function releaseEditNotice(table: string, key: string): void {\n if (!drafted(table, key)) dismissEditNotice(table, key);\n}\nexport const useEditNotice = (table: string, key: string): EditNotice | undefined => {\n const read = () => notices.get().get(noticeId(table, key));\n return useSyncExternalStore(notices.subscribe, read, read);\n};\n\n/* ---------- when a record last changed ---------- */\n\ninterface RecentChange {\n readonly at: number;\n readonly self: boolean;\n}\nconst recents = store<ReadonlyMap<string, RecentChange>>(new Map());\nconst RECENTS_MOST = 500;\nexport function noteRecentChanges(table: string, keys: Iterable<string>, self: boolean, at = Date.now()): void {\n const next = new Map(recents.get());\n for (const key of keys) {\n next.delete(noticeId(table, key));\n next.set(noticeId(table, key), { at, self });\n }\n while (next.size > RECENTS_MOST) next.delete(next.keys().next().value!);\n recents.set(next);\n}\n/* Read by the record's own id, so a page re-draws for a change to its record and not for every change. */\nexport const useRecentChange = (table: string, key: string): RecentChange | undefined => {\n const read = () => recents.get().get(noticeId(table, key));\n return useSyncExternalStore(recents.subscribe, read, read);\n};\n\n/** Forget everything, as the page does when its session or connection changes. */\nexport function resetLiveState(): void {\n pulse = undefined;\n off.set(new Set());\n holds.clear();\n notices.set(new Map());\n recents.set(new Map());\n}\n\n/* ---------- forms that hold something typed ---------- */\n\n/** A form with input a change must not overwrite, other than the record draft (write.js): a command form on a record. */\nexport interface Editing {\n readonly table: string;\n readonly key: Readonly<Record<string, unknown>>;\n}\n/* Each open form's own reading of what it holds: nothing while it is untouched (its starting values may still follow\n the record), the records it acts on once something is typed. */\nconst editing = new Set<() => Editing | readonly Editing[] | undefined>();\nexport const editingRecords = (): Editing[] => [...editing].flatMap((read) => read() ?? []);\n/**\n * Register a form holding typed input: while `read` names a record, a change to it is not read over the form (its\n * record, its fields, its prepared starting values) and raises the notice instead (liveInvalidate.ts). Returns the\n * way to let go, which the form calls when it closes.\n */\nexport function registerEditing(read: () => Editing | readonly Editing[] | undefined): () => void {\n editing.add(read);\n return () => void editing.delete(read);\n}\n","/**\n * The question an App's list asks, as its first page sends it: the table,\n * the view's standing condition and a tab's, the order the view keeps, and\n * the plumbing — the show clause that fetches its columns, the names its\n * references are read by, the keys a row needs to open, its page size.\n *\n * The client's list builds its question by these rules\n * (client/components/appListModel.ts), and the server builds a first page's\n * the same way (server/http/firstPaintRooms.ts) so the answer it carries in\n * the page is the answer to the request the list then makes. One rule on\n * both sides: a copy would drift, and a drifted copy is a request the page\n * did not carry.\n */\nimport { andQuery } from './query.js';\nimport { splitQuery } from './clauses.js';\nimport { listPresentationColumns } from './appListColumns.js';\nimport { findTable, labelPath, primaryKey, type DatabaseSchema, type TableMeta } from './schema.js';\nimport { referenceProjection } from './referenceModel.js';\nimport { tableAtPrefix } from './viewPaths.js';\nimport type { ServedResource } from './servedApp.js';\nimport type { AppListEmpty, AppListPresentation } from './listPresentations.js';\nimport { leadTonePath, subtitlePath } from './subtitlePath.js';\nimport { currencyPath } from './money.js';\n\n/** What a list's question is read over: the schema, and the App's resources — their record labels and display rules. */\nexport interface ListRules {\n readonly schema: DatabaseSchema;\n readonly resources: Readonly<Record<string, Pick<ServedResource, 'recordLabel' | 'display'>>>;\n}\n\n/** One of a list's tabs: its label and the condition it adds. */\nexport interface ListTab {\n label: string;\n query?: string;\n /** Its word in an address where the label is said in another language (addressParams.ts `tabKey`). */\n slug?: string;\n /** What it says while it holds no row and nothing narrows it past its own condition. */\n empty?: AppListEmpty;\n}\n\n/** What of a list view its question is made from. */\nexport interface ListQuestionSpec {\n table: string;\n query?: string;\n tabs?: ListTab[];\n show?: string[];\n presentation?: AppListPresentation;\n sort?: string;\n order?: string;\n limit?: number;\n editable?: true | string[];\n /** The reference column whose record a row opens (a view's `opens`): fetched, as the row's key is, to open it. */\n opens?: string;\n}\n\nconst squeeze = (text: unknown): string =>\n String(text ?? '')\n .replace(/\\s+/g, ' ')\n .trim();\n\nconst resource = (rules: ListRules, tableId: string) => (Object.hasOwn(rules.resources, tableId) ? rules.resources[tableId] : undefined);\n\n/** A table's record label, where its resource names one (false: a projection that withholds it). */\nconst recordLabelOf = (rules: ListRules, table: TableMeta): string | false | undefined => resource(rules, table.id)?.recordLabel;\n\n/** Where a row's name lives, as a view path (schema.ts labelPath), by the App's record label. */\nconst labelPathOf = (rules: ListRules, table: TableMeta): string | undefined => labelPath(rules.schema, table, recordLabelOf(rules, table));\n\n/**\n * The references among a list's columns, each with the path its record's\n * name is read from: `partner_id` → `partner_id.code` where the partner's\n * resource says `recordLabel: 'code'`, else the name the record page would\n * give it. A target with nothing better than its key keeps the key.\n */\nexport function referenceNames(rules: ListRules, tableId: string, names: readonly string[]): Record<string, string> {\n const base = findTable(rules.schema, tableId);\n if (!base) return {};\n const naming = (target: TableMeta) => {\n const path = labelPathOf(rules, target);\n return path && !primaryKey(target).includes(path) ? path : undefined;\n };\n return Object.fromEntries(referenceProjection(rules.schema, base, names, true, naming).labels);\n}\n\n/** The columns a shown column's second line reads: fetched with the row, drawn under it. */\nexport function subtitleColumns(rules: ListRules, tableId: string, shown: readonly string[]): string[] {\n return [\n ...new Set(\n shown.flatMap((name) => {\n /* A dotted column wears the rule of the table it was read from, and its\n second line is read from that table too. */\n const hop = name.lastIndexOf('.');\n const owner = hop < 0 ? tableId : tableAtPrefix(rules.schema, tableId, name.slice(0, hop))?.id;\n const rule = owner ? resource(rules, owner)?.display?.[name.slice(hop + 1)] : undefined;\n /* A lead icon's tone is read with the row too: a failed run's square says so without a second column. */\n return [\n subtitlePath(rule as { subtitle?: string } | undefined, name),\n leadTonePath(rule as { icon?: { toneOf?: string } }, name),\n /* A money column whose currency is each row's own reads that code with it. */\n currencyPath(rule as { currencyColumn?: string } | undefined, name),\n ].filter((path): path is string => path !== undefined);\n }),\n ),\n ];\n}\n\n/** The references an editable list shows by name (`owner_id.name`): their keys ride along\n with the row, so a cell edits the reference and says what it replaces. */\nexport function editedReferences(rules: ListRules, spec: Pick<ListQuestionSpec, 'table' | 'show' | 'editable' | 'presentation'>): string[] {\n const t = findTable(rules.schema, spec.table);\n if (!t || !spec.editable || spec.presentation) return [];\n return [\n ...new Set(\n (spec.show ?? []).flatMap((name) => {\n const hop = name.indexOf('.');\n const head = name.slice(0, hop);\n return hop > 0 &&\n name.indexOf('.', hop + 1) < 0 &&\n (spec.editable === true || spec.editable!.includes(head)) &&\n t.columns.some((column) => column.name === head && column.references)\n ? [head]\n : [];\n }),\n ),\n ];\n}\n\n/** The references a list draws — its `show`, its presentation's columns, or every column — by the path each is named from (referenceNames). */\nexport function listReferenceNames(\n rules: ListRules,\n spec: Pick<ListQuestionSpec, 'table' | 'show' | 'presentation'>,\n): Record<string, string> {\n const t = findTable(rules.schema, spec.table);\n if (!t) return {};\n const drawn = [...(spec.show ?? []), ...(spec.presentation ? listPresentationColumns(spec.presentation) : [])];\n return referenceNames(rules, spec.table, drawn.length ? drawn : t.columns.map((column) => column.name));\n}\n\n/** The show clause that fetches the app's columns plus the keys a row needs to open.\n A presentation names the columns it draws, so a view of cards needs no `show`. */\nexport function showClause(rules: ListRules, spec: ListQuestionSpec): string {\n const t = findTable(rules.schema, spec.table);\n const names = spec.show ?? [];\n const listNames = spec.presentation ? listPresentationColumns(spec.presentation) : [];\n if (!t) return '';\n const naming = recordLabelOf(rules, t) === undefined ? undefined : labelPathOf(rules, t);\n const named = Object.values(listReferenceNames(rules, spec));\n if (!names.length && !listNames.length && !naming && !named.length) return '';\n const shown = names.length || listNames.length ? names : t.columns.map((column) => column.name);\n return `show ${[\n ...new Set([\n ...shown,\n ...listNames,\n ...(naming ? [naming] : []),\n ...named,\n ...(spec.order ? [spec.order] : []),\n ...subtitleColumns(rules, spec.table, names),\n ...editedReferences(rules, spec),\n ...(spec.opens ? [spec.opens] : []),\n ...primaryKey(t),\n ]),\n ].join(', ')}`;\n}\n\n/* The authored page size, as the question writes it after the show clause. */\nexport const limitClause = (spec: Pick<ListQuestionSpec, 'limit'>): string => (spec.limit ? `limit ${spec.limit}` : '');\n\n/* A view's hand order is plumbing too: \"sort position\" is how the list is\n kept, not a sort anyone chose, so it is asked wherever nothing else sorts\n the question — a tab's own sort, a header's, the reader's own win — and\n folded out of what the bar shows. A view's default `sort` is the same\n reading, said in the query bar's words. */\nexport const orderClause = (spec: Pick<ListQuestionSpec, 'order' | 'sort'>): string =>\n spec.order ? `sort ${spec.order}` : spec.sort ? `sort ${spec.sort}` : '';\n\nexport function withOrder(spec: Pick<ListQuestionSpec, 'table' | 'order' | 'sort'>, question: string): string {\n const order = orderClause(spec);\n return order && !splitQuery(`${spec.table} ${question}`).sort ? squeeze(`${question} ${order}`) : question;\n}\n\n/** The full query text one of the app's tabs stands for. A module's\n standing conditions come first; a tab refines on top of them. */\nexport function appListQuery(rules: ListRules, spec: ListQuestionSpec, index = 0): string {\n const tab: Partial<ListTab> = (spec.tabs?.length ? spec.tabs : [{}])[index] ?? {};\n const where = withOrder(spec, andQuery(spec.query, tab.query) ?? '');\n return [spec.table, where, showClause(rules, spec), limitClause(spec)].filter(Boolean).join(' ');\n}\n","/** What appListModel says, in the lists and grid room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../../messages.js';\n\nexport const say = defineMessages({\n filtersCount: { one: '{count} filter', other: '{count} filters' },\n});\n","/**\n * What an app's list page is, before anything is drawn.\n *\n * Which spec dresses a table, the query text each tab stands for, which\n * tab a query text *is*, what the breadcrumb calls it, and how the app's\n * plumbing (the show clause that fetches its columns and the keys a row\n * needs to open) is folded out of the visible question and back in on the\n * way out. Pure, so the component and the walk read one rule.\n *\n * There is one source of truth for what the list is showing: the entry's\n * query text, exactly as in DB mode. A tab click writes the tab's query\n * into it; the boxes edit it; a header menu appends to it; the URL carries\n * it. Which tab is lit is *derived* from the text, so a refined tab\n * honestly shows as a filter rather than pretending to still be the tab\n * it started from.\n */\nimport { andQuery, expandSegments, splitClauseTail } from '@mistriwork/engine/shared/query.js';\nimport { humanName, type AppNoun } from '@mistriwork/engine/shared/model.js';\nimport { recordNoun } from '@mistriwork/engine/shared/appNoun.js';\nimport { labelColumn, labelPath as schemaLabelPath, type DatabaseSchema, type TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { findTable, labelPath, recordLabel, state } from '../core.js';\nimport { referenceProjection } from '@mistriwork/engine/shared/referenceModel.js';\nimport { LABEL_SEGMENT } from '@mistriwork/engine/shared/recordLabel.js';\nimport {\n appListQuery as sharedAppListQuery,\n editedReferences as sharedEditedReferences,\n limitClause,\n listReferenceNames as sharedListReferenceNames,\n orderClause,\n referenceNames as sharedReferenceNames,\n showClause as sharedShowClause,\n subtitleColumns as sharedSubtitleColumns,\n withOrder,\n type ListRules,\n type ListTab,\n} from '@mistriwork/engine/shared/listQuestion.js';\nimport { shell } from '../shellMode.js';\nimport { canonicalize, conditionTail, hasShowClause, squeeze, stripCondition } from '../filterbar.js';\nimport { maskQuoted, splitConditions, splitQuery } from '../clauses.js';\nimport { appRooms, isListRoom, offeredBy, resourceOf, viewRoom } from './appRooms.js';\nimport type { AppAction } from '@mistriwork/engine/schema/model.js';\nimport type { AppForm } from '@mistriwork/engine/shared/servedApp.js';\nimport type { AppListPresentation, AppSplitListDetail } from '@mistriwork/engine/shared/listPresentations.js';\nimport { say } from '../copy/lists/components/appListModel.js';\n\n/* The question's rules live in shared/listQuestion.ts, where a first page's\n is built by the server too; these read them over the App on screen. */\nconst rules = (): ListRules | undefined => (state.schema ? { schema: state.schema, resources: shell().app()?.resources ?? {} } : undefined);\n\n/** One of the App's list views, with what its resource lets it offer — or the stand-in for a table it has no view of. */\nexport interface ListSpec {\n /** The view's key, when the App has a view of this list: which view\n opened a room rides the walk as `view` and wins over table and query. */\n id?: string;\n /** How the rows are drawn; a `split` is the list/detail workspace. */\n presentation?: AppListPresentation;\n empty?: import('@mistriwork/engine/shared/listPresentations.js').AppListEmpty;\n quickAdd?: true;\n /** The view carries a Favorites star. */\n favorite?: true;\n /** The menu's mark for the view, one of the App icons. */\n icon?: string;\n /** Columns summed in the grid's footer, over the whole query. */\n totals?: string[];\n /** Row height; 'comfortable' is the default. */\n density?: 'comfortable' | 'compact';\n /** A ⋯ menu at the end of each row with the record's own actions. */\n rowActions?: true;\n /** Cells edited in place, and a selection's \"Set field…\": every shown writable column, or those named. */\n editable?: true | string[];\n /** 'none' hides the filter form; 'rail' draws the filters as facets beside the rows. */\n filterBar?: import('@mistriwork/engine/shared/listPresentations.js').FilterBar;\n /** A text filter's suggestions: the columns whose values it offers as the reader types. */\n suggest?: Record<string, readonly string[]>;\n advancedFilters?: boolean;\n /** A split's single keys: a key → the id of an action of the picked record. */\n keys?: Record<string, string>;\n /** false draws the list without its title; it stays for a screen reader. */\n heading?: false;\n sizing?: import('@mistriwork/engine/shared/tableSizing.js').TableSizing;\n table: string;\n /** The list's own name, its heading. The menu may call it something else. */\n label: string;\n query?: string;\n tabs?: ListTab[];\n /** The server's word for what the menu counts, where it is not `query`: a saved form's drafts left out. */\n countQuery?: string;\n /** The author's say on the menu's count, over the rule (shared/menuCounts.ts). */\n count?: boolean;\n /** Columns or label paths the list shows, in order. */\n show?: string[];\n filters?: string[];\n /** The orders a reader may choose from the list's Sort menu. */\n sorts?: Array<{ label: string; sort: string }>;\n /** The order the list reads in when nothing else says one: the view's, kept out of the bar as `order` is. */\n sort?: string;\n /** The numeric column holding each row's place: the list reads in it, and an editor puts rows in place (useListOrder.tsx). */\n order?: string;\n /** The resource's New form. */\n form?: AppForm<string>;\n /** What the list offers: its resource's actions, narrowed by a queue's or a board's selector. */\n actions?: AppAction[];\n /** What one of its records is called, and several: its resource's noun. */\n noun?: AppNoun;\n error?: string;\n open?: 'page' | 'drawer' | 'modal';\n /** A reference column whose record a row opens instead of the row (rowOpens.ts). */\n opens?: string;\n /** A split list's authored page size: the view's, like its show clause —\n written into its question, never offered back as a filter. */\n limit?: number;\n}\n\n/** The split workspace a list's presentation is, or undefined. */\nexport const splitOf = (spec: Pick<ListSpec, 'presentation'> | undefined): AppSplitListDetail | undefined =>\n spec?.presentation?.kind === 'split' ? spec.presentation : undefined;\n\n/** The list half of a split workspace: the view's own list, at the split's page size.\n The presentation stays: a split that chose its rows draws them, and one that did not is the plain grid.\n Here rather than beside the room, because an address says the list's question too. */\nexport function splitListSpec(spec: ListSpec): ListSpec {\n const limit = splitOf(spec)?.limit;\n return { ...spec, ...(limit ? { limit } : {}) };\n}\n\n/** A list on the walk. `view` is the key of the view that opened it. */\nexport interface ListEntry {\n table: string;\n query: string;\n tab?: string;\n view?: string;\n}\n\nconst table = (id: string) => findTable(id) as TableMeta | undefined;\n\n/**\n * The app's list spec behind a table: one of its views when the app has\n * one, and a synthesized stand-in — the humanized name, derived filter\n * boxes, no tabs, the resource's form and actions — when it does not.\n * Tables without a view used to fall through to the explorer's grid, but\n * every drill from a page lands on one, and each landing swapped the room's\n * dress for raw chrome. The dress is a property of the mode, not of being listed.\n *\n * A table may have several views — the plain list and its modules (\"Work\n * orders\", \"Urgent orders\"). The view the room was opened from says which,\n * when the walk carries its key (`view`): a split beside a plain list asks\n * the same question of the same rows, and nothing else can tell them apart;\n * and a list view only a dashboard embeds is reached by its key alone.\n * Without one the walk's own query decides among the rooms the App lists,\n * as it always did: the view one of whose tabs *is* this query, else the\n * module whose standing conditions lead it, else the plain list, else the\n * first.\n */\nexport function appListFor(tableId: string, query?: string, view?: string): ListSpec {\n const app = shell().app();\n /* A key that names no view over this table — a link from before a view\n was renamed or removed — falls back rather than failing. */\n const own = app && view ? viewRoom(app, view) : undefined;\n if (own && isListRoom(own) && own.table === tableId && !own.error) return own;\n const candidates = (app ? appRooms(app) : []).filter(\n (e): e is ListSpec & { id: string } => isListRoom(e) && e.table === tableId && !e.error,\n );\n if (candidates.length) {\n if (query !== undefined) {\n const exact = candidates.find((e) => activeTab(e, query) >= 0);\n if (exact) return exact;\n const want = squeeze(query);\n const leads = candidates.find((e) => e.query && want.startsWith(squeeze(`${e.table} ${e.query}`)));\n if (leads) return leads;\n }\n return candidates.find((e) => !e.query) ?? candidates[0];\n }\n const base = table(tableId);\n const name = base?.name ?? tableId;\n return {\n table: tableId,\n label: humanName(name) || name,\n ...(base ? { show: defaultListShow(state.schema, base) } : {}),\n ...offeredBy(resourceOf(app, tableId)),\n };\n}\n\n/** Only synthesized lists use these defaults; authored projections remain authoritative. */\nexport function defaultListShow(schema: DatabaseSchema, base: TableMeta): string[] {\n const paths = base.columns.map((column) => column.name);\n const { labels } = referenceProjection(schema, base, paths, true, (target) => schemaLabelPath(schema, target, recordLabel(target)));\n return base.columns.map((column) => (column.primaryKey ? column.name : (labels.get(column.name) ?? column.name)));\n}\n\n/**\n * The references among a list's columns, each with the path its record's\n * name is read from (shared/listQuestion.ts): the name rides the row,\n * fetched in the list's own statement, and the key stays the column's value.\n */\nexport function referenceNames(tableId: string, names: readonly string[]): Record<string, string> {\n const over = rules();\n return over ? sharedReferenceNames(over, tableId, names) : {};\n}\n\nexport const specTabs = (spec: ListSpec): ListTab[] => (spec.tabs?.length ? spec.tabs : [{ label: say('common.all') }]);\n\n/** The columns a shown column's second line reads: fetched with the row, drawn under it. */\nexport function subtitleColumns(tableId: string, shown: readonly string[]): string[] {\n const over = rules();\n return over ? sharedSubtitleColumns(over, tableId, shown) : [];\n}\n\n/** The references an editable list shows by name (`owner_id.name`): their keys ride along\n with the row, so a cell edits the reference and says what it replaces (GridCellEditor.tsx). */\nexport function editedReferences(spec: Pick<ListSpec, 'table' | 'show' | 'editable' | 'presentation'>): string[] {\n const over = rules();\n return over ? sharedEditedReferences(over, spec) : [];\n}\n\n/** The column a list's search box searches: the one its records are named by,\n where a filter box can read it — not a templated name (`$label`), which is\n computed, nor a column an API cannot filter by. The list draws that box and\n its address says it as `search=` (publicAddress.ts), by this one rule. */\nexport function searchColumn(t: TableMeta | undefined): string | undefined {\n if (!t) return undefined;\n const label = recordLabel(t) === undefined ? labelColumn(t) : labelPath(t);\n return label && label !== LABEL_SEGMENT && (!t.filterable || t.filterable.includes(label)) ? label : undefined;\n}\n\n/** The show clause that fetches the app's columns plus the keys a row needs to open. */\nfunction showClause(spec: ListSpec): string {\n const over = rules();\n return over ? sharedShowClause(over, spec) : '';\n}\n\n/** The references a list draws — its `show`, its presentation's columns, or every column — by the path each is named from (referenceNames). */\nexport function listReferenceNames(spec: Pick<ListSpec, 'table' | 'show' | 'presentation'>): Record<string, string> {\n const over = rules();\n return over ? sharedListReferenceNames(over, spec) : {};\n}\n\n/** The full query text one of the app's tabs stands for. A module's\n standing conditions come first; a tab refines on top of them. */\nexport function appListQuery(spec: ListSpec, index = 0): string {\n const over = rules();\n return over\n ? sharedAppListQuery(over, spec, index)\n : [spec.table, withOrder(spec, andQuery(spec.query, specTabs(spec)[index]?.query) ?? ''), limitClause(spec)].filter(Boolean).join(' ');\n}\n\n/** The tabs as the bar reads them: each tab's question as the list asks it, less what the view always asks — its\n standing conditions, its show, and its order. A tab whose own sort is the view's order is said without it, as\n the question it opens is, so it lights on arrival and is never a chip (\"Offered is Offered\"). */\nexport function shownTabs(spec: ListSpec): ListTab[] {\n return specTabs(spec).map((tab, i) => {\n const query = tabQuestion(spec, i);\n const { query: _authored, ...rest } = tab;\n return query ? { ...rest, query } : rest;\n });\n}\n\n/** Which tab the entry's query text is, or -1 when refined away. Canonical on\n both sides, as the tabs light (litTabFor): a tab clicked asks its `a or b`\n bare, and its question as composed brackets it, `(a or b)` — the same tab,\n which the crumb called by its query instead of its name. */\nfunction activeTab(spec: ListSpec, query: string): number {\n /* The question hides the view's standing conditions, so a query that never\n asked them (the bare table) reads as empty, as an untabbed view's own\n does: without this, a table's plain address was the first filtered view\n over it (Urgent orders for work_order), its conditions and all. */\n const standing = standingHead(spec);\n if (standing && !unplumbed(spec, query).startsWith(standing)) return -1;\n const want = canonicalize(visibleQuestion(spec, query));\n return specTabs(spec).findIndex((_, i) => kept(spec, `\\u0001${i}`, () => canonicalize(tabQuestion(spec, i))) === want);\n}\n\n/** What the breadcrumb calls this list: the app's label, with the tab or\n what the refinement narrows to — never the raw query text. */\nexport function appCrumbLabel(entry: ListEntry): string {\n const spec = appListFor(entry.table, entry.query, entry.view);\n if (squeeze(entry.query) === entry.table) return spec.label;\n const tab = activeTab(spec, entry.query);\n if (tab === 0) return spec.label;\n if (tab > 0) return `${spec.label} · ${specTabs(spec)[tab].label}`;\n const words = refinementWords(visibleQuestion(spec, entry.query));\n return words ? `${spec.label} · ${words}` : spec.label;\n}\n\nconst unquoted = (value: string) => {\n const text = value.trim();\n return /^([\"']).*\\1$/.test(text) ? text.slice(1, -1) : text;\n};\n\n/**\n * A refinement as the crumb says it: the values it narrows to — \"Sedan,\n * Toyota\" — when every condition is a plain equality, up to three; the first\n * two and how many more when some are; the number of filters when none are.\n * A sort or a column list narrows nothing and says nothing. \"· filtered\" told\n * a reader that something was hidden and not what.\n */\nexport function refinementWords(refinement: string): string {\n const { filter } = splitQuery(`list ${refinement}`) as { filter: string };\n const conditions = (splitConditions(filter) as string[]).map(squeeze).filter(Boolean);\n if (!conditions.length) return '';\n /* A word says itself (\"Sedan\"); a number alone says nothing, so it\n carries its column's name (\"Priority 2\"). */\n const plain = conditions.flatMap((condition) => {\n const m = /^([A-Za-z_][\\w.]*)\\s*=\\s*(.+)$/.exec(condition);\n // An either-or is no one value: \"a or status = b\" is the query, not a word.\n if (!m || /\\sor\\s/i.test(maskQuoted(condition))) return [];\n const value = unquoted(m[2]);\n return [/^-?\\d+(?:\\.\\d+)?$/.test(value) ? `${humanName(m[1].split('.').pop() ?? m[1])} ${value}` : value];\n });\n if (plain.length === conditions.length && plain.length <= 3) return plain.join(', ');\n if (plain.length) {\n const said = plain.slice(0, 2);\n return `${said.join(', ')} +${conditions.length - said.length}`;\n }\n return say('filtersCount', { count: conditions.length });\n}\n\n/**\n * The bar shows the question without the table name — the heading already\n * says which table this is — and without the app's show clause, which is\n * plumbing, not part of anyone's question.\n */\nexport function visibleQuestion(spec: ListSpec, query: string): string {\n return kept(spec, query, () => inTabWords(spec, standingless(spec, query)));\n}\n\n/** A tab's question as the bar reads it: the whole question it opens (appListQuery), less the view's plumbing. */\nexport const tabQuestion = (spec: ListSpec, index: number): string =>\n kept(spec, `\\u0000${index}`, () => visibleQuestion(spec, appListQuery(spec, index)));\n\n/* A view's questions as read, kept per view while the schema and the App stand: both are replaced when they change,\n never edited in place. The list, its crumb, its room, its address and the nav each ask them several times a paint,\n every tab's composed and read again for each; a sort asked them all again inside its click\n (test/built-client-vitals.mjs). */\nlet read = new WeakMap<ListSpec, Map<string, string>>();\nlet readOver: unknown[] = [];\nfunction kept(spec: ListSpec, key: string, ask: () => string): string {\n const over = [state.schema, shell().app()];\n if (over[0] !== readOver[0] || over[1] !== readOver[1]) [read, readOver] = [new WeakMap(), over];\n const said = read.get(spec) ?? new Map<string, string>();\n read.set(spec, said);\n if (!said.has(key)) {\n if (said.size > 99) said.clear();\n said.set(key, ask());\n }\n return said.get(key)!;\n}\n\n/**\n * A question that spells out a tab's segment, said in the tab's word: a dashboard's drill into Incidents asks\n * `status != resolved and status != closed and priority = critical`, which is the Active tab (`active`) and the\n * priority's box. A tab names its segment (appSegments.ts), so without this the drill lit no tab and its address\n * was the whole question; where several tabs fit, the one that accounts for the most conditions.\n */\nfunction inTabWords(spec: ListSpec, question: string): string {\n const segments = (findTable(spec.table) as TableMeta | undefined)?.segments;\n if (!segments || !question) return question;\n const { head, tail } = splitClauseTail(question);\n const said: string[] = splitConditions(head);\n if (!said.length) return question;\n const heard = said.map((condition) => canonicalize(condition));\n let best: { word: string; taken: Set<number> } | undefined;\n for (const tab of specTabs(spec)) {\n const word = tab.query?.trim();\n if (!word || !Object.hasOwn(segments, word)) continue;\n const own: string[] = splitConditions(unwrapped(expandSegments(segments[word]!, segments).text));\n const taken = new Set<number>();\n for (const condition of own) {\n const at = heard.findIndex((candidate, i) => !taken.has(i) && candidate === canonicalize(condition));\n if (at < 0) break;\n taken.add(at);\n }\n if (own.length && taken.size === own.length && (!best || taken.size > best.taken.size)) best = { word, taken };\n }\n if (!best) return question;\n const filter = [best.word, ...said.filter((_, i) => !best!.taken.has(i))].join(' and ');\n return tail ? `${filter} ${tail}` : filter;\n}\n\n/** A condition text without the parentheses a segment's expansion stands in. */\nfunction unwrapped(text: string): string {\n const trimmed = text.trim();\n if (!trimmed.startsWith('(') || !trimmed.endsWith(')')) return trimmed;\n let depth = 0;\n for (let i = 0; i < trimmed.length; i++) {\n if (trimmed[i] === '(') depth++;\n else if (trimmed[i] === ')' && --depth === 0 && i < trimmed.length - 1) return trimmed;\n }\n return trimmed.slice(1, -1).trim();\n}\n\nfunction standingless(spec: ListSpec, query: string): string {\n const asked = unplumbed(spec, query);\n /* A view's standing condition leads every question it asks (appListQuery).\n It is the view's, not the reader's: the bar, the tabs and the chips see\n only what follows it, and wholeQuery puts it back. A link that arrives\n without it shows the whole of what it asks. */\n const standing = standingHead(spec);\n if (!standing || !asked.startsWith(standing)) return asked;\n const rest = asked.slice(standing.length).trim();\n if (!rest) return '';\n if (rest.startsWith('and ')) return rest.slice(4).trim();\n return splitClauseTail(rest).head ? asked : rest;\n}\n\n/** The query without the table name and the view's own show, page size and order. */\nfunction unplumbed(spec: ListSpec, query: string): string {\n const plumbing = squeeze(showClause(spec));\n const whole = squeeze(query);\n const bare = whole.startsWith(spec.table) ? whole.slice(spec.table.length).trim() : whole;\n const shown = plumbing && bare.includes(plumbing) ? squeeze(bare.replace(plumbing, ' ')) : bare;\n /* The authored page size is the view's too: \"limit 25\" was a chip with a ×\n on every split list, a filter nobody had set. */\n const paged = limitClause(spec);\n const limited = paged && new RegExp(`(^|\\\\s)${paged}$`).test(shown) ? squeeze(shown.slice(0, -paged.length)) : shown;\n const order = orderClause(spec);\n return order && new RegExp(`(^|\\\\s)${order.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}$`).test(limited)\n ? squeeze(limited.slice(0, -order.length))\n : limited;\n}\n\n/** The conditions a view always asks, as appListQuery writes them first. */\nfunction standingHead(spec: ListSpec): string {\n const head = spec.query ? splitClauseTail(spec.query).head : '';\n return head ? squeeze(andQuery(head)) : '';\n}\n\n/** The plumbing folded back in on the way out — unless the reader wrote a\n show of their own, which wins and stays visible. */\nexport function wholeQuery(spec: ListSpec, typed: string): string {\n const plumbing = squeeze(showClause(spec));\n // The view's hand order, unless the reader sorts the list another way.\n const kept = withOrder(spec, squeeze(typed));\n const shown = plumbing && !hasShowClause(typed) ? `${kept} ${plumbing}` : kept;\n // The authored page size goes back on too, unless the reader wrote a limit of their own.\n const paged = limitClause(spec);\n const question = paged && !/(^|\\s)limit\\s+\\d+/.test(squeeze(typed)) ? `${shown} ${paged}` : shown;\n // The view's standing condition first, unless the reader wrote it out themselves.\n const standing = standingHead(spec);\n const asked = standing && !squeeze(typed).startsWith(standing) ? andQuery(spec.query, question) : question;\n return squeeze(`${spec.table} ${asked}`);\n}\n\n/**\n * Which tab the state is, boxes aside. A box column can also be a tab's\n * own dimension — status is both, on many lists — so each tab is compared\n * with only the *other* box columns stripped: the tab's own condition\n * keeps its value, and \"Open\" does not light up for a state that says\n * in_progress. Canonical on both sides: narrowing an or-tab wrapped its\n * group in parens, and `(a or b)` still *is* the \"a or b\" tab.\n */\nexport function litTabFor(tabs: ListTab[], refinement: string, boxColumns: string[]): number {\n /* Several tabs can match once box columns are stripped — an \"All\" tab\n with no conditions matches anything the boxes account for — so the\n most specific match wins: the tab that says the most itself. \"Open\"\n lights for `status = open and priority = 2` even where status is also\n a box, and \"All\" only when no other tab explains the text. */\n let best = -1;\n let said = -1;\n tabs.forEach((tab, i) => {\n const tq = canonicalize(tab.query ?? '');\n let r = refinement;\n for (const name of boxColumns) {\n if (!conditionTail(tab.query ?? '', name)) r = stripCondition(r, name);\n }\n if (canonicalize(r) !== tq) return;\n if (tq.length > said) {\n best = i;\n said = tq.length;\n }\n });\n return best;\n}\n\n/** The refinement with every box column's conditions taken out. */\nexport function residueOf(refinement: string, boxColumns: string[]): string {\n return boxColumns.reduce((out, name) => stripCondition(out, name), squeeze(refinement));\n}\n\n/** What the New button makes: one of the table's records, by its resource's\n noun (\"New issue\", \"New update\"), else by the table's own name. Never the\n list's label, which may name a layout (\"Task calendar\") or a workspace\n (\"Inbox\"), and never a label singularised by rule (\"Statuses\" made\n \"New statuse\"). */\nexport function newRecordNoun(spec: Pick<ListSpec, 'noun'>, tableName: string): string {\n return recordNoun(spec.noun, tableName);\n}\n\n/**\n * Which menu entry over a table the walk is on — the row to light. A table\n * may sit in the menu more than once, the plain list and its modules: the\n * view whose standing conditions lead the query wins, preferring the most\n * specific; a bare table query lights the plain list. -1 for none. The\n * view the walk says opened the room (`view`) wins over all of that.\n */\nexport function currentNavIndex(\n entries: Array<Pick<ListSpec, 'table' | 'query' | 'id'>>,\n tableId: string,\n query: string,\n view?: string,\n): number {\n if (view) {\n const own = entries.findIndex((entry) => entry.table === tableId && entry.id === view);\n if (own >= 0) return own;\n }\n const want = query.replace(/\\s+/g, ' ').trim();\n let best = -1;\n let bestLen = -1;\n entries.forEach((entry, i) => {\n if (entry.table !== tableId) return;\n const navq = entry.query ?? '';\n const base = navq ? `${tableId} ${navq}`.replace(/\\s+/g, ' ') : tableId;\n const leads = navq ? want === base || want.startsWith(`${base} `) : true;\n const len = navq ? base.length : 0;\n if (leads && len > bestLen) {\n best = i;\n bestLen = len;\n }\n });\n return best;\n}\n","/**\n * Deep links: the pure half.\n *\n * No DOM and no state, so it can be tested directly. The stateful half —\n * reading `window.location`, deciding when to write it — lives in url.js.\n *\n * The design decision that matters: **the trail goes in the URL, not just the\n * current position.** A link to a row you reached by walking should arrive\n * with the walk intact, so whoever you send it to can go back the way you\n * came. That is the tool's whole idea, and a link that dropped it would hand\n * them a dead end.\n *\n * The hash is used rather than the path because tablewalk serves a static\n * client from a small server with no router. A path-based URL would need the\n * server to know every route; a hash never reaches it.\n *\n * Compactness matters, because these get pasted into chat. A table view is\n * its query text, already short and human-readable; a row is its key:\n *\n * /demo/customer/~4/invoice%20customer_id%20=%204/~1004\n */\n\n/** A table view. Mirrors core.js — kept here so this module imports nothing. */\n/* The tabs a table view can be on — see the tab strip in table.js — and\n `new`, which is not a tab of the grid but the app's New drawer open over\n the list; it rides the same slot so a half-filled form survives a reload.\n A segment ends in one of these or it does not end in a tab at all. */\nconst TABS = new Set(['rows', 'ddl', 'api', 'diagram', 'new']);\n/* A composer session is a tab too (composerTab.js): a bare `view`, a saved\n one as `view:<id>`, an unsaved one as `view+<its text, encoded>`. */\nconst isTableTab = (suffix) => TABS.has(suffix) || suffix === 'view' || /^view[:+]./.test(suffix);\n\n/**\n * A query, safe to put after a `!` separator.\n *\n * `encodeURIComponent` leaves `!` alone — it is an unreserved character — so\n * a query containing `!=` wrote a second separator into its own segment.\n */\nfunction encodeQuery(query) {\n return encodeURIComponent(query).replace(/!/g, '%21');\n}\n\n/**\n * A key, as it appears in a link.\n *\n * Single-column keys — nearly all of them — are just the value, so the common\n * case stays readable; composite keys name their columns, because position\n * alone would not survive a column being added.\n *\n * Shared by rows and pages so the two cannot spell the same key differently.\n */\nfunction keyBody(key) {\n const columns = Object.keys(key);\n return columns.length === 1 ? String(key[columns[0]]) : columns.map((c) => `${c}=${key[c]}`).join(',');\n}\n\nfunction tableView(tableId, query, tab, view) {\n return { kind: 'table', table: tableId, query: query ?? tableId, tab: tab ?? 'rows', ...(view ? { view } : {}) };\n}\n\n/* A view's key — the letters a view key allows. Only these ride a\n link as `{id}:` before a list's question, which keeps the prefix\n decidable: an encoded query never carries a raw `:`, and no table's name\n is followed by one. */\nconst VIEW_KEY = /^[a-z0-9][a-z0-9-]*$/;\n\n/**\n * Serialise a connection id and a stack into a hash.\n *\n * `pageToken` turns a page's id into the text a link should carry — its name,\n * where that names it unambiguously. Passed in rather than imported: this\n * module deliberately depends on nothing, which is what lets the link format\n * be tested without a browser, and the page list it would need to consult\n * lives three modules away. The default writes the id, which is what every\n * link did before and still resolves.\n *\n * `listParams` says a list one of the App's views opened in words — its key,\n * its question as the address's parameters (publicAddress.ts) — and answers\n * undefined for a list it cannot say that way, which is written as ever. The\n * default says none, which is what the Workbench writes.\n */\nexport function hashFor(connectionId, stack, options = {}) {\n const pageToken = options.pageToken ?? ((id) => id);\n const listParams = options.listParams ?? (() => undefined);\n const parts = [encodeURIComponent(connectionId ?? '')];\n /* The lists said in words, and the one whose parameters are the search:\n an address has one search, so it is the last such list's, and an earlier\n list is said in words only where it stands as authored. */\n const said = stack.map((entry) => (entry.kind === 'table' && VIEW_KEY.test(entry.view ?? '') ? listParams(entry) : undefined));\n let asks = -1;\n said.forEach((params, index) => {\n if (params !== undefined) asks = index;\n });\n let search = '';\n stack.forEach((entry, index) => {\n if (entry.kind === 'page') {\n /* `@page-id` for the page, and the root — when one has been chosen —\n written exactly as a row's key is, so the two agree about composite\n keys instead of inventing a second spelling for them. A page with no\n root is a link to the front door, which is a real place to send\n someone: \"open the customer page and pick one\". */\n /* `rootBody` is the unresolved form a link arrives with, and it is\n written back when the key has not been resolved yet. Boot renders —\n and stamps the hash — before the page has looked up which column a\n bare key belongs to, so without this the first paint dropped the root\n out of the address bar and the reader lost it by reloading. */\n const body = entry.key ? keyBody(entry.key) : (entry.rootBody ?? '');\n /* The open tab rides with the page rather than after the key: a key is\n arbitrary text and may contain a `!`, while a page token is a slug or\n an id and never does. \"Look at the parts tab\" is a thing people send\n each other, and a link that always lands on the first tab loses the\n point of sending it. */\n const tab = entry.tab ? `!${encodeURIComponent(entry.tab)}` : '';\n parts.push(`@${encodeURIComponent(pageToken(entry.pageId))}${tab}${body ? `~${encodeURIComponent(body)}` : ''}`);\n return;\n }\n if (entry.kind === 'table' || entry.kind === 'breakdown') {\n /* A list in words: its key — `/thread/board`, the New drawer after it\n as ever, `/crm/leads!new` — and its question in the search. */\n const params = said[index];\n if (params !== undefined && (index === asks || params === '')) {\n const suffix = entry.tab && entry.tab !== 'rows' ? `!${entry.tab}` : '';\n parts.push(`${entry.view}${suffix}`);\n if (index === asks) search = params;\n return;\n }\n /* A breakdown carries no tab — it has none — and is otherwise the same\n segment as a table query, because it is the same language. Which kind\n it comes back as is decided by `isBreakdown` in `fromHash`. */\n const tab = entry.kind === 'table' && entry.tab && entry.tab !== 'rows' ? `!${entry.tab}` : '';\n /* Which of the App's views opened the list, by its key: `inbox:issue…`.\n Two views over one table — a plain list and a split — ask the same\n question of the same rows, so the text alone cannot say which room\n to draw. A row after it inherits the view and writes nothing.\n Absent, the view is found by table and query, as every link written\n before keys existed still is. */\n const view = entry.kind === 'table' && VIEW_KEY.test(entry.view ?? '') ? `${entry.view}:` : '';\n parts.push(view + encodeQuery(entry.query) + tab);\n } else {\n /* A row is `~` plus its key. Single-column keys — nearly all of them —\n are just the value, so the common case stays readable; composite keys\n name their columns because position alone would not survive a schema\n change.\n\n The table is named whenever it differs from the entry before, which\n is exactly what following a foreign key from one row to another does.\n Without it `work_order/~8/~636` claims 636 is a work_order when it is\n a customer, and the link restores the wrong row — or no row. */\n const body = keyBody(entry.key);\n const previous = stack[index - 1];\n const prefix = previous && previous.table === entry.table ? '' : `${entry.table}:`;\n /* And which related table is open, if one is — the record view's rail\n is a tablist, and \"look at its notes\" is as worth linking to on a\n record as it is on a page. `!` is escaped inside the key for the\n same reason the query encoder escapes it: it is an unreserved\n character that `encodeURIComponent` leaves alone, so a value\n containing one would otherwise write a second separator. */\n const tab = entry.tab ? `!${encodeURIComponent(entry.tab)}` : '';\n parts.push(`~${encodeQuery(prefix + body)}${tab}`);\n }\n });\n return `/${parts.join('/')}${search ? `?${search}` : ''}`;\n}\n\n/**\n * The address a public visitor sees: the one thing on screen, not the walk\n * that reached it.\n *\n * The walk is the tool's idea of a link, and it is right for the people who\n * work in it; a marketplace's visitor shares a car, and a car's address that\n * carried `vehicles:vehicle status != sold and body_type = Sedan show title,\n * price…` before it leaked the list's plumbing into every message it was\n * pasted in. So a page is its own segment alone, and a list the App names is\n * its view key with its question as address parameters — `listParams`\n * returns them, '' for the view as it stands, or undefined when the question\n * cannot be said that way, and then the list is written as ever — hashFor's\n * words, for a walk of one. The walk itself rides in history state (url.js),\n * so Back and the crumbs still know it.\n */\nexport function publicPathFor(connectionId, stack, options = {}) {\n const last = stack[stack.length - 1];\n if (!last) return `/${encodeURIComponent(connectionId ?? '')}`;\n return hashFor(connectionId, [last], options);\n}\n\n/**\n * The connection a hash names, without parsing the rest of it.\n *\n * Needed because parsing the trail requires the *right* schema: a link into\n * another database mentions tables the current one has never heard of, so\n * every row segment fails to resolve and is dropped. The connection has to be\n * switched before the rest can be read.\n */\n/**\n * Take the leading `/` off a link — or the leading `#/` off one written\n * before these were paths.\n *\n * Both spellings are read for as long as it costs one regex to do so. A link\n * is the thing people paste into a ticket and come back to a year later, and\n * the day the old ones stop resolving should not be the day this changed.\n */\nfunction stripPrefix(link) {\n return String(link ?? '')\n .replace(/^#/, '')\n .replace(/^\\//, '');\n}\n\n/* A segment as the person typed it. A link pasted through a mailer or a linkifier arrives with a lone `%` or a cut\n escape (`%zz`, `%E0%A4%A`), and `decodeURIComponent` throws on those: at boot that stops the App from starting at\n all, and in a click it kills the navigation. The raw segment is returned instead, which names nothing and so lands on\n the same not-found as any other address nobody made. */\nfunction unescapeSegment(segment) {\n try {\n return decodeURIComponent(segment);\n } catch {\n return segment;\n }\n}\n\nexport function connectionFromHash(hash) {\n // A public list's address carries its question after `?`; the connection is before it.\n const raw = stripPrefix(hash).split('?')[0];\n if (!raw) return null;\n const first = raw.split('/').filter(Boolean)[0];\n return first ? unescapeSegment(first) : null;\n}\n\n/**\n * Parse a hash into a stack. Returns null when there is nothing to restore.\n *\n * Rows need the table they belong to, which is the entry before them — so a\n * row segment that opens the trail is dropped rather than guessed at.\n */\nexport function fromHash(hash, findTableById, options = {}) {\n /* Read off `options` rather than destructured with a default in the\n signature: `check-client-imports` cannot see a parameter list once a\n default inside it has parentheses of its own, and reads every name in it\n as undefined. The tool is right that this file must import nothing, so it\n is the signature that gives way. */\n const isBreakdown = options.isBreakdown ?? (() => false);\n /* A view the App names, as a public address spells it — its key, its\n question as parameters — is resolved by the caller, which knows the\n App's views: this module imports nothing. */\n const viewEntry = options.viewEntry ?? (() => null);\n const [raw, search = ''] = stripPrefix(hash).split(/\\?(.*)/s);\n if (!raw) return null;\n const segments = raw.split('/').filter(Boolean);\n if (!segments.length) return null;\n\n const connection = unescapeSegment(segments[0]);\n const stack = [];\n /* A bare view key — a list said in words, its key and the New drawer if\n it is open — is the caller's to read. A table of that name wins, so no\n link written before this means something new. The search is the last\n such list's, as hashFor writes it. */\n const bareView = (segment) => {\n const m = /^([a-z0-9][a-z0-9-]*)(?:!([a-z]+))?$/.exec(segment);\n return m && !findTableById(m[1]) && (!m[2] || TABS.has(m[2])) ? { key: m[1], tab: m[2] } : null;\n };\n let asked = -1;\n segments.forEach((segment, index) => {\n if (index > 0 && bareView(segment)) asked = index;\n });\n\n for (let index = 1; index < segments.length; index += 1) {\n let segment = segments[index];\n if (segment.startsWith('@')) {\n /* A page, and its root if the link has one. The base table is not in\n the link: a page names it, and putting it in the URL as well would be\n a second copy to disagree with the config file the day someone\n re-points a page at another table. It is filled in when the page\n loads. */\n const [head, keyPart] = segment.slice(1).split('~');\n /* Page first, then the tab: split on the first `!`, which a page token\n cannot contain and a tab name is encoded past. */\n const bang = head.indexOf('!');\n const pageId = unescapeSegment(bang === -1 ? head : head.slice(0, bang));\n const tab = bang === -1 ? undefined : unescapeSegment(head.slice(bang + 1)) || undefined;\n if (!pageId) continue;\n const body = keyPart === undefined ? undefined : unescapeSegment(keyPart);\n /* Carried as text, not resolved here. A single-column key is written as\n a bare value, and turning `1181` back into `{ id: 1181 }` needs the\n page's base table — which the link deliberately does not name, since\n the page already does and two copies would disagree the day someone\n re-points it. The page resolves it when it knows its own base. */\n stack.push({ kind: 'page', pageId, table: undefined, rootBody: body, label: body, tab });\n continue;\n }\n if (segment.startsWith('~')) {\n const rest = segment.slice(1);\n const bang = rest.indexOf('!');\n const tab = bang === -1 ? undefined : unescapeSegment(rest.slice(bang + 1)) || undefined;\n let body = unescapeSegment(bang === -1 ? rest : rest.slice(0, bang));\n /* An explicit `table:` prefix wins. It is only written when the table\n changed, so its absence means \"same as the entry before\". The colon\n is found from the left and only counts before any `=`, so a composite\n key like `a=1,b=2` is never mistaken for a table prefix. */\n let tableId = null;\n const colon = body.indexOf(':');\n if (colon > 0 && (body.indexOf('=') === -1 || colon < body.indexOf('='))) {\n /* Only if it actually names a table. A key value can contain a colon\n — a time like `12:30`, a URN, a namespaced id — and treating that\n as a table prefix would drop the row entirely. Checking against the\n schema makes the ambiguity decidable instead of guessed. */\n const candidate = body.slice(0, colon);\n if (findTableById(candidate)) {\n tableId = candidate;\n body = body.slice(colon + 1);\n }\n }\n const previous = stack[stack.length - 1];\n if (!tableId && !previous) continue; // a row with no table means nothing\n const resolvedId = tableId ?? previous.table;\n const table = findTableById(resolvedId);\n if (!table) continue;\n const key = {};\n if (body.includes('=')) {\n for (const pair of body.split(',')) {\n const [column, ...rest] = pair.split('=');\n key[column] = rest.join('=');\n }\n } else {\n const pk = table.columns.filter((c) => c.primaryKey).map((c) => c.name);\n if (!pk.length) continue;\n key[pk[0]] = body;\n }\n /* A row read beside the list it was chosen from belongs to the same\n view; the link wrote it once, on the list. */\n const inherited = previous?.view && previous.table === table.id ? { view: previous.view } : {};\n stack.push({ kind: 'row', table: table.id, key, label: labelFor(body), tab, ...inherited });\n continue;\n }\n /* A bare view key, as an App's address writes a list: the caller reads\n the address's parameters into the list's question. */\n const bare = bareView(segment);\n if (bare) {\n const entry = viewEntry(bare.key, index === asked ? search : '');\n if (entry) {\n stack.push(bare.tab ? { ...entry, tab: bare.tab } : entry);\n continue;\n }\n }\n /* `{view key}:` before a list's question names the view that opened\n it. Only when what follows starts with a table: a hand-typed query is\n never mistaken for a prefix, the way a row's `table:` is checked. */\n let view;\n const marked = /^([a-z0-9][a-z0-9-]*):(.+)$/.exec(segment);\n if (marked && findTableById(unescapeSegment(marked[2].split('!')[0]).trim().split(/\\s+/)[0])) {\n view = marked[1];\n segment = marked[2];\n }\n /* Only a real tab name ends a segment.\n \n `lastIndexOf('!')` alone read the `!` of `!=` as the separator, so\n `invoice total != 0` came back as `invoice total ` with a tab of\n `%3D 0` — the condition silently gone, and a shared \"unpaid invoices\"\n link showing every invoice. Encoding fixes it going forward; checking\n the suffix against the tabs that exist also rescues every link already\n written and every one this app did not write. */\n const bang = segment.lastIndexOf('!');\n const suffix = bang > 0 ? segment.slice(bang + 1) : '';\n const hasTab = isTableTab(suffix);\n const tab = hasTab ? suffix : 'rows';\n const query = unescapeSegment(hasTab ? segment.slice(0, bang) : segment);\n const name = query.trim().split(/\\s+/)[0];\n const table = findTableById(name);\n /* A breakdown is written into the link exactly as a table query is — it is\n the same language and the same text — so which kind it is on the way back\n is read off the text itself. The rule is supplied rather than imported:\n this module deliberately depends on nothing, which is what lets the link\n format be tested without a browser, and it is the same arrangement\n `pageToken` uses on the way out. */\n stack.push(\n isBreakdown(query)\n ? { kind: 'breakdown', table: table ? table.id : name, query }\n : tableView(table ? table.id : name, query, tab, view),\n );\n }\n\n return { connection, stack };\n}\n\nfunction labelFor(body) {\n // The real label needs the row, which has not been fetched yet. The key is\n // a truthful placeholder and gets replaced by resolveLabels below.\n return body.length > 24 ? `${body.slice(0, 23)}…` : body;\n}\n","/**\n * A breakdown, written down.\n *\n * The same argument the view text form makes, and it applies harder here: a\n * breakdown is the shape most likely to be pasted into a conversation, saved\n * in a config file, or handed to an agent as a string. A grouping that can\n * only be expressed as JSON is one nobody writes by hand.\n *\n * invoice count by status\n * invoice count, sum total as billed by month invoice_date sort billed desc limit 12\n * invoice where total > 100 count by customer_id.country_code.name as country\n *\n * The grammar is the query language plus two clauses. Measures come first —\n * `count`, `count distinct sold_by`, `sum total`, each optionally `as name` —\n * then `by`, then the things to group by, each optionally cut down to a period\n * (`by month invoice_date`) and optionally named. Everything else in the line\n * is the ordinary language: `where`, `sort`, `limit`, parsed by\n * `parseViewQuery` exactly as the composer's filter box parses it. Two parsers\n * for one language is how a language starts disagreeing with itself.\n *\n * One deliberate asymmetry with a view: **`sort` names an output column**, not\n * a path. Every column of a breakdown is a key or a measure and both are in\n * the answer under a name, so there is nothing else it could mean — and `sort\n * total desc` on a grouped statement, where `total` is no longer a column,\n * should not quietly compile into something else.\n */\nimport { parseViewQuery, tryResolvePath, type ViewFilter } from './view.js';\nimport { findTable, type DatabaseSchema } from './schema.js';\nimport type { QueryError, QueryPerson } from './query.js';\nimport {\n DATE_UNITS,\n MEASURE_FUNCTIONS,\n type BreakdownDef,\n type BreakdownKey,\n type BreakdownOrder,\n MEASURE_OPS,\n measureName,\n measurePaths,\n measureRefusal,\n measureToText,\n type Measure,\n type MeasureFn,\n type MeasureOp,\n type MeasureTerm,\n} from './breakdown.js';\n\ninterface ParsedBreakdownText {\n breakdown?: BreakdownDef;\n /** The conditions half of the line, exactly as typed — everything\n before the measures. The section emitter's whole reason to exist\n here: only the parser knows where that boundary fell. */\n conditions?: string;\n errors: QueryError[];\n}\n\n/** Whether a line is asking for a breakdown at all. */\nexport function looksLikeBreakdown(text: string): boolean {\n /* The `by` keyword, standing alone and not the tail of `order by`. That is\n the whole tell: no other clause in the language uses it, which is why it\n was available to mean this. */\n return /(?<!\\border\\s)\\bby\\s+\\S/i.test(String(text ?? ''));\n}\n\nconst TERM_RE = new RegExp(\n String.raw`^(${MEASURE_FUNCTIONS.join('|')})` +\n String.raw`(\\s+distinct)?` +\n /* `+` for a composite hop (`invoice_id+line_no.qty`); an operator stands apart, between spaces. */\n String.raw`(?:\\s+([\\w.$+]+))?` +\n /* `count when [status = open]`, its brackets already lifted out (liftWhens): the mark of the n-th. */\n String.raw`(?:\\s+when\\s+\\uE000(\\d+)\\uE001)?$`,\n 'i',\n);\nconst NUMBER_RE = /^\\d+(?:\\.\\d+)?$/;\n\n/**\n * The conditions of every `when [...]` lifted out of the line and replaced by a mark with no spaces, commas or keywords\n * in it: a condition holds `in (a, b)`, `and`, even the word `by`, and the line is split on exactly those. Quotes are\n * respected, so a `]` in a value does not close it. Nested brackets are not a thing the language has.\n */\nfunction liftWhens(text: string): { text: string; whens: string[]; error?: string } {\n const whens: string[] = [];\n let out = '';\n let from = 0;\n for (const found of text.matchAll(/\\bwhen\\s*\\[/gi)) {\n const open = (found.index ?? 0) + found[0].length;\n if (open <= from) continue;\n let quote = '';\n let close = -1;\n for (let i = open; i < text.length; i++) {\n const c = text[i];\n if (quote) {\n if (c === '\\\\') i++;\n else if (c === quote) quote = '';\n } else if (c === '\"' || c === \"'\") quote = c;\n else if (c === ']') {\n close = i;\n break;\n }\n }\n if (close < 0) return { text, whens, error: '`when [` is not closed: end the conditions with `]`.' };\n out += `${text.slice(from, found.index)}when \\uE000${whens.length}\\uE001`;\n whens.push(text.slice(open, close).trim());\n from = close + 1;\n }\n return { text: out + text.slice(from), whens };\n}\n\n/**\n * One comma piece as a measure, or null when it is not one: an aggregate\n * (`sum total`), or aggregates and numbers joined by `+ - * /` — a\n * computed measure, `sum paid / sum total as rate`. The first term is an\n * aggregate, so a condition's trailing number is never read as one.\n */\nfunction measureFrom(piece: string, whens: readonly string[]): Measure | null {\n const aliased = /^(.*?)\\s+as\\s+([\\w$]+)$/i.exec(piece);\n const body = aliased ? aliased[1] : piece;\n const parts = body.trim().split(/\\s+([+\\-*/])\\s+/);\n const term = (text: string): MeasureTerm | null => {\n const m = TERM_RE.exec(text.trim());\n return m\n ? {\n fn: m[1].toLowerCase() as MeasureFn,\n ...(m[3] ? { path: m[3] } : {}),\n ...(m[2] ? { distinct: true } : {}),\n ...(m[4] !== undefined && whens[Number(m[4])] !== undefined ? { when: whens[Number(m[4])] } : {}),\n }\n : null;\n };\n const head = term(parts[0]);\n if (!head) return null;\n const steps: NonNullable<Measure['steps']> = [];\n for (let i = 1; i < parts.length; i += 2) {\n const op = parts[i] as MeasureOp;\n const text = parts[i + 1]?.trim() ?? '';\n const next = NUMBER_RE.test(text) ? Number(text) : term(text);\n if (!MEASURE_OPS.includes(op) || next === null) return null;\n steps.push({ op, term: next });\n }\n return { ...head, ...(steps.length ? { steps } : {}), ...(aliased ? { alias: aliased[2] } : {}) };\n}\n\nconst KEY_RE = new RegExp(String.raw`^(?:(${DATE_UNITS.join('|')})\\s+)?([\\w.$+]+)(?:\\s+as\\s+([\\w$]+))?$`, 'i');\n\n/** Where the clauses after the group keys begin. */\nconst TAIL_CLAUSE = /\\b(sort|order\\s+by|limit)\\b/i;\n\n/**\n * Split `a, b, c` on commas, dropping the empties a trailing comma leaves.\n */\nconst commas = (text: string): string[] =>\n text\n .split(',')\n .map((part) => part.trim())\n .filter(Boolean);\n\n/**\n * Find the `by` that pivots the line.\n *\n * The *first* standalone `by` not preceded by `order`, because a breakdown's\n * `sort` clause comes after the keys and may legitimately be written `order\n * by`. Searching from the front means `invoice count by status order by count`\n * splits where it should.\n */\nfunction pivot(text: string): number {\n for (const match of text.matchAll(/\\bby\\b/gi)) {\n const at = match.index ?? 0;\n if (/\\border\\s+$/i.test(text.slice(0, at))) continue;\n return at;\n }\n return -1;\n}\n\nexport function textToBreakdown(\n schema: DatabaseSchema,\n text: string,\n options: { now?: Date; me?: QueryPerson | null } = {},\n): ParsedBreakdownText {\n const errors: QueryError[] = [];\n const written = String(text ?? '').trim();\n if (!written) return { errors: [{ message: 'Start with a table name.' }] };\n const lifted = liftWhens(written);\n if (lifted.error) return { errors: [{ message: lifted.error }] };\n /* What the line is split on has no `when [...]` in it; `text` below keeps it as it was written. */\n const body = lifted.text;\n\n const baseName = body.split(/\\s+/)[0];\n const base = findTable(schema, baseName) ?? schema.tables.find((t) => t.name === baseName);\n if (!base) {\n return { errors: [{ message: `No table called \"${baseName}\" in this database.`, at: 0 }] };\n }\n\n const rest = body.slice(baseName.length);\n const at = pivot(rest);\n /* No `by` is one group: \"invoice sum total\" is the whole answer as one\n row. The head is then everything before the tail clauses, and the key\n list is empty — the compiler skips GROUP BY for exactly this shape.\n A line with no measures either still gets the needs-`by` guidance\n below, because that line was not a breakdown at all. */\n const head = at === -1 ? (rest.search(TAIL_CLAUSE) === -1 ? rest : rest.slice(0, rest.search(TAIL_CLAUSE))) : rest.slice(0, at);\n const afterBy = at === -1 ? (rest.search(TAIL_CLAUSE) === -1 ? '' : rest.slice(rest.search(TAIL_CLAUSE))) : rest.slice(at + 2);\n\n /* The keys run to the first clause that is not a key. Split here rather\n than by counting commas, because a key list and a sort clause are both\n comma-separated and only a keyword tells them apart. */\n const tailAt = afterBy.search(TAIL_CLAUSE);\n const keyText = tailAt === -1 ? afterBy : afterBy.slice(0, tailAt);\n const tail = tailAt === -1 ? '' : afterBy.slice(tailAt);\n\n /* The measures are the longest suffix of `head` that reads as a list of\n them; everything before that is the ordinary language, and is handed on\n untouched. Found by trying each word boundary from the left and keeping\n the first that works, which is what makes `invoice where total > 100\n count by status` split correctly without this module knowing what `where`\n means.\n\n Splitting on commas alone was the obvious version and it was wrong: `where\n total > 100 count` holds no comma at all, so the whole clause read as one\n piece, failed to match, and the line came back \"nothing to measure\" with\n a `count` plainly in it. */\n const words = [...head.matchAll(/\\S+/g)].map((m) => ({ text: m[0], at: m.index ?? 0 }));\n const measures: Measure[] = [];\n let prefix = head;\n for (const word of words) {\n const candidate = head.slice(word.at);\n const pieces = commas(candidate);\n const read = pieces.map((piece) => measureFrom(piece, lifted.whens));\n if (!pieces.length || read.some((m) => m === null)) continue;\n measures.push(...(read as Measure[]));\n prefix = head.slice(0, word.at);\n break;\n }\n if (!measures.length) {\n errors.push({\n message:\n at === -1\n ? 'A breakdown needs `by` — try `count by status` — or a bare measure for the whole answer: `sum total`.'\n : 'Nothing to measure before `by`. Try `count by …`, or `sum total by …`.',\n });\n }\n for (const measure of measures) {\n if (measure.when !== undefined) {\n if (measure.fn !== 'count' || measure.path || measure.distinct) {\n errors.push({ message: '`when` goes with a bare `count`: `count when [status = open]`.' });\n continue;\n }\n if (!measure.when) {\n errors.push({ message: '`when [` needs conditions before `]`, like `count when [status = open]`.' });\n continue;\n }\n /* The same parser, the same segments and the same clock as the line's own conditions. */\n const held = parseViewQuery(schema, base.id, measure.when, options.now, options.me !== undefined ? { me: options.me } : {});\n errors.push(...held.errors);\n if (!held.errors.length && (held.columns.length || held.orderBy.length || held.limit !== undefined))\n errors.push({ message: `\\`when [${measure.when}]\\` takes conditions only, not show, sort or limit.` });\n if (!held.errors.length) measure.where = held.filter as ViewFilter;\n }\n for (const fn of new Set([measure.fn, ...(measure.steps ?? []).flatMap(({ term }) => (typeof term === 'number' ? [] : [term.fn]))])) {\n /* Judged against the source's dialect here, so `check` names it at startup rather than a query failing at read. */\n const refused = measureRefusal(fn, schema.dialect);\n if (refused) errors.push({ message: refused });\n }\n for (const path of measurePaths(measure)) {\n const { error } = tryResolvePath(schema, base.id, path);\n if (error) errors.push({ message: error.message });\n }\n }\n\n const keys: BreakdownKey[] = [];\n for (const piece of commas(keyText)) {\n const match = KEY_RE.exec(piece);\n if (!match) {\n errors.push({\n message:\n `\"${piece}\" is not something to group by. A column, a path like customer_id.name, ` +\n `or a period like \\`month invoice_date\\` (day, week, month, quarter, year, weekday or hour).`,\n });\n continue;\n }\n const [, unit, path, alias] = match;\n /* Resolved here rather than left to the compiler. This runs on a\n keystroke and the compiler runs on a request, so a path caught here is\n a message under the caret and a path caught there is a failed call. */\n const { resolved, error } = tryResolvePath(schema, base.id, path);\n if (error) {\n errors.push({ message: error.message });\n continue;\n }\n /* The compiler refuses a bucket of a non-date too, but it refuses at\n request time; here is a keystroke, and an app manifest's startup,\n where \"errors name the fix\" is the contract. Same rule as the\n compiler's: the declared type, not the values. */\n if (unit && resolved && !/date|time/i.test(resolved.column.type ?? '')) {\n errors.push({\n message: `\"${path}\" is ${resolved.column.type || 'untyped'}, so it cannot be grouped by ${unit.toLowerCase()}. Pick a date column.`,\n });\n continue;\n }\n keys.push({\n path,\n bucket: unit ? (unit.toLowerCase() as BreakdownKey['bucket']) : undefined,\n alias: alias || undefined,\n });\n }\n /* With a `by` written, an empty key list is a mistake to name; with no\n `by` at all it is the one-group whole answer. */\n if (at !== -1 && !keys.length && !errors.length) {\n errors.push({ message: '`by` needs something after it — a column, or `month <date column>`.' });\n }\n\n /* The names this breakdown will answer under, so `sort billed desc` parses.\n Derived the same way the compiler derives them, because a sort that\n validates against one spelling and compiles against another is a sort\n that works until somebody adds an alias. */\n const names = [\n ...keys.map((k) => k.alias?.trim() || (k.bucket ? `${k.bucket}(${k.path})` : k.path)),\n ...measures.map((m) => measureName(m)),\n ];\n\n const parsed = parseViewQuery(schema, base.id, `${prefix} ${tail}`.trim(), options.now, {\n /* Every output name joins the synthetic table for the sort clause. A\n breakdown has no `show`, so nothing else here can reach them.\n\n Except a plain key: unbucketed, unaliased, its output name IS the\n base column, and shadowing it refused `invoice status = paid count\n by status` — the filter runs before the grouping exists, on the\n column that very much does. Only names that exist solely as\n aggregate outputs join the shadow list. */\n aggregateAliases: names.filter((name) => !keys.some((k) => !k.alias && !k.bucket && k.path === name)),\n ...(options.me !== undefined ? { me: options.me } : {}),\n });\n errors.push(...parsed.errors);\n\n if (parsed.columns.length) {\n errors.push({\n message: '`show` does not apply to a breakdown — its columns are the things it groups by and measures.',\n });\n }\n\n const orderBy: BreakdownOrder[] = parsed.orderBy.map((o) => ({ name: o.path, direction: o.direction }));\n\n const breakdown: BreakdownDef = {\n base: base.id,\n by: keys,\n measures,\n filter: parsed.filter.groups.length ? (parsed.filter as ViewFilter) : undefined,\n orderBy: orderBy.length ? orderBy : undefined,\n limit: parsed.limit,\n text: written,\n };\n\n return {\n breakdown: errors.length ? undefined : breakdown,\n conditions: prefix.trim() || undefined,\n errors,\n };\n}\n\n/**\n * The line as an authored dashboard section, or null when it is not one:\n * the workbench-to-config bridge. Compose in the query bar, copy the\n * section, paste it into a dashboard — the kind is read off the shape\n * (two keys cross a matrix, a bucketed key draws a chart, one plain key\n * ranks a breakdown, none is a metric), and the conditions half survives\n * exactly as typed, because only this parser knows where it ended.\n */\nexport function sectionFromText(schema: DatabaseSchema, text: string) {\n const parsed = textToBreakdown(schema, text);\n const def = parsed.breakdown;\n if (!def || parsed.errors.length) return null;\n const by = def.by.map((k) => `${k.bucket ? `${k.bucket} ` : ''}${k.path}${k.alias ? ` as ${k.alias}` : ''}`).join(', ');\n const m = def.measures[0];\n const measure = m && !(m.fn === 'count' && !m.path && !m.alias && !m.steps) ? measureToText(m) : undefined;\n const kind: 'matrix' | 'chart' | 'breakdown' | 'metric' =\n def.by.length === 2 ? 'matrix' : def.by.length === 1 ? (def.by[0].bucket ? 'chart' : 'breakdown') : 'metric';\n return {\n kind,\n table: def.base,\n ...(parsed.conditions ? { query: parsed.conditions } : {}),\n ...(measure ? { measure } : {}),\n ...(by ? { by } : {}),\n };\n}\n\n/**\n * Render a breakdown as text — the inverse, and the round trip is tested.\n *\n * One line, unlike a view. A breakdown is a phrase: two measures and a key is\n * the normal size of one, and the whole point of the form is that it fits in\n * a query bar.\n */\nexport function breakdownToText(schema: DatabaseSchema, def: BreakdownDef): string {\n const base = findTable(schema, def.base);\n const parts: string[] = [base?.name ?? def.base];\n\n const conditions = (def.filter?.groups ?? []).filter((g) => g.length);\n if (conditions.length) {\n parts.push('where');\n parts.push(conditions.map((group) => group.map(conditionToText).join(' and ')).join(' or '));\n }\n\n parts.push(def.measures.map(measureToText).join(', '));\n // One group has no `by` to write back — the bare measure is the spelling.\n if (def.by?.length) {\n parts.push('by');\n parts.push(def.by.map(keyToText).join(', '));\n }\n\n if (def.orderBy?.length) {\n parts.push('sort');\n parts.push(def.orderBy.map((o) => `${o.name}${o.direction === 'desc' ? ' desc' : ''}`).join(', '));\n }\n if (def.limit !== undefined) parts.push(`limit ${def.limit}`);\n\n return parts.join(' ');\n}\n\nconst keyToText = (k: BreakdownKey): string => {\n const words: string[] = [];\n if (k.bucket) words.push(k.bucket);\n words.push(k.path);\n if (k.alias) words.push('as', k.alias);\n return words.join(' ');\n};\n\n/**\n * One condition, back in words.\n *\n * Deliberately small: the operators a breakdown's filter uses are the ones the\n * query language spells the same way in both directions. Anything else is\n * rendered by its own name, which round-trips because that is how it parses.\n */\nfunction conditionToText(c: { path: string; op: string; value?: unknown; other?: string; any?: unknown }): string {\n // The rows that point at the record keep the words they were asked in (`any opportunity where …`, `no task`).\n if (c.any !== undefined) return c.path;\n if (c.op === 'isNull') return `${c.path} is null`;\n if (c.op === 'isNotNull') return `${c.path} is not null`;\n if (c.other !== undefined) return `${c.path} ${c.op} ${c.other}`;\n const value = Array.isArray(c.value) ? c.value.join(', ') : String(c.value ?? '');\n const spelled = c.op === '=' ? '=' : c.op;\n return `${c.path} ${spelled} ${value}`;\n}\n","/**\n * Deep links: the stateful half.\n *\n * Reads and writes `window.location`, and decides when. The serialisation\n * itself is in deeplink.js, which touches neither the DOM nor app state.\n */\nimport {\n allowMutationExit,\n api,\n captureNavigation,\n invalidateNavigation,\n labelPath,\n primaryKey,\n render,\n renderCrumbs,\n rowLabel,\n state,\n} from './core.js';\nimport { equalityFilter, pathEqualityFilter } from './resourceRequests.js';\nimport { pageToken } from './page.js';\nimport { connectionFromHash, fromHash, hashFor, publicPathFor } from './deeplink.js';\nimport { looksLikeBreakdown } from '@mistriwork/engine/shared/breakdowntext.js';\nimport { connectionTransitionPending } from './connectionTransition.js';\nimport { sessionIdentity } from './sessionIdentity.js';\nimport { shell } from './shellMode.js';\nimport { herePath, hereSearch, shown } from './addressMount.js';\nimport { navPush, navReplace, navState } from './shellHost.js';\n\n/** Rebuilding the URL while reacting to one would loop. */\nlet applying = false;\n\n/**\n * Nothing writes the address bar until boot says the incoming link has been\n * read.\n *\n * Boot renders once before applying the link — it has to, because the empty\n * state is what a plain visit should see — and that render called `syncHash`,\n * which wrote *the state it had* over the link that had not been applied yet.\n * Usually the link was re-applied a moment later and the bar corrected\n * itself; sometimes the reader was left on the wrong connection, and always\n * there was a window in which the address bar said something nobody asked\n * for. Opening an agent-supplied link in a fresh tab is exactly the case this\n * tool exists to serve, so it is exactly the case that must not race.\n */\nlet settled = false;\nexport function allowSync() {\n settled = true;\n}\n\nexport { connectionFromHash, fromHash, hashFor };\n\n/* An App's addresses and a tenant's links are the shell's (shellMode.ts):\n the Workbench has neither, and reads and writes the walk's own form. */\nconst inAppMode = () => shell().inApp();\n/** @param {string} trail @param {{ appId: string, tenantId: string }} tenant */\nconst qualifyTenantLink = (trail, tenant) => shell().tenantLinks?.qualify(trail, tenant.appId, tenant.tenantId) ?? trail;\n/** @param {string} hash @param {string} appId */\nfunction parseTenantLink(hash, appId) {\n /* A tenant's session has its links (app.js installs them with the tenant's\n flows); a link read without them names no tenant, and so is never taken\n as this one's. */\n return shell().tenantLinks?.parse(hash, appId) ?? { pathname: hash, search: '', tenantId: null };\n}\n/** @param {string} key @param {string} search */\nconst viewEntryFromAddress = (key, search) => shell().addresses?.viewEntry(key, search) ?? null;\n/** @param {{ table: string, query: string, view?: string }} entry */\nconst listParams = (entry) => shell().addresses?.listParams(entry);\n\n/** The whole walk, as the tool writes a link — the page half by name where\n the name identifies it (`pageToken`). The Workbench's address, and every\n App walk's history state. */\nfunction trailHash() {\n return hashFor(state.activeConnection, state.stack, { pageToken });\n}\n\n/* A signed-out visitor to an App's public side reads the same canonical\n addresses as staff, with a record's name after its id where the App\n asks for a slug. A tenant's walk is never a public one. */\nfunction publicAddress(owner) {\n return !owner.tenant && shell().publicVisitor();\n}\n\n/* The walk as history state keeps it: the tool's own whole-walk form, which\n reads back exactly. A tenant's carries its selector, as its address does. */\nfunction walkState(owner) {\n const trail = trailHash();\n /* The names the crumbs showed ride beside it: the trail's own form holds\n keys, and a page entry read back from it would otherwise say \"300\"\n where the reader saw a name, until something asked again. */\n const labels = state.stack.map((entry) => (typeof entry.label === 'string' ? entry.label : null));\n /* …and a natural key's value, which the trail's form (the primary key) cannot say. */\n const addresses = state.stack.map((entry) => (typeof entry.address === 'string' ? entry.address : null));\n return { trail: owner.tenant ? qualifyTenantLink(trail, owner.tenant) : trail, labels, addresses };\n}\n\n/** The walk read back from history state, with the names its crumbs had and its natural keys. */\nfunction withLabels(parsed) {\n const { labels, addresses } = navState() ?? {};\n if (!parsed) return parsed;\n parsed.stack.forEach((entry, i) => {\n if (Array.isArray(labels) && labels.length === parsed.stack.length && typeof labels[i] === 'string' && labels[i])\n entry.label = labels[i];\n if (Array.isArray(addresses) && addresses.length === parsed.stack.length && typeof addresses[i] === 'string')\n entry.address = addresses[i];\n });\n return parsed;\n}\n\n/**\n * The address bar's text for the walk as it stands.\n *\n * In an App it is the one thing on screen, canonically: `/compass/leads/127`,\n * `/compass/sales-dashboard?period=last-30-days`, `/compass/leads?tab=working`\n * (publicAddress.ts). Following a reference opens the target's own address\n * rather than growing a path, and the walk rides in history state\n * (`syncHash`), so Back and the crumbs know it and a shared link is clean.\n * What has no address in words — a breakdown, a list no view shows — is the\n * last entry in the walk's own form. A tenant's address is the same, its\n * `tenant=` or `realm=platform` selector after the App's own parameters\n * (tenantLink.ts). The Workbench is the database and keeps the whole\n * walk in the query language.\n */\nexport function toHash() {\n const owner = sessionIdentity();\n const path = inAppMode() ? appPath(state.activeConnection, state.stack) : trailHash();\n return owner.tenant ? qualifyTenantLink(path, owner.tenant) : path;\n}\n\n/** An App walk's address, before a tenant's selector: its canonical one, else its last entry in the walk's own form. */\nfunction appPath(connection, stack) {\n return shell().addresses?.address(connection, stack) ?? publicPathFor(connection, stack, { pageToken, listParams });\n}\n\n/**\n * Fetch readable names for every row in a restored trail.\n *\n * Only the last entry in a stack is rendered, so on a fresh load the earlier\n * crumbs would keep their raw keys — a shared link reading\n * `employee › 2 › invoice sold_by = 2` where the sender saw\n * `employee › Rina Petrova › …`. The trail is the thing being shared, so it\n * should arrive legible.\n *\n * One small query per row, in parallel, and only on restore. Failures are\n * ignored: a crumb showing its key is worse than one showing a name, and far\n * better than a page that fails to load because a label could not be read.\n */\nexport async function resolveLabels(stack, findTableById) {\n const isCurrent = captureNavigation();\n const rows = stack.filter((entry) => entry.kind === 'row');\n if (!rows.length) return;\n await Promise.allSettled(\n rows.map(async (entry) => {\n const table = findTableById(entry.table);\n if (!table) return;\n /* As a view rather than a plain query when the name lives a hop away —\n `party_id.display_name` — because a plain row cannot carry a joined\n column, and a restored trail through such a table read as keys. */\n const path = labelPath(table);\n /* …and when it is computed (`$label`, a record label template), which a\n plain row does not carry either. */\n const result =\n path && (path.includes('.') || path.startsWith('$'))\n ? await api('/api/view/run', {\n view: {\n id: `crumb:${entry.table}`,\n name: table.name,\n base: entry.table,\n columns: [...new Set([...primaryKey(table), path])].map((p) => ({ path: p })),\n filter: pathEqualityFilter(entry.key),\n limit: 1,\n },\n })\n : await api('/api/query', {\n table: entry.table,\n filter: equalityFilter(entry.key),\n limit: 1,\n offset: 0,\n });\n if (!isCurrent()) return;\n const row = result.rows?.[0];\n if (!row) return;\n const readable = rowLabel(table, row);\n if (readable) entry.label = readable;\n }),\n );\n if (isCurrent()) renderCrumbs();\n}\n\n/**\n * Write the current state into the address bar.\n *\n * Whether it adds a history entry depends on how you got here. A step in the\n * walk pushes, so the browser's Back button undoes it; a refinement of the\n * view you are already on — a sort toggle, a tab, a re-run of the same query\n * — replaces, so Back does not spend three presses undoing sorts.\n *\n * This started as replaceState for everything, on the reasoning that the\n * trail is already a back stack with its own affordance. That was wrong in a\n * way only using it revealed: with no history entries at all, pressing Back\n * leaves tablewalk entirely and takes the whole trail with it. Avoiding a\n * little history noise is not worth destroying someone's work.\n *\n * A public address carries its parameters in the search and the walk in\n * history state, so both are compared and written. An App's signed-in\n * address says its lists' parameters in the search too.\n */\nexport function syncHash() {\n if (applying || !settled) return;\n const owner = sessionIdentity();\n if (owner.tenantRequired && !owner.tenant) return;\n const next = toHash();\n const open = publicAddress(owner);\n const app = inAppMode();\n /* Tenant selectors are part of the walk's ownership. Ordinary development\n cache-busting queries are not navigation state and remain ignored in the\n Workbench; in an App the search is a list's question or a dashboard's window. */\n /* Compared in the inside form (addressMount.js): the bar may say the\n address under a base path, or without the App's id. */\n const here = herePath();\n const current = owner.tenant ? here + hereSearch() + window.location.hash : app || open ? here + hereSearch() : here;\n const walk = app || open ? walkState(owner) : null;\n writeAddress(next, current, walk);\n if (open) canonicalLink(next);\n const natural = shell().addresses?.needsNaturalKey(state.stack[state.stack.length - 1]);\n if (natural) void fillNaturalKey(state.stack[state.stack.length - 1], natural);\n}\n\n/** Push or replace the address, or — the same address — only the walk it stands for. */\nfunction writeAddress(next, current, walk) {\n if (next === current) {\n // One address can stand for a longer walk (a list, then its record): keep the walk current.\n if (\n walk &&\n (navState()?.trail !== walk.trail ||\n JSON.stringify(navState()?.labels) !== JSON.stringify(walk.labels) ||\n JSON.stringify(navState()?.addresses) !== JSON.stringify(walk.addresses))\n )\n navReplace(shown(next), walk);\n return;\n }\n if (state.navMode === 'push') navPush(shown(next), walk);\n else navReplace(shown(next), walk);\n // Anything that renders without going through go() is a refinement.\n state.navMode = 'replace';\n}\n\n/**\n * A public page names its canonical address for whoever indexes it: the\n * server writes it into the page it serves, and the walk keeps it current.\n */\nfunction canonicalLink(path) {\n let link = document.head.querySelector('link[rel=\"canonical\"]');\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('rel', 'canonical');\n document.head.append(link);\n }\n link.setAttribute('href', new URL(shown(path), window.location.origin).href);\n}\n\n/**\n * A record whose address is a natural key (`address: 'sku'`) opened by its\n * primary key — a click, a reference — is first written by that key, named\n * (`id=12`), which reads back without doubt; its natural value is read once\n * and the address rewritten in place. Never a history step of its own.\n */\n// Request ownership must not ride along when a row becomes a page entry: a\n// spread copy would inherit a pending marker that only the old request clears.\nconst naturalPending = new WeakSet();\nasync function fillNaturalKey(entry, { table, column }) {\n if (naturalPending.has(entry)) return;\n naturalPending.add(entry);\n const isCurrent = captureNavigation();\n try {\n const result = await api('/api/query', { table, filter: equalityFilter(entry.key), limit: 1, offset: 0 });\n const value = result.rows?.[0]?.[column];\n if (!isCurrent() || value === undefined || value === null || state.stack[state.stack.length - 1] !== entry) return;\n entry.address = String(value);\n state.navMode = 'replace';\n syncHash();\n } catch {\n // The primary-key address stands; it opens the same record.\n } finally {\n naturalPending.delete(entry);\n }\n}\n\n/** Rewrite the address in place: a record's name arrived, and a public page's slug is written from it. */\nexport function readdress() {\n if (!inAppMode() || !publicAddress(sessionIdentity())) return;\n state.navMode = 'replace';\n syncHash();\n}\n\n/**\n * Apply a hash to the app. Used on load and when someone edits the address\n * bar or uses the browser's Back button.\n */\nexport function applyHash(hash, { findTableById, selectConnection, walk = false }) {\n if (!allowMutationExit()) {\n navReplace(shown(toHash()));\n return false;\n }\n const owner = sessionIdentity();\n if (owner.tenantRequired) {\n if (!owner.tenant) return false;\n const link = parseTenantLink(hash, owner.tenant.appId);\n // A URL suggests a tenant; only verified explicit selection establishes it.\n // The host owns re-entry. Never parse its record under the previous schema.\n if (link.tenantId !== owner.tenant.tenantId) return 'tenant-selection';\n // The App's own address, its parameters included: the selector is not one of them.\n hash = link.search ? `${link.pathname}?${link.search}` : link.pathname;\n }\n /* The connection is read first and separately. Parsing the trail needs the\n schema it was written against — a link into another database names tables\n the current one has never heard of, so every row segment fails to resolve\n and is silently dropped. Switch first, parse second. */\n const target = connectionFromHash(hash);\n if (target && state.activeConnection && (target !== state.activeConnection || connectionTransitionPending())) {\n invalidateNavigation();\n // Handed the raw hash, not a parsed stack: it can only be parsed once\n // the new schema is loaded.\n void selectConnection(target, hash);\n /* Not `true`. The switch is asynchronous and renders the target itself\n when it lands; a caller that renders in the meantime paints the\n *outgoing* connection — which on a cold tab is whatever another tab left\n active on the server — into the address bar for a frame. That frame is a\n `/other-db` URL that can be copied or bookmarked, and it is exactly what\n the cold-link guarantee forbids. The sentinel tells the caller the\n render is not theirs to do. */\n return 'switching';\n }\n\n const parsed = readAddress(hash, findTableById, walk);\n if (!parsed) return false;\n invalidateNavigation();\n applying = true;\n try {\n state.stack = parsed.stack;\n state.page = 0;\n // Restoring from the address bar must not itself add an entry, or Back\n // would need two presses to get past the state it just restored.\n state.navMode = 'replace';\n render();\n void resolveLabels(parsed.stack, findTableById);\n return true;\n } finally {\n applying = false;\n }\n}\n\n/**\n * An address read into a walk. In an App, its canonical address first\n * (publicAddress.ts); anything else — a query-language path, the walk's\n * `@page~id` and `~id` forms, a list's `view:query` — the older way, which\n * every link written before still opens, and syncHash then rewrites to the\n * canonical one. `walk` is history state's own whole-walk form, read as\n * written. A reload keeps history state: the walk it holds is kept when it\n * ends where the address does, so the crumbs survive F5.\n */\nexport function readAddress(hash, findTableById, walk = false) {\n const older = (text) => fromHash(text, findTableById, { isBreakdown: looksLikeBreakdown, viewEntry: viewEntryFromAddress });\n if (walk) return withLabels(older(hash));\n if (!inAppMode()) return older(hash);\n const read = shell().addresses?.stackFrom(hash) ?? older(hash);\n if (!read) return read;\n const owner = sessionIdentity();\n let trail = navState()?.trail;\n if (typeof trail === 'string' && owner.tenant) {\n try {\n trail = parseTenantLink(trail, owner.tenant.appId).pathname;\n } catch {\n trail = undefined;\n }\n }\n const walked = typeof trail === 'string' ? withLabels(older(trail)) : null;\n /* Compared as written, so an address with no words of its own — a drill\n into a table no view shows — keeps its walk through a reload too. */\n if (\n walked?.stack.length &&\n walked.connection === read.connection &&\n appPath(walked.connection, unnamed(walked.stack)) === appPath(read.connection, unnamed(read.stack))\n )\n return walked;\n return read;\n}\n\n/* A walk compared by what it addresses, not by what its last record is\n called: a public slug is a name, and one side may not know it yet. */\nconst unnamed = (stack) => stack.map((entry, i) => (i === stack.length - 1 ? { ...entry, label: undefined } : entry));\n\n/** Suppress hash writes while a caller rebuilds state from one. */\nexport function whileApplying(fn) {\n applying = true;\n try {\n return fn();\n } finally {\n applying = false;\n }\n}\n","/** What useRecordInsert says, in the forms room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../../messages.js';\n\nexport const say = defineMessages({\n creationWasNotConfirmed: 'Creation was not confirmed. The row may already exist. Check the table before adding it again.',\n theRequestMayStill: '{problem} The request may still complete.',\n theServerReturnedAnInvalid: 'The server returned an invalid error response.',\n theServerDidNotReturn: '{problem} The server did not return a record key.',\n theRowWasAdded: 'The row was added, but its record could not be opened. Close this form and find it in the table.',\n});\n","import { useEffect, useRef, useState } from 'react';\nimport { shell } from '../shellMode.js';\nimport { safeFieldErrors, type FieldError } from '../fieldErrors.js';\nimport { say } from '../copy/forms/components/useRecordInsert.js';\nimport { addHostListener, removeHostListener } from '../shellHost.js';\n\nexport interface InsertResult {\n key: Record<string, unknown>;\n outcome?: 'applied';\n row?: Record<string, unknown>;\n /** The journal entry this creation made, for the confirmation's Undo. */\n undoId?: unknown;\n}\n\ninterface InsertFailure {\n errors: Array<{ message: string; field?: string; fields?: readonly { field: string; message: string }[] }>;\n outcome?: 'rejected' | 'unknown';\n}\n\ntype InsertFieldError = FieldError;\n\nexport type InsertResponse = InsertResult | InsertFailure;\n\n/** A refusal before sending a write, such as an obsolete form's connection. */\nexport class InsertRefusal extends Error {}\n\ntype Phase = 'idle' | 'pending' | 'uncertain' | 'succeeded';\nconst UNCONFIRMED = say('creationWasNotConfirmed');\n\n/** One attempt at a time; an unacknowledged insert is never automatically retried. */\n/** What a New form sends beside the row: the tags it carries, as keys of the tag table (tagLists.ts). */\nexport interface InsertExtra {\n tags?: string[];\n /** The record's lines, by child table: each row's values, inserted with it (FormLines.tsx). */\n lines?: Record<string, Array<{ values: Record<string, string | null> }>>;\n}\n\nexport function useRecordInsert(\n insert: (values: Record<string, unknown>, extra?: InsertExtra) => Promise<InsertResponse>,\n onAdded: (result: InsertResult) => void,\n onPendingChange?: (pending: boolean) => void,\n) {\n const [phase, setPhase] = useState<Phase>('idle');\n const [problem, setProblem] = useState('');\n const [fieldErrors, setFieldErrors] = useState<InsertFieldError[]>([]);\n const locked = useRef(false);\n const alive = useRef(true);\n const timeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n useEffect(() => {\n alive.current = true;\n return () => {\n alive.current = false;\n clearTimeout(timeout.current);\n };\n }, []);\n useEffect(() => {\n if (phase !== 'pending' && phase !== 'uncertain') return;\n const warn = (event: BeforeUnloadEvent) => {\n event.preventDefault();\n event.returnValue = '';\n };\n addHostListener(window, 'beforeunload', warn);\n return () => removeHostListener(window, 'beforeunload', warn);\n }, [phase]);\n\n const submit = async (values: Record<string, unknown>, extra?: InsertExtra) => {\n if (locked.current || !alive.current) return;\n locked.current = true;\n setProblem('');\n setFieldErrors([]);\n setPhase('pending');\n onPendingChange?.(true);\n const tracked = shell().mutations.start('insert');\n timeout.current = setTimeout(() => {\n shell().mutations.unknown(tracked);\n if (!alive.current) return;\n setPhase('uncertain');\n setProblem(say('theRequestMayStill', { problem: UNCONFIRMED }));\n onPendingChange?.(false);\n }, 30_000);\n\n let result: InsertResponse;\n try {\n result = await (extra ? insert(values, extra) : insert(values));\n } catch (error) {\n // These HTTP responses reject the request before the insert is executed.\n const status = (error as { status?: number } | null)?.status;\n const outcome = (error as { outcome?: string } | null)?.outcome;\n const refused =\n outcome !== 'unknown' &&\n (error instanceof InsertRefusal ||\n outcome === 'rejected' ||\n outcome === 'not_applied' ||\n (outcome === undefined && [400, 401, 403, 404, 409, 422, 501].includes(status ?? 0)));\n if (refused) shell().mutations.settle(tracked);\n else shell().mutations.unknown(tracked);\n if (!alive.current) return;\n locked.current = !refused;\n setPhase(refused ? 'idle' : 'uncertain');\n const detail = error instanceof Error ? error.message : String(error);\n setProblem(refused ? detail : `${UNCONFIRMED} ${detail}`);\n return;\n } finally {\n clearTimeout(timeout.current);\n if (alive.current) onPendingChange?.(false);\n }\n if (result && typeof result === 'object' && 'errors' in result) {\n const message =\n Array.isArray(result.errors) && typeof result.errors[0]?.message === 'string'\n ? result.errors[0].message\n : say('theServerReturnedAnInvalid');\n const rejected = Array.isArray(result.errors) && typeof result.errors[0]?.message === 'string' && result.outcome === 'rejected';\n const mapped = rejected ? safeFieldErrors(result.errors) : [];\n if (rejected) shell().mutations.settle(tracked);\n else shell().mutations.unknown(tracked);\n if (!alive.current) return;\n locked.current = !rejected;\n setPhase(rejected ? 'idle' : 'uncertain');\n // Keep the server's safe envelope available to the form. The form may\n // map some fields and must retain this summary for unknown targets.\n setProblem(rejected ? message : `${UNCONFIRMED} ${message}`);\n setFieldErrors(mapped);\n return;\n }\n if (result && typeof result === 'object' && 'outcome' in result && result.outcome !== undefined && result.outcome !== 'applied') {\n shell().mutations.unknown(tracked);\n if (!alive.current) return;\n setPhase('uncertain');\n setProblem(UNCONFIRMED);\n return;\n }\n if (\n !result ||\n typeof result !== 'object' ||\n !('key' in result) ||\n !result.key ||\n typeof result.key !== 'object' ||\n Array.isArray(result.key)\n ) {\n shell().mutations.unknown(tracked);\n if (!alive.current) return;\n setPhase('uncertain');\n setProblem(say('theServerDidNotReturn', { problem: UNCONFIRMED }));\n return;\n }\n shell().mutations.settle(tracked);\n if (!alive.current) return;\n setPhase('succeeded');\n setProblem('');\n try {\n onAdded(result);\n } catch {\n setProblem(say('theRowWasAdded'));\n }\n };\n return {\n submit,\n phase,\n problem,\n fieldErrors,\n clearProblem: () => {\n setProblem('');\n setFieldErrors([]);\n },\n locked: phase !== 'idle',\n };\n}\n","import type { TableMeta } from '@mistriwork/engine/shared/schema.js';\nimport { updateOwnerKey, type UpdateOwner } from './updateAttempts.js';\nimport type { RecordEditControlState } from './recordEditValidation.js';\n\ntype Value = string | number | boolean | null;\nexport interface RecordDraft extends UpdateOwner {\n schemaKey: string;\n needsReview: boolean;\n /** Resume only restores editing; it must not turn retained/rejected intent\n * into an automatic submission. Explicit Save or Discard clears this latch. */\n manualSaveRequired: boolean;\n values: Record<string, Value>;\n originals: Record<string, Value>;\n inputs: Record<string, { element: HTMLElement; onCommitted?: (value: Value) => void; readState?: () => RecordEditControlState }>;\n /** Each staged row-defined field (`specs.capacity`): its column, the object it was read in, and its box's text as a value. */\n folds?: Record<string, DefinedFold>;\n}\n\n/** How a row-defined field's edit becomes part of its column's object (DefinedFields.tsx, write.js). */\nexport interface DefinedFold {\n column: string;\n /** The definition's caption, which the field's editor is named by. */\n label: string;\n object: Readonly<Record<string, unknown>>;\n /** Undefined is empty: the key leaves the object. */\n toValue: (text: unknown) => unknown;\n}\n\n/** Presentation changes do not invalidate drafts; storage/validation and field policy changes do. */\nexport function draftSchemaKey(table: TableMeta): string {\n return JSON.stringify([\n table.id,\n table.isView,\n [...(table.columns ?? [])]\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((column) => [column.name, column.type, column.nullable, column.primaryKey, column.references, column.allowed, column.writable]),\n ]);\n}\n\n/** Tab-memory only. Suspending releases DOM callbacks without losing business values. */\nexport function createRecordDrafts() {\n const drafts = new Map<string, RecordDraft>();\n const acquire = (owner: UpdateOwner, schemaKey: string): RecordDraft => {\n const id = updateOwnerKey(owner);\n let draft = drafts.get(id);\n if (!draft) {\n draft = {\n ...owner,\n key: { ...owner.key },\n schemaKey,\n needsReview: false,\n manualSaveRequired: false,\n values: {},\n originals: {},\n inputs: {},\n };\n drafts.set(id, draft);\n }\n if (draft.schemaKey !== schemaKey && Object.keys(draft.values).length) {\n draft.needsReview = true;\n draft.manualSaveRequired = true;\n } else if (!Object.keys(draft.values).length) {\n draft.schemaKey = schemaKey;\n draft.needsReview = false;\n }\n return draft;\n };\n const suspend = (draft: RecordDraft) => {\n draft.inputs = {};\n if (Object.keys(draft.values).length) {\n draft.needsReview = true;\n draft.manualSaveRequired = true;\n } else if (!draft.manualSaveRequired) drafts.delete(updateOwnerKey(draft));\n };\n return {\n acquire,\n suspend,\n clear: () => drafts.clear(),\n drop: (owner: UpdateOwner) => drafts.delete(updateOwnerKey(owner)),\n hasPending: () => [...drafts.values()].some((draft) => Object.keys(draft.values).length > 0),\n };\n}\n","/**\n * The sidebar's counts, read live.\n *\n * A number beside a list reads as that list's size now. The catalog's\n * `approxRows` is a snapshot from when the schema was read, never\n * refreshed after a write — this browser's or another session's — so it\n * said 48 beside a list of 49 once an applicant had submitted through a\n * public form. An app's menu asks the server instead.\n *\n * What is counted is what the view stands for, its standing condition\n * included. A whole table goes to `/api/count`; a view with a condition\n * goes to `/api/run` with the condition as text, the request the list's\n * own tab badges make (AppList.tsx): the query language is parsed on the\n * server and only there, on the server's clock, so \"last 30 days\" is the\n * same days beside the menu row as in the list it opens. `limit: 1` keeps the\n * rows that ride along with the total to one.\n *\n * Every request carries `countLimit`, so the server reads at most\n * NAV_COUNT_LIMIT + 1 matching rows and answers `capped` past the bound,\n * and the row says 10,000+. Unbounded, each row on screen was a full\n * COUNT(*) per user per refresh — a scan of a large Postgres table. The\n * catalog's estimate is no substitute in an app: it is the whole table's\n * size, rows a role's row policy or scope keeps from it included. The\n * bounded count goes through the same policy and filter as the list.\n *\n * The rows that ask in the same moment ask together, in one request\n * (`/api/counts`, which a list's tab badges use too), and the server counts\n * them in one statement where it can: a menu of seventeen rows was seventeen\n * requests on every page load. A row that asks alone, or a batch the server\n * refuses, asks as a single row does.\n *\n * When: once per row on screen — a row scrolled out of the list, or a\n * sidebar folded away or not drawn, asks nothing — deduplicated by what is\n * counted; again every two minutes while the page is visible (Query stops the\n * clock in a hidden tab); on return to the window; and at once after this\n * browser's own writes. Saves, bulk actions, commands and undo already\n * invalidate the `count` family these keys sit in; `countsChanged` covers\n * the two paths that did not, create and delete.\n */\nimport { useEffect, useState, type RefObject } from 'react';\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { api, findTable, state } from '../core.js';\nimport { sessionIdentity } from '../sessionIdentity.js';\nimport { firstPaintItem } from '../firstPaint.js';\nimport { NAV_COUNT_LIMIT } from '@mistriwork/engine/shared/reads.js';\nimport { queryClient } from './mount.js';\nimport { sameReads } from '../liveReads.js';\nimport { addHostListener, removeHostListener } from '../shellHost.js';\n\nexport interface NavCountSpec {\n table: string;\n condition: string;\n}\n/** `capped`: the server stopped at the bound; `count` is the bound, and more match. */\nexport interface NavCount {\n count: number;\n exact: boolean;\n capped?: boolean;\n}\n\n/** How often a count on screen is asked again. */\nconst NAV_COUNT_INTERVAL = 120_000;\n\nconst activeConnection = (): string => (state as { activeConnection?: string | null }).activeConnection ?? '';\n\n/**\n * In the `count` family, so every invalidation of a connection's counts\n * reaches these; five parts, so it never shares a cache entry with a tab\n * badge (`['count', connection, query]`, which holds a bare number).\n */\nexport const navCountKey = (connection: string, spec: NavCountSpec) => ['count', connection, 'nav', spec.table, spec.condition] as const;\n\nconst isNavCountKey = (key: readonly unknown[]): boolean => key[0] === 'count' && key[2] === 'nav';\n\n/** The count, or null when the server gave none it stands behind. */\nfunction fetchNavCount(spec: NavCountSpec): Promise<NavCount | null> {\n // A source that reports no totals (an API) is not asked for one it would refuse.\n if ((findTable(spec.table) as { countable?: false } | undefined)?.countable === false) return Promise.resolve(null);\n /* A first page's menu comes with its counts (firstPaint.ts), each by what it counts. */\n const carried = firstPaintItem('count', activeConnection(), { q: countText(spec), countLimit: NAV_COUNT_LIMIT });\n if (carried !== undefined) return Promise.resolve(counted(carried as CountResult));\n return new Promise((resolve, reject) => {\n waiting.push({ spec, resolve, reject });\n if (waiting.length === 1) setTimeout(flush, 0);\n });\n}\n\n/* The rows of one paint: a macrotask, after every row's query has mounted. */\nlet waiting: Array<{ spec: NavCountSpec; resolve: (count: NavCount | null) => void; reject: (error: unknown) => void }> = [];\n/* The server's own ceiling on one batch (shared/reads.ts, COUNT_EACH_MAX). */\nconst BATCH = 64;\n\nfunction flush() {\n const asked = waiting;\n waiting = [];\n for (let at = 0; at < asked.length; at += BATCH) void send(asked.slice(at, at + BATCH));\n}\n\n/** What a row counts, as a batch item says it. */\nconst countText = (spec: NavCountSpec): string => (spec.condition ? `${spec.table} ${spec.condition}` : spec.table);\n\ntype CountResult = { total?: unknown; exactTotal?: unknown; cappedTotal?: unknown; errors?: unknown[] } | undefined;\n/** One item of a batch's answer, as the row says it. */\nconst counted = (said: CountResult): NavCount | null =>\n said && !said.errors?.length && typeof said.total === 'number'\n ? { count: said.total, exact: said.exactTotal !== false, ...(said.cappedTotal === true ? { capped: true } : {}) }\n : null;\n\nasync function send(batch: typeof waiting) {\n if (batch.length === 1) return fetchOne(batch[0].spec).then(batch[0].resolve, batch[0].reject);\n let results: CountResult[];\n let data: { results?: typeof results };\n try {\n data = (await api('/api/counts', { items: batch.map(({ spec }) => countText(spec)), countLimit: NAV_COUNT_LIMIT })) as {\n results?: typeof results;\n };\n if (!Array.isArray(data?.results) || data.results.length !== batch.length) throw new Error();\n results = data.results;\n } catch {\n // Whatever refused the batch, each row is owed its own answer.\n for (const { spec, resolve, reject } of batch) fetchOne(spec).then(resolve, reject);\n return;\n }\n batch.forEach(({ resolve }, index) => resolve(sameReads(counted(results[index]), data)));\n}\n\n/** One row's count, asked alone. */\nasync function fetchOne(spec: NavCountSpec): Promise<NavCount | null> {\n if (!spec.condition) {\n const data = await api('/api/count', { table: spec.table, countLimit: NAV_COUNT_LIMIT });\n return typeof data?.count === 'number'\n ? sameReads({ count: data.count, exact: data.exact !== false, ...(data.capped === true ? { capped: true } : {}) }, data)\n : null;\n }\n const data = await api('/api/run', { q: `${spec.table} ${spec.condition}`, limit: 1, countLimit: NAV_COUNT_LIMIT });\n return 'total' in data && !data.errors?.length && typeof data.total === 'number'\n ? sameReads(\n {\n count: data.total,\n exact: !('exactTotal' in data && data.exactTotal === false),\n ...('cappedTotal' in data && data.cappedTotal === true ? { capped: true } : {}),\n },\n data,\n )\n : null;\n}\n\n/**\n * A row's live count. A refused or failed read is absent — not zero, and\n * not the last number either, which may be one this role can no longer\n * see. The server's refusal is the whole answer; the sidebar says nothing.\n */\nexport function useNavCount(spec: NavCountSpec, visible: boolean): NavCount | null {\n const query = useQuery({\n queryKey: navCountKey(activeConnection(), spec),\n queryFn: () => fetchNavCount(spec),\n enabled: visible,\n refetchInterval: NAV_COUNT_INTERVAL,\n });\n return query.isError ? null : (query.data ?? null);\n}\n\n/**\n * Whether a row is on screen. One observer per row rather than a shared\n * one: a menu is tens of rows, and an observer that belongs to its row\n * goes when the row does. Without IntersectionObserver every row counts as\n * seen — the alternative is a menu with no numbers at all.\n */\nexport function useInView(ref: RefObject<Element | null>): boolean {\n const [seen, setSeen] = useState(() => typeof IntersectionObserver === 'undefined');\n useEffect(() => {\n const node = ref.current;\n if (!node || typeof IntersectionObserver === 'undefined') return;\n const observer = new IntersectionObserver((entries) => {\n const last = entries[entries.length - 1];\n if (last) setSeen(last.isIntersecting);\n });\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return seen;\n}\n\n/**\n * Coming back to the window asks again. Query's own focus refetch listens\n * for the tab turning visible, which a second window beside this one never\n * changes; the window's `focus` event does. Rows on screen only, counts\n * past the client's stale time only, and a refetch already on its way is\n * joined rather than restarted. A tenant session is left to lease renewal,\n * the way the client's defaults leave every other query (mount.tsx).\n */\nexport function useCountsOnFocus(): void {\n const client = useQueryClient();\n useEffect(() => {\n const refresh = () => {\n if (sessionIdentity().tenantRequired) return;\n void client.refetchQueries(\n { predicate: (query) => isNavCountKey(query.queryKey), type: 'active', stale: true },\n { cancelRefetch: false },\n );\n };\n addHostListener(window, 'focus', refresh);\n return () => removeHostListener(window, 'focus', refresh);\n }, [client]);\n}\n\n/**\n * After this browser's own create or delete: every count on the connection\n * — the menu's and the list tabs' — at once, joining a refetch the same\n * write already started elsewhere rather than asking twice.\n */\nexport function countsChanged(connection: string | null | undefined = activeConnection()): void {\n try {\n void queryClient.invalidateQueries({ queryKey: ['count', connection ?? ''] }, { cancelRefetch: false });\n } catch {\n /* A disposed cache has no counts to refresh. */\n }\n}\n","/** What insert says, in the record page room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '../../messages.js';\n\nexport const say = defineMessages({\n theConnectionOrView: 'The connection or view changed. Close this form and open a new one.',\n theTableDefinitionChangedClose: 'The table definition changed. Close this form and open a new one.',\n addingRecordsIsNoLonger: 'Adding records is no longer allowed.',\n added: 'Added {name} · {label}',\n});\n","/**\n * Adding a row, in a form the schema wrote.\n *\n * Nobody declares a form for this: the columns, their types, what is\n * required and what the database will fill are all in the catalog already.\n * Required is NOT NULL with no default and no auto-assigned key; everything\n * else is optional, and an empty box means \"leave it to the database\" — its\n * defaults are part of the schema's design and pre-filling them here would\n * turn every default into a value somebody appears to have chosen.\n *\n * Components own field state and feedback. This host owns the connection,\n * request, and navigation for the form's lifetime.\n */\nimport { ownedBy } from './requestIdentity.js';\nimport { createElement } from 'react';\nimport {\n allowMutationExit,\n api,\n columnDisplay,\n columnLabel,\n currentEntry,\n el,\n findTable,\n go,\n humanName,\n openRecord,\n prefersPages,\n rowLabel,\n state,\n toast,\n whenConnectionChanges,\n writeAllowed,\n} from './core.js';\n// The App through the bridge: appnav.js would pull the page's whole tangle of imports in here (uiBridge.ts).\nimport { pageBridge } from './uiBridge.js';\nimport { syncHash } from './url.js';\nimport { mount, unmount } from './components/mount.js';\nimport { onDemand } from './components/onDemand.js';\nimport { InsertRefusal } from './components/useRecordInsert.js';\nimport { draftSchemaKey } from './recordDrafts.js';\nimport { shell } from './shellMode.js';\nimport { countsChanged } from './components/navCounts.js';\nimport { writeValues } from './resourceRequests.js';\nimport { captureSessionIdentity, sessionIdentity } from './sessionIdentity.js';\nimport { say } from './copy/record/insert.js';\nimport { portalRoot } from './shellHost.js';\n\n/* The form and its field library load when a New is first opened; a reader\n who only reads never fetches them. */\nconst NewRecordDialog = onDemand(() => import('./components/NewRecord.js'), 'NewRecordDialog', { quiet: true });\nconst NewRecordDrawer = onDemand(() => import('./components/NewRecord.js'), 'NewRecordDrawer', { quiet: true });\n\n/** Inserts may supply a writable subset even when a complete delete snapshot is unavailable. */\nexport function canInsert(table, app = false) {\n if ((!app && !state.canWrite) || !table || table.isView || table.insertable === false || !writeAllowed(table.id)) return false;\n return Boolean(state.connections?.find((c) => c.id === state.activeConnection)?.writable);\n}\n\n/**\n * The New form as an app shows it: a drawer over the list, addressed by the\n * list's tab slot (`…!new`) so a link can reopen the form (not its unsaved\n * values). A modal hid the list you were on, fought the picker's\n * menu for room, and could not be linked to. The workbench keeps its dialog.\n */\nexport function openNewRecord(table, form, { reopen = false } = {}) {\n /* The list room drawing an address that says `…!new` again — the App's words\n asked for anew after a language pick or a save (app.js reloadAppInPlace)\n remount it — finds its form already open: that form, half filled, is kept. */\n if (reopen && drawerNow?.table === table.id && drawerNow.connection === state.activeConnection && drawerNow.host.isConnected) {\n /* Drawn again where it stands, so its captions are the App's new words; its draft is the root's state, kept. */\n drawerNow.redraw();\n return;\n }\n if (!allowMutationExit()) return;\n if (!prefersPages()) {\n openInsert(table, form);\n return;\n }\n drawerNow?.close();\n const here = currentEntry();\n const connection = state.activeConnection;\n if (here?.kind === 'table' && here.table === table.id && here.tab !== 'new') {\n here.tab = 'new';\n state.navMode = 'replace';\n syncHash();\n }\n openDrawer(table, form, () => {\n const now = currentEntry();\n if (state.activeConnection === connection && now === here && now?.kind === 'table' && now.table === table.id && now.tab === 'new') {\n now.tab = 'rows';\n state.navMode = 'replace';\n syncHash();\n }\n });\n}\n\n/* The frames are components (components/NewRecord.tsx); what stays here is the\n crossing — a host element on the body, taken down when the form is — and\n the navigation the form's outcome drives, which is the page's business. */\nlet drawerNow = null;\n\nfunction openDrawer(table, form, onClose, onAdded) {\n drawerNow?.close();\n const host = el('div', { class: 'newpanel-host' });\n portalRoot().append(host);\n const close = hostClose(host, () => {\n if (drawerNow?.host === host) drawerNow = null;\n onClose?.();\n });\n const props = formProps(table, form, host, close, onAdded);\n const redraw = () => mount(host, createElement(NewRecordDrawer, props));\n drawerNow = { host, close, redraw, table: table.id, connection: state.activeConnection };\n redraw();\n}\n\n/** Related forms retain their parent's route and existing field draft.\n * A modal supplies a renderer in its own React tree; ordinary pages keep the\n * existing drawer host. Both frames use the same request/authority owner.\n * @param {import('@mistriwork/engine/shared/schema.js').TableMeta} table\n * @param {import('./components/NewRecord.js').FormCuration} form\n * @param {(result: import('./components/NewRecord.js').InsertResult) => void} onAdded\n * @param {{ host: HTMLElement, isCurrent: () => boolean, close: () => void,\n * render: (props: import('./components/NewRecord.js').NewRecordProps) => void }} [surface]\n */\nexport function openRelatedRecord(table, form, onAdded, surface) {\n if (!allowMutationExit()) return;\n if (!canInsert(table)) return;\n if (surface) {\n try {\n if (!surface.host.isConnected || surface.isCurrent() !== true) return;\n } catch {\n return;\n }\n surface.render(formProps(table, form, surface.host, surface.close, onAdded, { isCurrent: surface.isCurrent }));\n return;\n }\n openDrawer(table, form, undefined, onAdded);\n}\n\n/**\n * @param {*} table\n * @param {{ show?: string[], defaults?: Record<string, unknown> } | undefined} [form]\n * The app's curation: which columns to ask for — the rest are left to\n * the database, or filled from `defaults` without being asked — and the\n * values a box starts with. Absent, the form is the schema's: every column.\n */\nexport function openInsert(table, form) {\n if (!allowMutationExit()) return;\n const host = el('div', { class: 'insert-host' });\n portalRoot().append(host);\n const close = hostClose(host);\n mount(host, createElement(NewRecordDialog, formProps(table, form, host, close)));\n}\n\n/** @param {HTMLElement} host @param {(() => void) | undefined} [onClose] */\nfunction hostClose(host, onClose) {\n let closed = false;\n const close = () => {\n if (closed) return;\n closed = true;\n stopWatching();\n unmount(host);\n host.remove();\n onClose?.();\n };\n const stopWatching = whenConnectionChanges(close);\n return close;\n}\n\n/** What every frame needs from the page: its words, its schema, its next step.\n * @param {import('@mistriwork/engine/shared/schema.js').TableMeta} table\n * @param {import('./components/NewRecord.js').FormCuration | undefined} form\n * @param {HTMLElement} host A connected element owned by this form instance.\n * @param {() => void} close\n * @param {((result: import('./components/NewRecord.js').InsertResult) => void) | undefined} [onAdded]\n * @param {{ app?: boolean, isCurrent?: () => boolean }} [options]\n * @returns {import('./components/NewRecord.js').NewRecordProps}\n */\nexport function formProps(table, form, host, close, onAdded, options = {}) {\n const app = options.app ?? prefersPages();\n const schemaKey = draftSchemaKey(table);\n const identity = captureSessionIdentity();\n const connection = state.activeConnection;\n const route = location.href;\n const entry = currentEntry();\n let closed = false;\n const current = () => {\n try {\n return (\n !closed &&\n host.isConnected &&\n identity === sessionIdentity() &&\n identity.mode !== 'locked' &&\n connection === state.activeConnection &&\n route === location.href &&\n entry === currentEntry() &&\n (options.isCurrent === undefined || options.isCurrent() === true)\n );\n } catch {\n return false;\n }\n };\n const finish = () => {\n if (!closed) {\n closed = true;\n close();\n }\n };\n return {\n table,\n form,\n app,\n /* The workbench reads the schema; an app's reader reads a form. */\n label: (column) => {\n if (!app) return column.name;\n return columnLabel(table.id, column.name) ?? humanName(column.name);\n },\n target: (id) => findTable(id),\n /* How the App dresses each column: a vocabulary's words, money's currency. */\n ...(app\n ? {\n display: (column) => columnDisplay(table.id, column.name),\n appName: /** @type {{ name?: string } | null} */ (pageBridge.activeApp())?.name,\n }\n : {}),\n insert: (values, extra) => {\n if (!connection || !current()) throw new InsertRefusal(say('theConnectionOrView'));\n const currentTable = findTable(table.id);\n if (!currentTable || draftSchemaKey(currentTable) !== schemaKey) throw new InsertRefusal(say('theTableDefinitionChangedClose'));\n if (!canInsert(currentTable, app)) throw new InsertRefusal(say('addingRecordsIsNoLonger'));\n let payload;\n try {\n payload = writeValues(values);\n } catch (error) {\n throw new InsertRefusal(error.message);\n }\n /* The record's tags and lines go with it, inserted in its transaction (tagLists.ts, FormLines.tsx). */\n const tags = extra?.tags?.length ? { tags: extra.tags } : {};\n /* Only when there are some: a tenant App's transport sends inert JSON and\n refuses a field that is present but undefined (tenantTransport.ts). */\n const lines = extra?.lines ? { lines: extra.lines } : {};\n return api('/api/insert', { ...ownedBy(connection), table: table.id, values: payload, ...tags, ...lines });\n },\n onCancel: () => {\n if (current() && allowMutationExit()) finish();\n },\n canClose: () => current() && allowMutationExit(),\n onAdded: (result) => {\n if (!current()) return;\n finish();\n // Creation can add an inverse or a non-revertible history barrier. Both\n // must replace the menu's previous editing history before the next Undo.\n void shell().undo.refresh();\n /* A new row changes every count on the connection — the menu's and\n the list tabs'. Asked after the caller's own refresh, so a count\n that caller already started is joined rather than asked twice. */\n if (onAdded) {\n onAdded(result);\n countsChanged(connection);\n return;\n }\n countsChanged(connection);\n const label = result.row ? rowLabel(table, result.row) : Object.values(result.key).join('/');\n /* Undo beside the confirmation, as a field edit has it: this is the\n moment the wrong record is noticed. Undone, the page of a record that\n is gone is no place to stand, so the reader goes back to its list. */\n const created = JSON.stringify(result.key);\n toast(\n say('added', { name: table.name, label }),\n 'ok',\n shell().undo.toast(result.undoId, () => {\n countsChanged(connection);\n const now = currentEntry();\n if (now?.table === table.id && JSON.stringify(now.key) === created)\n go({ kind: 'table', table: table.id, query: table.id, tab: 'rows' }, 'reset');\n }),\n );\n /* Straight to the new record: the form's answer is the row the database\n stored — defaults filled, key assigned — and the record page is where\n that answer is legible. */\n void openRecord(table.id, result.key, label);\n },\n };\n}\n",null,null,null],"ignoreList":[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,78,79,80],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,SAAS,WAAW,QAAQ,QAAQ;CACnC,MAAM,aAAa,IAAI,IAAI,MAAM;CACjC,OAAO,OAAO,QAAQ,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;AAC/C;AACA,IAAI,kBAAkB,cAAc,aAAa;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,mBAAmB,CAAC;CACpB,YAAY,QAAQ,SAAS,SAAS;EACrC,MAAM;EACN,KAAK,UAAU;EACf,KAAK,WAAW;EAChB,KAAK,WAAW,CAAC;EACjB,KAAK,aAAa,CAAC;EACnB,KAAK,UAAU,CAAC;EAChB,KAAK,WAAW,OAAO;CACxB;CACA,cAAc;EACb,IAAI,KAAK,UAAU,SAAS,GAAG,KAAK,WAAW,SAAS,aAAa;GACpE,SAAS,WAAW,WAAW;IAC9B,KAAK,UAAU,UAAU,MAAM;GAChC,CAAC;EACF,CAAC;CACF;CACA,gBAAgB;EACf,IAAI,CAAC,KAAK,UAAU,MAAM,KAAK,QAAQ;CACxC;CACA,UA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