@objectstack/console 17.1.0 → 17.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/CHANGELOG.md +731 -0
  2. package/README.md +26 -10
  3. package/dist/.objectstack-injection.json +2 -2
  4. package/dist/.objectui-sha +1 -1
  5. package/dist/assets/ActionResultDialog-CQwenjVA.js +9 -0
  6. package/dist/assets/AiPendingActionsPage-7gZ8zlOy.js +1 -0
  7. package/dist/assets/ApiConsolePage-DUF0ysH7.js +1 -0
  8. package/dist/assets/{AppDocsIndex-DVrJTsbv.js → AppDocsIndex-CP_AVG4X.js} +1 -1
  9. package/dist/assets/AppManagementPage-BJktnoa5.js +1 -0
  10. package/dist/assets/ApprovalsInboxPage-DlnxY-uy.js +1 -0
  11. package/dist/assets/{AuditLogPage-B-2e1YhN.js → AuditLogPage-DIJPRjji.js} +1 -1
  12. package/dist/assets/{ComponentNavView-BVbkfJfE.js → ComponentNavView-C84QByT7.js} +1 -1
  13. package/dist/assets/CreateViewDialog-Zbd9Cagm.js +1 -0
  14. package/dist/assets/DashboardView-UyKHklBx.js +1 -0
  15. package/dist/assets/{DeveloperHubPage-CWq2uYpr.js → DeveloperHubPage-BRyNdrCJ.js} +1 -1
  16. package/dist/assets/DocPage-Bx8ZXCYt.js +1 -0
  17. package/dist/assets/{DocShell-UFsFTSr-.js → DocShell-Ipy_IDvh.js} +1 -1
  18. package/dist/assets/DocsIndex-CmY-7OQR.js +1 -0
  19. package/dist/assets/DocsLayout-BNsSvaz2.js +1 -0
  20. package/dist/assets/DocsSlug-Cb_NMM1k.js +1 -0
  21. package/dist/assets/ExpressionProvider-DqGWVuxV.js +1 -0
  22. package/dist/assets/FlowRunsPage-B6ustUgi.js +1 -0
  23. package/dist/assets/{IntegrationsPage-DdKbqwGE.js → IntegrationsPage-chOxmiyU.js} +2 -2
  24. package/dist/assets/InterfaceListPage-DVETnQm5.js +1 -0
  25. package/dist/assets/MarketplaceInstalledPage-DA5pjhAz.js +1 -0
  26. package/dist/assets/MarketplacePackagePage-dCIVHBFi.js +4 -0
  27. package/dist/assets/MarketplacePage-wJb6g1p7.js +1 -0
  28. package/dist/assets/MetadataInspector-Cu-n1FYz.js +1 -0
  29. package/dist/assets/ObjectDataPage-CP-YSZYQ.js +1 -0
  30. package/dist/assets/PageView-B1_ibRuM.js +1 -0
  31. package/dist/assets/ProfilePage-DEr5iZVB.js +1 -0
  32. package/dist/assets/PublicFormsPage-CBcKQbNl.js +1 -0
  33. package/dist/assets/RecordDetailView-A8bbPnkK.js +3 -0
  34. package/dist/assets/RecordFormPage-CGQlYWDk.js +1 -0
  35. package/dist/assets/ReportDefaultInspector-R_p6YStL.js +1 -0
  36. package/dist/assets/ReportView-BTMrtcGH.js +2 -0
  37. package/dist/assets/RuntimeDraftBar-agGU39FL.js +1 -0
  38. package/dist/assets/SchemaForm-DJbupOno.js +3 -0
  39. package/dist/assets/SearchResultsPage-CHhZUc6L.js +1 -0
  40. package/dist/assets/SettingsHub-BGLR_gS7.js +1 -0
  41. package/dist/assets/SettingsView-Bq-7Zkzs.js +1 -0
  42. package/dist/assets/SkeletonDetail-B4-UKxai.js +1 -0
  43. package/dist/assets/SystemHubPage-CVZVag1e.js +1 -0
  44. package/dist/assets/{abnfDiagram-N423BO3Z-DfpQlDUF.js → abnfDiagram-VCTEODGH-DUS5D5dU.js} +1 -1
  45. package/dist/assets/app-shell-eager-leaves-BB0oaPx6.js +1 -0
  46. package/dist/assets/{utils-CJ4UwXMF.js → appRoute-DEVGXLLH.js} +1 -1
  47. package/dist/assets/architecture-7GRP2DOG-kzM7RUjO.js +1 -0
  48. package/dist/assets/{architectureDiagram-T3A2C74G-Ej_4n3NG.js → architectureDiagram-5GKGNRK7-mGW8P1lC.js} +1 -1
  49. package/dist/assets/blockDiagram-OSKFZWR5-Bz2hnVmp.js +129 -0
  50. package/dist/assets/c4Diagram-7LVT6UL2-DU3u1Y6c.js +38 -0
  51. package/dist/assets/channel-FD4s9EIH.js +1 -0
  52. package/dist/assets/{chunk-U6XO7XAA-D-dXvZaW.js → chunk-2ZTRR5NV-DXmA5XXf.js} +1 -1
  53. package/dist/assets/chunk-3NF5O7KM-B8Q7HUio.js +168 -0
  54. package/dist/assets/{chunk-YOTPTUD7-CDtXQZ13.js → chunk-3Z5EZCMW-D3OlaP15.js} +1 -1
  55. package/dist/assets/chunk-4HAMMTFA-BPKwX4iB.js +62 -0
  56. package/dist/assets/{chunk-BIQX33UG-DMScvo0C.js → chunk-5V3GS4D5-sE73jHoi.js} +1 -1
  57. package/dist/assets/{chunk-MOZMSUNE-DG70Besp.js → chunk-6AZGARVD-dsTIs5yl.js} +1 -1
  58. package/dist/assets/{chunk-5JV3BV7I-BrKM6vC-.js → chunk-6EIED4P4-BB4xaK3K.js} +1 -1
  59. package/dist/assets/{chunk-R7FJI6CG-DsJHM8am.js → chunk-6K3QC6MW-DaG1LefG.js} +1 -1
  60. package/dist/assets/{chunk-OSBZ3O6U-Dch_xyhf.js → chunk-6TQVIW2G-DL8WEcT0.js} +1 -1
  61. package/dist/assets/{chunk-JG7HCLWE-lCTbN-f1.js → chunk-747NJXEK-Bdie6H1T.js} +1 -1
  62. package/dist/assets/chunk-75Z2AOVW-CkSdnmiC.js +2 -0
  63. package/dist/assets/chunk-CLGD4ZFX-BTkDISwp.js +1 -0
  64. package/dist/assets/chunk-DU6HZSFF-BkY4hAzc.js +127 -0
  65. package/dist/assets/{chunk-2GRJ4B5K-D1if-ThW.js → chunk-F27PBJKO-DUKg0YWV.js} +1 -1
  66. package/dist/assets/{chunk-KEIR6QF5-ydf36Hye.js → chunk-FOHPRMQF-C65HoZVt.js} +2 -2
  67. package/dist/assets/chunk-GMAD6QVW-DZo_NykZ.js +72 -0
  68. package/dist/assets/chunk-GVQU2GXP-9ELY9S6X.js +1 -0
  69. package/dist/assets/chunk-H2I77ZZE-vCr_buP7.js +1 -0
  70. package/dist/assets/{chunk-GF5L2VYU-Dgjjn2FR.js → chunk-HLEWEB6X-iPkY2ESt.js} +1 -1
  71. package/dist/assets/{chunk-QBLGF6JB-CzQYydMJ.js → chunk-I5DQTOEV-Cz6Y6T9y.js} +1 -1
  72. package/dist/assets/{chunk-5FCAYU7R-BuOxxvKk.js → chunk-ICYGCRZG-DdtFYQ2l.js} +1 -1
  73. package/dist/assets/{chunk-CQNSW5MT-CCth14ZS.js → chunk-IH6LHLGP-DybuHD8B.js} +1 -1
  74. package/dist/assets/{chunk-CYSBUYHQ-DIigEFGo.js → chunk-KI3K4JFJ-CB_CI00L.js} +1 -1
  75. package/dist/assets/chunk-L3NEJ4N5-Bzz35TZJ.js +1 -0
  76. package/dist/assets/chunk-LNGE3PJU-DWpGwHrW.js +34 -0
  77. package/dist/assets/chunk-LQGUR6SS-iVI0GACK.js +1 -0
  78. package/dist/assets/chunk-OSK3NFVY-DcRwXCQD.js +10 -0
  79. package/dist/assets/{chunk-5TONJI2A-Bdh0MHqz.js → chunk-OUJLGHUK-TbeyE6CA.js} +1 -1
  80. package/dist/assets/chunk-P2QGCYS3-nx2-dM5t.js +1 -0
  81. package/dist/assets/{chunk-KBJHAD2P-DI4-lUt-.js → chunk-POPQ4Y6H-BxLOacOG.js} +1 -1
  82. package/dist/assets/{chunk-4I5QYGJK-DlrWrdEa.js → chunk-PWAF6VOD-2mst9kZu.js} +1 -1
  83. package/dist/assets/{chunk-6Q2QTUOP-C2vvuHlO.js → chunk-SVP7TREG-C3BMpr4x.js} +1 -1
  84. package/dist/assets/{chunk-EMLP6XTP-B4CrDa5p.js → chunk-UY3FDG6J-CDAtW6MI.js} +1 -1
  85. package/dist/assets/{chunk-5HE753X5-T_shrJhj.js → chunk-XHIXRSVI-CqmtoxrP.js} +1 -1
  86. package/dist/assets/chunk-XXDRQBXY-iNC8aYmk.js +1 -0
  87. package/dist/assets/{chunk-5RXB4S5H-JwFhdddt.js → chunk-ZLD2IHE6-ZFqtFJbj.js} +2 -2
  88. package/dist/assets/classDiagram-CYGNFDIV-D5Pd2TCl.js +1 -0
  89. package/dist/assets/classDiagram-v2-TLXNO2FR-D5Pd2TCl.js +1 -0
  90. package/dist/assets/{cose-bilkent-JH36ORCC-XP-DnSP5.js → cose-bilkent-JH36ORCC-CPQv9aQH.js} +1 -1
  91. package/dist/assets/createDerive-Best2JCj.js +2 -0
  92. package/dist/assets/cynefin-OW5HDTMX-Dtvf1C60.js +1 -0
  93. package/dist/assets/{cynefinDiagram-MW4NZA55-B8MvpqXe.js → cynefinDiagram-5FMLGOSQ-Lnly8IJd.js} +1 -1
  94. package/dist/assets/cytoscape.esm-CGd-uY3x.js +321 -0
  95. package/dist/assets/dagre-OS7QT2EB-CdXLxmTK.js +4 -0
  96. package/dist/assets/dagre-PrKaheQc.js +1 -0
  97. package/dist/assets/data-adapter-DL25qpAe.js +5 -0
  98. package/dist/assets/default-inspector-registry-DeEG98bO.js +1 -0
  99. package/dist/assets/{diagram-7IWD3JNH-Xj62y5BF.js → diagram-S7CK7UJ4-DE8I3gxQ.js} +4 -4
  100. package/dist/assets/{diagram-UB23O5K3-bseKIzhv.js → diagram-UQ7AKVKN-D2xQpbEq.js} +1 -1
  101. package/dist/assets/{diagram-B4RE2ZJO-mI-iOCGl.js → diagram-VSXAHHWV-DnttDSlO.js} +1 -1
  102. package/dist/assets/{diagram-Q27KOJAE-B98Knrnh.js → diagram-VX7I27RA-BSEwkn7K.js} +1 -1
  103. package/dist/assets/{diagram-LBJQPF4R-BMTSoZch.js → diagram-Z3DM3KII-BgB9f0Nv.js} +1 -1
  104. package/dist/assets/dist-BpPy7hlB.js +5 -0
  105. package/dist/assets/{ebnfDiagram-BXEA7PRR-Bgo10FP1.js → ebnfDiagram-PWID7BFC-32WvKbS2.js} +1 -1
  106. package/dist/assets/erDiagram-2YWLMYGG-Dwf8uAdl.js +99 -0
  107. package/dist/assets/eventmodeling-NTZA5JFV-CSwP2CpK.js +1 -0
  108. package/dist/assets/expressionUser-CASszt1z.js +1 -0
  109. package/dist/assets/flowDiagram-T62WH6J4-CqVSNJ8T.js +1 -0
  110. package/dist/assets/framework-BfSv4Kb0.js +36 -0
  111. package/dist/assets/{ganttDiagram-PKOTCBZU-CrmKcYGt.js → ganttDiagram-EL5Y4UJY-DqYIE0Cu.js} +2 -2
  112. package/dist/assets/getIcon-CgyYxSEC.js +1 -0
  113. package/dist/assets/gitGraph-4MIJSDKK--Dc33TN5.js +1 -0
  114. package/dist/assets/{gitGraphDiagram-DS77QQ5N-COu0mOui.js → gitGraphDiagram-WWUBYQGX-D1dYmoGu.js} +1 -1
  115. package/dist/assets/{highlighted-body-OFNGDK62-DUQut-ZU.js → highlighted-body-OFNGDK62-BxO9mjPI.js} +1 -1
  116. package/dist/assets/i18n-Cfqor-xb.js +9 -0
  117. package/dist/assets/i18n-locales-Bz4c8KXc.js +31 -0
  118. package/dist/assets/index-BU-FzlQ6.js +20 -0
  119. package/dist/assets/index-_VyGO4ms.css +2 -0
  120. package/dist/assets/info-A6RAGUB7-DBa3mCQO.js +1 -0
  121. package/dist/assets/{infoDiagram-6WML65LV-BT0Q6MIs.js → infoDiagram-FKFFQAWI-Cr1-5_Am.js} +1 -1
  122. package/dist/assets/infrastructure-CIpDEFyQ.js +3 -0
  123. package/dist/assets/{ishikawaDiagram-WSZJBQD7-kvPjMvBP.js → ishikawaDiagram-5VMMS53U-Bsjx7BsE.js} +1 -1
  124. package/dist/assets/{journeyDiagram-NVQOT4AX-DhXy7wxt.js → journeyDiagram-EYS64GPL-1scn5Z5c.js} +2 -2
  125. package/dist/assets/{kanban-definition-27J2QSJJ-CFDavpZY.js → kanban-definition-UXKFOSKX-DjLQAv5U.js} +2 -2
  126. package/dist/assets/mermaid-GHXKKRXX-NzEcDxBh.js +1 -0
  127. package/dist/assets/{mermaid-parser.core-Dd2B8Ckv.js → mermaid-parser.core-DUt1FNlO.js} +1 -1
  128. package/dist/assets/mermaid.core-pW40dd4u.js +10 -0
  129. package/dist/assets/metadata-admin-pawEBYI9.js +9 -0
  130. package/dist/assets/{mindmap-definition-FAOFIHXS-ITGoV4nW.js → mindmap-definition-THT77NOG-CUcYMB9H.js} +1 -1
  131. package/dist/assets/nav-selection-Dzm_mA3C.js +1 -0
  132. package/dist/assets/packet-AYTQ26CC-CPP93DZD.js +1 -0
  133. package/dist/assets/{pegDiagram-VL7TDLO6-BoRu9yvl.js → pegDiagram-XKGWAZYB-CT1r3sRa.js} +1 -1
  134. package/dist/assets/pie-WAS4IAKB-B-zzBvuc.js +1 -0
  135. package/dist/assets/{pieDiagram-7S7Q4E2Y-DVsM9krU.js → pieDiagram-E7YTZNPT-CSi-V1LQ.js} +3 -3
  136. package/dist/assets/plugin-calendar-BwiiCIjv.js +1 -0
  137. package/dist/assets/plugin-charts-CDGkx7z5.js +7 -0
  138. package/dist/assets/plugin-chatbot-BGnkLzFS.js +122 -0
  139. package/dist/assets/plugin-dashboard-Bj4ldCX6.js +6 -0
  140. package/dist/assets/plugin-form-_fjHxKTV.js +1 -0
  141. package/dist/assets/plugin-gantt-zR8DkpEg.js +63 -0
  142. package/dist/assets/plugin-grid-kkbz4uec.js +9 -0
  143. package/dist/assets/plugin-kanban-DA0eW6yj.js +1 -0
  144. package/dist/assets/plugin-map-DukneTNg.js +1 -0
  145. package/dist/assets/{plugin-markdown-7fyNN0UM.js → plugin-markdown-B7zwZHmn.js} +1 -1
  146. package/dist/assets/plugin-report-DaPtlsJr.js +59 -0
  147. package/dist/assets/plugin-timeline-B6rsNNAK.js +1 -0
  148. package/dist/assets/plugin-tree-DauauLFc.js +1 -0
  149. package/dist/assets/plugin-view-5qxxRyZZ.js +1 -0
  150. package/dist/assets/plugins-views-iYcMmImr.js +4 -0
  151. package/dist/assets/{quadrantDiagram-CIZ2JOQS-C4VzXHnp.js → quadrantDiagram-AXDQQJYC-DUJ_94hm.js} +1 -1
  152. package/dist/assets/radar-RG4KPBEZ-DWmbpYEk.js +1 -0
  153. package/dist/assets/railroad-74A4TZTK-xJ7dMu2F.js +1 -0
  154. package/dist/assets/railroad-abnf-HS5TGJTU-Cw4KG_nE.js +1 -0
  155. package/dist/assets/railroad-ebnf-LZEXJU2U-C0cgrfTl.js +1 -0
  156. package/dist/assets/railroad-peg-WCYAUIDC-DOEGG9oQ.js +1 -0
  157. package/dist/assets/{railroadDiagram-AXF67PYL-DqZ3yKWv.js → railroadDiagram-O6MQD6OU-CEyfAhzM.js} +1 -1
  158. package/dist/assets/{requirementDiagram-LRYGKXZP-BeH0P3vD.js → requirementDiagram-IS5BZ75X-CAK7hvBg.js} +2 -2
  159. package/dist/assets/{runtime-metadata-persistence-DpS5GXuQ.js → runtime-metadata-persistence-DYPxFzHI.js} +1 -1
  160. package/dist/assets/{sankeyDiagram-W5VNT64P-Bu_tPh-A.js → sankeyDiagram-P5KCCOFB-DgYJh7uz.js} +2 -2
  161. package/dist/assets/{sequenceDiagram-SI44F4Z6-BWEuLn1a.js → sequenceDiagram-WJ2MYXX4-DsQerPtC.js} +1 -1
  162. package/dist/assets/{src-CY2xhbXR.js → src-CVJP2nIc.js} +1 -1
  163. package/dist/assets/src-JX1BkhmR.js +17 -0
  164. package/dist/assets/{src-ClOOPIkS.js → src-S6pzKItc.js} +1 -1
  165. package/dist/assets/src-_DxAIBqo.js +1 -0
  166. package/dist/assets/{stateDiagram-OKZ733FA-Cp7aDYsZ.js → stateDiagram-XQSTLZYL-BJndPKik.js} +1 -1
  167. package/dist/assets/stateDiagram-v2-IH3M54BS-Bi94bTLl.js +1 -0
  168. package/dist/assets/studioEntry-C6G8U-LG.js +1 -0
  169. package/dist/assets/submitRedirect-UXd9NsjL.js +1 -0
  170. package/dist/assets/swimlanes-V6O3JKXN-BiKyiEJr.js +1 -0
  171. package/dist/assets/swimlanesDiagram-JKAHXJPX-DKIR852g.js +8 -0
  172. package/dist/assets/{timeline-definition-Z64GVDOM-BcUiJfLU.js → timeline-definition-24CTP7MA-CW5rY3PX.js} +2 -2
  173. package/dist/assets/treeView-Q6P3EWNA-BcWCBGcU.js +1 -0
  174. package/dist/assets/treemap-WGGIJYW6-DMTEJzXV.js +1 -0
  175. package/dist/assets/ui-components-D2lrjG-t.js +43 -0
  176. package/dist/assets/ui-layout-UUTFXV6S.js +1 -0
  177. package/dist/assets/use-book-data-qUZAxIs0.js +1 -0
  178. package/dist/assets/useActionModal-CkM-zGdy.js +1 -0
  179. package/dist/assets/usePackageL10n-F9isJ9pn.js +1 -0
  180. package/dist/assets/useSettingsLabel-CSZBfUiw.js +1 -0
  181. package/dist/assets/utils-MjUhYVsx.js +1 -0
  182. package/dist/assets/{vendor-charts-BEGSmcjR.js → vendor-charts-CY9WhhzX.js} +1 -1
  183. package/dist/assets/vendor-i18n-C1AQDWux.js +1 -0
  184. package/dist/assets/{vendor-markdown-C_Ip9E_I.js → vendor-markdown-BW_XFZ_b.js} +25 -25
  185. package/dist/assets/vendor-objectstack-BeKUVjuj.js +270 -0
  186. package/dist/assets/{vennDiagram-T6HMQDX7-BKJsL5fS.js → vennDiagram-4TSXK5OY-C79cMc25.js} +1 -1
  187. package/dist/assets/wardley-WFR3VGLG-BRyRizpT.js +1 -0
  188. package/dist/assets/{wardleyDiagram-T6FBY63Y-CZ0aMbYX.js → wardleyDiagram-VM6X3IG4-BAO0_jUk.js} +1 -1
  189. package/dist/assets/{xychartDiagram-ELKLHX3M-BpK2RmQ_.js → xychartDiagram-S5SC5T6Z-BIRd7YRo.js} +3 -3
  190. package/dist/eager-closure.json +318 -0
  191. package/dist/index.html +271 -15
  192. package/package.json +2 -2
  193. package/dist/assets/AdapterProvider-3zTVoQKF.js +0 -3
  194. package/dist/assets/AiPendingActionsPage-DD5DLXIK.js +0 -1
  195. package/dist/assets/ApiConsolePage-CSQNdOPN.js +0 -1
  196. package/dist/assets/AppManagementPage-vRCBT69X.js +0 -1
  197. package/dist/assets/ApprovalsInboxPage-Bft5QF0I.js +0 -1
  198. package/dist/assets/CreateViewDialog-CW0w7Nxc.js +0 -1
  199. package/dist/assets/DashboardView-CTBV4_tx.js +0 -1
  200. package/dist/assets/ExpressionProvider-X1OAB_O-.js +0 -1
  201. package/dist/assets/FlowRunsPage-CUhBLwm-.js +0 -1
  202. package/dist/assets/InterfaceListPage-FCdy-_Q-.js +0 -1
  203. package/dist/assets/ManagedByBadge-Bap9_dqR.js +0 -1
  204. package/dist/assets/MarketplaceAccessDenied-CrK7hygV.js +0 -1
  205. package/dist/assets/MarketplaceInstalledPage-Cv-qDRNA.js +0 -1
  206. package/dist/assets/MarketplacePackagePage-CMS--SE2.js +0 -4
  207. package/dist/assets/MarketplacePage-njErv-tN.js +0 -1
  208. package/dist/assets/MetadataInspector-CNeJqkLQ.js +0 -1
  209. package/dist/assets/MetadataProvider-DwMR1SMR.js +0 -1
  210. package/dist/assets/ObjectDataPage-BVV4yksz.js +0 -1
  211. package/dist/assets/PageView-XUBdr6tb.js +0 -1
  212. package/dist/assets/ProfilePage-ClU0WVRr.js +0 -1
  213. package/dist/assets/PublicFormsPage-a_MNzdQw.js +0 -1
  214. package/dist/assets/RecordDetailView-uf81gH3J.js +0 -11
  215. package/dist/assets/RecordFormPage-CLZcT8Z0.js +0 -1
  216. package/dist/assets/ReportDefaultInspector-DU2azDYd.js +0 -3
  217. package/dist/assets/ReportView-oFhBKNBE.js +0 -2
  218. package/dist/assets/SearchResultsPage-lgNcs7l7.js +0 -1
  219. package/dist/assets/SettingsHub-TQOc7wH3.js +0 -1
  220. package/dist/assets/SettingsView-DAje5pDB.js +0 -1
  221. package/dist/assets/SystemHubPage-DUE-2-vc.js +0 -1
  222. package/dist/assets/architecture-TIHT7OUA-B8Ln-u1a.js +0 -1
  223. package/dist/assets/blockDiagram-VBNYF7ZC-l_P_W7_Y.js +0 -132
  224. package/dist/assets/c4Diagram-5PPSVZJV-CE82HAlO.js +0 -10
  225. package/dist/assets/channel-DowAYf9b.js +0 -1
  226. package/dist/assets/chunk-3NCLNEKW-Z5ckM4mG.js +0 -1
  227. package/dist/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
  228. package/dist/assets/chunk-7Z6QIM7H-m6s_oalL.js +0 -10
  229. package/dist/assets/chunk-I66GZJ75-BsY3mBMx.js +0 -127
  230. package/dist/assets/chunk-J7OUQ5F2-Cl4FNR_k.js +0 -1
  231. package/dist/assets/chunk-JQJVKLGR-BApWxqMA.js +0 -156
  232. package/dist/assets/chunk-NSK5VX7P-BBTxIP6Z.js +0 -2
  233. package/dist/assets/chunk-QR6OTTB3-DJcD7xr-.js +0 -62
  234. package/dist/assets/chunk-RYQCIY6F-CnMsR_qh.js +0 -1
  235. package/dist/assets/chunk-UBXNYLIW-B7z1tp3V.js +0 -1
  236. package/dist/assets/chunk-W5SLKNZC-BnMc5i0B.js +0 -1
  237. package/dist/assets/chunk-WRU74C26-MrzCPX2E.js +0 -70
  238. package/dist/assets/chunk-XXDRQBXY-NKBlW2Dm.js +0 -1
  239. package/dist/assets/chunk-ZIRB5QZD-O39ZBUk3.js +0 -32
  240. package/dist/assets/classDiagram-JCYQIIEL-C4ADaKBz.js +0 -1
  241. package/dist/assets/classDiagram-v2-OCEON4UE-C4ADaKBz.js +0 -1
  242. package/dist/assets/createDerive-xZXxMz1g.js +0 -1
  243. package/dist/assets/cynefin-VYW2F7L2-exAq6djZ.js +0 -1
  244. package/dist/assets/cytoscape.esm-B-NFISlW.js +0 -321
  245. package/dist/assets/dagre-Buvkdvvj.js +0 -1
  246. package/dist/assets/dagre-VZM6K2ZE-B5E8-xuM.js +0 -4
  247. package/dist/assets/dist-jor1XT9f.js +0 -5
  248. package/dist/assets/erDiagram-JOGREHBK-BU4b8mUv.js +0 -85
  249. package/dist/assets/eventmodeling-45OFAUF4-DVTVIsGT.js +0 -1
  250. package/dist/assets/flowDiagram-UKHOOZJN-BDHHPApJ.js +0 -1
  251. package/dist/assets/framework-LCCQTTcs.js +0 -47
  252. package/dist/assets/getIcon-Bnm_i39L.js +0 -1
  253. package/dist/assets/gitGraph-TEB2WS4Q-DizXBl0d.js +0 -1
  254. package/dist/assets/i18n-DGSduXFT.js +0 -9
  255. package/dist/assets/index-ZtYnn1PE.css +0 -2
  256. package/dist/assets/index-mpVXni3j.js +0 -2
  257. package/dist/assets/info-DKCQHKI2-CfAGND28.js +0 -1
  258. package/dist/assets/infrastructure-CerjT_c2.js +0 -3
  259. package/dist/assets/map-BaFkSB1l.js +0 -1
  260. package/dist/assets/mermaid-GHXKKRXX-DQTMu5TJ.js +0 -1
  261. package/dist/assets/mermaid.core-BwiBFu_S.js +0 -10
  262. package/dist/assets/metadata-admin-C_DEFfDE.js +0 -25
  263. package/dist/assets/packet-7NZHBO7P-DeymwuCa.js +0 -1
  264. package/dist/assets/pie-RZYD4A2V-C2S5u8nr.js +0 -1
  265. package/dist/assets/plugin-calendar-ClpbcK3u.js +0 -1
  266. package/dist/assets/plugin-charts-Cq0LpABN.js +0 -7
  267. package/dist/assets/plugin-chatbot-Cq7rZtnW.js +0 -120
  268. package/dist/assets/plugin-dashboard-C8Ohdrxi.js +0 -6
  269. package/dist/assets/plugin-form-B7CBtYvZ.js +0 -1
  270. package/dist/assets/plugin-gantt-ChkG9_UG.js +0 -64
  271. package/dist/assets/plugin-grid-D49BBhCX.js +0 -8
  272. package/dist/assets/plugin-kanban-BsTsRjoP.js +0 -1
  273. package/dist/assets/plugin-map-CQAe4Yh6.js +0 -1
  274. package/dist/assets/plugin-report-01bEGHuR.js +0 -59
  275. package/dist/assets/plugin-timeline-Dw4Lj2Rz.js +0 -1
  276. package/dist/assets/plugin-tree-DW0XC55y.js +0 -1
  277. package/dist/assets/plugin-view-B9yCVdSX.js +0 -1
  278. package/dist/assets/plugins-views-BaBStVok.js +0 -4
  279. package/dist/assets/radar-I7S5WNFK-DzcfTC8k.js +0 -1
  280. package/dist/assets/railroad-3IZDKUUU-DT2-gzup.js +0 -1
  281. package/dist/assets/railroad-abnf-AHOZXSZD-BvCkhVdg.js +0 -1
  282. package/dist/assets/railroad-ebnf-EBAXGLYW-rvjxEE4k.js +0 -1
  283. package/dist/assets/railroad-peg-LSFZ7HO6-BIzZt1tD.js +0 -1
  284. package/dist/assets/skeletons-DVwGbFUS.js +0 -1
  285. package/dist/assets/src-BA9h8a8o.js +0 -1
  286. package/dist/assets/src-Ctj_ivDh.js +0 -19
  287. package/dist/assets/stateDiagram-v2-UEYNNEHI-DaTg8C5m.js +0 -1
  288. package/dist/assets/swimlanes-SLNWSIFB-wrx1JN6o.js +0 -1
  289. package/dist/assets/swimlanesDiagram-ULZ7WXOC-Bqz9GVuM.js +0 -8
  290. package/dist/assets/treeView-QDETBFTQ-DKZwqlNb.js +0 -1
  291. package/dist/assets/treemap-6X3UGDF4-Bqsldamv.js +0 -1
  292. package/dist/assets/ui-components-3mb69z8L.js +0 -42
  293. package/dist/assets/ui-layout-DpuFph25.js +0 -1
  294. package/dist/assets/use-book-data-BZg_051K.js +0 -1
  295. package/dist/assets/useActionModal-Z2yDiihK.js +0 -1
  296. package/dist/assets/usePackageL10n-Cy-u65Zo.js +0 -1
  297. package/dist/assets/useSettingsLabel-CvZKl8CQ.js +0 -1
  298. package/dist/assets/vendor-i18n-Cpia2wlg.js +0 -1
  299. package/dist/assets/vendor-objectstack-DGpW4oR-.js +0 -158
  300. package/dist/assets/wardley-OPB4EBWU-C_U_bbc2.js +0 -1
  301. /package/dist/assets/{sizeCapture-X5ZJPWSS-B0uUizjq.js → sizeCapture-INFHLROL-B0uUizjq.js} +0 -0
@@ -0,0 +1,36 @@
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{$t as r,Cn as i,Ft as a,G as o,J as s,Jt as c,Ot as l,U as u,Vt as d,_n as f,an as p,cn as m,dn as h,gn as g,ht as _,in as v,it as y,kn as b,ln as x,lt as ee,nn as te,on as ne,qt as re,rn as S,sn as ie,vn as ae,yt as oe}from"./vendor-objectstack-BeKUVjuj.js";import{c as se,h as ce,n as le,u as ue}from"./data-adapter-DL25qpAe.js";import{S as de,a as fe,d as pe,u as me,y as he}from"./i18n-locales-Bz4c8KXc.js";import{_ as C,a as ge,b as w,c as T,d as _e,f as E,g as D,h as O,i as ve,l as ye,m as be,n as xe,o as k,s as A,t as j,v as M,x as Se,y as Ce}from"./vendor-zod-r9lyeyrU.js";function we(e,t,n){if(!e)return;let r=e=>t.includes(e);if(r(e))return e;let i=`${n}.`;if(!e.includes(`.`)&&r(i+e))return i+e;if(e.startsWith(i)&&r(e.slice(i.length)))return e.slice(i.length)}var Te=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function Ee(e){if(!Te(e)||typeof e.find==`function`)return!1;let t=e.object;return typeof t==`string`&&t.length>0}function De(...e){let t={};for(let n of e)if(Array.isArray(n))for(let e of n){if(!Te(e))continue;let n=e.name??e.id;typeof n==`string`&&n&&(t[n]=e)}else if(Te(n))for(let[e,r]of Object.entries(n))Te(r)&&(t[e]=r);return t}function Oe(e,t,n){let r=we(t,Object.keys(e),n);return r===void 0?void 0:e[r]}function ke(e){if(!e)return;let t=e.pagination;return Te(t)&&typeof t.pageSize==`number`?t.pageSize:typeof e.limit==`number`?e.limit:void 0}function Ae(e){if(!e)return;let t=e.type??e.viewType;return typeof t==`string`&&t?t:void 0}function je(e){if(e){if(Array.isArray(e.columns))return e.columns;if(Array.isArray(e.fields))return e.fields}}function Me(e,t){let n={object:e.object},r=je(t);r!==void 0&&(n.columns=r);let i=t?.filter,a=i!==void 0&&e.filter!==void 0?ce(i,e.filter):e.filter??i;a!==void 0&&(n.filter=a);let o=e.sort??t?.sort;o!==void 0&&(n.sort=o);let s=e.limit??ke(t);s!==void 0&&(n.limit=s);let c=Ae(t);return c!==void 0&&(n.viewType=c),n}function Ne(e,t,n){return`dataSource.view "${t}" was not found on object "${e}". ${n.length?`Known views: ${[...n].sort().join(`, `)}.`:`This object has no saved views.`}`}var Pe={name:`dataSource`,type:`object`,label:`Data Source`,binding:`object`,description:"Per-element data binding: { object, view, filter, sort, limit }. Overrides the page-level object context for this block; `view` names a saved view of `object`, and `filter` is ANDed with the view’s own rather than replacing it."},Fe=new WeakSet;function Ie(e){return e&&(typeof e==`object`||typeof e==`function`)&&Fe.add(e),e}function Le(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&Fe.has(e)}var Re=`object-grid.list-view.object-form.embeddable-form.object-master-detail-form.object-kanban.object-calendar.object-gantt.object-timeline.object-map.object-metric.object-chart.dashboard.object-pivot.record:details.record:highlights.record:related_list.record:path.record:line_items.record:activity.record:discussion.record:history.record:quick_actions.record:reference_rail.record:alert.page:tabs.page:card.page:accordion.page:section.page:footer.page:sidebar.element:text.element:number.element:button.element:definition-list.element:repeater.action:button.action:group.action:menu.action:icon.flex.grid.stack.card.tabs.accordion.container.page:header.text.image.icon.markdown.element:divider.badge.alert.button.html`.split(`.`);new Set(Re);function ze(e,t){if(!Le(e))return t;let n=t?.inputs??[];return n.some(e=>e?.name===Pe.name)?t:{...t??{},inputs:[...n,{...Pe}]}}var N=new class{components=new Map;lazyEntries=new Map;listeners=new Set;version=0;register(e,t,n){let r=n?.namespace?`${n.namespace}:${e}`:e,i=ze(t,n);if(n?.namespace||console.warn(`Registering component "${e}" without a namespace is deprecated. Please provide a namespace in the meta parameter.\n\n Migration:\n // Before (deprecated):\n registry.register('${e}', MyComponent);\n\n // After:\n registry.register('${e}', MyComponent, { namespace: 'my-plugin' });\n\n See: https://www.objectui.org/docs/guide/plugin-development#namespaced-registration`),this.components.has(r),this.components.set(r,{type:r,component:t,...i}),n?.namespace&&!n?.skipFallback){let n=this.components.get(e);n&&n.component!==t&&n.type!==r&&console.warn(`Component "${e}" bare-name fallback is being overwritten by "${r}". If this is intentional keep going; otherwise register "${r}" with { skipFallback: true } so it doesn't claim the bare "${e}" key.`),this.components.set(e,{type:r,component:t,...i})}this.lazyEntries.delete(r),this.lazyEntries.delete(e),this.notify()}unregister(e,t){let n=t?`${t}:${e}`:e,r=this.components.delete(n);if(t){let t=this.components.get(e);t&&t.type===n&&this.components.delete(e)}return this.lazyEntries.delete(n),this.lazyEntries.delete(e),r&&this.notify(),r}registerLazy(e,t,n){let r=n?.namespace?`${n.namespace}:${e}`:e,i={loader:t,meta:n};this.lazyEntries.set(r,i),n?.namespace&&!n?.skipFallback&&this.lazyEntries.set(e,i),this.version++}hasLazy(e,t){return t?this.lazyEntries.has(`${t}:${e}`):this.lazyEntries.has(e)}loadLazy(e,t){let n=t?`${t}:${e}`:e,r=this.lazyEntries.get(n);if(r)return r.pending||=r.loader().catch(e=>{throw r.pending=void 0,e}),r.pending}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){this.version++;for(let e of this.listeners)try{e()}catch(e){console.error(`[Registry] listener error`,e)}}getVersion(){return this.version}get(e,t){if(t){let n=`${t}:${e}`;return this.components.get(n)?.component}return this.components.get(e)?.component}getConfig(e,t){if(t){let n=`${t}:${e}`;return this.components.get(n)}return this.components.get(e)}has(e,t){if(t){let n=`${t}:${e}`;return this.components.has(n)}return this.components.has(e)}getAllTypes(){return Array.from(this.components.keys())}getKnownTypes(){return Array.from(new Set([...this.components.keys(),...this.lazyEntries.keys()]))}getMeta(e,t){let n=t?`${t}:${e}`:e;return this.components.get(n)??this.lazyEntries.get(n)?.meta}deprecationFor(e,t,n){let r=this.getMeta(e,n)?.deprecated;if(r)return r.surfaces.includes(t)?r:void 0}getAllConfigs(){return Array.from(this.components.values())}getContractConfig(e){let t=this.components.get(e);if(t)return t;let n=this.lazyEntries.get(e);if(!n)return;let r=n.meta?.namespace,i=r&&!e.startsWith(`${r}:`)?`${r}:${e}`:e;return{...n.meta,type:i,lazy:!0}}getPublicConfigs(){let e=new Set,t=[],n=(n,r)=>{!r||e.has(r.type)||(e.add(r.type),t.push({...r,type:n}))};for(let e of Re)n(e,this.getContractConfig(e));for(let[e,t]of this.components.entries())t.tier===`public`&&!e.includes(`:`)&&n(e,t);for(let[e,t]of this.lazyEntries.entries())t.meta?.tier===`public`&&!e.includes(`:`)&&n(e,this.getContractConfig(e));return t}getNamespaceComponents(e){return Array.from(this.components.values()).filter(t=>t.namespace===e)}};function Be(e){return e==null||typeof e==`string`&&e.trim()===``||Array.isArray(e)&&e.length===0}l();function Ve(e){return typeof e==`object`&&!!e&&typeof e.dialect==`string`&&typeof e.source==`string`}function He(e){return a(e)||Ve(e)}function Ue(e,t){return t?He(e?.field?.defaultValue):!1}function We(e){return e.includes("${")?e:`\${${e}}`}function Ge(e){if(e!=null&&e!==``){if(typeof e==`boolean`)return e;if(typeof e==`string`)return We(e);if(typeof e==`object`&&typeof e.source==`string`){let t=e.source;return t?e.dialect===`cel`?{dialect:`cel`,source:t}:We(t):void 0}}}function Ke(e){if(typeof e==`string`)return e.trim()===``;if(typeof e==`object`&&e){let t=e.source;if(typeof t==`string`)return t.trim()===``}return!1}function P(e){return!Ke(e)&&Ge(e)!==void 0}function qe(e){return{required:!1,validate:e=>typeof e==`boolean`||P(e),message:`${e} must be a boolean or a declared predicate: an expression string (bare, e.g. "record.stage == 'closed'", or the "\${...}" template spelling), or a { dialect, source } expression envelope`}}var Je={type:{required:!0,validate:e=>typeof e==`string`&&e.length>0,message:`type must be a non-empty string`},id:{required:!1,validate:e=>typeof e==`string`,message:`id must be a string`},className:{required:!1,validate:e=>typeof e==`string`,message:`className must be a string`},visible:qe(`visible`),disabled:qe(`disabled`)};function Ye(e,t=`schema`){let n=[];return!e||typeof e!=`object`?(n.push({path:t,message:`Schema must be an object`,type:`error`,code:`INVALID_SCHEMA`}),n):(Object.entries(Je).forEach(([r,i])=>{let a=e[r];i.required&&a===void 0&&n.push({path:`${t}.${r}`,message:`${r} is required`,type:`error`,code:`MISSING_REQUIRED`}),a!==void 0&&!i.validate(a)&&n.push({path:`${t}.${r}`,message:i.message,type:`error`,code:`INVALID_TYPE`})}),n)}var Xe=Object.freeze({crud:'Node type `crud` was RETIRED (objectui#5373, ADR-0049 enforce-or-remove). `CRUDSchema` declared it in four places and no renderer ever registered it, so a node spelling it painted the OBJUI-001 "Unknown component type" panel. Compose the shapes that DO render instead: `object-grid` for the record table with its toolbar, filters, pagination and row/batch actions, `object-form` for the create/edit form, and `detail` for the record view.'});function Ze(e,t=`schema`){let n=e?.type;return typeof n!=`string`||!Object.prototype.hasOwnProperty.call(Xe,n)?[]:[{path:`${t}.type`,message:Xe[n],type:`error`,code:`RETIRED_TYPE`}]}var Qe=`field:`;function $e(e){let t=e.widget??e.type;return typeof t==`string`?t:void 0}function et(e,t){let n=$e(e);if(!(!n||!n.includes(`:`)||n.startsWith(Qe)))return{path:`${t}.${typeof e.widget==`string`?`widget`:`type`}`,message:`'${n}' is not a form field widget: a namespaced field widget id must name the \`field:\` namespace (objectui#5254), so this id resolves NOTHING on the field path and the renderer would fall through to a plain text box — putting a secret on screen in clear text when the field holds one (objectui#5375). Write the built-in spelling (e.g. \`password\`), or the field widget id \`field:${n.slice(n.indexOf(`:`)+1)}\`. Resolving in the registry is not proof it resolves HERE — \`ui:password\` is a registered SDUI node renderer and still renders clear text as a field.`,type:`error`,code:`UNRESOLVABLE_FIELD_WIDGET_NAMESPACE`}}function tt(e,t=`schema`){let n=[];return e.type===`form`&&e.fields&&Array.isArray(e.fields)&&e.fields.forEach((r,i)=>{r.name||n.push({path:`${t}.fields[${i}]`,message:`Form field requires name property`,type:`error`,code:`MISSING_FIELD_NAME`});let a=et(r,`${t}.fields[${i}]`);a&&n.push(a),e.fields.filter(e=>e.name===r.name).length>1&&n.push({path:`${t}.fields[${i}]`,message:`Duplicate field name: ${r.name}`,type:`warning`,code:`DUPLICATE_FIELD_NAME`})}),n}function nt(e,t=`schema`){let n=[],r=e.children||e.body;if(r){if(Array.isArray(r))r.forEach((e,r)=>{if(typeof e==`object`&&e){let i=rt(e,`${t}.children[${r}]`);n.push(...i.errors,...i.warnings)}});else if(typeof r==`object`&&r){let e=rt(r,`${t}.children`);n.push(...e.errors,...e.warnings)}}return n}function rt(e,t=`schema`){let n=[];n.push(...Ye(e,t)),n.push(...Ze(e,t)),n.push(...tt(e,t)),n.push(...nt(e,t));let r=n.filter(e=>e.type===`error`),i=n.filter(e=>e.type===`warning`);return{valid:r.length===0,errors:r,warnings:i}}var it=[`id`,`className`,`role`,`tabIndex`,`autoFocus`,`onClick`,`onBlur`,`onFocus`];function at(e){return e.startsWith(`data-`)||e.startsWith(`aria-`)}function ot(e,t){let n=new Set(t),r={};for(let t of Object.keys(e))(n.has(t)||at(t))&&(r[t]=e[t]);return r}function st(e){return ot(e,it)}l();function ct(e,t){if(e==null)return{enabled:t};if(typeof e==`boolean`)return{enabled:e};let n=e.enabled??t;if(e.visibleWhen==null&&e.disabledWhen==null)return{enabled:n};let r={};return e.visibleWhen!=null&&(r.visibleWhen=e.visibleWhen),e.disabledWhen!=null&&(r.disabledWhen=e.disabledWhen),{enabled:n,predicates:r}}function lt(e){return ct(e,!1).predicates}var ut={create:`create`,import:`import`,edit:`update`,delete:`delete`,exportCsv:`export`};function dt(e,t){let n=d({managedBy:e?.managedBy??void 0,userActions:e?.userActions??void 0});if(Array.isArray(t)){let e=new Set(t);for(let[t,r]of Object.entries(ut))n[t]&&!e.has(r)&&(n[t]=!1)}return n}function ft(e,t){return dt(e,t).edit}function pt(e){if(Array.isArray(e))return e;if(e&&typeof e==`object`){if(Array.isArray(e.records))return e.records;if(Array.isArray(e.data))return e.data;if(Array.isArray(e.value))return e.value}return[]}var F=`field`,mt=[`name`,`fieldName`],ht=e=>!!e&&typeof e==`object`&&!Array.isArray(e),gt=e=>typeof e==`string`&&e.length>0?e:void 0;function _t(e){if(typeof e==`string`)return gt(e);if(!ht(e))return;let t=gt(e[F]);if(t)return t;for(let t of mt){let n=gt(e[t]);if(n)return n}}var vt=new Set,yt=()=>!1;function bt(e,t,n){if(!(!yt()||n.length===0))for(let r of n){let n=`${t}:${r}:${String(e[r])}`;vt.has(n)||(vt.add(n),console.warn(`[ObjectUI] Column carries two identities: \`${F}: '${t}'\` and \`${r}: '${String(e[r])}'\`. \`${F}\` wins — it is the only key \`ListColumnSchema\` declares — and \`${r}\` has been rewritten to match, so the rendered column and the requested field agree. Fix the producer: drop \`${r}\` and author \`${F}\` only. (objectui#3104)`))}}function xt(e){if(typeof e==`string`||!ht(e))return e;let t=_t(e);if(!t)return e;let n=e[F]!==t,r=mt.filter(n=>e[n]!==void 0&&e[n]!==t);if(!n&&r.length===0)return e;bt(e,t,r);let i={...e};i[F]=t;for(let e of r)i[e]=t;return i}function St(e){if(!Array.isArray(e))return e;let t=!1,n=e.map(e=>{let n=xt(e);return n!==e&&(t=!0),n});return t?n:e}function Ct(e){if(ht(e))return gt(e.header)??gt(e.label)}var wt=new Set([`lookup`,`master_detail`,`tree`,`user`]);function Tt(e){return!!e&&typeof e==`object`&&wt.has(e.type)}function Et(e,t){if(!e||typeof e!=`object`)return[];let n=[];for(let[t,r]of Object.entries(e))Tt(r)&&n.push(t);if(n.length===0)return[];if(t&&Array.isArray(t)&&t.length>0){let e=new Set;for(let n of t){let t=_t(n);t&&e.add(t)}return n.filter(t=>e.has(t))}return n}var Dt=Object.freeze({owner:"[object-ui] Field type `owner` was RETIRED (objectui#4814). It was a synonym for `user` with no behavioral difference, and it is not a member of `@objectstack/spec`'s FieldType. Write the record-owner field as `{ type: 'user', name: 'owner' }` — the field NAME carries the ownership meaning, the type carries the widget. The `widget: 'field:owner'` spelling is retired with it."});function Ot(e){return typeof e!=`string`||!e?!1:Object.prototype.hasOwnProperty.call(Dt,e)}var kt=new Set;function At(e){let t=Ot(e)?Dt[e]:void 0;return t?(kt.has(e)||(kt.add(e),console.error(t)),!0):!1}l();var jt=_;function Mt(e){return!!e&&typeof e==`object`&&jt.has(e.type)}function Nt(e,t=0){let n=`migrated_${t}`;return e.type===`separator`?{id:n,type:`separator`,label:e.label||``}:e.type===`group`?{id:n,type:`group`,label:e.label||``,icon:e.icon,children:(e.children||[]).map((e,n)=>Nt(e,t*100+n)),visible:e.hidden===void 0?void 0:!e.hidden,badge:e.badge,defaultOpen:!0}:e.href?{id:n,type:`url`,label:e.label||``,icon:e.icon,url:e.href,target:`_blank`,visible:e.hidden===void 0?void 0:!e.hidden,badge:e.badge}:{id:n,type:`page`,label:e.label||``,icon:e.icon,pageName:e.path||``,visible:e.hidden===void 0?void 0:!e.hidden,badge:e.badge}}function Pt(e){return/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/.test(e)}function Ft(e){return{type:`app`,name:e.name,title:e.title,label:e.title,description:e.description,icon:e.icon,logo:e.branding.logo,favicon:e.branding.favicon,branding:e.branding,layout:e.layout,navigation:e.navigation}}function It(e){if(!e)return null;let t=e.stageField;if(t===!1)return null;if(typeof t==`string`&&t)return t;let n=e.fields||{};for(let e of[`status`,`stage`,`state`,`phase`])if(e in n)return e;for(let[e,t]of Object.entries(n)){let n=(t?.type||``).toLowerCase();if(n===`status`||n===`stage`)return e}return null}function Lt(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=Object.keys(e);if(t.length!==1||t[0]!==`preset`)return!1;let n=e.preset;return typeof n==`string`&&n.length>0}function Rt(e){if(!e||typeof e!=`object`)return e;let t=e.defaultValue;return Lt(t)?{...e,defaultValue:t.preset}:e}function zt(e){if(!e||typeof e!=`object`)return e;let t=e.globalFilters;if(!Array.isArray(t))return e;let n=!1,r=t.map(e=>{let t=Rt(e);return t!==e&&(n=!0),t});return n?{...e,globalFilters:r}:e}var Bt=[`text`,`number`,`date`,`datetime`,`currency`,`percent`,`boolean`,`action`],Vt={int:`number`,integer:`number`,float:`number`,double:`number`,"datetime-local":`datetime`};function Ht(e){if(typeof e==`string`)return Bt.includes(e)?e:Vt[e]}var Ut=new Set(`id._id.__v._version._rev.created.created_at.createdAt.created_by.createdBy.modified.modified_by.updated_at.updatedAt.updated_by.updatedBy.deleted.deleted_at.deletedAt.is_deleted.instance_state.locked.owner_id.organization_id.tenant_id.company_id.space`.split(`.`)),Wt={createdAt:`created_at`,createdBy:`created_by`,updatedAt:`updated_at`,updatedBy:`updated_by`},Gt=new Set(Object.values(Wt));function Kt(e,t){return t?.system===!0||Ut.has(e)}var qt=`text.textarea.number.boolean.date.datetime.time.select.email.phone.url.password.currency.percent.lookup.formula.autonumber.file.image.markdown.html.color.code.location.address.rating.slider`.split(`.`);function Jt(e,t){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e.default;if(typeof t==`string`)return t}return t}function Yt(e){let t=e.type??`tabular`,n=t===`joined`||t===`tabular`?`tabular`:t,r=(e.values??[]).map(e=>({name:e,label:Jt(void 0,e)})),i=(e.rows??[]).map(e=>({field:e,sort:`asc`}));return{type:`report`,title:Jt(e.label,e.name),description:e.description?Jt(e.description,``):void 0,reportType:n,fields:r,groupBy:i.length>0?i:void 0}}function Xt(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.name!=`string`||t.type===`report`&&Array.isArray(t.fields)?!1:typeof t.dataset==`string`||Array.isArray(t.blocks)||typeof t.type==`string`&&[`tabular`,`summary`,`matrix`,`joined`].includes(t.type)}l();function Zt(e,t){if(!t)return!0;let n=e?.locations;return Array.isArray(n)&&n.includes(t)}var Qt=`an actions array is either all action ids or all inline action objects — mixed id/object action arrays are refused; use all ids or all objects`;function $t(e){return e===null?`null`:Array.isArray(e)?`an array`:`a ${typeof e}`}function en(e){let t=e=>typeof e==`string`?`id`:typeof e==`object`&&e&&!Array.isArray(e)?`object`:null;if(e.length===0)return{kind:`objects`,objects:[]};let n=t(e[0]);for(let r=0;r<e.length;r+=1){let i=e[r],a=t(i);if(a===null)return{kind:`refused`,index:r,message:`element ${r} is ${$t(i)}, which is neither an action id (a string) nor an inline action object; ${Qt}`};if(a!==n)return{kind:`refused`,index:r,message:`element ${r} is ${a===`id`?`an action id`:`an inline action object`} but element 0 is ${n===`id`?`an action id`:`an inline action object`}; an actions array is either all action ids or all inline action objects — mixed id/object action arrays are refused; use all ids or all objects`}}return n===`id`?{kind:`ids`,ids:e}:{kind:`objects`,objects:e}}function tn(e,t){let n=en(e);if(n.kind===`refused`)return n;if(n.kind===`objects`)return{kind:`objects`,actions:Array.from(n.objects)};let r=new Map;for(let e of t??[]){let t=typeof e?.name==`string`?e.name:``;t&&!r.has(t)&&r.set(t,e)}let i=[],a=[];return n.ids.forEach((e,t)=>{let n=r.get(e);n?i.push(n):a.push({index:t,id:e})}),{kind:`ids`,ids:n.ids,actions:i,unresolved:a}}var nn=ee.options,rn=[`checkbox`,`reference`,`datetime-local`],an=3e4,on=new Set([408,425,429,502,503,504]),sn=class extends Error{status;retryAfterMs;constructor(e,t,n){super(n??`Endpoint returned ${e}`),this.status=e,this.retryAfterMs=t,this.name=`HttpFetchError`}};function cn(e){return e instanceof sn?on.has(e.status):!0}function ln(e,t){if(!e)return;let n=e.trim();if(!n)return;let r;if(/^\d+$/.test(n))r=Number(n)*1e3;else{let e=Date.parse(n);if(Number.isNaN(e))return;r=e-t}if(!(!Number.isFinite(r)||r<0))return Math.min(r,an)}function un(e,t,n){return n===void 0?Math.min(t*2**e,an):n}var dn=e=>new Promise(t=>setTimeout(t,e));function fn(e){return ln(e.headers?.get?.(`Retry-After`),Date.now())}var pn=Symbol.for(`objectui.inflightGet`);function mn(){let e=globalThis,t=e[pn];if(t)return t;let n=new Map;return e[pn]=n,n}function hn(e){if(!e)return``;let t=[];if(typeof Headers<`u`&&e instanceof Headers)e.forEach((e,n)=>t.push(`${n.toLowerCase()}=${e}`));else if(Array.isArray(e))for(let[n,r]of e)t.push(`${String(n).toLowerCase()}=${String(r)}`);else for(let[n,r]of Object.entries(e))t.push(`${n.toLowerCase()}=${String(r)}`);return t.sort().join(`,`)}function gn(e,t){return`GET\n${t?.credentials??`same-origin`}\n${e}\n${hn(t?.headers)}`}function _n(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}var vn=(e,t)=>fetch(e,t);async function yn(e,t,n=vn){let r=t?.method;if(r!==void 0&&r.toUpperCase()!==`GET`)throw TypeError(`sharedGetJson is GET-only; refusing to share a ${r.toUpperCase()} request`);if(t?.signal){let r=await n(e,{...t,method:`GET`});if(!r.ok)throw new sn(r.status,fn(r));return await r.json()}let i=gn(e,t),a=mn(),o=a.get(i);if(o)return _n(await o);let s=(async()=>{let r=await n(e,{...t,method:`GET`});if(!r.ok)throw new sn(r.status,fn(r));return await r.json()})();a.set(i,s);let c=()=>{a.get(i)===s&&a.delete(i)};return s.then(c,c),_n(await s)}var bn=`\0`,xn=`[-\\u2013\\u2014|/·,:]`,Sn=[`name`,`title`,`subject`,`label`,`full_name`,`display_name`],Cn=new Set([`date`,`datetime`,`time`,`number`,`currency`,`percent`,`boolean`,`file`,`image`,`attachment`,`json`,`geolocation`,`select`,`multiselect`,`picklist`,`multipicklist`,`lookup`,`master_detail`,`reference`,`autonumber`,`auto_number`,`phone`]),wn=new Set([`text`,`string`,`textarea`,`html`]);function Tn(e){let t=e.name??e.full_name??e.display_name??e.label??e.title??e.subject??null;return t==null||typeof t==`string`&&!t.trim()?[e.salutation,e.first_name,e.last_name].filter(e=>typeof e==`string`&&e.trim()).map(e=>e.trim()).join(` `)||(typeof e.email==`string`&&e.email.trim()?e.email.trim():null):typeof t==`string`?t:String(t)}function En(e,t){let n=typeof e==`string`?e:e&&typeof e==`object`&&typeof e.source==`string`?e.source:void 0;if(!n||!t||typeof t!=`object`)return``;n=n.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,`{$1}`);let r=!1,i=n.replace(/\{([^{}]+)\}/g,(e,n)=>{let i=String(n).trim().split(`.`),a=t;for(let e of i){if(a==null)break;a=a[e]}return a&&typeof a==`object`&&(a=Tn(a)),a==null||a===``?bn:(r=!0,String(a))});if(!r)return``;let a=RegExp(`\\s*${xn}\\s*${bn}`,`g`),o=RegExp(`${bn}\\s*${xn}\\s*`,`g`);return i=i.replace(a,``).replace(o,``).replace(new RegExp(bn,`g`),``).replace(/\s+/g,` `).trim(),i}function Dn(e){if(!e||typeof e!=`object`)return!1;let t=typeof e.type==`string`?e.type.toLowerCase():void 0;if(!t)return!0;if(t===`formula`){let t=String(e.data_type??e.dataType??e.returnType??e.result_type??``).toLowerCase();return wn.has(t)}return!Cn.has(t)}function On(e){return e?Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&typeof e.name==`string`).map(e=>[e.name,e]):typeof e==`object`?Object.keys(e).map(t=>[t,e[t]]):[]:[]}var kn=new WeakMap;function An(e){let t=On(e?.fields).filter(([,e])=>Dn(e));if(t.length===0)return;for(let e of Sn){let n=t.find(([t])=>t.toLowerCase()===e);if(n)return n[0]}let n=t.find(([e])=>{let t=e.toLowerCase();return t.endsWith(`_name`)||t.endsWith(`_title`)||t.startsWith(`name_`)});return n?n[0]:t[0][0]}function jn(e){if(typeof e!=`object`||!e)return An(e);if(kn.has(e))return kn.get(e);let t=An(e);return kn.set(e,t),t}function Mn(e){return e?.nameField??e?.displayNameField??e?.NAME_FIELD_KEY}function Nn(e){let t=Mn(e);return typeof t==`string`&&t.length>0?t:jn(e)}function Pn(e,t){let n=Mn(e),r=typeof n==`string`&&n.length>0,i=r?n:jn(e),a=i?e?.fields?.[i]:void 0;return!i||!a||a.hidden||!r&&Kt(i,a)?t:[i,...t.filter(e=>e!==i)]}var Fn=[`name`,`full_name`,`fullName`,`display_name`,`displayName`,`title`,`subject`,`label`];function In(e,t){if(!t||!e||typeof e!=`object`)return;let n=e[t];if(n&&typeof n==`object`&&(n=Tn(n)),n==null)return;let r=typeof n==`string`?n.trim():String(n);return r===``?void 0:r}function Ln(e,t,n){let r=In(t,n?.titleField);if(r)return r;let i=In(t,Mn(e));if(i)return i;if(e?.titleFormat){let n=En(e.titleFormat,t);if(n)return n}let a=In(t,jn(e));if(a)return a;if(n?.deriveFromRecordKeys!==!1&&t&&typeof t==`object`){for(let e of Fn){let n=In(t,e);if(n)return n}for(let e of Object.keys(t)){let n=e.toLowerCase();if(!(n===`id`||n===`_id`||n.endsWith(`_id`)||n.startsWith(`_`))&&(n.endsWith(`_name`)||n.endsWith(`_title`)||n.startsWith(`name_`))){let n=In(t,e);if(n)return n}}}let o=t?.id??t?._id;return o!=null&&String(o).trim()!==``?`Record #${o}`:n?.fallback??`Untitled`}function Rn(e,t){if(e==null||e===``)return null;let n=t?.labels;if(typeof e==`string`)return n?.[e]??e;if(typeof e==`number`)return Number.isFinite(e)?n?.[String(e)]??e:null;if(typeof e==`boolean`)return e;if(e instanceof Date){let t=e.getTime();return Number.isNaN(t)?null:t}if(Array.isArray(e)){let n=e.map(e=>Rn(e,t)).filter(e=>e!==null).map(e=>String(e));return n.length>0?n.join(`, `):null}if(typeof e==`object`){let t=e,r=t.id??t._id;if(r!=null){let e=n?.[String(r)];if(e)return e}let i=Ln(void 0,t,{fallback:``});return i===``?null:i}return String(e)}function zn(e,t){return e===null&&t===null?0:e===null?1:t===null?-1:typeof e==`boolean`&&typeof t==`boolean`?!!e-+!!t:typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0})}function Bn(e){if(e){if(typeof e==`string`){let[t,n]=e.trim().split(/\s+/);return t?{[t]:n?.toLowerCase()===`desc`?`desc`:`asc`}:void 0}if(Array.isArray(e)){let t={};for(let n of e)!n||typeof n.field!=`string`||n.field===``||(t[n.field]=n.order===`desc`?`desc`:`asc`);return Object.keys(t).length>0?t:void 0}}}var Vn=class e{scopes=[];constructor(e={}){this.scopes.push(new Map(Object.entries(e)))}pushScope(e){this.scopes.push(new Map(Object.entries(e)))}popScope(){this.scopes.length>1&&this.scopes.pop()}get(e){let t=e.split(`.`),n=t[0];for(let e=this.scopes.length-1;e>=0;e--)if(this.scopes[e].has(n)){let r=this.scopes[e].get(n);for(let e=1;e<t.length;e++)if(r&&typeof r==`object`)r=r[t[e]];else return;return r}}set(e,t){this.scopes.length>0&&this.scopes[this.scopes.length-1].set(e,t)}has(e){let t=e.split(`.`)[0];for(let e=this.scopes.length-1;e>=0;e--)if(this.scopes[e].has(t))return!0;return!1}toObject(){let e={};for(let t of this.scopes)for(let[n,r]of t.entries())e[n]=r;return e}createChild(t={}){let n=new e;return n.scopes=[...this.scopes,new Map(Object.entries(t))],n}},Hn={Math,JSON,parseInt,parseFloat,isNaN,isFinite},Un=new Set([`constructor`,`__proto__`,`prototype`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`]),Wn=class e{source=``;pos=0;context={};_evaluating=!0;evaluate(e,t){this.source=e.trim(),this.pos=0,this.context={...Hn,...t};let n=this.parseTernary();if(this.skipWhitespace(),this.pos<this.source.length)throw SyntaxError(`Unexpected token "${this.source[this.pos]}" at position ${this.pos} in expression "${e}"`);return n}skipWhitespace(){for(;this.pos<this.source.length&&/\s/.test(this.source[this.pos]);)this.pos++}peek(e=0){return this.source[this.pos+e]??``}consume(){return this.source[this.pos++]??``}withEvaluation(e,t){let n=this._evaluating;this._evaluating=e;try{return t()}finally{this._evaluating=n}}assertSafeProp(e){if(typeof e==`string`&&Un.has(e))throw TypeError(`Access to property "${e}" is not permitted in expressions`)}parseTernary(){let e=this.parseNullish();if(this.skipWhitespace(),this.peek()===`?`&&this.peek(1)!==`?`){if(this.pos++,this.skipWhitespace(),!this._evaluating){if(this.parseTernary(),this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);this.pos++,this.skipWhitespace(),this.parseTernary();return}if(e){let e=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);return this.pos++,this.skipWhitespace(),this.withEvaluation(!1,()=>this.parseTernary()),e}if(this.withEvaluation(!1,()=>this.parseTernary()),this.skipWhitespace(),this.peek()!==`:`)throw SyntaxError(`Expected ":" in ternary expression`);return this.pos++,this.skipWhitespace(),this.parseTernary()}return e}parseNullish(){let e=this.parseOr();for(this.skipWhitespace();this.peek()===`?`&&this.peek(1)===`?`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&e!=null)this.withEvaluation(!1,()=>this.parseOr());else{let t=this.parseOr();this._evaluating&&(e??=t)}this.skipWhitespace()}return e}parseOr(){let e=this.parseAnd();for(this.skipWhitespace();this.peek()===`|`&&this.peek(1)===`|`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&e)this.withEvaluation(!1,()=>this.parseAnd());else{let t=this.parseAnd();this._evaluating&&(e||=t)}this.skipWhitespace()}return e}parseAnd(){let e=this.parseEquality();for(this.skipWhitespace();this.peek()===`&`&&this.peek(1)===`&`;){if(this.pos+=2,this.skipWhitespace(),this._evaluating&&!e)this.withEvaluation(!1,()=>this.parseEquality());else{let t=this.parseEquality();this._evaluating&&(e&&=t)}this.skipWhitespace()}return e}parseEquality(){let e=this.parseAddition();for(this.skipWhitespace();;){let t;if(this.peek()===`=`&&this.peek(1)===`=`&&this.peek(2)===`=`)t=`===`,this.pos+=3;else if(this.peek()===`!`&&this.peek(1)===`=`&&this.peek(2)===`=`)t=`!==`,this.pos+=3;else if(this.peek()===`=`&&this.peek(1)===`=`)t=`==`,this.pos+=2;else if(this.peek()===`!`&&this.peek(1)===`=`)t=`!=`,this.pos+=2;else if(this.peek()===`>`&&this.peek(1)===`=`)t=`>=`,this.pos+=2;else if(this.peek()===`<`&&this.peek(1)===`=`)t=`<=`,this.pos+=2;else if(this.peek()===`>`&&this.peek(1)!==`>`)t=`>`,this.pos++;else if(this.peek()===`<`&&this.peek(1)!==`<`)t=`<`,this.pos++;else break;this.skipWhitespace();let n=this.parseAddition();switch(t){case`===`:e=e===n;break;case`!==`:e=e!==n;break;case`==`:e=e==n;break;case`!=`:e=e!=n;break;case`>`:e=e>n;break;case`<`:e=e<n;break;case`>=`:e=e>=n;break;case`<=`:e=e<=n}this.skipWhitespace()}return e}parseAddition(){let e=this.parseMultiplication();for(this.skipWhitespace();(this.peek()===`+`||this.peek()===`-`)&&this.peek(1)!==`=`;){let t=this.consume();this.skipWhitespace();let n=this.parseMultiplication();e=t===`+`?e+n:e-n,this.skipWhitespace()}return e}parseMultiplication(){let e=this.parseUnary();for(this.skipWhitespace();(this.peek()===`*`||this.peek()===`/`||this.peek()===`%`)&&this.peek(1)!==`=`;){let t=this.consume();this.skipWhitespace();let n=this.parseUnary();t===`*`?e*=n:t===`/`?e/=n:e%=n,this.skipWhitespace()}return e}parseUnary(){if(this.skipWhitespace(),this.source.startsWith(`typeof`,this.pos)&&!/[\w$]/.test(this.source[this.pos+6]??``)){this.pos+=6,this.skipWhitespace();try{return typeof this.parseUnary()}catch{return`undefined`}}return this.peek()===`!`?(this.pos++,!this.parseUnary()):this.peek()===`-`?(this.pos++,-this.parseUnary()):this.peek()===`+`?(this.pos++,+this.parseUnary()):this.parseMember()}parseMember(){let e=this.parsePrimary();for(;;){this.skipWhitespace();let t=this.peek()===`?`&&this.peek(1)===`.`;if(this.peek()===`.`&&this.peek(1)!==`.`||t){t&&this.pos++,this.pos++,this.skipWhitespace();let n=this.parseIdentifierName();if(!n)break;if(this.assertSafeProp(n),this.skipWhitespace(),this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating){e=void 0;continue}e=e!=null&&typeof e[n]==`function`?e[n](...t):void 0}else{if(!this._evaluating){e=void 0;continue}e=e?.[n]}continue}let n=this.peek()===`?`&&this.peek(1)===`[`;if(this.peek()===`[`||n){n&&this.pos++,this.pos++,this.skipWhitespace();let t=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`]`)throw SyntaxError(`Expected "]" after bracket expression at position ${this.pos}`);if(this.pos++,this.assertSafeProp(t),!this._evaluating){e=void 0;continue}e=e?.[t];continue}if(this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating){e=void 0;continue}if(typeof e==`function`)e=e(...t);else throw TypeError(`${String(e)} is not a function`);continue}break}return e}parsePrimary(){this.skipWhitespace();let e=this.peek();if(e===`(`){this.pos++;let e=this.parseTernary();if(this.skipWhitespace(),this.peek()!==`)`)throw SyntaxError(`Expected ")" to close "(" expression at position ${this.pos}`);return this.pos++,e}if(e===`[`)return this.parseArrayLiteral();if(e===`"`||e===`'`)return this.parseString(e);if(/\d/.test(e)||e===`.`&&/\d/.test(this.peek(1)))return this.parseNumber();if(/[a-zA-Z_$]/.test(e))return this.parseIdentifierOrKeyword();throw SyntaxError(`Unexpected character "${e}" at position ${this.pos}`)}parseArrayLiteral(){this.pos++;let e=[];for(this.skipWhitespace();this.peek()!==`]`&&this.pos<this.source.length;)e.push(this.parseTernary()),this.skipWhitespace(),this.peek()===`,`&&(this.pos++,this.skipWhitespace());if(this.peek()!==`]`)throw SyntaxError(`Expected "]" to close array literal at position ${this.pos}`);return this.pos++,e}parseString(e){this.pos++;let t=``;for(;this.pos<this.source.length;){let n=this.source[this.pos];if(n===`\\`){this.pos++;let e=this.source[this.pos++]??``;switch(e){case`n`:t+=`
2
+ `;break;case`t`:t+=` `;break;case`r`:t+=`\r`;break;case`\\`:t+=`\\`;break;case`"`:t+=`"`;break;case`'`:t+=`'`;break;case"`":t+="`";break;default:t+=e}}else if(n===e){this.pos++;break}else t+=n,this.pos++}return t}parseNumber(){let e=this.pos,t=!1;for(;this.pos<this.source.length&&/\d/.test(this.source[this.pos]);)t=!0,this.pos++;if(this.source[this.pos]===`.`)for(this.pos++;this.pos<this.source.length&&/\d/.test(this.source[this.pos]);)t=!0,this.pos++;if(/[eE]/.test(this.source[this.pos]??``)){this.pos++,/[+-]/.test(this.source[this.pos]??``)&&this.pos++;let t=0;for(;this.pos<this.source.length&&/\d/.test(this.source[this.pos]);)t++,this.pos++;if(t===0)throw SyntaxError(`Invalid numeric literal exponent at position ${e}`)}if(!t)throw SyntaxError(`Invalid numeric literal at position ${e}`);let n=this.source.slice(e,this.pos),r=Number(n);if(!Number.isFinite(r))throw SyntaxError(`Invalid numeric literal "${n}" at position ${e}`);return r}parseIdentifierName(){let e=this.pos;for(;this.pos<this.source.length&&/[\w$]/.test(this.source[this.pos]);)this.pos++;return this.source.slice(e,this.pos)}parseIdentifierOrKeyword(){let e=this.parseIdentifierName();switch(e){case`true`:return!0;case`false`:return!1;case`null`:return null;case`undefined`:return;case`NaN`:return NaN;case`Infinity`:return 1/0}if(e===`new`)return this.parseNewExpression();if(this.skipWhitespace(),this.peek()===`=`&&this.peek(1)===`>`)return this.parseArrowFunction(e);if(this.peek()===`(`){this.pos++;let t=this.parseArgList();if(this.peek()!==`)`)throw SyntaxError(`Expected ")" after argument list at position ${this.pos}`);if(this.pos++,!this._evaluating)return;let n=this.context[e];if(typeof n==`function`)return n(...t);throw TypeError(`"${e}" is not a function`)}if(this._evaluating){if(!(e in this.context))throw ReferenceError(`${e} is not defined`);return this.context[e]}}parseNewExpression(){this.skipWhitespace();let e=this.parseIdentifierName();this.skipWhitespace();let t=[];if(this.peek()===`(`){if(this.pos++,t=this.parseArgList(),this.peek()!==`)`)throw SyntaxError(`Expected ")" after new ${e}() at position ${this.pos}`);this.pos++}if(this._evaluating)switch(e){case`Date`:return new Date(...t);case`RegExp`:return new RegExp(t[0],t[1]);default:throw TypeError(`new ${e}() is not supported in expressions`)}}parseArrowFunction(t){this.pos+=2,this.skipWhitespace();let n=this.pos,r=this.scanExpressionEnd(),i=this.source.slice(n,r).trim();this.pos=r;let a=this.context;return n=>new e().evaluate(i,{...a,[t]:n})}scanExpressionEnd(){let e=this.pos,t=0,n=!1,r=``;for(;e<this.source.length;){let i=this.source[e];if(n){if(i===`\\`){e+=2;continue}i===r&&(n=!1),e++;continue}if(i===`"`||i===`'`){n=!0,r=i,e++;continue}if(i===`(`||i===`[`)t++;else if(i===`)`||i===`]`){if(t===0)break;t--}else if(i===`,`&&t===0)break;e++}return e}parseArgList(){let e=[];for(this.skipWhitespace();this.peek()!==`)`&&this.pos<this.source.length;)e.push(this.parseTernary()),this.skipWhitespace(),this.peek()===`,`&&(this.pos++,this.skipWhitespace());return e}},Gn=class{cache=new Map;maxSize;constructor(e=1e3){this.maxSize=e}compile(e,t){let n=`${e}::${t.join(`,`)}`;if(this.cache.has(n)){let e=this.cache.get(n);return e.hitCount++,e}this.cache.size>=this.maxSize&&this.evictLFU();let r={fn:this.compileExpression(e,t),varNames:[...t],expression:e,compiledAt:Date.now(),hitCount:1};return this.cache.set(n,r),r}compileExpression(e,t){let n=new Wn;return(...r)=>{let i={};for(let e=0;e<t.length;e++)i[t[e]]=r[e];return n.evaluate(e,i)}}evictLFU(){let e=null,t=1/0,n=1/0;for(let[r,i]of this.cache.entries())(i.hitCount<n||i.hitCount===n&&i.compiledAt<t)&&(e=r,t=i.compiledAt,n=i.hitCount);e&&this.cache.delete(e)}has(e,t){let n=`${e}::${t.join(`,`)}`;return this.cache.has(n)}clear(){this.cache.clear()}getStats(){let e=0,t=[];for(let n of this.cache.values())e+=n.hitCount,t.push({expression:n.expression,hitCount:n.hitCount});return{size:this.cache.size,maxSize:this.maxSize,totalHits:e,entries:t.sort((e,t)=>t.hitCount-e.hitCount)}}},Kn=class{functions=new Map;constructor(){this.registerDefaults()}register(e,t){this.functions.set(e.toUpperCase(),t)}get(e){return this.functions.get(e.toUpperCase())}has(e){return this.functions.has(e.toUpperCase())}getNames(){return Array.from(this.functions.keys())}toObject(){let e={};for(let[t,n]of this.functions)e[t]=n;return e}registerDefaults(){this.registerAggregationFunctions(),this.registerDateFunctions(),this.registerLogicFunctions(),this.registerStringFunctions(),this.registerStringSearchFunctions(),this.registerStatisticalFunctions()}registerAggregationFunctions(){this.register(`SUM`,(...e)=>I(e).reduce((e,t)=>e+t,0)),this.register(`AVG`,(...e)=>{let t=I(e);return t.length===0?0:t.reduce((e,t)=>e+t,0)/t.length}),this.register(`COUNT`,(...e)=>qn(e).filter(e=>e!=null).length),this.register(`MIN`,(...e)=>{let t=I(e);return t.length===0?0:Math.min(...t)}),this.register(`MAX`,(...e)=>{let t=I(e);return t.length===0?0:Math.max(...t)})}registerDateFunctions(){this.register(`TODAY`,()=>new Date().toISOString().split(`T`)[0]),this.register(`NOW`,()=>new Date().toISOString()),this.register(`DATEADD`,(e,t,n)=>{let r=new Date(e);if(isNaN(r.getTime()))throw Error(`DATEADD: Invalid date "${e}"`);switch(String(n).toLowerCase()){case`day`:case`days`:r.setDate(r.getDate()+t);break;case`month`:case`months`:r.setMonth(r.getMonth()+t);break;case`year`:case`years`:r.setFullYear(r.getFullYear()+t);break;case`hour`:case`hours`:r.setHours(r.getHours()+t);break;case`minute`:case`minutes`:r.setMinutes(r.getMinutes()+t);break;default:throw Error(`DATEADD: Unsupported unit "${n}"`)}return r.toISOString()}),this.register(`DATEDIFF`,(e,t,n)=>{let r=new Date(e),i=new Date(t);if(isNaN(r.getTime()))throw Error(`DATEDIFF: Invalid date "${e}"`);if(isNaN(i.getTime()))throw Error(`DATEDIFF: Invalid date "${t}"`);let a=i.getTime()-r.getTime();switch(String(n).toLowerCase()){case`day`:case`days`:return Math.floor(a/864e5);case`month`:case`months`:return(i.getFullYear()-r.getFullYear())*12+(i.getMonth()-r.getMonth());case`year`:case`years`:return i.getFullYear()-r.getFullYear();case`hour`:case`hours`:return Math.floor(a/36e5);case`minute`:case`minutes`:return Math.floor(a/6e4);default:throw Error(`DATEDIFF: Unsupported unit "${n}"`)}}),this.register(`DATEFORMAT`,(e,t)=>{let n=new Date(e);if(isNaN(n.getTime()))throw Error(`DATEFORMAT: Invalid date "${e}"`);let r=(e,t=2)=>String(e).padStart(t,`0`);return t.replace(`YYYY`,String(n.getFullYear())).replace(`YY`,String(n.getFullYear()).slice(-2)).replace(`MM`,r(n.getMonth()+1)).replace(`DD`,r(n.getDate())).replace(`HH`,r(n.getHours())).replace(`mm`,r(n.getMinutes())).replace(`ss`,r(n.getSeconds()))})}registerLogicFunctions(){this.register(`IF`,(e,t,n)=>e?t:n),this.register(`AND`,(...e)=>e.every(Boolean)),this.register(`OR`,(...e)=>e.some(Boolean)),this.register(`NOT`,e=>!e),this.register(`SWITCH`,(e,...t)=>{for(let n=0;n<t.length-1;n+=2)if(e===t[n])return t[n+1];if(t.length%2==1)return t[t.length-1]})}registerStringFunctions(){this.register(`CONCAT`,(...e)=>e.map(e=>String(e??``)).join(``)),this.register(`LEFT`,(e,t)=>String(e??``).substring(0,t)),this.register(`RIGHT`,(e,t)=>{let n=String(e??``);return n.substring(Math.max(0,n.length-t))}),this.register(`TRIM`,e=>String(e??``).trim()),this.register(`UPPER`,e=>String(e??``).toUpperCase()),this.register(`LOWER`,e=>String(e??``).toLowerCase())}registerStringSearchFunctions(){this.register(`FIND`,(e,t,n)=>String(t??``).indexOf(String(e??``),n??0)),this.register(`REPLACE`,(e,t,n)=>String(e??``).split(String(t??``)).join(String(n??``))),this.register(`SUBSTRING`,(e,t,n)=>{let r=String(e??``);return n===void 0?r.substring(t):r.substring(t,t+n)}),this.register(`REGEX`,(e,t,n)=>{let r=String(e??``);return new RegExp(t,n).test(r)}),this.register(`LEN`,e=>String(e??``).length)}registerStatisticalFunctions(){this.register(`MEDIAN`,(...e)=>{let t=I(e).sort((e,t)=>e-t);if(t.length===0)return 0;let n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}),this.register(`STDEV`,(...e)=>{let t=I(e);if(t.length<2)return 0;let n=t.reduce((e,t)=>e+t,0)/t.length,r=t.map(e=>(e-n)**2).reduce((e,t)=>e+t,0)/(t.length-1);return Math.sqrt(r)}),this.register(`VARIANCE`,(...e)=>{let t=I(e);if(t.length<2)return 0;let n=t.reduce((e,t)=>e+t,0)/t.length;return t.map(e=>(e-n)**2).reduce((e,t)=>e+t,0)/(t.length-1)}),this.register(`PERCENTILE`,(e,...t)=>{let n=I(t).sort((e,t)=>e-t);if(n.length===0)return 0;let r=Math.max(0,Math.min(100,e))/100*(n.length-1),i=Math.floor(r),a=Math.ceil(r);if(i===a)return n[i];let o=r-i;return n[i]+o*(n[a]-n[i])})}};function I(e){let t=[];for(let n of e)if(Array.isArray(n))t.push(...I(n));else{let e=Number(n);isNaN(e)||t.push(e)}return t}function qn(e){let t=[];for(let n of e)Array.isArray(n)?t.push(...qn(n)):t.push(n);return t}function Jn(e){return typeof e==`string`?{dialect:`cel`,source:e}:{dialect:e.dialect??`cel`,source:e.source}}var Yn=new Set;function Xn(e,t,n,r){let i=JSON.stringify([e.dialect,e.source]);Yn.has(i)||(Yn.add(i),console.warn(`[object-ui] A conditional predicate failed to evaluate`+(r?` (${r})`:``)+` and was treated as its safe default (${String(t)}): `+JSON.stringify(e.source)+`. Reason: ${n}. Values are bound under 'record.' (e.g. record.status) — check the field names and CEL syntax.`))}function L(e,t,n,r,i,a){if(e==null||typeof e==`string`&&!e.trim())return n;let o=Jn(e),s,c=n;try{let e=u.evaluate(o,{record:t,previous:r,...i?{extra:i}:{}});e.ok?c=e.value===!0:s=`[${e.error.kind}] ${e.error.message}`}catch(e){s=`[throw] ${e instanceof Error?e.message:String(e)}`}return s===void 0?c:(a?.warn!==!1&&Xn(o,n,s,a?.context),a?.onFault?.(s),n)}function Zn(e,t,n,r,i,a){let o=e=>({context:a?`${e} of ${a}`:e});return{visible:e.visibleWhen==null||L(e.visibleWhen,t,!0,r,i,o(`visibleWhen`)),readonly:n.readonly===!0||e.readonlyWhen!=null&&L(e.readonlyWhen,t,!1,r,i,o(`readonlyWhen`)),required:n.serverOwnedValue===!0?!1:n.required===!0||e.requiredWhen!=null&&L(e.requiredWhen,t,!1,r,i,o(`requiredWhen`))}}var Qn=new Set;function $n(e,t,n,r){let i=r instanceof Error?r.message:String(r);if(e){e(i);return}let a=JSON.stringify([t,n]);Qn.has(a)||(Qn.add(a),console.warn(t===`template-part`?`Expression evaluation failed for: ${n}`:`Failed to evaluate expression: ${n}`,r))}var R=class e{context;cache;formulas;constructor(e,t,n){this.context=e instanceof Vn?e:new Vn(e||{}),this.cache=t||new Gn,this.formulas=n||new Kn}evaluate(e,t={}){if(e&&typeof e==`object`&&typeof e.source==`string`&&(e=e.source),typeof e!=`string`)return e;let{defaultValue:n,throwOnError:r=!1,sanitize:i=!0,onFault:a}=t;try{if(!e.includes("${"))return e;let t=e.match(/^\$\{([^}]+)\}$/);return t?this.evaluateExpression(t[1].trim(),{sanitize:i}):e.replace(/\$\{([^}]+)\}/g,(e,t)=>{try{let e=this.evaluateExpression(t.trim(),{sanitize:i});return String(e??``)}catch(n){if(r)throw n;return $n(a,`template-part`,t,n),e}})}catch(t){if(r)throw t;return $n(a,`whole-expression`,e,t),n??e}}evaluateExpression(e,t={}){let{sanitize:n=!0}=t;if(!(!e||e.trim()===``)){if(n&&this.isDangerous(e))throw Error(`Potentially dangerous expression detected: ${e}`);try{let t=this.context.toObject(),n={...this.formulas.toObject(),...t},r=Object.keys(n),i=Object.values(n);return this.cache.compile(e,r).fn(...i)}catch(t){throw Error(`Failed to evaluate expression "${e}": ${t.message}`)}}}isDangerous(e){return[/eval\s*\(/i,/Function\s*\(/i,/setTimeout\s*\(/i,/setInterval\s*\(/i,/import\s*\(/i,/require\s*\(/i,/process\./i,/global\./i,/window\./i,/document\./i,/__proto__/i,/constructor\s*\(/i,/prototype\./i].some(t=>t.test(e))}evaluateCondition(e,t={}){if(typeof e==`boolean`)return e;if(e&&typeof e==`object`&&e.dialect===`cel`&&typeof e.source==`string`)return this.evaluateCelCondition(e.source,t);if(e&&typeof e==`object`&&typeof e.source==`string`&&(e=e.source),!e)return!0;if(typeof e!=`string`)return!!e;let n=e.trim();if(!n)return!0;if(n.includes("${"))return!!this.evaluate(n,t);try{return!!this.evaluateExpression(n,{sanitize:t.sanitize!==!1})}catch(e){if(t.throwOnError)throw e;return t.onFault?.(e instanceof Error?e.message:String(e)),!0}}evaluateCelCondition(e,t){if(!e.trim())return!0;let n=this.context.toObject(),r=n.record,i=r&&typeof r==`object`&&!Array.isArray(r)?r:n;if(!t.throwOnError)return L(e,i,!0,void 0,n,t.onFault?{warn:!1,onFault:t.onFault}:void 0);let a=L(e,i,!0,void 0,n,{warn:!1});if(a!==L(e,i,!1,void 0,n,{warn:!1}))throw Error(`CEL predicate failed to evaluate: ${e}`);return a}updateContext(e){Object.entries(e).forEach(([e,t])=>{this.context.set(e,t)})}getContext(){return this.context}withContext(t){return new e(this.context.createChild(t),this.cache,this.formulas)}getCacheStats(){return this.cache.getStats()}clearCache(){this.cache.clear()}getFormulas(){return this.formulas}registerFunction(e,t){this.formulas.register(e,t)}};new Gn,new Kn;var er=`record`,tr=`data`;function nr(e,t,n){if(typeof e!=`string`||!e.trim())return null;let r=o(e);if(!r||r.ok!==!0)return null;let i=s(e);return typeof i==`string`&&typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(t,i)?{kind:`bare-shorthand`,identifier:i,canonical:`${er}.${i}`}:n&&Array.isArray(r.roots)&&r.roots.includes(tr)?{kind:`metadata-layer-root`,identifier:tr,canonical:er}:null}var rr=()=>!1,ir=new Set;function ar(e,t,n,r){if(!rr())return;let i=nr(e,t,n);if(!i)return;let a=JSON.stringify([r??``,e,i.kind]);if(ir.has(a))return;ir.add(a);let o=r?` (${r})`:``,s=i.kind===`bare-shorthand`?`it references the bare field ${JSON.stringify(i.identifier)}; the server refuses that spelling outright ("Unknown variable: ${i.identifier}")`:"it is rooted at `data.`, which is the metadata-editing-form root — on a record surface the server binds no `data` at all, so the predicate is a constant false there rather than an error";console.warn(`[object-ui] A row predicate${o} uses a DEPRECATED spelling: ${JSON.stringify(e)} — ${s}. The canon is \`record.*\` (objectui#5330, ruled 2026-08-20): write \`${i.canonical}\`. This still evaluates here for now; the tolerance retires after a stored-metadata survey.`)}function or(e){if(!e||typeof e!=`object`)return null;let t=new Set;if(Array.isArray(e))for(let n of e){let e=n?.name,r=n?.type;typeof e==`string`&&wt.has(r)&&t.add(e)}else for(let[n,r]of Object.entries(e)){let e=r?.type;wt.has(e)&&t.add(n)}return t.size>0?t:null}function sr(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n=t.id??t._id;return typeof n==`string`||typeof n==`number`?String(n):void 0}function cr(e,t){if(!e||typeof e!=`object`)return e;let n=or(t);if(!n)return e;let r=null,i=(t,n)=>{r||={...e},r[t]=n};for(let t of n){if(!(t in e))continue;let n=e[t];if(Array.isArray(n)){if(!n.some(e=>sr(e)!==void 0))continue;i(t,n.map(e=>sr(e)??e));continue}let r=sr(n);r!==void 0&&i(t,r)}return r??e}var lr=/\$\{|===|!==|\?\.|\?\?|\.(?:includes|indexOf|toUpperCase|toLowerCase|startsWith|endsWith|trim|split|map|filter|reduce|find|some|every|join|slice|charAt|padStart|padEnd|replace|match|test)\s*\(/;function ur(e){return lr.test(e)}var dr=new Set;function fr(e){dr.has(e)||(dr.add(e),console.warn(`[object-ui] A conditional predicate uses the legacy expression dialect and is not portable to the server CEL engine: `+JSON.stringify(e)+`. Rewrite it as CEL (use "==" not "===", "x in [..]" for membership, ".contains()" not ".includes()", and drop template interpolation).`))}var pr=new Set;function mr(e,t,n){let r=JSON.stringify([t??``,e]);pr.has(r)||(pr.add(r),console.warn(`[object-ui] A conditional predicate failed to evaluate`+(t?` (${t})`:``)+` and was treated as its safe default: `+JSON.stringify(e)+(n?`. Reason: ${n}`:``)+`. Check the field names and CEL syntax.`))}function hr(e,t,n){let r,i={warn:!1,onFault:e=>{r??=e}},a=L(e,t,!0,void 0,n,i);return a===L(e,t,!1,void 0,n,i)?{ok:!0,value:a}:{ok:!1,value:!1,reason:r}}function gr(e,t,n={}){let r=n.fallback??!1;if(e==null)return r;let i=typeof e==`string`?e:void 0;if(i!==void 0&&!i.trim())return r;let a=n.rowless?{}:cr(t&&typeof t==`object`?t:{},n.fields),o=n.rowless?{...n.scope??{}}:{...n.scope??{},...a,data:a,record:a},s=i??(e&&typeof e==`object`&&typeof e.source==`string`?e.source:`(expression)`);if(i!==void 0&&ur(i)){fr(i);try{return new R(o).evaluateCondition(i,{throwOnError:!0})}catch(e){return n.warnOnError&&mr(i,n.label,`[legacy] ${e instanceof Error?e.message:String(e)}`),r}}if(s!==`(expression)`&&ar(s,a,!n.rowless,n.label),!n.warnOnError)return L(e,a,r,void 0,o,{context:n.label});let c=hr(e,a,o);return c.ok?c.value:(mr(s,n.label,c.reason),r)}function _r(e,t,n={}){if(e==null||e===``)return{eligible:t,skipped:0};if(typeof e==`boolean`)return e?{eligible:t,skipped:0}:{eligible:[],skipped:t.length};let r=t.filter(t=>gr(e,t,{...n,warnOnError:n.warnOnError??!0,fallback:!1}));return{eligible:r,skipped:t.length-r.length}}function z(e){if(e==null)return`null`;let t=typeof e;return t===`string`?JSON.stringify(e):t===`number`||t===`boolean`?String(e):Array.isArray(e)?`[${e.map(z).join(`, `)}]`:JSON.stringify(String(e))}function vr(e){let{field:t,operator:n,value:r}=e;if(!t||!n)return null;let i=`record[${JSON.stringify(t)}]`;switch(n){case`equals`:return`${i} == ${z(r)}`;case`not_equals`:return`${i} != ${z(r)}`;case`greater_than`:return`${i} > ${z(r)}`;case`less_than`:return`${i} < ${z(r)}`;case`contains`:return`${i}.contains(${z(r)})`;case`in`:return`${i} in ${z(Array.isArray(r)?r:[r])}`;default:return null}}function yr(e){return e.condition==null?typeof e.expression==`string`&&e.expression.trim()?e.expression:vr(e):e.condition}function br(e){let t={};if(e.style&&typeof e.style==`object`)for(let[n,r]of Object.entries(e.style))r!=null&&(t[n]=String(r));return e.backgroundColor&&(t.backgroundColor=String(e.backgroundColor)),e.textColor&&(t.color=String(e.textColor)),e.borderColor&&(t.borderColor=String(e.borderColor)),t}function xr(e,t,n,r){if(!t||t.length===0)return{};let i=e&&typeof e==`object`?e:{};for(let e=0;e<t.length;e++){let a=t[e];if(!a||typeof a!=`object`)continue;let o=yr(a);if(o!=null&&gr(o,i,{fallback:!1,scope:n,fields:r,label:`conditionalFormatting[${e}]`}))return br(a)}return{}}function Sr(e){return e?(Array.isArray(e)?e:[e]).map(e=>typeof e==`string`?e:e&&typeof e==`object`?e.field:null).filter(e=>typeof e==`string`&&e.length>0):[]}function Cr(e){return e==null||e===``||Array.isArray(e)&&e.length===0}function wr(e,t){return Sr(e).some(e=>Cr(t[e]))}function Tr(e,t,n){return!e||e.length===0?[]:e.filter(e=>e?.visibleWhen==null||L(e.visibleWhen,t,!0,void 0,n,{context:`visibleWhen of option '${String(e.value)}'`}))}function Er(e,t){return Cr(e)?!0:Array.isArray(e)?e.every(e=>t.some(t=>t.value===e)):t.some(t=>t.value===e)}function Dr(e,t,n,r){let i=Sr(n),a=i.length>0&&wr(n,t);return{options:a?[]:Tr(e,t,r),gated:a,dependsOnFields:i}}var Or=new Set([`select`,`multiselect`,`radio`,`checkboxes`]);function kr(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.type==`string`&&typeof t.objectName==`string`&&typeof t.recordId==`string`&&typeof t.timestamp==`number`}var B=new class e{undoStack=[];redoStack=[];maxHistory;listeners=new Set;constructor(e){this.maxHistory=e?.maxHistory??50}push(e){this.undoStack.push(e),this.undoStack.length>this.maxHistory&&this.undoStack.shift(),this.redoStack=[],this.notify()}peekUndo(){return this.undoStack[this.undoStack.length-1]}peekRedo(){return this.redoStack[this.redoStack.length-1]}popUndo(){let e=this.undoStack.pop();return e&&(this.redoStack.push(e),this.notify()),e}popRedo(){let e=this.redoStack.pop();return e&&(this.undoStack.push(e),this.notify()),e}clear(){this.undoStack=[],this.redoStack=[],this.notify()}get canUndo(){return this.undoStack.length>0}get canRedo(){return this.redoStack.length>0}get undoCount(){return this.undoStack.length}get redoCount(){return this.redoStack.length}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}getHistory(){return[...this.undoStack]}getRedoHistory(){return[...this.redoStack]}pushBatch(e){e.length!==0&&(this.undoStack.push(...e),this.undoStack.length>this.maxHistory&&this.undoStack.splice(0,this.undoStack.length-this.maxHistory),this.redoStack=[],this.notify())}popUndoBatch(e){let t=Math.min(e,this.undoStack.length);if(t===0)return[];let n=this.undoStack.splice(this.undoStack.length-t,t);return this.redoStack.push(...n),this.notify(),n}popRedoBatch(e){let t=Math.min(e,this.redoStack.length);if(t===0)return[];let n=this.redoStack.splice(this.redoStack.length-t,t);return this.undoStack.push(...n),this.notify(),n}static STORAGE_KEY=`objectui:undo-history`;saveToStorage(){try{let t=JSON.stringify({undoStack:this.undoStack,redoStack:this.redoStack});localStorage.setItem(e.STORAGE_KEY,t)}catch{}}loadFromStorage(){try{if(typeof localStorage>`u`)return;let t=localStorage.getItem(e.STORAGE_KEY);if(!t)return;let n=JSON.parse(t);Array.isArray(n.undoStack)&&(this.undoStack=n.undoStack.filter(kr)),Array.isArray(n.redoStack)&&(this.redoStack=n.redoStack.filter(kr)),this.undoStack.length>this.maxHistory&&this.undoStack.splice(0,this.undoStack.length-this.maxHistory),this.notify()}catch{}}notify(){this.listeners.forEach(e=>e())}},Ar=`type.actionType.name.label.description.confirmText.confirm.condition.disabled.api.endpoint.method.navigate.to.external.newTab.replace.onClick.reload.close.redirect.toast.successMessage.errorMessage.refreshAfter.undoable.params.actionParams.resultDialog.target.body.openIn.modal.chain.chainMode.onFailure.opensInNewTab.newTabUrl.locations.visible.requiredPermissions.icon.variant.order.component.objectName.ai.aria.bodyExtra.bodyShape.mode.recordIdField.recordIdParam.requiresFeature.onSuccess.shortcut.bulkEnabled`.split(`.`),jr=`_lock._lockDocsUrl._lockReason._lockSource._packageId._packageVersion._provenance.ai.aria.body.bodyExtra.bodyShape.bulkEnabled.component.confirmText.description.disabled.errorMessage.execute.icon.label.locations.method.mode.name.newTabUrl.objectName.onSuccess.openIn.opensInNewTab.order.params.recordIdField.recordIdParam.refreshAfter.requiredPermissions.requiresFeature.resultDialog.shortcut.successMessage.target.type.undoable.variant.visible`.split(`.`),Mr=[`to`,`external`,`newTab`,`replace`],Nr=[`overrideNotice`],Pr={execute:"`execute` was removed in @objectstack/spec 17 (#3855) — rename the key to `target`. The value (a script name or expression) is unchanged. Run `os migrate meta --from 16` to rewrite it automatically."},Fr=new Set([...Ar,...jr,...Mr,...Nr].filter(e=>!(e in Pr)));function Ir(e){let t=[],n=[];if(!e||typeof e!=`object`)return{unknown:t,retired:n};for(let r of Object.keys(e))r in Pr?n.push(r):Fr.has(r)||t.push(r);return{unknown:t,retired:n}}var V=new Set,Lr=()=>!1;function Rr(e,t=`ActionRunner`){if(!Lr())return;let{unknown:n,retired:r}=Ir(e),i=e?.name??e?.type??`(unnamed)`;for(let e of r){let n=`retired:${String(i)}:${e}`;V.has(n)||(V.add(n),console.warn(`[${t}] action "${String(i)}" carries the retired key \`${e}\`. ${Pr[e]}`))}if(n.length===0)return;let a=`unknown:${String(i)}:${n.slice().sort().join(`,`)}`;V.has(a)||(V.add(a),console.warn(`[${t}] action "${String(i)}" carries ${n.length===1?`a key`:`keys`} no reader recognizes: \`${n.join("`, `")}\`. Nothing will read ${n.length===1?`it`:`them`} — check for a typo, or promote the key to an explicit field on \`ActionDef\` (packages/core/src/actions/ActionRunner.ts), adding it to \`ACTION_DEF_KEYS\` (packages/core/src/actions/actionKeys.ts) in the SAME commit — the pin test derives one from the other, so either edit alone goes red. Warned rather than rejected because \`tsc\` only sees actions authored in code: this one may have arrived as DATA, and stored \`sys_metadata\` rows reach the runner unparsed (objectstack#3903).`))}var zr=new Set([`recordId`]),Br=e=>!e.startsWith(`_`)&&!zr.has(e);function Vr(e){if(!e||typeof e!=`object`)return!1;let{type:t,actionType:n,params:r}=e;return(t??n)!==`api`||!r||typeof r!=`object`||Array.isArray(r)?!1:Object.keys(r).some(Br)}function Hr(e,t=`ActionRunner`){if(!Lr()||!Vr(e))return;let n=e?.name??`(unnamed)`,r=`deprecated-object-params:${String(n)}`;V.has(r)||(V.add(r),console.warn(`[${t}] action "${String(n)}" carries a static request payload in \`params\`. \`params\` is the parameter DEFINITION array (fields collected from the user before the action runs), never a payload map — put the payload in \`bodyExtra\` instead (objectstack#5777). Still read as the payload for one version window; the arm is removed at 18. \`bodyExtra\` is merged LAST, so it overrides anything left here.`))}function Ur(e,t){let n=e,r=n?.error;if(typeof r==`string`&&r.length>0)return r;let i=r?.message;return typeof i==`string`&&i.length>0?i:typeof n?.message==`string`&&n.message.length>0?n.message:t}function Wr(e){return Kr(e)?e.data:e}var Gr=new Set([`success`,`data`,`error`,`code`,`fields`]);function Kr(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.success==`boolean`&&Object.keys(e).every(e=>Gr.has(e))}function qr(e,t,n){let r=t?.data,i=Kr(r)&&r.success===!1;return!e.ok||t&&t.success===!1||i?{ok:!1,error:i?Ur(r,`${n} failed`):Ur(t,`${n} failed (HTTP ${e.status})`)}:{ok:!0,envelope:r,payload:Wr(r)}}function Jr(e){let t=e.user;if(t===void 0)return e;let n=e.os;return n&&typeof n==`object`&&n.user===t?e:{...e,os:{...n&&typeof n==`object`?n:{},user:t}}}var Yr=`recordId`,Xr=`recordObject`;function Zr(e){let t=e.objectName;return typeof t==`string`&&t.trim()!==``?t.trim():void 0}function Qr(e,t){return!t||!e.includes(`.`)?!1:!e.startsWith(`${t}.`)}var $r=class{handlers=new Map;scripts=new Map;evaluator;context;confirmHandler;toastHandler;modalHandler;navigationHandler;paramCollectionHandler;resultDialogHandler;builtinExecutors={script:e=>this.executeScript(e),url:e=>this.executeUrl(e),modal:e=>this.executeModal(e),flow:e=>this.executeFlow(e),api:e=>this.executeAPI(e),form:e=>this.executeForm(e),navigation:e=>this.executeNavigation(e)};constructor(e={}){this.context=Jr(e),this.evaluator=new R(this.context),this.confirmHandler=async e=>window.confirm(e),this.toastHandler=null,this.modalHandler=null,this.navigationHandler=null,this.paramCollectionHandler=null,this.resultDialogHandler=null}setConfirmHandler(e){this.confirmHandler=e}setToastHandler(e){this.toastHandler=e}setModalHandler(e){this.modalHandler=e}setNavigationHandler(e){this.navigationHandler=e}setParamCollectionHandler(e){this.paramCollectionHandler=e}setResultDialogHandler(e){this.resultDialogHandler=e}registerHandler(e,t){this.handlers.set(e,t)}unregisterHandler(e){this.handlers.delete(e)}registerScript(e,t){this.scripts.set(e,t)}unregisterScript(e){this.scripts.delete(e)}async execute(e){try{Rr(e),Hr(e);let t=e.type||e.actionType||e.name||``;if(P(e.condition)&&!this.evaluator.evaluateCondition(e.condition))return{success:!1,error:`Action condition not met`};if(P(e.disabled)){let t=!1;try{t=this.evaluator.evaluateCondition(e.disabled)}catch{t=!1}if(t)return{success:!1,error:`Action is disabled`}}if(e.confirmText&&!await this.confirmHandler(this.evaluator.evaluate(e.confirmText)))return{success:!1,error:`Action cancelled by user`};let n=e.actionParams&&Array.isArray(e.actionParams)?e.actionParams:Array.isArray(e.params)?e.params:void 0;if(n&&n.length>0&&this.paramCollectionHandler){let t=await this.paramCollectionHandler(n,e);if(t===null)return{success:!1,error:`Action cancelled by user (params)`};let r=Array.isArray(e.params)?{}:e.params||{},i=r._rowRecord;e.params={...r,...t},i!==void 0&&(e.params._rowRecord=i)}if(t&&this.handlers.has(t)){let n=await this.handlers.get(t)(e,this.context);return await this.handlePostExecution(e,n),n}let r,i=t?this.builtinExecutors[t]:void 0;return i?r=await i(e):e.navigate?r=await this.executeNavigation(e):e.api||e.endpoint?r=await this.executeAPI(e):e.onClick?(await e.onClick(),r={success:!0}):r=await this.executeActionSchema(e),await this.handlePostExecution(e,r),r}catch(t){let n={success:!1,error:t.message};return await this.handlePostExecution(e,n),n}}async executeChain(e,t=`sequential`){if(e.length===0)return{success:!0};if(t===`parallel`){let t=await Promise.allSettled(e.map(e=>this.execute(e)));if(t.filter(e=>e.status===`rejected`||e.status===`fulfilled`&&!e.value.success).length>0)return{success:!1,error:t.find(e=>e.status===`fulfilled`&&!e.value.success)?.value?.error||`One or more parallel actions failed`};let n=t[t.length-1];return n.status===`fulfilled`?n.value:{success:!1,error:`Action failed`}}let n={success:!0};for(let t of e)if(n=await this.execute(t),!n.success)return n;return n}async handlePostExecution(e,t){let n=!!(e.resultDialog&&t.success);if(this.toastHandler){let r=e.toast??{showOnSuccess:!0,showOnError:!0},i=e.toast?.duration;if(t.success&&!n&&!t.silent&&r.showOnSuccess!==!1){let n=(t.data&&typeof t.data==`object`&&typeof t.data.message==`string`?String(t.data.message).trim():``)||e.successMessage||`Action completed successfully`;if(t.undo)try{B.push(t.undo)}catch{}this.toastHandler(n,{type:`success`,duration:i,undo:t.undo?{}:void 0})}if(!t.success&&r.showOnError!==!1&&t.error){let n=e.errorMessage||t.error,r=typeof n==`string`?n:n&&typeof n.message==`string`?n.message:`Action failed`;this.toastHandler(r,{type:`error`,duration:i})}}if(n){if(this.resultDialogHandler)try{await this.resultDialogHandler(e.resultDialog,t.data,e)}catch(e){console.warn(`[ActionRunner] resultDialog handler rejected; treating as acknowledged`,e)}else console.warn(`[ActionRunner] action.resultDialog set but no resultDialogHandler registered — the response value will not be shown to the user.`,{action:e.name,data:t.data})}if(e.refreshAfter&&t.success&&(t.reload=!0),e.chain&&e.chain.length>0&&t.success){let n=await this.executeChain(e.chain,e.chainMode||`sequential`);n.success||(t.success=!1,t.error=n.error),n.data&&(t.data=n.data),n.redirect&&(t.redirect=n.redirect),n.reload&&(t.reload=!0)}if(t.success&&e.onSuccess){let n=ei(e.onSuccess);n&&this.navigateOnSuccess(n,e,t)}if(!t.success&&e.onFailure){let t=Array.isArray(e.onFailure)?e.onFailure:[e.onFailure];await this.executeChain(t,`sequential`)}}navigateOnSuccess(e,t,n){let r=this.interpolateTarget(e.navigate,t,Wr(n.data));if(!this.isValidUrl(r)){console.warn(`[ActionRunner] onSuccess.navigate resolved to a URL this runner refuses to open (only http://, https:// and relative URLs are allowed) — no navigation performed.`,{action:t.name,navigate:e.navigate,resolved:r});return}let i=e.openIn===`newTab`,a=r.startsWith(`http://`)||r.startsWith(`https://`);if(this.navigationHandler){this.navigationHandler(r,{external:a,newTab:i});return}i?window.open(r,`_blank`,`noopener,noreferrer`):n.redirect=r}async executeScript(e){let t=e.target;if(!t)return e.body==null?typeof e.execute==`string`?{success:!1,error:"`execute` was removed in @objectstack/spec 17 — rename the key to `target`. The value (a script name or expression) is unchanged. Run `os migrate meta --from 16` to rewrite it automatically."}:{success:!1,error:`No script provided for script action`}:{success:!1,error:"Action body must be executed server-side — this client runner does not interpret `body` (sandboxed JS needs an isolated VM; expression bodies use the formula engine). Register a `script` handler that POSTs to /api/v1/actions/{object}/{action} — build one with createServerActionHandler from @object-ui/core."};let n=this.scripts.get(t);if(n)try{return await n(e,this.context)}catch(e){return{success:!1,error:`Script execution failed: ${e.message}`}}try{let e=this.evaluator.evaluate(`\${${t}}`);return e!=null&&typeof e.then==`function`&&(e=await e),{success:!0,data:e}}catch(e){return{success:!1,error:`Script execution failed: ${e.message}`}}}async executeUrl(e){let t=e.target||e.redirect;return t?this.navigateTo(e,t,e):{success:!1,error:`No URL provided for url action`}}async navigateTo(e,t,n){let r=this.interpolateTarget(t,e),i=this.evaluator.evaluate(r);if(!this.isValidUrl(i))return{success:!1,error:`Invalid URL scheme. Only http://, https://, and relative URLs are allowed.`};let a=typeof this.context.apiBase==`string`?this.context.apiBase.replace(/\/+$/,``):``;a&&/^\/(api|_auth|_account)\//.test(i)&&(i=`${a}${i}`);let o=!!n.external||i.startsWith(`http://`)||i.startsWith(`https://`);if(/\/(api|_auth|_account)\//.test(i)&&(o||i.startsWith(`/`)))return window.location.href=i,{success:!0};let s=n.openIn??e.openIn,c=s===`new-tab`?!0:s===`self`?!1:n.newTab??o,l=n.replace??e.replace;if(this.navigationHandler)return this.navigationHandler(i,{external:o,newTab:c,...l===void 0?{}:{replace:!!l}}),{success:!0};if(c)window.open(i,`_blank`,`noopener,noreferrer`);else return{success:!0,redirect:i};return{success:!0}}async executeModal(e){let t=e.modal||e.target||e.params?.schema;return t?this.modalHandler?await this.modalHandler(t,this.context):{success:!0,modal:t}:{success:!1,error:`No modal schema or target provided for modal action`}}async executeFlow(e){let t=e.target||e.name;return t?this.handlers.has(`flow`)?await this.handlers.get(`flow`)(e,this.context):{success:!1,error:`Flow handler not registered. Cannot execute flow: ${t}`}:{success:!1,error:`No flow target provided for flow action`}}async executeActionSchema(e){let t=!!(e.api||e.endpoint);if(!(t||e.onClick||e.redirect||e.reload===!0||e.close===!0))return{success:!1,error:`Action "${e.name||e.type||e.actionType||`action`}" is not executable: no handler is registered under that name and it declares no api, endpoint, navigate, redirect or onClick.`};let n={success:!0};if(t){let t=await this.executeAPI(e);if(!t.success)return t;n.data=t.data}return e.onClick&&await e.onClick(),n.reload=e.reload!==!1,n.close=e.close!==!1,e.redirect&&(n.redirect=this.evaluator.evaluate(e.redirect)),n}async executeForm(e){let t=this.evaluator.evaluate(e.target);if(!t||typeof t!=`string`)return{success:!1,error:`No form target (FormView name) provided for form action`};let n=(this.context.record&&this.context.record.id)??(this.context.data&&this.context.data.id),r=`/forms/${t}`,i=Zr(this.context),a=n==null||Qr(t,i)?r:`${r}?${Yr}=${encodeURIComponent(String(n))}`+(i?`&${Xr}=${encodeURIComponent(i)}`:``);return this.navigationHandler?(this.navigationHandler(a,{external:!1}),{success:!0}):{success:!0,redirect:a}}async executeNavigation(e){let t=e.navigate||e,n=t.to||t.target||t.redirect;return n?this.navigateTo(e,n,t):{success:!1,error:`No URL provided for navigation action`}}buildApiRequestBody(e){let t=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:void 0,n=t(e.bodyExtra),r=t(e.params)??this.context.data,i=e.bodyShape,a=i&&typeof i==`object`&&typeof i.wrap==`string`&&i.wrap?i.wrap:void 0;return a?{[a]:r??{},...n}:n?{...t(r),...n}:r??{}}async executeAPI(e){let t=e.api||e.endpoint||e.target;if(!t)return{success:!1,error:`No API endpoint provided`};try{let n,r,i={"Content-Type":`application/json`},a,o=`json`;if(typeof t==`string`)n=this.interpolateTarget(t,e),r=e.method||`POST`,a=JSON.stringify(this.buildApiRequestBody(e));else{let s=t;if(n=this.interpolateTarget(s.url,e),r=s.method||e.method||`POST`,i={...i,...s.headers},o=s.responseType||`json`,s.queryParams){let e=new URLSearchParams(s.queryParams);n=`${n}${n.includes(`?`)?`&`:`?`}${e.toString()}`}s.body?a=typeof s.body==`string`?s.body:JSON.stringify(s.body):r!==`GET`&&r!==`HEAD`&&(a=JSON.stringify(this.buildApiRequestBody(e)))}let s={method:r,headers:i};a&&r!==`GET`&&r!==`HEAD`&&(s.body=a);let c=await fetch(n,s);if(!c.ok)throw Error(`HTTP ${c.status}: ${c.statusText}`);let l;switch(o){case`text`:l=await c.text();break;case`blob`:l=await c.blob();break;default:l=await c.json()}return{success:!0,data:l}}catch(e){return{success:!1,error:e.message}}}isValidUrl(e){return typeof e==`string`&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)||e.startsWith(`./`))}interpolateTarget(e,t,n){if(typeof e!=`string`||e.indexOf("${")===-1)return e;let r={param:t.params&&typeof t.params==`object`&&!Array.isArray(t.params)?t.params:{},ctx:this.buildInterpolationContext()};n!==void 0&&(r.result=n);let i=RegExp(`\\$\\{(${Object.keys(r).join(`|`)})\\.([\\w.]+)\\}`,`g`);return e.replace(i,(e,t,n)=>{let i=ti(r[t],n);return i==null?``:encodeURIComponent(String(i))})}buildInterpolationContext(){let e={origin:typeof window<`u`?window.location.origin:``,apiBase:typeof this.context.apiBase==`string`?this.context.apiBase.replace(/\/+$/,``):``,user:this.context.user??{},org:this.context.org??this.context.organization??{},recordId:this.context.record?.id??this.context.recordId,selection:{ids:Array.isArray(this.context.selectedRecords)?this.context.selectedRecords.map(e=>e?.id).filter(e=>e!=null).map(String):[],count:Array.isArray(this.context.selectedRecords)?this.context.selectedRecords.length:0}};return this.context.ctx&&typeof this.context.ctx==`object`&&Object.assign(e,this.context.ctx),e}updateContext(e){this.context=Jr({...this.context,...e}),this.evaluator.updateContext(this.context)}getContext(){return this.context}getEvaluator(){return this.evaluator}};function ei(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.navigate;return typeof t!=`string`||t===``?null:e}function ti(e,t){if(e!=null)return t.split(`.`).reduce((e,t)=>{if(e!=null)return e[t]},e)}function ni(e){return e.toLowerCase().split(`+`).map(e=>e.trim()).sort().join(`+`)}var ri=new Set;function ii(e,t,n){let r=typeof t==`string`?t:t&&typeof t==`object`&&typeof t.source==`string`?t.source:String(t),i=`${String(e)}::${r}`;if(ri.has(i))return;ri.add(i);let a=n instanceof Error?n.message:String(n);console.warn(`[ActionEngine] action "${String(e)}" hidden: its \`visible\` predicate threw — ${a}. Predicate: ${r}. Action predicates evaluate against { record, recordId, objectName, user, os.user, … }; use \`record.<field>\` (not a bare field).`)}var ai=class{actions=new Map;shortcuts=[];normalizedShortcutMap=new Map;runner;constructor(e={}){this.runner=e instanceof $r?e:new $r(e)}getRunner(){return this.runner}registerAction(e,t){let n=e.name||e.type||``;if(!n)throw Error(`Action must have a name or type`);this.actions.set(n,{action:e,locations:t?.locations||[],shortcut:t?.shortcut,bulkEnabled:t?.bulkEnabled??!1,priority:t?.priority??100}),t?.shortcut&&(this.shortcuts.push({keys:t.shortcut,actionName:n}),this.normalizedShortcutMap.set(ni(t.shortcut),n))}registerActions(e){for(let t of e)this.registerAction(t,{locations:t.locations})}unregisterAction(e){let t=this.actions.get(e);t?.shortcut&&this.normalizedShortcutMap.delete(ni(t.shortcut)),this.actions.delete(e),this.shortcuts=this.shortcuts.filter(t=>t.actionName!==e)}getActionsForLocation(e){let t=this.runner.getEvaluator();return Array.from(this.actions.values()).filter(t=>t.locations.includes(e)).filter(e=>{let t=e.action.requiredPermissions;if(!Array.isArray(t)||t.length===0)return!0;let n=this.runner.getContext()?.user?.systemPermissions;return!Array.isArray(n)||t.every(e=>n.includes(e))}).filter(e=>{let n=e.action.visible;if(!P(n))return!0;let r=Ge(n);try{return t.evaluateCondition(r,{throwOnError:!0})}catch(t){return ii(e.action.name,n,t),!1}}).sort((e,t)=>(e.priority??100)-(t.priority??100)).map(e=>e.action)}getBulkActions(){return Array.from(this.actions.values()).filter(e=>e.bulkEnabled).sort((e,t)=>(e.priority??100)-(t.priority??100)).map(e=>e.action)}getShortcuts(){return[...this.shortcuts]}getAction(e){return this.actions.get(e)?.action}async executeAction(e,t){let n=this.actions.get(e);return n?(t&&this.runner.updateContext(t),this.runner.execute(n.action)):{success:!1,error:`Action not found: ${e}`}}async handleShortcut(e,t){let n=this.normalizedShortcutMap.get(ni(e));return n?this.executeAction(n,t):null}async executeBulk(e,t,n){let r=this.actions.get(e);if(!r)return{total:0,succeeded:0,failed:0,results:[{success:!1,error:`Action not found: ${e}`}]};if(!r.bulkEnabled)return{total:0,succeeded:0,failed:0,results:[{success:!1,error:`Action ${e} does not support bulk operations`}]};let i=[],a=0,o=0;if(n?.parallel){let e=t.map(e=>(this.runner.updateContext({record:e,selectedRecords:t}),this.runner.execute(r.action))),n=await Promise.allSettled(e);for(let e of n)e.status===`fulfilled`?(i.push(e.value),e.value.success?a++:o++):(i.push({success:!1,error:e.reason?.message||`Unknown error`}),o++)}else for(let e of t){this.runner.updateContext({record:e,selectedRecords:t});let s=await this.runner.execute(r.action);if(i.push(s),s.success)a++;else if(o++,!n?.continueOnError)break}return{total:t.length,succeeded:a,failed:o,results:i}}updateContext(e){this.runner.updateContext(e)}clear(){this.actions.clear(),this.shortcuts=[],this.normalizedShortcutMap.clear()}};async function oi(e,t){let{ids:n,allowBulk:r,offset:i,label:a=`bulk`}=e,o={succeeded:0,failed:0,errors:[]};if(r&&typeof t.bulkCall==`function`)try{let e=await t.bulkCall(n),r=Math.max(0,Math.min(e,n.length));o.succeeded+=r;let s=n.length-r;return s>0&&(o.failed+=s,o.errors.push({id:`batch_${i}`,error:`${s} record${s===1?``:`s`} failed in ${a}`})),o}catch{}return(await Promise.allSettled(n.map(e=>t.perRow(e)))).forEach((e,t)=>{e.status===`fulfilled`?o.succeeded+=1:(o.failed+=1,o.errors.push({id:n[t],error:e.reason instanceof Error?e.reason.message:String(e.reason)}))}),o}function si(e){let t=e.locations;return Array.isArray(t)?t.some(e=>e===`list_item`||e===`record_header`||e===`record_more`||e===`record_section`):!1}function ci(e,t){let n=e.params&&!Array.isArray(e.params)?e.params:{},r=n._rowRecord,i=e.recordIdField||`id`,a=n.recordId??r?.[i],o=Array.isArray(n._selectedIds);if(a==null&&!o){let n=Array.isArray(t?.selectedRecords)?t.selectedRecords:[];if(n.length===1)a=n[0]?.[i];else if(n.length>1)return{error:`This action runs on a single record — select exactly one row.`};else if(si(e))return{error:`This action runs on a single record — select a row first.`}}return{recordId:a??void 0}}function li(e){let{fetch:t,resolveObject:n,onRefresh:r}=e,i=e.resolveRecordId??ci,a=new Set;return async function(o,s){let c=o.name;if(!c)return{success:!1,error:`Action has no name — a server action must declare one`};let l=o.params&&!Array.isArray(o.params)?{...o.params}:{};delete l._rowRecord;let u=i(o,s);if(u.error)return{success:!1,error:u.error};let d=u.recordId,f=`${c}:${d??``}`;if(a.has(f))return{success:!1,error:`Action already in progress`};a.add(f);try{let i=typeof e.baseUrl==`function`?e.baseUrl():e.baseUrl??``,a=o.objectName||n?.(o,s)||`global`,u=await t(`${i}/api/v1/actions/${encodeURIComponent(a)}/${encodeURIComponent(c)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({recordId:d,params:l})}),f=qr(u,await u.json().catch(()=>null),`Action "${c}"`);if(!f.ok)return{success:!1,error:f.error};let p=o.refreshAfter!==!1;return p&&r?.(),{success:!0,data:f.envelope,reload:p}}catch(e){return{success:!1,error:e.message}}finally{a.delete(f)}}}function ui(e,t){let n=e?.recordIdParam;if(!n||!t||typeof t!=`object`)return{};let r=e?.recordIdField||`id`,i=e?.label||e?.name||n;if(!(r in t))return{error:`Action "${i}" identifies its record by "${r}", but that field is not present on the row. Add it to the view's columns, or check that it is readable — running without it would send a request that names no record.`};let a=t[r];return a==null?{error:`Action "${i}" identifies its record by "${r}", but this record has no value for it — running without it would send a request that names no record.`}:{value:a}}function di(e,t,n){let r=e;if(t&&(r=r.replace(/\/+$/,``)+`/`+t.replace(/^\/+/,``)),n&&Object.keys(n).length>0){let e=new URLSearchParams;for(let[t,r]of Object.entries(n))r!=null&&e.set(t,String(r));let t=e.toString();t&&(r+=(r.includes(`?`)?`&`:`?`)+t)}return r}function fi(e){if(!e)return{};let t={};return e.$select?.length&&(t.$select=e.$select.join(`,`)),e.$filter&&Object.keys(e.$filter).length>0&&(t.$filter=JSON.stringify(e.$filter)),e.$orderby&&(t.$orderby=typeof e.$orderby==`string`?e.$orderby:Array.isArray(e.$orderby)?typeof e.$orderby[0]==`string`?e.$orderby.join(`,`):e.$orderby.map(e=>`${e.field} ${e.order||`asc`}`).join(`,`):Object.entries(e.$orderby).map(([e,t])=>`${e} ${t}`).join(`,`)),e.$skip!==void 0&&(t.$skip=e.$skip),e.$top!==void 0&&(t.$top=e.$top),e.$expand?.length&&(t.$expand=e.$expand.join(`,`)),e.$search&&(t.$search=e.$search),e.$count&&(t.$count=`true`),t}function pi(e,t){return{...e,...t}}var mi=class{readConfig;writeConfig;fetchFn;defaultHeaders;constructor(e){this.readConfig=e.read,this.writeConfig=e.write,this.fetchFn=e.fetch??globalThis.fetch.bind(globalThis),this.defaultHeaders=e.defaultHeaders??{}}async request(e,t={}){if(!e)throw Error(`ApiDataSource: No HTTP configuration provided for this operation. Ensure the ViewData has read/write configs.`);let n=t.method??e.method??`GET`,r={...e.params,...t.queryParams},i=di(e.url,t.pathSuffix,r),a=pi(pi(this.defaultHeaders,e.headers),t.headers),o={method:n,headers:a};t.body!==void 0&&n!==`GET`&&(t.body instanceof FormData||t.body instanceof Blob?o.body=t.body:typeof t.body==`string`?(o.body=t.body,a[`Content-Type`]||=`text/plain`):(o.body=JSON.stringify(t.body),a[`Content-Type`]||=`application/json`));let s=await this.fetchFn(i,o);if(!s.ok){let e=await s.text().catch(()=>``);throw Error(`ApiDataSource: HTTP ${s.status} ${s.statusText} — ${e}`)}return(s.headers.get(`content-type`)??``).includes(`application/json`)?s.json():await s.text()}async find(e,t){let n=fi(t),r=await this.request(this.readConfig,{method:`GET`,queryParams:n});return this.normalizeQueryResult(r)}async findOne(e,t,n){try{let e=fi(n);return await this.request(this.readConfig,{pathSuffix:String(t),method:`GET`,queryParams:e})??null}catch{return null}}async create(e,t){let n=this.writeConfig??this.readConfig;return this.request(n,{method:`POST`,body:t})}async update(e,t,n,r){let i=this.writeConfig??this.readConfig;return this.request(i,{pathSuffix:String(t),method:`PATCH`,body:n,...r?.ifMatch?{headers:{"If-Match":String(r.ifMatch)}}:{}})}async delete(e,t,n){let r=this.writeConfig??this.readConfig;try{return await this.request(r,{pathSuffix:String(t),method:`DELETE`,...n?.ifMatch?{headers:{"If-Match":String(n.ifMatch)}}:{}}),!0}catch{return!1}}batchTransaction(e){return se(this,e)}async getObjectSchema(e){return{name:e,fields:{}}}async getView(e,t){return null}async getApp(e){return null}async aggregate(e,t){let n={field:t.field,function:t.function,groupBy:t.groupBy};t.filter&&(n.filter=typeof t.filter==`string`?t.filter:JSON.stringify(t.filter));let r=await this.request(this.readConfig,{pathSuffix:`aggregate`,method:`GET`,queryParams:n});return Array.isArray(r)?r:r?.data&&Array.isArray(r.data)?r.data:r?.results&&Array.isArray(r.results)?r.results:[]}normalizeQueryResult(e){if(Array.isArray(e))return{data:e,total:e.length};if(e&&typeof e==`object`){if(Array.isArray(e.data)&&(`total`in e||`totalCount`in e))return{data:e.data,total:e.total??e.totalCount??e.data.length,hasMore:e.hasMore,cursor:e.cursor};for(let t of[`data`,`items`,`results`,`records`,`value`])if(Array.isArray(e[t]))return{data:e[t],total:e.total??e.totalCount??e.count??e[t].length,hasMore:e.hasMore??e.hasNextPage};return{data:[e],total:1}}return{data:[],total:0}}};l();function H(e,t){return t?e[t]:e.id??e._id}function hi(e,t){return e.add(`[ObjectUI] ValueDataSource: ${t}. Rows are excluded rather than passed through.`),!1}function gi(e,t,n){let r=t[0],i=t[1],a=i===`not in`?`nin`:oe(i),o=e[r],s=t[2];switch(a){case`is_null`:return o==null;case`is_not_null`:return o!=null;case`=`:return o===s;case`!=`:return o!==s;case`>`:return o>s;case`>=`:return o>=s;case`<`:return o<s;case`<=`:return o<=s;case`in`:return Array.isArray(s)&&s.includes(o);case`nin`:return Array.isArray(s)&&!s.includes(o);case`contains`:case`icontains`:{let e=typeof o==`string`?o.toLowerCase():``;return typeof o==`string`&&e.includes(String(s).toLowerCase())}case`not_contains`:{let e=typeof o==`string`?o.toLowerCase():``;return typeof o==`string`&&!e.includes(String(s).toLowerCase())}case`starts_with`:{let e=typeof o==`string`?o.toLowerCase():``;return typeof o==`string`&&e.startsWith(String(s).toLowerCase())}case`ends_with`:{let e=typeof o==`string`?o.toLowerCase():``;return typeof o==`string`&&e.endsWith(String(s).toLowerCase())}case`between`:return Array.isArray(s)&&s.length===2&&o>=s[0]&&o<=s[1];default:return hi(n,`filter operator '${String(i)}' is not implemented by the in-memory matcher`)}}function _i(e,t,n){if(!Array.isArray(t))return hi(n,`filter node ${JSON.stringify(t)??String(t)} is not an array`);if(t.length===0)return!0;let r=t[0];if(typeof r==`string`){let i=r.toLowerCase();if(i===`and`||i===`or`){if(t.length<2)return hi(n,`'${i}' group carries no conditions`);let r=t.slice(1);return i===`and`?r.every(t=>_i(e,t,n)):r.some(t=>_i(e,t,n))}}return Array.isArray(r)?t.every(t=>_i(e,t,n)):typeof r==`string`&&typeof t[1]==`string`&&t.length<=3?gi(e,t,n):hi(n,`filter node ${JSON.stringify(t)} is not a shape the matcher reads`)}function vi(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(r&&typeof r==`object`&&!Array.isArray(r))for(let[e,n]of Object.entries(r))switch(e){case`$gt`:if(!(t>n))return!1;break;case`$gte`:if(!(t>=n))return!1;break;case`$lt`:if(!(t<n))return!1;break;case`$lte`:if(!(t<=n))return!1;break;case`$ne`:if(t===n)return!1;break;case`$in`:if(!Array.isArray(n)||!n.includes(t))return!1;break;case`$contains`:if(typeof t!=`string`||!t.toLowerCase().includes(String(n).toLowerCase()))return!1}else if(t!==r)return!1}return!0}function yi(e,t){if(!t)return e;let n=[];return Array.isArray(t)?n=t.map(e=>typeof e==`string`?e.startsWith(`-`)?{field:e.slice(1),order:`desc`}:{field:e,order:`asc`}:{field:e.field,order:e.order??`asc`}):typeof t==`object`&&(n=Object.entries(t).map(([e,t])=>({field:e,order:t}))),n.length===0?e:[...e].sort((e,t)=>{for(let{field:r,order:i}of n){let n=e[r],a=t[r];if(n===a)continue;if(n==null)return i===`asc`?-1:1;if(a==null)return i===`asc`?1:-1;let o=n<a?-1:1;return i===`asc`?o:-o}return 0})}function bi(e,t){if(!t||t.length===0)return e;let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}var xi=class{items;idField;mutationListeners=new Set;constructor(e){this.items=JSON.parse(JSON.stringify(e.items)),this.idField=e.idField}emitMutation(e){for(let t of this.mutationListeners)try{t(e)}catch(e){console.warn(`ValueDataSource: mutation listener error`,e)}}async find(e,t){let n=[...this.items];if(t?.$filter){if(Array.isArray(t.$filter)&&t.$filter.length>0){let e=new Set;n=n.filter(n=>_i(n,t.$filter,e));for(let t of e)console.warn(t)}else!Array.isArray(t.$filter)&&Object.keys(t.$filter).length>0&&(n=n.filter(e=>vi(e,t.$filter)))}if(t?.$search){let e=t.$search.toLowerCase();n=n.filter(t=>Object.values(t).some(t=>typeof t==`string`&&t.toLowerCase().includes(e)))}let r=n.length;n=yi(n,t?.$orderby);let i=t?.$skip??0,a=t?.$top;return i>0&&(n=n.slice(i)),a!==void 0&&(n=n.slice(0,a)),t?.$select?.length&&(n=n.map(e=>bi(e,t.$select))),{data:n,total:r,hasMore:i+(a??n.length)<r}}async findOne(e,t,n){let r=this.items.find(e=>String(H(e,this.idField))===String(t));return r?n?.$select?.length?bi(r,n.$select):{...r}:null}async create(e,t){let n={...t};if(!H(n,this.idField)){let e=this.idField??`id`;n[e]=`auto_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}return this.items.push(n),this.emitMutation({type:`create`,resource:e,record:{...n}}),{...n}}async update(e,t,n){let r=this.items.findIndex(e=>String(H(e,this.idField))===String(t));if(r===-1)throw Error(`ValueDataSource: Record with id "${t}" not found`);return this.items[r]={...this.items[r],...n},this.emitMutation({type:`update`,resource:e,id:t,record:{...this.items[r]}}),{...this.items[r]}}async delete(e,t){let n=this.items.findIndex(e=>String(H(e,this.idField))===String(t));return n!==-1&&(this.items.splice(n,1),this.emitMutation({type:`delete`,resource:e,id:t}),!0)}async bulk(e,t,n){let r=[];for(let i of n)switch(t){case`create`:r.push(await this.create(e,i));break;case`update`:{let t=H(i,this.idField);t!==void 0&&r.push(await this.update(e,t,i));break}case`delete`:{let t=H(i,this.idField);t!==void 0&&await this.delete(e,t);break}}return r}batchTransaction(e){return se(this,e)}async getObjectSchema(e){if(this.items.length===0)return{name:e,fields:{}};let t=this.items[0],n={};for(let[e,r]of Object.entries(t))n[e]={type:typeof r};return{name:e,fields:n}}async getView(e,t){return null}async getApp(e){return null}async aggregate(e,t){let{field:n,function:r,groupBy:i}=t,a={};for(let e of this.items){let t=String(e[i]??`Unknown`);a[t]||(a[t]=[]),a[t].push(e)}return Object.entries(a).map(([e,t])=>{let a=t.map(e=>Number(e[n])||0),o;switch(r){case`count`:o=t.length;break;case`avg`:o=a.length>0?a.reduce((e,t)=>e+t,0)/a.length:0;break;case`min`:o=a.length>0?Math.min(...a):0;break;case`max`:o=a.length>0?Math.max(...a):0;break;default:o=a.reduce((e,t)=>e+t,0)}return{[i]:e,[n]:o}})}onMutation(e){return this.mutationListeners.add(e),()=>{this.mutationListeners.delete(e)}}get count(){return this.items.length}getAll(){return JSON.parse(JSON.stringify(this.items))}};function Si(e,t,n){if(!e)return t??null;switch(e.provider){case`object`:return t??null;case`api`:return new mi({read:e.read,write:e.write,fetch:n?.fetch,defaultHeaders:n?.defaultHeaders});case`value`:return new xi({items:e.items??[],idField:n?.idField});default:return t??null}}var U=`https://objectui.dev/docs/errors`,Ci={"OBJUI-001":{code:`OBJUI-001`,message:'Unknown component type: "${type}"',suggestion:`Ensure the component is registered via registry.register() before rendering. Check for typos in the component type name.`,docUrl:`${U}/OBJUI-001`},"OBJUI-002":{code:`OBJUI-002`,message:"Schema validation failed: ${reason}",suggestion:`Verify the schema against the ObjectUI JSON spec. Run the built-in schema validator for details.`,docUrl:`${U}/OBJUI-002`},"OBJUI-003":{code:`OBJUI-003`,message:"Expression evaluation failed: ${expression}",suggestion:`Check the expression syntax and ensure all referenced variables exist in the current data scope.`,docUrl:`${U}/OBJUI-003`},"OBJUI-004":{code:`OBJUI-004`,message:'Plugin dependency missing: "${dependency}"',suggestion:`Install the required dependency and register it before loading this plugin.`,docUrl:`${U}/OBJUI-004`},"OBJUI-005":{code:`OBJUI-005`,message:'Plugin already loaded: "${plugin}"',suggestion:`A plugin with the same name is already registered. Remove the duplicate or use a unique plugin name.`,docUrl:`${U}/OBJUI-005`},"OBJUI-006":{code:`OBJUI-006`,message:'Plugin not found: "${plugin}"',suggestion:`Verify the plugin name and ensure it has been registered before access.`,docUrl:`${U}/OBJUI-006`},"OBJUI-007":{code:`OBJUI-007`,message:'Registry namespace deprecated: "${namespace}"',suggestion:`Migrate to the new namespace format. See the migration guide for details.`,docUrl:`${U}/OBJUI-007`},"OBJUI-008":{code:`OBJUI-008`,message:'Read-only scope violation: "${scope}"',suggestion:`You are trying to mutate a read-only data scope. Use a writable scope or clone the data before modifying.`,docUrl:`${U}/OBJUI-008`},"OBJUI-009":{code:`OBJUI-009`,message:'Invalid field configuration: "${field}"',suggestion:`Check the field schema for required properties (type, name). Ensure the field widget is registered.`,docUrl:`${U}/OBJUI-009`},"OBJUI-010":{code:`OBJUI-010`,message:'Action execution failed: "${action}"',suggestion:`Verify the action handler is registered and that all required parameters are provided.`,docUrl:`${U}/OBJUI-010`}},wi=class extends Error{code;details;constructor(e,t,n){super(e),this.code=t,this.details=n,this.name=`ObjectUIError`,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,code:this.code,details:this.details,stack:this.stack}}};function Ti(e){return e instanceof wi}var W=`__debug`;function Ei(e){let t=e;if(t===void 0)try{t=typeof window<`u`?window.location.search:``}catch{t=``}let n=new URLSearchParams(t),r=n.has(W),i=n.has(`${W}_schema`),a=n.has(`${W}_perf`),o=n.has(`${W}_data`),s=n.has(`${W}_expr`),c=n.has(`${W}_events`),l=n.has(`${W}_registry`);return{enabled:r||i||a||o||s||c||l,...i&&{schema:i},...a&&{perf:a},...o&&{data:o},...s&&{expr:s},...c&&{events:c},...l&&{registry:l}}}function Di(){try{if(typeof window<`u`)try{if(Ei(window.location.search).enabled)return!0}catch{}let e=typeof globalThis<`u`&&globalThis.OBJECTUI_DEBUG;return e===!0||e===`true`||globalThis.process?.env?.OBJECTUI_DEBUG===`true`}catch{return!1}}function Oi(e,t,n){Di()&&(n===void 0?console.log(`[ObjectUI Debug][${e}] ${t}`):console.log(`[ObjectUI Debug][${e}] ${t}`,n))}var ki=new Map;function Ai(e){Di()&&ki.set(e,performance.now())}function ji(e){if(!Di())return;let t=ki.get(e);if(t!==void 0){let n=(performance.now()-t).toFixed(2);console.log(`[ObjectUI Debug][perf] ${e}: ${n}ms`),ki.delete(e)}}var Mi=200,Ni=class e{static instance=null;entries=[];subscribers=new Set;static getInstance(){return e.instance||=new e,e.instance}static resetInstance(){e.instance=null}addPerf(e){this.push({kind:`perf`,data:e})}addExpr(e){this.push({kind:`expr`,data:e})}addEvent(e){this.push({kind:`event`,data:e})}getEntries(e){return e?this.entries.filter(t=>t.kind===e):this.entries.slice()}clear(){this.entries=[]}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}push(e){this.entries.push(e),this.entries.length>Mi&&(this.entries=this.entries.slice(-200));for(let t of this.subscribers)try{t(e)}catch{}}},Pi={medium:991,small:640,xsmall:479},Fi=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),Ii=e=>Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${Fi(e)}: ${typeof t==`number`?String(t):t} !important;`).join(` `);function Li(e){if(!e||typeof e!=`object`)return!1;let t=e;return!!(t.large||t.medium||t.small||t.xsmall)}function Ri(e){return`os-s-${String(e).replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function zi(e,t){let n=[];if(t.large){let r=Ii(t.large);r&&n.push(`${e} { ${r} }`)}for(let r of[`medium`,`small`,`xsmall`]){let i=t[r];if(!i)continue;let a=Ii(i);a&&n.push(`@media (max-width: ${Pi[r]}px) { ${e} { ${a} } }`)}return n.join(`
3
+ `)}var Bi={"react-pages":!0},Vi=new Map,Hi=!1;function Ui(){if(Hi)return;Hi=!0;let e=globalThis;if(Array.isArray(e.__OBJECTUI_CAPABILITIES__))for(let t of e.__OBJECTUI_CAPABILITIES__)typeof t==`string`&&!Vi.has(t)&&Vi.set(t,!0);if(Array.isArray(e.__OBJECTUI_CAPABILITIES_DISABLED__))for(let t of e.__OBJECTUI_CAPABILITIES_DISABLED__)typeof t==`string`&&Vi.set(t,!1)}function Wi(e){Ui();let t=Vi.get(e);return t===void 0?Bi[e]??!1:t}var Gi=`react-pages`,Ki=/\$\{event\.([a-zA-Z0-9_]+)\}/g;function qi(e,t){return typeof e!=`string`||e.indexOf("${event.")===-1?e:e.replace(Ki,(e,n)=>{let r=t[n];return r==null?``:String(r)})}function Ji(e,t){if(typeof e==`string`){let n=e.match(/^\$\{event\.([a-zA-Z0-9_]+)\}$/);if(n){let e=t[n[1]];return e===``||e===void 0?null:e}return qi(e,t)}if(Array.isArray(e))return e.map(e=>Ji(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))n[r]=Ji(i,t);return n}return e}function Yi(e,t,n={}){if(e?.filter)return Ji(e.filter,t);let r={},{rowField:i,columnField:a,groupByField:o}=n,s=t.scope??`cell`;return s===`total`?r:((s===`cell`||s===`row`)&&i&&`rowKey`in t&&(r[i]=t.rowKey===``?null:t.rowKey),(s===`cell`||s===`column`)&&a&&`colKey`in t&&(r[a]=t.colKey===``?null:t.colKey),o&&`category`in t&&(r[o]=t.category===``?null:t.category),r)}function Xi(e,t,n=`Details`){if(e?.title){let n=qi(e.title,t).trim();if(n)return n}let r=[];return t.rowLabel&&r.push(t.rowLabel),t.colLabel&&r.push(t.colLabel),t.categoryLabel?r.push(t.categoryLabel):t.category&&r.push(t.category),t.series&&r.push(t.series),r.length>0?r.join(` × `):n}function Zi(e){return e?e.enabled!==!1:!1}function Qi(e,t=new Date){if(e==null)return e;let n=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t},r=e=>{let t=n(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`},i=e=>{let t=n(e),r=(t.getDay()+6)%7;return t.setDate(t.getDate()-r),t},a=e=>new Date(e.getFullYear(),e.getMonth(),1),o=e=>{let t=Math.floor(e.getMonth()/3);return new Date(e.getFullYear(),t*3,1)},s=e=>new Date(e.getFullYear(),0,1),c=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,1),l=(e,t)=>{let r=n(e);return r.setDate(r.getDate()+t),r},u=e=>l(c(a(e),1),-1),d=e=>l(i(e),6),f=e=>l(c(o(e),3),-1),p=e=>new Date(e.getFullYear(),11,31),m={today:()=>r(t),yesterday:()=>r(l(t,-1)),tomorrow:()=>r(l(t,1)),now:()=>t.toISOString(),current_week_start:()=>r(i(t)),current_week_end:()=>r(d(t)),current_month_start:()=>r(a(t)),current_month_end:()=>r(u(t)),current_quarter_start:()=>r(o(t)),current_quarter_end:()=>r(f(t)),current_year_start:()=>r(s(t)),current_year_end:()=>r(p(t)),last_week_start:()=>r(l(i(t),-7)),last_week_end:()=>r(l(i(t),-1)),last_month_start:()=>r(c(a(t),-1)),last_month_end:()=>r(l(a(t),-1)),last_quarter_start:()=>r(c(o(t),-3)),last_quarter_end:()=>r(l(o(t),-1)),last_year_start:()=>r(new Date(t.getFullYear()-1,0,1)),last_year_end:()=>r(new Date(t.getFullYear()-1,11,31)),next_week_start:()=>r(l(i(t),7)),next_month_start:()=>r(c(a(t),1)),next_quarter_start:()=>r(c(o(t),3)),next_year_start:()=>r(new Date(t.getFullYear()+1,0,1))};for(let[e,t]of Object.entries({week_start:`current_week_start`,week_end:`current_week_end`,month_start:`current_month_start`,month_end:`current_month_end`,quarter_start:`current_quarter_start`,quarter_end:`current_quarter_end`,year_start:`current_year_start`,year_end:`current_year_end`}))m[e]=m[t];let h=/^(\d+)_(minutes?|hours?|days?|weeks?|months?|years?)_(ago|from_now)$/,g=e=>{let n=e.match(h);if(!n)return null;let i=parseInt(n[1],10);if(!Number.isFinite(i))return null;let a=n[3]===`ago`?-1:1,o=n[2].replace(/s$/,``);if(o===`minute`)return new Date(t.getTime()+a*i*60*1e3).toISOString();if(o===`hour`)return new Date(t.getTime()+a*i*60*60*1e3).toISOString();if(o===`day`)return r(l(t,a*i));if(o===`week`)return r(l(t,a*i*7));if(o===`month`){let e=new Date(t.getFullYear(),t.getMonth()+a*i,t.getDate());return r(e)}if(o===`year`){let e=new Date(t.getFullYear()+a*i,t.getMonth(),t.getDate());return r(e)}return null},_=/\$?\{([a-zA-Z0-9_]+)\}/g,v=e=>{if(e==null)return e;if(typeof e==`string`){let t=e.match(/^\$?\{([a-zA-Z0-9_]+)\}$/);if(t){let e=t[1];if(m[e])return m[e]();let n=g(e);if(n!=null)return n}let n=!1,r=e.replace(_,(e,t)=>{if(m[t])return n=!0,m[t]();let r=g(t);return r==null?e:(n=!0,r)});return n?r:e}if(Array.isArray(e))return e.map(v);if(typeof e==`object`){let t={};for(let n of Object.keys(e))t[n]=v(e[n]);return t}return e};return v(e)}l();var $i={current_user:`current_user_id`,current_user_email:`current_user_id`,user_id:`current_user_id`,userid:`current_user_id`,me:`current_user_id`,current_organization_id:`current_org_id`,org_id:`current_org_id`,organization_id:`current_org_id`,current_tenant_id:`current_org_id`},ea=/^\$?\{([a-zA-Z0-9_]+)\}$/;function ta(e){return y.includes(e)}function na(e,t={}){if(e==null)return e;let{currentUserId:n,currentOrgId:r}=t,i=t.onUnresolved===null?()=>{}:t.onUnresolved??(e=>{console.warn(`[object-ui] ${e}`)}),a={current_user_id:n,current_org_id:r},o=e=>{if(e==null)return e;if(typeof e==`string`){let t=e.match(ea);if(!t)return e;let n=t[1];if(ta(n)){let t=a[n];return t!=null&&t!==``?t:(i(`Filter placeholder "{${n}}" could not be resolved — no ${n===`current_user_id`?`signed-in user`:`active organization`} in scope. The filter will match no records.`),e)}let r=$i[n.toLowerCase()];return r&&i(`Filter placeholder "{${n}}" is not a recognised token — did you mean "{${r}}"? It is sent to the server as a literal string and will match no records.`),e}if(Array.isArray(e))return e.map(o);if(typeof e==`object`){let t={};for(let n of Object.keys(e))t[n]=o(e[n]);return t}return e};return o(e)}function ra(e,t={},n=new Date){return e==null?e:na(Qi(e,n),t)}var ia=`dateRange`,aa=`created_at`,oa={today:{from:`{today}`,to:`{today}`},yesterday:{from:`{yesterday}`,to:`{yesterday}`},this_week:{from:`{current_week_start}`,to:`{current_week_end}`},last_week:{from:`{last_week_start}`,to:`{last_week_end}`},this_month:{from:`{current_month_start}`,to:`{current_month_end}`},last_month:{from:`{last_month_start}`,to:`{last_month_end}`},this_quarter:{from:`{current_quarter_start}`,to:`{current_quarter_end}`},last_quarter:{from:`{last_quarter_start}`,to:`{last_quarter_end}`},this_year:{from:`{current_year_start}`,to:`{current_year_end}`},last_year:{from:`{last_year_start}`,to:`{last_year_end}`},last_7_days:{from:`{7_days_ago}`,to:`{today}`},last_30_days:{from:`{30_days_ago}`,to:`{today}`},last_90_days:{from:`{90_days_ago}`,to:`{today}`}};function sa(e){return oa[e]}var ca=/^\d{4}-\d{2}-\d{2}(?:[T ][\d:.]+(?:Z|[+-]\d{2}:?\d{2})?)?$/;function la(e){return Qi(e)!==e||ca.test(e)&&!Number.isNaN(Date.parse(e))}function ua(){return r.join(`, `)}function da(e){typeof console<`u`&&console.warn(`[dashboard-filters] ${e}`)}var fa=()=>!1,pa=new Set;function ma(e){let t=Rt(e);if(t===e)return e;let n=e?.name??e?.field??`?`,r=t?.defaultValue;return da(`filter "${n}": \`defaultValue: { preset: ${JSON.stringify(r)} }\` is a LEGACY spelling (objectui#4165) and was lifted to the canonical bare preset name ${JSON.stringify(r)}. Rewrite the stored dashboard — the object form is refused by @objectstack/spec and its acceptance here ends with @object-ui/types 18.`),t}function ha(e,t){return e!==`date`&&e!==`dateRange`||typeof t!=`string`?t:t in oa?{preset:t}:t}function ga(e,t){if(!Array.isArray(e)||e.length===0)return;let n=[],r=[];for(let t of e)if(t!=null){if(typeof t==`object`){let e=t.value;if(e==null)continue;let r=t.label,i=typeof r==`object`&&!!r&&!Array.isArray(r);n.push({value:String(e),label:typeof r==`string`&&r||i?r:String(e)})}else r.push(String(t)),n.push({value:String(t),label:String(t)})}return r.length>0&&_a(t,r),n.length>0?n:void 0}function _a(e,t){if(!fa())return;let n=`${e}:${t.join(`,`)}`;if(pa.has(n))return;pa.add(n);let r=t.map(e=>`{ value: ${JSON.stringify(e)}, label: ${JSON.stringify(e)} }`).join(`, `);da(`filter "${e}": \`options\` carries the bare-string shorthand (${t.map(e=>JSON.stringify(e)).join(`, `)}), which @objectstack/spec's \`GlobalFilterSchema\` REFUSES at publish — a dashboard authored this way renders here and is rejected the moment it reaches the platform (objectui#4356). Rewrite the stored dashboard to the canonical pair form: [${r}]. Still lifted here for already-persisted dashboards; the lift is removed on the objectstack#7917 schedule.`)}function va(e){let t=new Map;if(e.dateRange){let n=e.dateRange.defaultRange;t.set(ia,{name:ia,field:e.dateRange.field||aa,type:`dateRange`,defaultValue:n&&n!==`custom`?{preset:n}:void 0,allowCustomRange:e.dateRange.allowCustomRange})}for(let n of e.globalFilters??[]){if(!n?.field)continue;let e=ma(n),r=e.name||e.field;t.has(r)&&typeof console<`u`&&console.warn(`[dashboard-filters] duplicate filter name "${r}" — the later definition wins`);let i=e.type??`text`;t.set(r,{name:r,field:e.field,label:e.label,type:i,options:ga(e.options,r),optionsFrom:e.optionsFrom,defaultValue:ha(i,e.defaultValue),targetWidgets:e.targetWidgets})}return Array.from(t.values())}function ya(e){return e.map(e=>({name:e.name,type:e.type===`dateRange`?`object`:`string`,defaultValue:e.defaultValue}))}function ba(e,t){if(t==null||t===``)return!0;if(Array.isArray(t))return t.length===0;if(e.type===`dateRange`||e.type===`date`){let e=t;return typeof e==`object`&&!e.preset&&!e.from&&!e.to}return typeof t==`object`&&Object.keys(t).length===0}function xa(e,t){if(!ba(e,t)){if(e.type===`dateRange`||e.type===`date`){let n=t;if(typeof n==`object`){let t=typeof n.preset==`string`&&n.preset?n.preset:void 0,r=t?sa(t):void 0,i=r?.from??n.from,a=r?.to??n.to;return t&&!r&&da(i||a?`filter "${e.name}": ignoring unknown date range preset "${t}" — using the explicit from/to bounds instead; known presets: ${ua()}`:`skipping filter "${e.name}": unknown date range preset "${t}" — expected one of: ${ua()}`),!i&&!a?void 0:{...i?{$gte:i}:{},...a?{$lte:a}:{}}}if(typeof n==`string`&&!la(n)){da(`skipping filter "${e.name}": value "${n}" is neither a known date range preset nor an ISO date — expected one of: ${ua()}, an ISO date (YYYY-MM-DD), or a date macro such as {today}`);return}return t}return e.type===`select`||e.type===`lookup`?Array.isArray(t)?{$in:t}:t:e.type===`text`?{$contains:t}:t}}function Sa(e,t){let n=e.filterBindings?.[t.name];if(n!==!1){if(typeof n==`string`&&n)return n;if(!(t.targetWidgets&&t.targetWidgets.length>0&&(!e.id||!t.targetWidgets.includes(e.id))))return t.field}}function Ca(e,t,n,r){let i=[];for(let a of t){let t=n[a.name];if(ba(a,t))continue;let o=Sa(e,a);if(!o)continue;if(typeof e.filterBindings?.[a.name]!=`string`&&r&&!r.has(o)){typeof console<`u`&&console.warn(`[dashboard-filters] skipping filter "${a.name}" on widget "${e.id??`?`}": default field "${o}" does not exist on the widget's object — map it with filterBindings: { "${a.name}": "<field>" } or opt out with false`);continue}let s=xa(a,t);s!==void 0&&i.push({[o]:s})}if(i.length!==0)return i.length===1?i[0]:{$and:i}}function wa(e,t){let n=e&&Object.keys(e).length>0,r=t&&Object.keys(t).length>0;if(n&&r)return{$and:[e,t]};if(n)return e;if(r)return t}var Ta={current_week_start:`last_week_start`,current_week_end:`last_week_end`,current_month_start:`last_month_start`,current_month_end:`last_month_end`,current_quarter_start:`last_quarter_start`,current_quarter_end:`last_quarter_end`,current_year_start:`last_year_start`,current_year_end:`last_year_end`,week_start:`last_week_start`,week_end:`last_week_end`,month_start:`last_month_start`,month_end:`last_month_end`,quarter_start:`last_quarter_start`,quarter_end:`last_quarter_end`,year_start:`last_year_start`,year_end:`last_year_end`,today:`yesterday`};function Ea(e,t){if(e==null)return e;if(typeof e==`string`)return e.replace(/\$?\{([a-zA-Z0-9_]+)\}/g,(e,n)=>{let r=t[n];return r?`{${r}}`:e});if(Array.isArray(e))return e.map(e=>Ea(e,t));if(typeof e==`object`){let n={};for(let r of Object.keys(e))n[r]=Ea(e[r],t);return n}return e}function Da(e,t,n=new Date){return t.kind===`previousYear`?Qi(e,new Date(n.getFullYear()-1,n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds())):Qi(Ea(e,Ta),n)}function Oa(e,t){if(e.kind===`previousYear`)return`vsLastYear`;let n=t?JSON.stringify(t):``;return/current_year_|year_start|year_end/.test(n)?`vsLastYear`:/current_quarter_|quarter_start|quarter_end/.test(n)?`vsLastQuarter`:/current_month_|month_start|month_end/.test(n)?`vsLastMonth`:/current_week_|week_start|week_end/.test(n)?`vsLastWeek`:/\btoday\b/.test(n)?`vsYesterday`:`vsPreviousPeriod`}var ka=e=>e==null?null:String(e),Aa=e=>JSON.stringify(e),ja=(e,t)=>JSON.stringify([e,t]),Ma=[`count`,`sum`,`avg`,`min`,`max`,`count_distinct`];function Na(e){return typeof e==`string`&&Ma.includes(e)}function Pa(e,t){let n=e.builtinAggregate;if(Na(n)){let e=t?.[n];if(typeof e==`string`&&e!==``)return e}return e.label??e.name}function G(e){return Aa([ka(e)])}var Fa=`__bucketId`;function Ia(e){if(!e||typeof e!=`object`)return;let t=e[Fa];return typeof t==`string`&&t!==``?t:void 0}function La(e,t){return K(e,t)&&e[t]==null}function K(e,t){return!!e&&typeof e==`object`&&t in e}function Ra(e){return e==null?``:String(e)}function za(e){let t=new Map;for(let{id:n,display:r}of e){let e=t.get(r);e||t.set(r,e=new Set),e.add(n)}let n=new Set;for(let[e,r]of t)r.size>1&&n.add(e);return n}function Ba(e,t,n){let r=e=>La(e,t)?n:e[t],i=za(e.filter(e=>K(e,t)).map(e=>({id:G(e[t]),display:Ra(r(e))}))),a=!1,o=e.map(e=>{if(!K(e,t))return e;let o=La(e,t),s=i.has(Ra(r(e)));return!o&&!s?e:(a=!0,{...e,...o?{[t]:n}:{},...s?{[Fa]:G(e[t])}:{}})});return a?o:e}function Va(e,t,n,r){let i=new Map;for(let r of e){if(!K(r,t))continue;let e=G(r[t]);i.has(e)||i.set(e,{id:e,label:La(r,t)?n:String(r[t])})}let a=Array.from(i.values()),o=za(a.map(({id:e,label:t})=>({id:e,display:t}))),s=new Set([r,Fa]),c=new Set(a.map(({id:e})=>e));return a.map(({id:e,label:t})=>({id:e,label:t,dataKey:o.has(t)||s.has(t)||c.has(t)?e:t}))}function Ha(e,t,n,r,i){let a=(t??[]).filter(Boolean),o=(n??[]).filter(Boolean),s=Array.isArray(e)?e:[],c=e=>{let t=(r??[]).find(t=>t.name===e);return t?Pa(t,i?.builtinAggregateLabels):e};if(a.length>=2&&o.length===1){let e=a[0],t=a[1],n=o[0],r=i?.nullCategoryLabel??`(None)`,c=Va(s,t,r,e),l=new Map(c.map(({id:e,dataKey:t})=>[e,t])),u=new Map;for(let i of s){let a=i[e],o=G(a),s=u.get(o);s||u.set(o,s={}),K(i,e)&&!K(s,e)&&(s[e]=La(i,e)?r:a);let c=K(i,t)?l.get(G(i[t])):void 0;c!==void 0&&(s[c]=i[n])}let d=za(Array.from(u.entries()).map(([t,n])=>({id:t,display:Ra(n[e])})));return{data:Array.from(u.entries()).map(([t,n])=>d.has(Ra(n[e]))?{...n,[Fa]:t}:n),xAxisKey:e,series:c.map(({dataKey:e,label:t})=>({dataKey:e,label:t}))}}let l=a[0];return{data:l?Ba(s,l,i?.nullCategoryLabel??`(None)`):s,xAxisKey:l,series:o.map(e=>({dataKey:e,label:c(e)}))}}function Ua(e,t){let n=Array.isArray(e)?e:[];if(!t)return n;let r=Object.keys(t).filter(e=>t[e]&&Object.keys(t[e]).length>0);return r.length===0?n:n.map(e=>{let n=null;for(let i of r){let r=e[i];if(r==null)continue;let a=t[i][String(r)];a!=null&&a!==r&&(n||={...e},n[i]=a)}return n??e})}function Wa(e,t,n,r,i,a){let o=(t??[]).filter(Boolean),s=(n??[]).filter(Boolean),c=Array.isArray(e)?e:[],l=o[0];if(!l)return-1;let u=String(r??``),d=a?.nullCategoryLabel??`(None)`,f=a?.bucketId,p=typeof f==`string`&&f!==``?e=>G(e[l])===f:e=>(e[l]==null?d:String(e[l]))===u;if(o.length>=2&&s.length===1){let e=o[1],t=Va(c,e,d,l).find(({dataKey:e})=>e===String(i??``))?.id;return t===void 0?-1:c.findIndex(n=>p(n)&&K(n,e)&&G(n[e])===t)}return c.findIndex(e=>p(e))}function Ga(e){if(!Array.isArray(e)||e.length===0)return null;let t={};for(let n of e)if(n&&typeof n==`object`){let e=n;typeof e.color==`string`&&e.color&&(e.value!=null&&(t[String(e.value)]=e.color),e.label!=null&&(t[String(e.label)]=e.color))}return Object.keys(t).length>0?t:null}function Ka(e){if(!Array.isArray(e)||e.length===0)return null;let t=[];for(let n of e){if(typeof n==`string`||typeof n==`number`||typeof n==`boolean`){t.push(String(n));continue}if(n&&typeof n==`object`){let e=n;e.value!=null&&t.push(String(e.value)),e.label!=null&&String(e.label)!==String(e.value)&&t.push(String(e.label))}}return t.length>0?t:null}function qa(e){if(!Array.isArray(e)||e.length===0)return null;let t=new Map;return e.forEach((e,n)=>{t.has(e)||t.set(e,n)}),t.size>0?t:null}function Ja(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return{value:String(e),label:String(e)};if(e&&typeof e==`object`){let t=e;if(t.value!=null&&t.label!=null)return{value:String(t.value),label:String(t.label)}}return null}function Ya(e,t){if(!t||!Array.isArray(e)||e.length===0)return e;let n=!1,r=e.map(e=>{let r=Ja(e);if(!r)return e;let i=t(r.value,r.label);return i===r.label?e:(n=!0,e&&typeof e==`object`?{...e,label:i}:{value:r.value,label:i})});return n?r:e}function Xa(e,t){if(!Array.isArray(e)||e.length===0)return null;let n={},r={};for(let i of e){let e=Ja(i);if(!e)continue;let a=t?t(e.value,e.label):e.label;a!==e.value&&(n[e.value]=a),a!==e.label&&(r[e.label]=a)}let i={...r,...n};return Object.keys(i).length>0?i:null}var Za=new Set([`lookup`,`master_detail`,`masterdetail`,`master-detail`]);function Qa(e){let t=e?.fields;return t&&typeof t==`object`&&!Array.isArray(t)?t:null}function $a(e){if(!e||typeof e!=`object`)return;let t=e,n=typeof t.type==`string`?t.type.toLowerCase():``;if(!Za.has(n))return;let r=t.reference;return typeof r==`string`&&r?r:void 0}async function eo(e,t,n){let r={},i=Array.from(new Set((t??[]).filter(e=>!!e)));if(i.length===0)return r;let a=new Map,o=e?.name;typeof o==`string`&&o&&a.set(o,Promise.resolve(e));let s=e=>{let t=a.get(e);return t||(t=Promise.resolve().then(()=>n(e)).catch(()=>null),a.set(e,t)),t};for(let t of i){let n=t.split(`.`),i=e,a=typeof o==`string`&&o?o:void 0,c=!0;for(let e=0;e<n.length-1;e+=1){let t=$a(Qa(i)?.[n[e]]);if(!t){c=!1;break}if(i=await s(t),!i){c=!1;break}let r=i.name;a=typeof r==`string`&&r?r:t}if(!c)continue;let l=n[n.length-1],u=Qa(i)?.[l];u?.options!==void 0&&(r[t]={object:a,field:l,options:u.options})}return r}function to(e,t){let n=e?.object;if(!n||!t)return;let r=e.field;return(e,i)=>t(n,r,e,i)}function no(e,t,n){if(!e||!t||t.length===0)return null;let r={};for(let{dim:i,path:a}of t){let t=e[a],o=Xa(t?.options,to(t,n));o&&(r[i]=o)}return Object.keys(r).length>0?r:null}async function ro(e,t,n){return eo(await e(t),n,e)}var io=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function ao(e){if(typeof e==`string`&&e)return e;if(io(e))return Object.values(e).find(e=>typeof e==`string`&&e)}function oo(e){let t={},n=e.type;(n===`bar`||n===`line`||n===`area`)&&(t.chartType=n),(e.yAxis===`left`||e.yAxis===`right`)&&(t.yAxis=e.yAxis);let r=ao(e.label);return r&&(t.label=r),typeof e.color==`string`&&e.color&&(t.color=e.color),typeof e.stack==`string`&&e.stack&&(t.stack=e.stack),(e.variant===`primary`||e.variant===`comparison`)&&(t.variant=e.variant),typeof e.dashArray==`string`&&e.dashArray&&(t.dashArray=e.dashArray),typeof e.opacity==`number`&&Number.isFinite(e.opacity)&&(t.opacity=e.opacity),t}function so(e){let t={};if(!io(e))return t;let n=ao(e.title);return n&&(t.title=n),typeof e.format==`string`&&e.format&&(t.format=e.format),typeof e.min==`number`&&Number.isFinite(e.min)&&(t.min=e.min),typeof e.max==`number`&&Number.isFinite(e.max)&&(t.max=e.max),typeof e.stepSize==`number`&&Number.isFinite(e.stepSize)&&e.stepSize>0&&(t.stepSize=e.stepSize),typeof e.showGridLines==`boolean`&&(t.showGridLines=e.showGridLines),(e.position===`left`||e.position===`right`||e.position===`top`||e.position===`bottom`)&&(t.position=e.position),typeof e.logarithmic==`boolean`&&(t.logarithmic=e.logarithmic),t}function co(e,t){let n=new Map;for(let e of Array.isArray(t)?t:[]){if(!io(e))continue;let t=typeof e.name==`string`?e.name:void 0;t&&!n.has(t)&&n.set(t,e)}return e.map(e=>{let t=n.get(e.dataKey);return t?{...e,...oo(t)}:e})}function lo(e,t){let n=io(t)?t:{},r=co(e,n.series),i={},a=so(n.xAxis);Object.keys(a).length>0&&(i.xAxis=a);let o=Array.isArray(n.yAxis)?n.yAxis:n.yAxis===void 0?[]:[n.yAxis];return o.length>0&&(i.yAxis=o.map(so)),{series:r,axes:i}}function uo(e,t){let n=io(e)?e:{},r={},i=e=>typeof e==`string`&&e?e:void 0;typeof n.showLegend==`boolean`&&(r.showLegend=n.showLegend),typeof n.showDataLabels==`boolean`&&(r.showDataLabels=n.showDataLabels);let a=i(n.title);a&&(r.title=a);let o=i(n.subtitle);o&&(r.subtitle=o);let s=i(n.description);s&&(r.description=s),typeof n.height==`number`&&Number.isFinite(n.height)&&n.height>0&&(r.height=n.height),Array.isArray(n.annotations)&&n.annotations.length>0&&(r.annotations=n.annotations),n.interaction&&typeof n.interaction==`object`&&!Array.isArray(n.interaction)&&(r.interaction=n.interaction);let c=Array.isArray(n.colors)?n.colors.filter(e=>typeof e==`string`&&!!e):void 0;c?.length&&(r.colors=c);let l=n.colors&&typeof n.colors==`object`&&!Array.isArray(n.colors)?n.colors:void 0;return(t||l)&&(r.categoryColors={...t??{},...l??{}}),r}function fo(e,t){return t?!0:e!==0}function po(e,t={}){let{locale:n,currency:r,scale:i,style:a,...o}=t,s={...o};a===`percentPoints`?(s.style=`unit`,s.unit=`percent`,s.unitDisplay=`narrow`):a&&(s.style=a),r&&(s.style=`currency`,s.currency=r,delete s.unit,delete s.unitDisplay),fo(i,r)||(s.useGrouping=!1);try{return new Intl.NumberFormat(n,s).format(e)}catch{return new Intl.NumberFormat(void 0,s).format(e)}}function mo(e,t){try{let n=new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(e,`day`);return n.charAt(0).toUpperCase()+n.slice(1)}catch{return e===0?`Today`:e===1?`Tomorrow`:e===-1?`Yesterday`:e>0?`In ${e} days`:`${Math.abs(e)} days ago`}}function ho(e,t){if(e==null||e===``)return`—`;let n=e instanceof Date?e:new Date(e);if(!(n instanceof Date)||isNaN(n.getTime()))return`—`;let r=new Date,i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),a=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime()-i.getTime(),o=Math.round(a/864e5);if(o<-7||o>7)return go(n,void 0,t);if(o<-1&&t?.dueLike){let e=Math.abs(o),n=`fields.relativeDate.overdue`,r=t.t?.(n,{count:e});return r&&r!==n?r:`Overdue ${e}d`}return mo(o,t?.locale)}function go(e,t,n){if(e==null||e===``)return`—`;let r=e instanceof Date?e:new Date(e);if(!(r instanceof Date)||isNaN(r.getTime()))return`—`;if(t===`short`)return`${r.toLocaleDateString(n?.locale,{month:`short`})} ${r.getDate()}, '${String(r.getFullYear()).slice(-2)}`;if(t===`relative`)return ho(r,n);let i=r.getFullYear()===new Date().getFullYear();return r.toLocaleDateString(n?.locale,{year:i?void 0:`numeric`,month:`short`,day:`numeric`})}function _o(e,t){if(e==null||e===``)return`—`;let n=e instanceof Date?e:new Date(e);return!(n instanceof Date)||isNaN(n.getTime())?`—`:n.toLocaleDateString(t?.locale,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function vo(e){return e>-1&&e<1?e*100:e}function yo(e,t,n){return po(e,{...n,locale:t})}var bo=/^\d{4}-\d{2}-\d{2}$/,xo=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;function So(e,t,n){if(typeof e==`string`){if(bo.test(e))return Number.isNaN(Date.parse(e))?void 0:go(e,t,{locale:n});if(xo.test(e))return Number.isNaN(Date.parse(e))?void 0:_o(e,{locale:n})}}function Co(e,t,n,r,i){if(e==null)return`—`;if(typeof e!=`number`)return So(e,t,i)??String(e);let a=t?t.split(`.`)[1]?.match(/0/g)?.length??0:void 0;if(n)try{return yo(e,i,{currency:n,minimumFractionDigits:a??0,maximumFractionDigits:a??2})}catch{}if(!t)return Number.isInteger(e)?String(e):yo(e,i,{maximumFractionDigits:2});let o=t.includes(`%`);return`${t.includes(`$`)?`$`:``}${yo(o?r?r===`fraction`?e*100:e:vo(e):e,i,{style:o?`percentPoints`:`decimal`,minimumFractionDigits:a??0,maximumFractionDigits:a??0})}`}function wo(e,t){return e==null?`—`:typeof e==`number`?Number.isInteger(e)?String(e):yo(e,t,{maximumFractionDigits:2}):String(e)}function To(e,t,n){let r=new Map((e??[]).map(e=>[e.name,e])),i=e=>r.get(e);return{measureField:i,headerLabel:e=>{let r=i(e)?.label??e;return t&&n?n(t,e,r):r}}}function Eo(e,t,n,r,i){let a={};for(let r of t){let t=e?.[r];a[n[r]]=t===``||t===void 0?null:t}if(i)for(let e of Object.values(i))e&&e.field&&(a[e.field]={$gte:e.gte,$lt:e.lt});return r?{...r,...a}:a}var Do=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i;function Oo(e){return Do.test(e)||e.startsWith(`rgb`)||e.startsWith(`hsl`)}function ko(e){let t=e?.options;if(!Array.isArray(t))return{};let n={};for(let e of t)!e||typeof e!=`object`||e.value!=null&&typeof e.color==`string`&&e.color&&(n[String(e.value)]=e.color);return n}function Ao(e){let t=ko(e);return e=>{if(e==null||e===``)return;let n=String(e);return t[n]||(Oo(n)?n:void 0)}}var jo=/[\\/:*?"<>|\u0000-\u001f]+/g,Mo=80;function No(e){return e?String(e).replace(jo,`_`).replace(/\s+/g,` `).replace(/_{2,}/g,`_`).replace(/^[\s._-]+|[\s._-]+$/g,``).slice(0,Mo):``}function Po(e,t={},n=new Date){let r=No(t.prefix),i=r||No(t.label)||No(t.objectName)||`export`,a=No(t.viewLabel);!r&&a&&a.toLowerCase()!==i.toLowerCase()&&(i=`${i}-${a}`.slice(0,Mo));let o=e=>String(e).padStart(2,`0`),s=`${n.getFullYear()}${o(n.getMonth()+1)}${o(n.getDate())}-${o(n.getHours())}${o(n.getMinutes())}${o(n.getSeconds())}`;return`${i}-${s}.${e}`}var Fo=new Set([`id`,`created_at`,`created_by`,`updated_at`,`updated_by`,`owner_id`,`organization_id`,`owning_business_unit_id`]);function Io(e,t){return Fo.has(e)?!0:!!t&&typeof t==`object`&&e in t}var Lo=/\b(?:record|data)\.([A-Za-z_][A-Za-z0-9_]*)/g,Ro=/^[A-Za-z_][A-Za-z0-9_]*$/;function zo(e){if(typeof e==`string`)return e.trim()||null;if(e&&typeof e==`object`){let t=e.source;if(typeof t==`string`)return t.trim()||null}return null}function Bo(e){let t=[],n=new Set;for(let r of e){let e=zo(r);if(e){Lo.lastIndex=0;for(let r=Lo.exec(e);r;r=Lo.exec(e)){let e=r[1];n.has(e)||(n.add(e),t.push(e))}}}return t}function Vo(e){let t=[];for(let n of e.conditionalFormatting??[]){if(!n||typeof n!=`object`)continue;let e=n;t.push(e.condition,e.expression),typeof e.field==`string`&&e.field&&t.push(`record.${e.field}`)}for(let n of[e.rowActionDefs,e.bulkActionDefs,e.objectActions])for(let e of n??[]){if(!e||typeof e!=`object`)continue;let n=e;t.push(n.visible,n.disabled),typeof n.recordIdField==`string`&&Ro.test(n.recordIdField)&&t.push(`record.${n.recordIdField}`)}for(let n of Object.values(e.userActions??{})){if(!n||typeof n!=`object`)continue;let e=n;t.push(e.visibleWhen,e.disabledWhen)}return t}function Ho(e){let t=e?.fields;if(!Array.isArray(t))return[];let n=[],r=new Set;for(let e of t){let t=e?.field;if(typeof t!=`string`)continue;let i=t.trim();!i||r.has(i)||(r.add(i),n.push(i))}return n}var Uo={compact:`compact`,comfortable:`medium`,spacious:`tall`},Wo={compact:`compact`,short:`compact`,medium:`comfortable`,tall:`spacious`,extra_tall:`spacious`};function Go(e){if(typeof e==`string`&&Object.prototype.hasOwnProperty.call(Wo,e))return Wo[e]}var Ko=e=>!!e&&typeof e==`object`&&!Array.isArray(e),qo={showSearch:`search`,showSort:`sort`,showFilters:`filter`,showDensity:`rowHeight`,showGroup:`group`,showHideFields:`hideFields`,showColor:`rowColor`},Jo={private:`personal`,team:`collaborative`,organization:`collaborative`,public:`collaborative`},Yo={label:`ariaLabel`,describedBy:`ariaDescribedBy`},Xo={kanban:{groupField:`groupByField`,cardFields:`columns`},gallery:{imageField:`coverField`},timeline:{dateField:`startDateField`}};function Zo(e){if(!e||typeof e!=`object`)return e;let t=e,n=t.fields,r=Array.isArray(n),i=t.densityMode,a=typeof i==`string`&&i in Uo,o=t.filters,s=Array.isArray(o),c=Object.keys(qo).filter(e=>typeof t[e]==`boolean`),l=typeof t.showDescription==`boolean`,u=Ko(t.aria)?t.aria:void 0,d=!!u&&Object.keys(Yo).some(e=>u[e]!==void 0),f=Ko(t.sharing)?t.sharing:void 0,p=!!f&&(f.visibility!==void 0||f.enabled!==void 0),m=t.viewType,h=!m||m===`list`,g=Array.isArray(t.columns)?t.columns:r?n:void 0,_=St(g),v=_!==g,y=Object.entries(Xo).map(([e,n])=>{let r=Ko(t[e])?t[e]:void 0;if(!r)return;let i=Object.keys(n).filter(e=>r[e]!==void 0);return i.length?{viewKey:e,aliases:n,cfg:r,legacyKeys:i}:void 0}).filter(e=>e!==void 0);if(!r&&!a&&!s&&!c.length&&!l&&!d&&!p&&!h&&!v&&!y.length)return e;let b={...t};if(r&&(Array.isArray(b.columns)||(b.columns=n),delete b.fields),v&&(b.columns=_),a&&(typeof b.rowHeight!=`string`&&(b.rowHeight=Uo[i]),delete b.densityMode),s&&(Array.isArray(b.filter)||(b.filter=o),delete b.filters),c.length){let e={...Ko(b.userActions)?b.userActions:{}};for(let n of c){let r=qo[n];typeof e[r]!=`boolean`&&(e[r]=t[n]),delete b[n]}b.userActions=e}if(l){let e={...Ko(b.appearance)?b.appearance:{}};typeof e.showDescription!=`boolean`&&(e.showDescription=t.showDescription),delete b.showDescription,b.appearance=e}if(d&&u){let e={...u};for(let[t,n]of Object.entries(Yo))e[n]===void 0&&u[t]!==void 0&&(e[n]=u[t]),delete e[t];b.aria=e}if(p&&f){let e={...f};if(e.type===void 0){let t=typeof f.visibility==`string`?f.visibility:void 0,n=t?Jo[t]:f.enabled===!0?`personal`:void 0;n&&(e.type=n)}delete e.visibility,delete e.enabled,b.sharing=e}for(let{viewKey:e,aliases:t,cfg:n,legacyKeys:r}of y){let i={...n};for(let e of r){let r=t[e];i[r]===void 0&&(i[r]=n[e]),delete i[e]}b[e]=i}return h&&(b.viewType=`grid`),b}function Qo(e){return e.replace(/[_-]/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}var q=e(t(),1),J=n(),Y=(0,q.createContext)(null),$o=({children:e,dataSource:t,debug:n,debugFlags:r,apiFetch:i})=>{let a=(0,q.useContext)(Y),o=i??a?.apiFetch,s=(0,q.useMemo)(()=>({dataSource:t,debug:n,debugFlags:r,apiFetch:o}),[t,n,r,o]);return(0,J.jsx)(Y.Provider,{value:s,children:e})},es=()=>{let e=(0,q.useContext)(Y);if(!e)throw Error(`useSchemaContext must be used within a SchemaRendererProvider`);return e},ts=e=>{let t=(0,q.useContext)(Y)?.dataSource;if(e&&t)return e.split(`.`).reduce((e,t)=>e&&e[t],t)},ns=q.createContext(null),rs=({children:e})=>{let t=q.useMemo(()=>{let e=new Map,t=cs,n=new Set,r=()=>{let r=new Set;for(let t of e.values())for(let e of t)r.add(e);if(r.size===t.size){let e=!0;for(let n of r)if(!t.has(n)){e=!1;break}if(e)return}t=r,n.forEach(e=>e())};return{getNames:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)}),register:(t,n)=>{let i=e.get(t);i&&i.length===n.length&&i.every((e,t)=>e===n[t])||(e.set(t,[...n]),r())},unregister:t=>{e.delete(t)&&r()}}},[]);return(0,J.jsx)(ns.Provider,{value:t,children:e})};function is(){let e=q.useContext(ns);return q.useSyncExternalStore(e?e.subscribe:os,e?e.getNames:ss,e?e.getNames:ss)}function as(e,t){let n=q.useContext(ns),r=t.join(`|`);q.useEffect(()=>{if(n)return n.register(e,r.length===0?[]:r.split(`|`)),()=>n.unregister(e)},[n,e,r])}var os=e=>()=>{},ss=()=>cs,cs=new Set,ls=q.createContext(null),us=({children:e,...t})=>{let n=q.useMemo(()=>t,[t.objectName,t.recordId,t.dataSource,t.data,t.objectSchema,t.refresh,t.embedded,t.headerSystemActions,t.isFavorite,t.onToggleFavorite]);return(0,J.jsx)(ls.Provider,{value:n,children:e})};function ds(){return q.useContext(ls)}var fs=(0,q.createContext)({});function ps({scope:e,children:t}){return(0,q.createElement)(fs.Provider,{value:e},t)}function ms(){return(0,q.useContext)(fs)}function hs(e){return(0,q.useMemo)(()=>{if(typeof e!=`object`||!e||Array.isArray(e))return{};let t=e;return{...t,record:t,data:t}},[e])}var gs=new Set;function _s(e,t={},n){let r=ms();return(0,q.useMemo)(()=>{let i=t,a=i.record!=null&&typeof i.record==`object`&&i.record===i.data?i.record:void 0;if(a!==void 0){let t=typeof e==`string`?ur(e)?void 0:e:e&&typeof e==`object`&&e.dialect===`cel`?e.source:void 0;typeof t==`string`&&ar(t,a,!0,n?.label)}let o=new R({...r,...t});if(n?.throwOnError)try{return o.evaluateCondition(e,{throwOnError:!0})}catch(t){let r=typeof e==`string`?e:String(e),i=`${n?.label??``}::${r}`;if(!gs.has(i)){gs.add(i);let e=t instanceof Error?t.message:String(t);console.warn(`[object-ui] ${n?.label??`a component`} was hidden/disabled: its predicate threw — ${e}. Predicate: ${r}.`)}return!1}return o.evaluateCondition(e)},[e,t,r,n?.throwOnError,n?.label])}function vs(e,t,n){let r=ms(),i=n?.fallback??!0,a=n?.fields;return(0,q.useMemo)(()=>typeof e==`boolean`?e:e==null||e===``?i:gr(e,t??{},{fallback:i,scope:r,warnOnError:n?.warnOnError,label:n?.label,fields:a}),[e,t,r,i,n?.warnOnError,n?.label,a])}var ys=(0,q.createContext)(null);function bs(e){if(!e||e.length===0)return{};let t={};for(let n of e)if(n.defaultValue!==void 0)t[n.name]=n.defaultValue;else switch(n.type){case`number`:t[n.name]=0;break;case`boolean`:t[n.name]=!1;break;case`object`:t[n.name]={};break;case`array`:t[n.name]=[];break;default:t[n.name]=``}return t}var xs=({definitions:e,children:t})=>{let n=(0,q.useContext)(ys),[r,i]=(0,q.useState)(()=>bs(e)),a=(0,q.useMemo)(()=>e??[],[e]),o=(0,q.useMemo)(()=>new Set(a.map(e=>e.name)),[a]),s=(0,q.useCallback)((e,t)=>{if(!o.has(e)&&n&&n.definitions.some(t=>t.name===e)){n.setVariable(e,t);return}i(n=>({...n,[e]:t}))},[o,n]),c=(0,q.useCallback)(e=>{for(let[t,n]of Object.entries(e))s(t,n)},[s]),l=(0,q.useCallback)(()=>{i(bs(e))},[e]),u=(0,q.useMemo)(()=>n?{...n.variables,...r}:r,[n,r]),d=(0,q.useMemo)(()=>n?[...n.definitions.filter(e=>!o.has(e.name)),...a]:a,[n,a,o]),f=(0,q.useMemo)(()=>({variables:u,definitions:d,setVariable:s,setVariables:c,resetVariables:l}),[u,d,s,c,l]);return(0,J.jsx)(ys.Provider,{value:f,children:t})};xs.displayName=`PageVariablesProvider`;function Ss(){return(0,q.useContext)(ys)??Cs}var Cs=Object.freeze({variables:Object.freeze({}),definitions:Object.freeze([]),setVariable:()=>{},setVariables:()=>{},resetVariables:()=>{}});function ws(e){let{variables:t,definitions:n,setVariable:r}=Ss();return(0,q.useMemo)(()=>{if(!e)return null;let i=n.find(t=>t.source===e);return i?{name:i.name,value:t[i.name],setValue:e=>r(i.name,e)}:null},[e,n,t,r])}function Ts(e){if(e!=null)return typeof e==`string`?e:e.defaultValue||e.key}function X(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}var Es=/\$\{([^}]+)\}/g;function Ds(e){let t=[];Es.lastIndex=0;let n=Es.exec(e);for(;n!==null;)t.push(n[0]),n=Es.exec(e);return t}function Os(e,t,n,r){if(X(e))for(let[i,a]of Object.entries(e)){if(typeof a!=`string`||r?.(i,a))continue;let e=Ds(a);e.length>0&&n.push({key:i,channel:t,value:a,expressions:e})}}function ks(e,t,n){let r=[];Os(t,`properties`,r);let i=X(t)?t:void 0;return Os(e,`schema`,r,(e,t)=>i?.[e]===t),Os(n,`props`,r),r}function As(e){switch(e.channel){case`properties`:return`properties.`+e.key;case`props`:return`props.`+e.key;default:return e.key}}function js(e,t,n){let r=typeof e==`string`&&e?`"`+e+`"`:`(untyped node)`,i=typeof t==`string`&&t?` (id: "`+t+`")`:``,a=n.map(e=>` - `+As(e)+`: `+JSON.stringify(e.value)+` [`+e.expressions.join(`, `)+`]`);return`[ObjectUI] Unevaluated expression reached the DOM - node `+r+i+`
4
+ `+a.join(`
5
+ `)+`
6
+ The value above is placed VERBATIM: it is handed to the renderer, and spread
7
+ to the DOM, with its source text intact. Either SchemaRenderer does not
8
+ evaluate this key, or the expression threw and the evaluator returned the
9
+ source unchanged.
10
+ Channels that do evaluate and read back today: \`content\`, or resolve the
11
+ value in the host before handing the schema to SchemaRenderer.`}var Ms=typeof WeakSet<`u`?new WeakSet:{add(){},has(){return!1}};function Ns(e,t,n,r,i,a){let o=ks(r,i,a);if(o.length===0)return o;if(e&&typeof e==`object`){if(Ms.has(e))return o;Ms.add(e)}return console.error(js(t,n,o)),o}var Ps=`element:`,Fs=new Set([`view:simple`]);function Is(e){return typeof e!=`string`||e.length===0?!1:e.startsWith(Ps)?!0:Fs.has(e)}var Ls="[ObjectUI] A `props` config bag was not read";function Rs(e,t){return`${typeof e==`string`&&e?`\`${e}\``:`(untyped node)`}${typeof t==`string`&&t?` (id: '${t}')`:``}`}function zs(e,t,n){let r=n.map(e=>`\`${e}\``).join(`, `),i=n.length===1;return`${Ls} - node ${Rs(e,t)}\n ${i?`Key`:`Keys`} under \`props\`: ${r}\n\`props\` is NOT hoisted onto the node — only \`properties.*\` is. It is spread as
12
+ React props on the created element, so \`schema.${n[0]}\` is undefined and a\nrenderer declared as \`({ schema })\` never sees ${i?`this key`:`these keys`}. Nothing throws and\nnothing is logged by the renderer: the node renders as if the bag were empty.
13
+ Write ${i?`it`:`them`} under \`properties\` instead (or at node level, where the node's\nschema declares the key). The \`element:*\` renderers merge both bags via
14
+ \`readProps()\`; every other renderer reads \`schema\`. (objectui#6708)`}var Bs=new Set;function Vs(e,t,n){if(Is(e)||!X(t)||!X(n))return null;let r=Object.keys(n);return r.length>0?r:null}function Hs(e,t,n,r){let i=Vs(e,n,r);if(!i)return null;let a=zs(e,t,i);return Bs.has(a)?null:(Bs.add(a),console.warn(a),a)}var Us=`[ObjectUI] A visibility predicate could not be evaluated`,Ws=`[ObjectUI] An enablement predicate could not be evaluated`;function Gs(e){if(e&&typeof e==`object`){let t=e.source;if(typeof t==`string`)return t}return typeof e==`string`?e:String(e)}var Ks={"page-component":"Page-component predicates bind `record` (the row on a record page),\n`current_user`, and page state as `page.<var>`. Check those roots and the\nCEL syntax.","app-shell":"App-shell predicates bind `current_user` - also spelled `user`, `ctx.user`\nand `os.user` - plus `app` and `features` (the deployment flags).\nNeither `record` nor `page.<var>` exists at this tier.\nCheck those roots and the CEL syntax."},qs={visibility:{prefix:Us,consequence:`The node was treated as its safe default, which on this surface means the
15
+ gate did NOT bite - a predicate that cannot be evaluated reads on screen
16
+ exactly like one that said yes.
17
+ `},concealment:{prefix:Us,consequence:`The node was treated as its safe default, which on THIS leg is the one
18
+ that BITES: \`hidden\` / \`hiddenOn\` are NOT negated, so that default
19
+ REMOVED the node - it is not on the page at all, and an absent node is
20
+ indistinguishable from metadata that meant to hide it. Nothing is broken
21
+ in the renderer: the block is missing because the predicate above could
22
+ not be evaluated.
23
+ `},enablement:{prefix:Ws,consequence:`The node was treated as its safe default, which on THIS gate is the one
24
+ that BITES: the node renders DISABLED - on screen, greyed out, refusing
25
+ input - and that is indistinguishable from a gate the author meant to
26
+ close. No pixel says a predicate failed, so this line is the only thing
27
+ that will ever name the one that did it.
28
+ `}};function Js(e,t,n,r,i,a=`page-component`,o=`visibility`){let s=typeof e==`string`&&e?`"`+e+`"`:`(untyped node)`,c=typeof t==`string`&&t?` (id: "`+t+`")`:``,l=qs[o];return l.prefix+` - node `+s+c+`
29
+ `+n+`: `+JSON.stringify(Gs(r))+`
30
+ Reason: `+i+`
31
+ `+l.consequence+Ks[a]}var Ys=new Set;function Xs(e,t,n,r,i,a=`page-component`,o=`visibility`){let s=i instanceof Error?i.message:String(i),c=JSON.stringify([e,n,Gs(r)]);Ys.has(c)||(Ys.add(c),console.warn(Js(e,t,n,r,s,a,o)))}var Zs={visibility:{prefix:"[ObjectUI] A visibility predicate resolved `data.*` against the data-source adapter",consequence:"At the node tier `data` is the DATA-SOURCE ADAPTER - the object\n`${data.total}` in a props bag reads - and it is NOT the row. The reads\nabove are undefined on it, so this predicate is a CONSTANT: it does not\ndepend on the row at all, and on this surface a constant `false` hides the\nnode on every row while looking exactly like a gate that said no.\nWrite the row as `record.*` (e.g. `record.status`), which page-component\npredicates bind alongside `current_user` and page state as `page.<var>`.\n`data.*` as a spelling for the row is deprecated (objectui#5330) and was\nnever bound to the row on this tier."},enablement:{prefix:"[ObjectUI] An enablement predicate resolved `data.*` against the data-source adapter",consequence:"At the node tier `data` is the DATA-SOURCE ADAPTER - the object\n`${data.total}` in a props bag reads - and it is NOT the row. The reads\nabove are undefined on it, so this predicate is a CONSTANT: it does not\ndepend on the row at all, and on THIS gate the dangerous polarity is a\nconstant `true`: the node renders DISABLED - on screen, greyed out,\nrefusing input - on every row, in every build, while looking exactly\nlike a gate that said no. No pixel says the predicate is a constant, so\nthis line is the only thing that will ever name it.\nWrite the row as `record.*` (e.g. `record.status`), which page-component\npredicates bind alongside `current_user` and page state as `page.<var>`.\n`data.*` as a spelling for the row is deprecated (objectui#5330) and was\nnever bound to the row on this tier."}};function Qs(e){return e.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,`''`)}var $s=/(^|[^A-Za-z0-9_$.])data\.([A-Za-z_$][A-Za-z0-9_$]*(?:\.[A-Za-z_$][A-Za-z0-9_$]*)*)/g;function ec(e,t){let n=Qs(e),r=[];$s.lastIndex=0;let i;for(;(i=$s.exec(n))!==null;){let e=i[2],n=t;try{for(let t of e.split(`.`)){if(n==null){n=void 0;break}n=n[t]}}catch{return[]}let a=`data.`+e;n===void 0&&r.indexOf(a)===-1&&r.push(a)}return r}function tc(e,t,n,r,i,a=`visibility`){let o=typeof e==`string`&&e?`"`+e+`"`:`(untyped node)`,s=typeof t==`string`&&t?` (id: "`+t+`")`:``,c=Zs[a];return c.prefix+` - node `+o+s+`
32
+ `+n+`: `+JSON.stringify(Gs(r))+`
33
+ Undefined on the adapter: `+i.join(`, `)+`
34
+ `+c.consequence}function nc(e,t,n,r,i,a=`visibility`){let o=Gs(r);if(o.indexOf(`data.`)===-1)return;let s=ec(o,i);if(s.length===0)return;let c=JSON.stringify([`adapter-only-data`,e,n,o]);Ys.has(c)||(Ys.add(c),console.warn(tc(e,t,n,r,s,a)))}var Z=(()=>{try{return!1}catch{return!0}})(),rc=typeof WeakMap<`u`?new WeakMap:{set(){},get(){},has(){return!1}},ic=typeof WeakSet<`u`?new WeakSet:{add(){},has(){return!1}};function ac(e){if(!Z||!e||typeof e!=`object`)return{valid:!0,messages:[]};let t=rc.get(e);if(t)return t;let n={valid:!0,messages:[]};try{let t=rt(e);if(!t.valid){let r=t.errors.map(e=>`${e.path}: ${e.message}`);n={valid:!1,messages:r},ic.has(e)||(ic.add(e),console.warn(`[ObjectUI] Invalid schema detected:
35
+ `+r.join(`
36
+ `),e))}}catch(t){ic.has(e)||(ic.add(e),console.warn(`[ObjectUI] Schema validator threw:`,t))}return rc.set(e,n),n}function oc(e){let t={};return e.ariaLabel&&(t[`aria-label`]=Ts(e.ariaLabel)),e.ariaDescribedBy&&(t[`aria-describedby`]=e.ariaDescribedBy),e.role&&(t.role=e.role),t}var sc=new Set([`type`,`id`]);function cc(e,t){if(!X(e))return{};if(!X(t))return e;let n=null;for(let r of Object.keys(t))sc.has(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n||={...e},delete n[r]);return n??e}var lc=[`visibleWhen`,`visible`,`visibleOn`,`visibility`],uc=[`hidden`,`hiddenOn`],dc=e=>uc.includes(e)?`concealment`:`visibility`;function fc(e){let t=e.properties,n=X(t),r=r=>n&&Object.prototype.hasOwnProperty.call(t,r)?t[r]:e[r];for(let e of lc)if(r(e)!==void 0)return e;for(let e of uc)if(P(r(e)))return e}function pc(e){if(typeof e!=`string`||e===``)return;let t=e.toLowerCase();for(let n of N.getKnownTypes())if(n!==e&&n.toLowerCase()===t)return n}var mc=class extends q.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidUpdate(e){this.state.hasError&&(e.componentType!==this.props.componentType||e.resetKey!==this.props.resetKey)&&this.setState({hasError:!1,error:null})}handleRetry=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError&&this.state.error){let e=this.state.error;return Ti(e),(0,J.jsxs)(`div`,{className:`p-4 border border-orange-400 rounded bg-orange-50 text-orange-700 my-2`,role:`alert`,children:[(0,J.jsxs)(`p`,{className:`font-medium`,children:[`Component`,this.props.componentType?` "${this.props.componentType}"`:``,` failed to render`]}),(0,J.jsx)(`p`,{className:`text-sm mt-1`,children:e.message}),!1,(0,J.jsx)(`button`,{type:`button`,onClick:this.handleRetry,className:`mt-2 text-sm underline hover:no-underline`,children:`Retry`})]})}return this.props.children}},hc={},gc=(0,q.forwardRef)(({schema:e,...t},n)=>{let r=(0,q.useContext)(Y),i=r?.dataSource||hc,a=ms(),o=ds()?.data,{variables:s}=Ss(),[,c]=(0,q.useReducer)(e=>e+1,0);(0,q.useEffect)(()=>{let e=N.subscribe(c);return c(),e},[]);let[l,u]=(0,q.useState)(null),d=q.useId(),f=(0,q.useMemo)(()=>{if(!e||typeof e!=`object`)return e;let t=new R({...a,current_user:a?.user,...o&&typeof o==`object`&&!Array.isArray(o)?{record:o}:null,data:i,page:s}),n={...e},r=(e,r)=>{let a=dc(r);if(!Z)return t.evaluateCondition(e,{onFault:t=>Xs(n.type,n.id,r,e,t,`page-component`,a)});try{let a=t.evaluateCondition(e,{throwOnError:!0});return nc(n.type,n.id,r,e,i),a}catch(t){return Xs(n.type,n.id,r,e,t,`page-component`,a),!0}},c=(e,r)=>{let a=!1,o=t.evaluateCondition(e,{onFault:t=>{a=!0,Xs(n.type,n.id,r,e,t,`page-component`,`enablement`)}});return Z&&!a&&nc(n.type,n.id,r,e,i,`enablement`),o},l=X(n.properties)?n.properties:void 0;if(l){let e={...l};for(let[n,r]of Object.entries(e))e[n]=t.evaluate(r);n.properties=e}if(Z){let e=fc(n);if(e&&l&&Object.prototype.hasOwnProperty.call(l,e)){let t=l[e];typeof t==`string`&&t.includes("${")&&r(t,e)}}if(X(n.properties)){let e=n.type,t=n.id,r=n.properties;for(let[e,t]of Object.entries(r))e!==`type`&&e!==`id`&&(n[e]=t);e!==void 0&&(n.type=e),t!==void 0&&(n.id=t),n.properties=r}typeof n.content==`string`&&(n.content=t.evaluate(n.content));for(let e of b(typeof n.type==`string`?n.type:``))typeof n[e]==`string`&&(n[e]=t.evaluate(n[e]));if(X(n.props)){let e={...n.props};for(let[n,r]of Object.entries(e))e[n]=t.evaluate(r);n.props=e}return(n.visibleWhen===void 0?n.visible===void 0?n.visibleOn===void 0?n.visibility===void 0?P(n.hidden)?r(n.hidden,`hidden`):P(n.hiddenOn)&&r(n.hiddenOn,`hiddenOn`):!r(n.visibility,`visibility`):!r(n.visibleOn,`visibleOn`):!r(n.visible,`visible`):!r(n.visibleWhen,`visibleWhen`))&&(n._hidden=!0),(P(n.disabled)?c(n.disabled,`disabled`):P(n.disabledOn)&&c(n.disabledOn,`disabledOn`))&&(n._disabled=!0),n},[e,i,a,s,o]),p=(0,q.useMemo)(()=>{let e=f;if(!e||typeof e!=`object`)return{scopeClass:``,scopedCss:``,mergedClassName:void 0,schemaForComponent:e};let t=e.responsiveStyles;if(!Li(t))return{scopeClass:``,scopedCss:``,mergedClassName:e.className,schemaForComponent:e};let n=Ri(e.id??d),r=[e.className,n].filter(Boolean).join(` `);return{scopeClass:n,scopedCss:zi(`.${n}`,t),mergedClassName:r,schemaForComponent:{...e,className:r}}},[f,d]);if(!f)return null;if(typeof f==`string`)return(0,J.jsx)(J.Fragment,{children:f});if(typeof f!=`object`)return(0,J.jsx)(J.Fragment,{children:String(f)});if(f._hidden)return null;let m=Z?ac(e):{valid:!0,messages:[]};Oi(`schema`,`Rendering schema node`,{type:f.type,id:f.id});let h=N.get(f.type);if(!h){if(!l&&N.hasLazy(f.type)){let e=N.loadLazy(f.type);if(e)return e.catch(e=>{u(e instanceof Error?e:Error(String(e)))}),(0,J.jsxs)(`div`,{className:`p-2 text-sm text-muted-foreground animate-pulse`,role:`status`,"aria-live":`polite`,"data-lazy-loading":f.type,children:[`Loading `,(0,J.jsx)(`code`,{children:f.type}),`…`]})}Oi(`schema`,`Component not found in registry`,{type:f.type}),Ci[`OBJUI-001`];let e=pc(f.type);return(0,J.jsxs)(`div`,{className:`p-4 border border-red-500 rounded text-red-500 bg-red-50 my-2`,role:`alert`,children:[(0,J.jsxs)(`p`,{className:`font-medium`,children:[`Unknown component type: `,(0,J.jsx)(`strong`,{children:f.type}),e===void 0?null:(0,J.jsxs)(J.Fragment,{children:[` — did you mean '`,(0,J.jsx)(`strong`,{children:e}),`'?`]})]}),l&&(0,J.jsxs)(`p`,{className:`text-xs mt-1`,children:[`Failed to load plugin: `,l.message]}),!1,(0,J.jsx)(`pre`,{className:`text-xs mt-2 overflow-auto`,children:JSON.stringify(f,null,2)})]})}let{type:g,children:_,body:v,schema:y,visible:x,visibleWhen:ee,visibleOn:te,visibility:ne,hidden:re,hiddenOn:S,disabled:ie,disabledOn:ae,dataSource:oe,_hidden:se,_disabled:ce,responsiveStyles:le,...ue}=f;Z&&Ns(e,f.type,f.id,ue,f.properties,f.props);let de=cc(f.props,f.properties);Z&&Hs(f.type,f.id,e?.props,de);let{scopeClass:fe,scopedCss:pe,mergedClassName:me,schemaForComponent:he}=p,C=oc(f),ge=r?.debug||r?.debugFlags?.enabled,w={};ge&&(w[`data-debug-type`]=f.type,f.id&&(w[`data-debug-id`]=f.id)),Ai(`render:${f.type}:${f.id??`anon`}`);let T=ge?performance.now():0,_e=(0,J.jsxs)(mc,{componentType:f.type,resetKey:f.id??null,children:[pe?(0,J.jsx)(`style`,{"data-os-scope":fe,dangerouslySetInnerHTML:{__html:pe}}):null,q.createElement(h,{schema:he,...ue,...de,...C,...w,disabled:ce||void 0,className:me,"data-obj-id":f.id,"data-obj-type":f.type,...Z&&!m.valid?{"data-obj-schema-invalid":`true`}:{},...t})]});if(ji(`render:${f.type}:${f.id??`anon`}`),ge&&T){let e=performance.now()-T;Ni.getInstance().addPerf({type:f.type,id:f.id,durationMs:e,timestamp:Date.now()})}return _e});gc.displayName=`SchemaRenderer`;function _c(e){return typeof e==`number`||typeof e==`boolean`?String(e):e}var vc=(0,q.createContext)({});function yc({currentUserId:e,currentOrgId:t,children:n}){let r=(0,q.useMemo)(()=>({currentUserId:e,currentOrgId:t}),[e,t]);return(0,q.createElement)(vc.Provider,{value:r},n)}function bc(){return(0,q.useContext)(vc)}function xc(e={}){let{context:t={},onConfirm:n,onToast:r,onModal:i,onNavigate:a,onParamCollection:o,onResultDialog:s}=`context`in e?e:{context:e},[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(null),[f,p]=(0,q.useState)(null),m=(0,q.useMemo)(()=>{let e=new $r(t);return n&&e.setConfirmHandler(n),r&&e.setToastHandler(r),i&&e.setModalHandler(i),a&&e.setNavigationHandler(a),o&&e.setParamCollectionHandler(o),s&&e.setResultDialogHandler(s),e},[JSON.stringify(t)]);return{execute:(0,q.useCallback)(async e=>{l(!0),d(null),p(null);try{let t=await m.execute(e);return p(t),t.success||d(t.error||`Action failed`),t}catch(e){let t=e.message;d(t);let n={success:!1,error:t};return p(n),n}finally{l(!1)}},[m]),loading:c,error:u,result:f,updateContext:(0,q.useCallback)(e=>{m.updateContext(e)},[m]),runner:m}}var Sc={sm:`min(92vw, 480px)`,md:`min(92vw, 720px)`,lg:`min(92vw, 960px)`,xl:`min(92vw, 1200px)`,full:`min(92vw, 1600px)`};function Cc(e){if(!e)return;if(e.width!==void 0)return e.width;let t=e.size;if(t&&t!==`auto`)return Sc[t]}function wc(e){let{navigation:t,objectName:n,onNavigate:r,onRowClick:i}=e,[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(null),l=t?.mode??`page`,u=Cc(t),d=t?.view,f=l===`drawer`||l===`modal`||l===`split`||l===`popover`,p=(0,q.useCallback)(()=>{o(!1),c(null)},[]),m=(0,q.useCallback)(e=>{c(e),o(!0)},[]),h=(0,q.useCallback)((e,a)=>{if(i){i(e,a);return}if(a&&(a.metaKey||a.ctrlKey||a.button===1)){let t=e.id||e._id;if(r&&t!=null){r(t,`new_window`);return}}if(!t){let t=e.id||e._id;r&&t!=null&&r(t,d??`view`);return}if(!(l===`none`||t.preventNavigation)){if(l===`new_window`||t.openNewTab){let t=e.id||e._id;if(r&&t!=null){r(t,`new_window`);return}let i=encodeURIComponent(String(t)),a=n?`/${n}/record/${i}`:`/${i}`;window.open(a,`_blank`);return}if(l===`page`){let t=e.id||e._id;r&&t!=null&&r(t,d??`view`);return}if(f){c(e),o(!0);return}}},[i,t,l,n,r,f,d]);return(0,q.useMemo)(()=>({isOpen:a,selectedRecord:s,mode:l,close:p,open:m,setIsOpen:o,handleClick:h,width:u,view:d,isOverlay:f}),[a,s,l,p,m,h,u,d,f])}var Tc=(0,q.createContext)(!1),Ec=({value:e=!0,children:t})=>(0,J.jsx)(Tc.Provider,{value:e,children:t}),Dc=()=>(0,q.useContext)(Tc),Q=(0,q.createContext)(null),Oc=({children:e,context:t={},onConfirm:n,onToast:r,onModal:i,onNavigate:a,onParamCollection:o,onResultDialog:s,handlers:c})=>{let[l,u]=(0,q.useState)(!1),[d,f]=(0,q.useState)(null),[p,m]=(0,q.useState)(null),h=(0,q.useMemo)(()=>{let e=new $r({...t,ctx:t&&typeof t.ctx==`object`?{...t,...t.ctx}:{...t}});return n&&e.setConfirmHandler(n),r&&e.setToastHandler(r),i&&e.setModalHandler(i),a&&e.setNavigationHandler(a),o&&e.setParamCollectionHandler(o),s&&e.setResultDialogHandler(s),c&&Object.entries(c).forEach(([t,n])=>{e.registerHandler(t,n)}),e},[JSON.stringify(t)]),g=(0,q.useCallback)(async e=>{u(!0),f(null),m(null);try{let t=await h.execute(e);return m(t),t.success||f(t.error||`Action failed`),t}catch(e){let t=e.message;f(t);let n={success:!1,error:t};return m(n),n}finally{u(!1)}},[h]),_=(0,q.useCallback)(async(e,t)=>{u(!0),f(null),m(null);try{let n=await h.executeChain(e,t);return m(n),n.success||f(n.error||`Chain failed`),n}catch(e){let t=e.message;f(t);let n={success:!1,error:t};return m(n),n}finally{u(!1)}},[h]),v=(0,q.useCallback)(e=>{h.updateContext(e)},[h]),y=(0,q.useMemo)(()=>({execute:g,executeChain:_,loading:l,error:d,result:p,runner:h,updateContext:v}),[g,_,l,d,p,h,v]);return(0,J.jsx)(Q.Provider,{value:y,children:e})};Oc.displayName=`ActionProvider`;function kc(){let e=(0,q.useContext)(Q);if(!e){let e=new $r;return{execute:t=>e.execute(t),executeChain:(t,n)=>e.executeChain(t,n),loading:!1,error:null,result:null,runner:e,updateContext:t=>e.updateContext(t)}}return e}function Ac(){return(0,q.useContext)(Q)!==null}(0,q.createContext)(null);var jc={toast:{surface:`delegate`,transient:!0},snackbar:{surface:`snackbar`,transient:!0},banner:{surface:`banner`,transient:!1},alert:{surface:`alert`,transient:!1},inline:{surface:`inline`,transient:!1}};function Mc(e){return e===`modal`?`alert`:e&&e in jc?e:`toast`}new Set(Object.keys(jc));var Nc=new Set([`top_left`,`top_center`,`top_right`,`bottom_left`,`bottom_center`,`bottom_right`]);function Pc(e={}){return{defaultPosition:e.defaultPosition??e.position,defaultDuration:e.defaultDuration??5e3,maxVisible:e.stacking===!1?1:e.maxVisible??5,stackDirection:e.stackDirection??`down`,pauseOnHover:e.pauseOnHover??!0}}var Fc=0,Ic=(()=>{try{return!1}catch{return!0}})(),Lc={delegate:"pass `onToast` to <NotificationProvider>",snackbar:`mount <NotificationSnackbar /> from @object-ui/components`,banner:`mount <NotificationBanners /> from @object-ui/components`,alert:`mount <NotificationAlerts /> from @object-ui/components`,inline:`mount <NotificationInline /> from @object-ui/components at the raising surface`},Rc=(0,q.createContext)(null),zc=({children:e,config:t={},onToast:n})=>{let r=(0,q.useMemo)(()=>Pc(t),[JSON.stringify(t)]),[i,a]=(0,q.useState)([]),o=(0,q.useRef)(new Map),s=(0,q.useRef)(new Map),c=(0,q.useCallback)((e,t)=>{let n=setTimeout(()=>{s.current.delete(e),a(t=>t.filter(t=>t.id!==e))},t);s.current.set(e,{handle:n,endsAt:Date.now()+t,left:t})},[]),l=(0,q.useCallback)(e=>{let t=s.current.get(e);t&&(clearTimeout(t.handle),s.current.set(e,{...t,left:Math.max(0,t.endsAt-Date.now())}))},[]),u=(0,q.useCallback)(e=>{let t=s.current.get(e);t&&(clearTimeout(t.handle),c(e,t.left))},[c]);(0,q.useEffect)(()=>()=>{for(let{handle:e}of s.current.values())clearTimeout(e);s.current.clear()},[]);let d=(0,q.useCallback)(e=>{let t=o.current;return t.set(e,(t.get(e)??0)+1),()=>{let n=(t.get(e)??1)-1;n>0?t.set(e,n):t.delete(e)}},[]),f=(0,q.useCallback)(e=>{let t=`notification-${++Fc}`,i=Mc(e.displayType),{surface:s,transient:l}=jc[i],u={...e,displayType:i,id:t,createdAt:new Date,read:!1};a(e=>[u,...e]),s===`delegate`&&n?.(u,r),Ic&&s!==`delegate`&&(o.current.get(s)??0)===0&&console.warn(`[NotificationProvider] "${u.title}" declares displayType '${i}' but no ${i} surface is mounted, so it will not be shown. To present it, ${Lc[s]}.`);let d=e.duration??(l?r.defaultDuration:0);return d>0&&c(t,d),t},[r,n,c]),p=(0,q.useCallback)((e,t)=>f({title:e,message:t,severity:`info`}),[f]),m=(0,q.useCallback)((e,t)=>f({title:e,message:t,severity:`success`}),[f]),h=(0,q.useCallback)((e,t)=>f({title:e,message:t,severity:`warning`}),[f]),g=(0,q.useCallback)((e,t)=>f({title:e,message:t,severity:`error`}),[f]),_=(0,q.useCallback)(e=>{a(t=>t.map(t=>t.id===e?{...t,read:!0}:t))},[]),v=(0,q.useCallback)(()=>{a(e=>e.map(e=>({...e,read:!0})))},[]),y=(0,q.useCallback)(e=>{let t=s.current.get(e);t&&(clearTimeout(t.handle),s.current.delete(e)),a(t=>t.filter(t=>t.id!==e))},[]),b=(0,q.useCallback)(()=>{a([])},[]),x=(0,q.useMemo)(()=>i.filter(e=>!e.read).length,[i]),ee=(0,q.useMemo)(()=>({notifications:i,unreadCount:x,notify:f,info:p,success:m,warning:h,error:g,markAsRead:_,markAllAsRead:v,dismiss:y,clearAll:b,config:r,pauseAutoDismiss:l,resumeAutoDismiss:u,registerSurface:d}),[i,x,f,p,m,h,g,_,v,y,b,r,l,u,d]);return(0,J.jsx)(Rc.Provider,{value:ee,children:e})};zc.displayName=`NotificationProvider`;function Bc(){let e=(0,q.useContext)(Rc);if(!e)throw Error(`useNotifications must be used within a <NotificationProvider>. Wrap your app with <NotificationProvider> to use the notification system.`);return e}function Vc(){return(0,q.useContext)(Rc)!==null}function Hc(e,t){let n=t.maxVisible>0?e.slice(0,t.maxVisible):e;return t.stackDirection===`up`?n:[...n].reverse()}function Uc(e,t){let n=e.position??t?.defaultPosition;if(!n)return;let r=n.replace(/-/g,`_`);return Nc.has(r)?r:void 0}function Wc(e,t){let{notifications:n,registerSurface:r}=Bc(),{surface:i}=jc[e];return(0,q.useEffect)(()=>r(i),[r,i]),(0,q.useMemo)(()=>n.filter(n=>Mc(n.displayType)===e&&(e!==`inline`||(n.scope??void 0)===t)),[n,e,t])}var Gc=(0,q.createContext)(null);function Kc(){let e=(0,q.useContext)(Gc);if(!e)throw Error(`useDnd must be used within a <DndProvider>. Wrap your app with <DndProvider> to use the drag and drop system.`);return e}function qc(){return(0,q.useContext)(Gc)!==null}var Jc=(0,q.createContext)(null);function Yc(){return(0,q.useContext)(Jc)}var Xc=(0,q.createContext)(null),Zc=Object.freeze([]),Qc=Object.freeze({apps:Zc,objects:Zc,dashboards:Zc,reports:Zc,pages:Zc,loading:!1,error:null,refresh:async()=>{},invalidate:()=>{},ensureType:async()=>[],getItem:async()=>null,getItemsByType:()=>[],getTypeStatus:()=>`ready`});function $c(){return(0,q.useContext)(Xc)??Qc}function el(e,t){let{getItem:n}=$c(),[r,i]=(0,q.useState)({item:null,loading:!!t,error:null});return(0,q.useEffect)(()=>{if(!t){i(e=>e.item===null&&!e.loading&&e.error===null?e:{item:null,loading:!1,error:null});return}let r=!1;return i(e=>({...e,loading:!0,error:null})),n(e,t).then(e=>{r||i({item:e,loading:!1,error:null})}).catch(e=>{r||i({item:null,loading:!1,error:e instanceof Error?e:Error(String(e))})}),()=>{r=!0}},[e,t,n]),r}var tl=q.createContext(null),nl=({canEdit:e=!0,locked:t=!1,approvalPending:n,approvalProgress:r,approvalIsSubmitter:i,lockedReason:a,children:o})=>{let s=n??t,[c,l]=q.useState(!1),[u,d]=q.useState({}),[f,p]=q.useState(null),[m,h]=q.useState(!1),[g,_]=q.useState(null),[v,y]=q.useState(null),b=q.useCallback(t=>{e&&(p(t??null),l(!0),_(null),y(null))},[e]),x=q.useCallback((e,t)=>{d(n=>({...n,[e]:t}))},[]),ee=q.useCallback(()=>{d({}),l(!1),p(null),h(!1),_(null),y(null)},[]),te=q.useMemo(()=>({editing:c,canEdit:e,locked:t,approvalPending:s,approvalProgress:r,approvalIsSubmitter:i,lockedReason:a,draft:u,autoFocusField:f,saving:m,error:g,fieldErrors:v,enter:b,setField:x,cancel:ee,reset:ee,setSaving:h,setError:_,setFieldErrors:y}),[c,e,t,s,r,i,a,u,f,m,g,v,b,x,ee]);return(0,J.jsx)(tl.Provider,{value:te,children:o})};function rl(){return q.useContext(tl)}var il=q.createContext(null),al=({children:e,...t})=>{let n=q.useMemo(()=>t,[t.items,t.onAddComment,t.onAddReply,t.onToggleReaction,t.mentionSuggestions,t.onUploadAttachments,t.loading,t.error]);return(0,J.jsx)(il.Provider,{value:n,children:e})};function ol(){return q.useContext(il)}var sl=(0,q.createContext)({}),cl=({value:e,children:t})=>(0,J.jsx)(sl.Provider,{value:e,children:t});function ll(){return(0,q.useContext)(sl)}var ul=(0,q.createContext)({}),dl=({value:e,children:t})=>(0,J.jsx)(ul.Provider,{value:e,children:t});function fl(){return(0,q.useContext)(ul)}var pl=(0,q.createContext)(null),ml=({value:e,children:t})=>(0,J.jsx)(pl.Provider,{value:e,children:t});function hl(){return(0,q.useContext)(pl)}function gl(){let{variables:e}=Ss(),{updateContext:t}=kc();return q.useEffect(()=>(t({pageVariables:e}),()=>{t({pageVariables:{}})}),[e,t]),null}gl.displayName=`PageVariableActionBridge`;var _l=e=>!!e&&typeof e==`object`;async function vl(e,t){let n=typeof e?.getObjectSchema==`function`,r=typeof e?.listViews==`function`;if(!n&&!r)return{capable:!1,views:{}};let i=n?e.getObjectSchema(t).then(e=>_l(e)?e.listViews??e.list_views:void 0,()=>void 0):Promise.resolve(void 0),a=r?e.listViews(t).then(e=>e,()=>void 0):Promise.resolve(void 0),[o,s]=await Promise.all([i,a]);return{capable:!0,views:De(o,s)}}function yl(e,t){let n=(0,q.useContext)(Y),r=t??n?.dataSource??null,i=(0,q.useMemo)(()=>{let t=_l(e)?e.dataSource:void 0;return Ee(t)?t:void 0},[e]),a=i?.object,o=i?.view,s=a&&o?JSON.stringify([a,o]):``,[c,l]=(0,q.useState)(null);return(0,q.useEffect)(()=>{if(!a||!o)return;let e=!1;return vl(r,a).then(({capable:t,views:n})=>{if(e)return;if(!t){l({key:s,view:null,error:`dataSource.view "${o}" cannot be resolved: this data source cannot list the saved views of object "${a}".`});return}let r=Oe(n,o,a);l(r?{key:s,view:r}:{key:s,view:null,error:Ne(a,o,Object.keys(n))})}),()=>{e=!0}},[r,a,o,s]),(0,q.useMemo)(()=>i?i.view?c?.key===s?c.view===null?{status:`missing`,config:i,error:c.error}:{status:`resolved`,config:i,view:c.view,composed:Me(i,c.view)}:{status:`loading`,config:i}:{status:`ready`,config:i,composed:Me(i)}:{status:`absent`},[i,c,s])}function bl(e){return!e||e.enabled!==!1&&e.handlerReady!==!1&&e.status!==`stub`&&e.status!==`unavailable`}[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `);var xl={compact:32,comfortable:40,spacious:52},Sl={compact:`py-1 px-2`,comfortable:`py-2 px-3`,spacious:`py-3 px-4`},Cl={compact:`text-xs`,comfortable:`text-sm`,spacious:`text-base`},wl=[`compact`,`comfortable`,`spacious`];function Tl(e=`comfortable`,t){let[n,r]=(0,q.useState)(e),i=t?.rowHeights??xl,a=t?.paddingClasses??Sl,o=t?.fontSizeClasses??Cl,s=(0,q.useRef)(t?.onChange);(0,q.useEffect)(()=>{s.current=t?.onChange},[t?.onChange]);let c=(0,q.useRef)(e);(0,q.useEffect)(()=>{e!==c.current&&(c.current=e,r(e))},[e]);let l=(0,q.useCallback)(e=>{r(t=>t===e?t:(queueMicrotask(()=>s.current?.(e)),e))},[]),u=(0,q.useCallback)(()=>{r(e=>{let t=wl[(wl.indexOf(e)+1)%wl.length];return queueMicrotask(()=>s.current?.(t)),t})},[]);return(0,q.useMemo)(()=>({mode:n,setMode:l,cycle:u,rowHeight:i[n],paddingClass:a[n],fontSizeClass:o[n]}),[n,l,u,i,a,o])}function El(e){return typeof window>`u`?()=>{}:(window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)})}function Dl(){return typeof navigator<`u`?navigator.onLine:!0}function Ol(){return!0}var kl=`objectui-offline-queue`;function Al(){if(typeof localStorage>`u`)return[];try{let e=localStorage.getItem(kl);return e?JSON.parse(e):[]}catch{return[]}}function jl(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(kl,JSON.stringify(e))}catch{}}var Ml=0;function Nl(){return Ml+=1,`mut_${Date.now()}_${Ml}`}var Pl={enabled:!0,strategy:`network_first`,offlineIndicator:!0,offlineMessage:`You are currently offline. Changes will be synced when reconnected.`,queueMaxSize:100};function Fl(e={}){let{enabled:t=Pl.enabled,strategy:n=Pl.strategy,offlineIndicator:r=Pl.offlineIndicator,offlineMessage:i=Pl.offlineMessage,queueMaxSize:a=Pl.queueMaxSize,sync:o}=e,s=(0,q.useSyncExternalStore)(El,Dl,Ol),[c,l]=(0,q.useState)(Al),[u,d]=(0,q.useState)(`idle`),f=(0,q.useRef)(o);(0,q.useInsertionEffect)(()=>{f.current=o});let p=(0,q.useRef)(c);(0,q.useInsertionEffect)(()=>{p.current=c}),(0,q.useEffect)(()=>{jl(c)},[c]),(0,q.useEffect)(()=>{t&&(s?u===`offline`&&d(`idle`):d(`offline`))},[s,t,u]);let m=(0,q.useCallback)(e=>{t&&l(t=>{let n={...e,id:Nl(),timestamp:Date.now()},r=[...t,n];return r.length>a?r.slice(r.length-a):r})},[t,a]),h=(0,q.useCallback)(()=>{l([])},[]),g=(0,q.useCallback)(async()=>{let e=p.current;if(!(!t||e.length===0)){d(`syncing`);try{let t=f.current?.batchSize??e.length,n=e.slice(0,t);await new Promise(e=>setTimeout(e,0)),l(e=>e.filter(e=>!n.some(t=>t.id===e.id))),d(`idle`)}catch{d(`error`)}}},[t]),_=c.length>0;return(0,q.useEffect)(()=>{if(!t||!s||!_)return;let e=setTimeout(()=>{g()},100);return()=>clearTimeout(e)},[s,t,_,g]),(0,q.useMemo)(()=>({isOnline:s,enabled:t,syncState:u,strategy:n,pendingCount:c.length,queueMutation:m,sync:g,clearQueue:h,showIndicator:r&&!s,offlineMessage:i}),[s,t,u,n,c.length,m,g,h,r,i])}function Il(){return{canUndo:B.canUndo,canRedo:B.canRedo,undoDescription:B.peekUndo()?.description,redoDescription:B.peekRedo()?.description,history:B.getHistory()}}function Ll(){return{canUndo:!1,canRedo:!1,undoDescription:void 0,redoDescription:void 0,history:[]}}var Rl=Il();function zl(e){return B.subscribe(()=>{Rl=Il(),e()})}function Bl(){return Rl}function Vl(e={}){let t=(0,q.useRef)(e);(0,q.useInsertionEffect)(()=>{t.current=e});let n=(0,q.useSyncExternalStore)(zl,Bl,Ll),r=(0,q.useCallback)(async(e,n,r)=>{let i=t.current.dataSource;if(!i)return;let a=r===`undo`?{create:`delete`,update:`update`,delete:`create`}[e.type]:e.type;a===`delete`?await i.delete(e.objectName,e.recordId):a===`update`?await i.update(e.objectName,e.recordId,n):await i.create(e.objectName,n)},[]),i=(0,q.useCallback)(async()=>{let e=B.popUndo();e&&(await r(e,e.undoData,`undo`),t.current.onUndo?.(e))},[r]),a=(0,q.useCallback)(async()=>{let e=B.popRedo();e&&(await r(e,e.redoData,`redo`),t.current.onRedo?.(e))},[r]);return(0,q.useEffect)(()=>{let e=e=>{!(e.ctrlKey||e.metaKey)||e.key.toLowerCase()!==`z`||(e.preventDefault(),e.shiftKey?a():i())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,a]),(0,q.useMemo)(()=>({...n,undo:i,redo:a}),[n,i,a])}function Hl(e={}){let{actions:t=[],context:n={}}=e,r=(0,q.useContext)(Q)?.runner??null,i=(0,q.useMemo)(()=>{let e=n&&Object.keys(n).length>0?{...n,ctx:n.ctx&&typeof n.ctx==`object`?{...n,...n.ctx}:{...n}}:n,i=r?new ai(r):new ai(e);if(r&&n&&Object.keys(n).length>0){let e=i.getRunner(),t=e.getEvaluator().getContext().toObject(),r=t&&typeof t.ctx==`object`?t.ctx:{},a=n.ctx&&typeof n.ctx==`object`?n.ctx:n,o={...n,ctx:{...r,...a}};e.updateContext(o)}return i.registerActions(t),i},[r,JSON.stringify(t),JSON.stringify(n)]);return{getActionsForLocation:(0,q.useCallback)(e=>i.getActionsForLocation(e),[i]),getBulkActions:(0,q.useCallback)(()=>i.getBulkActions(),[i]),executeAction:(0,q.useCallback)((e,t)=>i.executeAction(e,t),[i]),handleShortcut:(0,q.useCallback)(e=>i.handleShortcut(e),[i]),engine:i}}function Ul(){let{actionLabel:e,actionConfirm:t,actionSuccess:n}=me(),{language:r}=he();return(0,q.useMemo)(()=>((i,a,o)=>{if(!a||typeof a!=`object`)return a;let s=fe(a.label,r),c=typeof a.name==`string`&&a.name?a.name:void 0,l=s||c||o?.fallbackLabel||``;if(!c)return l===a.label?a:{...a,label:l};let u={...a,label:e(i,c,l)};return a.confirmText!==void 0&&(u.confirmText=t(i,c,a.confirmText)),a.successMessage!==void 0&&(u.successMessage=n(i,c,a.successMessage)),u}),[e,t,n,r])}function Wl(){let e=(0,q.useContext)(Q),t=ms(),n=e?.runner?.getContext?.()?.user;if(Array.isArray(n?.systemPermissions))return n.systemPermissions;let r=t?.user;if(Array.isArray(r?.systemPermissions))return r.systemPermissions}function Gl(){let e=Wl();return(0,q.useCallback)(t=>!Array.isArray(t)||t.length===0||!Array.isArray(e)||t.every(t=>typeof t==`string`&&e.includes(t)),[e])}function Kl(e,t,n,r){let i=(0,q.useContext)(Y)?.apiFetch,a=r?.enabled??!0,[o,s]=(0,q.useState)(null),c=(n??[]).filter(Boolean),l=[a?`1`:`0`,e??``,c.join(`,`),JSON.stringify(t??null)].join(`|`);return(0,q.useEffect)(()=>{if(!a||!e||c.length===0){s(null);return}let n=e=>t&&t[e]||e,r=!1;return(async()=>{try{let t=i??fetch,a=await ro(async e=>{let n=await(await t(`/api/v1/meta/object/${encodeURIComponent(e)}`,{headers:{accept:`application/json`},credentials:`include`})).json().catch(()=>null);return n?.item??n?.data??n},e,c.map(n));r||s({metaByPath:a,relabel:c.map(e=>({dim:e,path:n(e)}))})}catch{r||s(null)}})(),()=>{r=!0}},[l,i]),o}function ql(e,t,n,r){let{fieldOptionLabel:i}=pe(),a=Kl(e,t,n,r);return(0,q.useMemo)(()=>no(a?.metaByPath,a?.relabel,i),[a,i])}function Jl(e,t){return!0}function Yl(e,t={}){let n=$c(),[r,i]=(0,q.useState)(!1),[a,o]=(0,q.useState)(null);(0,q.useEffect)(()=>{let e=!1;if(!n.ensureType){i(!0);return}return n.ensureType(`page`).then(()=>{e||(i(!0),o(null))}).catch(t=>{e||(o(t instanceof Error?t:Error(String(t))),i(!0))}),()=>{e=!0}},[n]);let s=(0,q.useMemo)(()=>{if(!e&&!t.pageName)return null;let r=Array.isArray(n.pages)?n.pages:[];if(!r.length)return null;if(t.pageName)return r.find(e=>e?.name===t.pageName)??null;let i=r.filter(n=>!n||(n.pageType??(n.type===`record`?`record`:void 0))!==`record`||n.object!==e?!1:Jl(n,t));return i.length?(i.sort((e,t)=>(t?.priority??0)-(e?.priority??0)),i[0]):null},[n.pages,e,t.pageName,t.recordType,t.profile,t.app,t.formFactor]),{page:c,slots:l}=(0,q.useMemo)(()=>s?s.kind===`slotted`?{page:null,slots:s.slots??{}}:{page:s,slots:null}:{page:null,slots:null},[s]);return{page:c,slots:l,loading:n.loading||!r,error:a??n.error??null}}function Xl(e,t,n){if(!e)return 0;let r=e.toLowerCase(),i=(t||``).toLowerCase();return(n||``).toLowerCase()===r?110:i===r?100:i.startsWith(r)?80:i.split(/[\s_\-/.,:;()[\]]+/).filter(Boolean).some(e=>e.startsWith(r))?60:i.includes(r)?40:0}function Zl(e){let{query:t,objects:n,dataSource:r,objectNames:i,maxObjectsQueried:a=8,topPerObject:o=3,minLength:s=2,debounceMs:c=250,enabled:l=!0,getDisplayName:u=Ln}=e,[d,f]=(0,q.useState)([]),[p,m]=(0,q.useState)(!1),[h,g]=(0,q.useState)(void 0),_=(0,q.useMemo)(()=>{if(!Array.isArray(n)||n.length===0)return[];let e;if(Array.isArray(i)&&i.length>0){let t=new Map;for(let e of n){let n=e?.name;typeof n==`string`&&t.set(n,e)}e=i.map(e=>t.get(e)).filter(e=>e!=null)}else e=n.filter(e=>e?.searchable!==!1);return e},[n,i]),v=(0,q.useMemo)(()=>_.map(e=>String(e?.name)).join(`|`),[_]),y=(0,q.useRef)(0);return(0,q.useEffect)(()=>{if(!l||!r||_.length===0){f([]),m(!1),g(void 0);return}let e=(t??``).trim();if(e.length<s){f([]),m(!1),g(void 0);return}let n=++y.current;m(!0),g(void 0);let i=setTimeout(()=>{if(y.current!==n)return;let t=r.searchAll;if(typeof t==`function`){let i=new Map;for(let e of _)typeof e?.name==`string`&&i.set(e.name,e);Promise.resolve().then(()=>t.call(r,e,{limit:a*o,objects:Array.from(i.keys())})).then(t=>{if(y.current!==n)return;let r=Array.isArray(t?.hits)?t.hits:Array.isArray(t)?t:[],a=[];for(let t of r){let n=t?.object??t?.objectName;if(typeof n!=`string`||i.size>0&&!i.has(n))continue;let r=t?.id??t?.record?.id??t?.record?._id;if(r==null)continue;let o=i.get(n)??{name:n},s=(typeof t?.title==`string`&&t.title.trim()!==``?t.title.trim():``)||u(o,t?.record??{})||`Record #${r}`,c=typeof t?.snippet==`string`?t.snippet.trim():``;a.push({objectName:n,objectLabel:typeof o.label==`string`&&o.label.length>0?o.label:n,recordId:String(r),display:s,subtitle:c&&c!==s?c:void 0,icon:o?.icon,score:Xl(e,s,String(r)),raw:t?.record??t})}a.sort((e,t)=>(t.score===110)-+(e.score===110)),f(a),m(!1),g(void 0)}).catch(e=>{y.current===n&&(f([]),m(!1),g(e instanceof Error?e:Error(String(e))))});return}let i=_.slice(0,a).map(t=>Promise.resolve().then(()=>r.find(t.name,{$search:e,$top:o})).then(e=>({obj:t,res:e,err:null})).catch(e=>({obj:t,res:null,err:e})));Promise.allSettled(i).then(t=>{if(y.current!==n)return;let r=[],i;for(let n of t){if(n.status!==`fulfilled`)continue;let{obj:t,res:a,err:s}=n.value;if(s){let e=s?.httpStatus??s?.status;if(s?.code,e===404||ue(s,`OBJECT_NOT_FOUND`))continue;i=s instanceof Error?s:Error(String(s));continue}let c=Array.isArray(a?.data)?a.data:Array.isArray(a)?a:[];for(let n of c.slice(0,o)){let i=n?.id??n?._id;if(i==null)continue;let a=u(t,n);r.push({objectName:t.name,objectLabel:typeof t.label==`string`&&t.label.length>0?t.label:t.name,recordId:String(i),display:a,icon:t?.icon,score:Xl(e,a,String(i)),raw:n})}}r.sort((e,t)=>t.score-e.score),f(r),m(!1),g(i)})},c);return()=>{clearTimeout(i)}},[t,l,r,v,o,a,s,c,u]),{results:d,isSearching:p,error:h}}function Ql(e,t){let[n,r]=(0,q.useState)(null);(0,q.useEffect)(()=>{let n=!0,i=e;return(async()=>{if(!t||!i||typeof t.getObjectSchema!=`function`){n&&r({key:i,def:null});return}try{let e=await t.getObjectSchema(i);n&&r({key:i,def:e})}catch(e){console.error(`[useSettledSchema] getObjectSchema failed for`,i,e),n&&r({key:i,def:null})}})(),()=>{n=!1}},[e,t]);let i=n!==null&&n.key===e;return{ready:i,def:i?n.def:null}}var $l=new Set,eu=`objectui:related-changed`;function tu(e){for(let t of Array.from($l))try{t(e)}catch{}typeof window<`u`&&window.dispatchEvent(new CustomEvent(eu,{detail:{objectName:e.objectName,recordId:e.recordId}}))}function nu(e){return $l.add(e),()=>$l.delete(e)}function ru(e,t,n){return e.objectName===`*`?!0:e.objectName===t?n===void 0||e.recordId===void 0||e.recordId===n:!1}function iu(e,t){let[n,r]=(0,q.useState)(0);return(0,q.useEffect)(()=>{if(e)return nu(n=>{ru(n,e,t)&&r(e=>e+1)})},[e,t]),n}function au(e){(0,q.useEffect)(()=>{let t=e;if(t?.onMutation)return t.onMutation(e=>{e?.resource&&tu({objectName:e.resource,recordId:e.id==null?void 0:String(e.id)})})},[e])}var ou=(e,t)=>t===`pagination.pageSize`?e.pagination?.pageSize:e[t],su=(e,t,n,r)=>{if(n===`pagination.pageSize`){e.pagination={...t.pagination??{},pageSize:r};return}e[n]=r};function cu(e,t={},n){let r=yl(e,Ee(n)?void 0:n),{object:i=`objectName`,columns:a,filter:o,sort:s,limit:c,viewType:l}=t,u=q.useMemo(()=>{let t=r.composed;if(!t)return e;let n=e??{},u={...n};if(i!==!1&&(u[i]=t.object),a&&!(Array.isArray(n.columns)&&n.columns.length>0)&&t.columns!==void 0&&(u.columns=t.columns),o){let e=ce(n.filter,t.filter);e===void 0?delete u.filter:u.filter=e}return s&&t.sort!==void 0&&(r.config?.sort!==void 0||n.sort===void 0)&&(u.sort=t.sort),c&&t.limit!==void 0&&(r.config?.limit!==void 0||ou(n,c)===void 0)&&su(u,n,c,t.limit),l&&t.viewType!==void 0&&n.viewType===void 0&&(u.viewType=t.viewType),u},[e,r.composed,r.config,i,a,o,s,c,l]);return q.useMemo(()=>({status:r.status,schema:u,config:r.config,error:r.error}),[r.status,r.config,r.error,u])}function lu({testId:e,title:t=`This component’s data source could not be resolved`,message:n}){return(0,J.jsxs)(`div`,{className:`p-4 border border-red-500 rounded text-red-500 bg-red-50 my-2`,role:`alert`,"data-testid":`${e}-datasource-error`,children:[(0,J.jsx)(`p`,{className:`font-medium`,children:t}),n?(0,J.jsx)(`p`,{className:`text-sm mt-1`,children:n}):null]})}function uu({testId:e}){return(0,J.jsx)(`div`,{className:`p-2 text-sm text-muted-foreground animate-pulse`,role:`status`,"aria-live":`polite`,"data-testid":`${e}-resolving-view`,children:`Loading view…`})}function du(e){let t=q.useContext(Y);return(Ee(e)?void 0:e)??t?.dataSource??void 0}function fu(e,t){return`“${e}” has no data source, so it cannot read ${typeof t==`string`&&t.trim().length>0?`“${t}”`:`its object`}. Inject one from an ancestor — <SchemaRendererProvider dataSource={…}> from @object-ui/react — or hand this block a dataSource of its own.`}function pu({testId:e,title:t=`No data source resolved`,message:n}){return(0,J.jsxs)(`div`,{className:`p-4 border border-red-500 rounded text-red-500 bg-red-50 my-2`,role:`alert`,"data-testid":`${e}-no-data-source`,children:[(0,J.jsx)(`p`,{className:`font-medium`,children:t}),n?(0,J.jsx)(`p`,{className:`text-sm mt-1`,children:n}):null]})}function mu({schema:e,mapping:t,dataSource:n,testId:r,errorTitle:i,requiresDataSource:a,noDataSourceMessage:o,children:s}){let c=cu(e,t,n),l=du(n);return a&&l==null?(0,J.jsx)(pu,{testId:r,message:o}):c.status===`missing`?(0,J.jsx)(lu,{testId:r,title:i,message:c.error}):c.status===`loading`?(0,J.jsx)(uu,{testId:r}):s(c.schema)}function hu(...e){for(let t of e)if(typeof t==`string`&&t.trim())return t;return null}function gu(e){let t=e,n=t&&typeof t==`object`?hu(t.details?.error,t.details?.message,t.error):null;if(!n){let r=e instanceof Error?e.message:typeof e==`string`?e:typeof t?.message==`string`?t.message:``,i=r.indexOf(`{`);if(i>=0)try{let e=JSON.parse(r.slice(i));n=hu(e?.error,e?.message)}catch{}!n&&r.trim()&&(n=r)}return n&&n.replace(/^\[[^\]]+\]\s*/,``).replace(/^[A-Z][A-Z0-9_]+:\s*/,``).trim()||null}function _u(e){if(!e||typeof e!=`object`)return null;let t=e;if(typeof t.userMessage==`string`&&t.userMessage.trim())return t.userMessage;let n=t.details;return n&&typeof n==`object`&&typeof n.userMessage==`string`&&n.userMessage.trim()?n.userMessage:null}function vu(e){let t=e;if(!t||typeof t!=`object`)return null;let n=Array.isArray(t.validationErrors)&&t.validationErrors||Array.isArray(t.details?.fields)&&t.details.fields||Array.isArray(t.fields)&&t.fields||null;if(!n||!Array.isArray(n))return null;let r=[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=e,n=hu(t.field,t.name,t.path);if(!n)continue;let i=hu(t.message,t.error,t.code)??``;r.push({field:n,message:i})}return r.length>0?r:null}function yu(e){let t=e;if(!t||typeof t!=`object`)return!1;if((t.httpStatus??t.status??t.statusCode)===403)return!0;let n=hu(t.code,t.details?.code)??``;if(n===`PERMISSION_DENIED`||n===`FORBIDDEN`)return!0;let r=`${typeof t.message==`string`?t.message:``} ${t.details?.error??t.error??``}`;return/row-level security|access denied|permission denied|not permitted/i.test(r)}var bu=new Set([`INVALID_FILTER`,`UNSUPPORTED_QUERY_PARAM`,`INVALID_QUERY`]);function xu(e){let t=e,n=[t?.httpStatus,t?.status,t?.statusCode].find(e=>typeof e==`number`);if(n===void 0){let e=/HTTP (\d{3})\b/.exec(String(t?.message??``));e&&(n=Number(e[1]))}let r=typeof t?.code==`string`?t.code.toUpperCase():``;return le(e)?`api-disabled`:n===403||r===`PERMISSION_DENIED`||r===`FORBIDDEN`?`forbidden`:n===401||r===`UNAUTHORIZED`||r===`UNAUTHENTICATED`?`unauthorized`:n===400||bu.has(r)?`rejected`:`network`}var Su=2e3,Cu=2001;function wu(e){let t=pt(e),n=e&&typeof e==`object`&&typeof e.total==`number`?e.total:void 0,r=t.length>Su;return{rows:r?t.slice(0,Su):t,total:n,truncated:r}}function Tu({drawn:e,total:t,truncated:n,className:r}){let{t:i}=he();if(!n)return null;let a=typeof t==`number`?i(`common.rowCeilingNote`,{shown:e,total:t,defaultValue:de.common.rowCeilingNote}):i(`common.rowCeilingNoteUnknownTotal`,{shown:e,defaultValue:de.common.rowCeilingNoteUnknownTotal});return(0,J.jsx)(`p`,{role:`note`,"data-row-ceiling-note":`non-grid`,className:r??`px-1 py-1 text-xs text-muted-foreground`,children:a})}var Eu=[{key:`indexed`,retiredBy:`objectui#4644`,specEquivalent:null,defensive:!1,sites:{metadataAdminFieldsReadDoor:!0,metadataServiceCarryOver:!0,metadataFieldsPageCarryOver:!0}},{key:`referenceTo`,retiredBy:`objectui#6041`,specEquivalent:`reference`,defensive:!1,sites:{metadataAdminFieldsReadDoor:!0,metadataServiceCarryOver:!0,metadataFieldsPageCarryOver:!0}},{key:`formula`,retiredBy:`objectui#6043`,specEquivalent:`expression`,defensive:!1,sites:{metadataAdminFieldsReadDoor:!1,metadataServiceCarryOver:!0,metadataFieldsPageCarryOver:!0}},{key:`isSystem`,retiredBy:`objectui#6044`,specEquivalent:`system`,defensive:!1,sites:{metadataAdminFieldsReadDoor:!0,metadataServiceCarryOver:!0,metadataFieldsPageCarryOver:!0}},{key:`sortOrder`,retiredBy:`objectui#6045`,specEquivalent:null,defensive:!0,sites:{metadataAdminFieldsReadDoor:!1,metadataServiceCarryOver:!0,metadataFieldsPageCarryOver:!1}}];function Du(e){return Eu.filter(t=>t.sites[e]).map(e=>e.key)}function Ou(e){return be({error:e}).optional().describe(e)}function ku(e,t,n){let r=t===`runtime-slot`?`\`${e}\` is a RUNTIME SLOT for a host-supplied function, not authorable metadata (objectui#6124): JSON has no function value, and no handler key consumes a declarative action object. A React host supplies it through the TypeScript interface / props, never through this validator, which refuses it by name.`:`\`${e}\` is RETIRED (objectui#6124, ADR-0049): JSON has no function value, and no renderer reads this key, so nothing could ever run it.`,i=`${n?`${n} — `:``}${r} Author behaviour as a NODE TYPE instead — e.g. { "type": "toast", ... } or an action:button node with a declared action, the spelling PR #6498 established.`;return ye(()=>!1,{error:i}).optional().describe(i)}var Au=D({key:M().describe("Translation-bundle key, e.g. `dialog.close`"),defaultValue:M().optional().describe(`Rendered when the key is missing from the bundle`),params:C(M(),k()).optional().describe(`Interpolation values for the key's placeholders`)}),ju=_e(()=>w([Mu,M(),O(),T(),ve(),ge()])),Mu=D({type:M().describe(`Component type identifier`),id:M().optional().describe(`Unique component identifier`),name:M().optional().describe(`Component name`),label:p.optional().describe(`Display label (plain string or inline locale map)`),description:p.optional().describe(`Description text (plain string or inline locale map)`),placeholder:M().optional().describe(`Placeholder text`),className:M().optional().describe(`Tailwind CSS classes`),style:C(M(),w([M(),O()])).optional().describe(`Inline CSS styles`),data:k().optional().describe(`Custom data payload`),bind:M().optional().describe(`Data-scope binding path (resolved by useDataScope)`),body:w([ju,A(ju)]).optional().describe(`Child components`),children:w([ju,A(ju)]).optional().describe(`Child components (React-style)`),visible:w([T(),M()]).optional().describe(`Visibility control (boolean or predicate expression)`),visibleWhen:M().optional().describe(`Canonical conditional-visibility predicate (ADR-0089)`),visibleOn:M().optional().describe(`[DEPRECATED → visibleWhen] Expression for conditional visibility`),hidden:w([T(),M()]).optional().describe(`Hidden control (boolean or predicate expression)`),hiddenOn:M().optional().describe(`Expression for conditional hiding`),disabled:w([T(),M()]).optional().describe(`Disabled state (boolean or predicate expression)`),disabledOn:M().optional().describe(`Expression for conditional disabling`),testId:M().optional().describe(`Test identifier`),ariaLabel:w([M(),Au]).optional().describe(`Accessibility label (plain string or keyed i18n reference)`)}).passthrough(),$=Mu;function Nu(e,t){let n=Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e)));return D(n).partial()}var Pu=j([`string`,`number`,`boolean`,`enum`,`array`,`object`,`color`,`date`,`code`,`file`,`slot`]),Fu=D({name:M().describe(`Property name`),type:w([Pu,A(Pu).min(1).refine(e=>new Set(e).size===e.length,{message:`Input control type arms must be distinct`})]).describe(`Input control type, or the arms of a union type`),label:M().optional().describe(`Display label`),defaultValue:k().optional().describe(`Default value`),required:T().optional().describe(`Required flag`),enum:w([A(M()),A(D({label:M(),value:k()}))]).optional().describe(`Enum options`),description:M().optional().describe(`Help text`),advanced:T().optional().describe(`Advanced option flag`),inputType:M().optional().describe(`Specific input type`),min:Ou("RETIRED (objectui#5905) — `ComponentInput.min` was never read, and never published: the manifest serializer forwards `name`/`type`/`required`/`enum`/`binding`/`description` and this is not one of them, so an authored value was silently dropped. Delete the key; spell the numeric domain out in `description`, which IS published."),max:Ou("RETIRED (objectui#5905) — `ComponentInput.max` was never read, and never published: the manifest serializer forwards `name`/`type`/`required`/`enum`/`binding`/`description` and this is not one of them, so an authored value was silently dropped. Delete the key; spell the numeric domain out in `description`, which IS published."),step:Ou("RETIRED (objectui#5905) — `ComponentInput.step` was never read, and never published: the manifest serializer forwards `name`/`type`/`required`/`enum`/`binding`/`description` and this is not one of them, so an authored value was silently dropped. Delete the key; spell the numeric domain out in `description`, which IS published."),placeholder:Ou("RETIRED (objectui#5905) — `ComponentInput.placeholder` was never read, and never published: the manifest serializer forwards `name`/`type`/`required`/`enum`/`binding`/`description` and this is not one of them, so an authored value was silently dropped. Delete the key; put the hint in `description`, which IS published. `BaseSchema.placeholder`, the node-level prop, is a DIFFERENT key and is unaffected.")});D({label:M().optional().describe(`Display name`),icon:M().optional().describe(`Icon name or SVG`),category:M().optional().describe(`Component category`),inputs:A(Fu).optional().describe(`Configurable properties`),defaultProps:C(M(),k()).optional().describe(`Default property values`),examples:C(M(),k()).optional().describe(`Example configurations`),isContainer:T().optional().describe(`Can have children`),resizable:T().optional().describe(`Can be resized`),resizeConstraints:D({width:T().optional(),height:T().optional(),minWidth:O().optional(),maxWidth:O().optional(),minHeight:O().optional(),maxHeight:O().optional()}).optional().describe(`Resize constraints`),tags:A(M()).optional().describe(`Search tags`),description:M().optional().describe(`Component description`)}).extend({type:M().describe(`Component type identifier`),component:k().describe(`Component renderer`)}),C(M(),k()).describe(`HTML attributes`),C(M(),xe()).describe(`Event handlers`),D({className:M().optional(),style:C(M(),w([M(),O()])).optional()}).describe(`Style properties`);var Iu=i,Lu=ie,Ru=g,zu=h,Bu=D({field:M().describe(`Field to sort by`),order:j([`asc`,`desc`]).describe(`Sort order`)}),Vu=$.extend({type:E(`object-grid`),objectName:M().describe(`ObjectQL object name`),data:Iu.optional().describe(`Data source configuration`),columns:w([A(M()),A(Lu)]).optional().describe(`Columns configuration`),filter:A(k()).optional().describe(`Filter criteria`),sort:w([M(),A(Bu)]).optional().describe(`Sort configuration`),searchableFields:A(M()).optional().describe(`Searchable fields`),resizable:T().optional().describe(`Enable column resizing`),showColumnTypeIcons:T().optional().describe(`Show column type icons (T/Tag/Calendar) in headers. Off by default — type is usually obvious from cell content; the icons add visual noise.`),selection:Ru.optional().describe(`Selection configuration`),pagination:zu.optional().describe(`Pagination configuration`),bulkActions:A(M()).optional().describe(`Bulk action identifiers (spec-canonical key; batchActions is the legacy alias)`),fields:A(M()).optional(),staticData:A(k()).optional(),selectable:w([T(),j([`single`,`multiple`])]).optional(),pageSize:O().optional(),showSearch:T().optional(),showFilters:T().optional(),showPagination:T().optional(),defaultSort:D({field:M(),order:j([`asc`,`desc`])}).optional(),defaultFilters:C(M(),k()).optional(),title:M().optional().describe(`DEPRECATED, write label instead: legacy caption/export-file-title fallback, read only when label is absent`),operators:C(M(),k()).optional(),rowActions:A(M()).optional(),batchActions:A(M()).optional(),editable:T().optional(),keyboardNavigation:T().optional(),frozenColumns:O().optional()}),Hu=$.extend({type:E(`object-form`),objectName:M().describe(`ObjectQL object name`),mode:j([`create`,`edit`,`view`]).describe(`Form mode`),recordId:w([M(),O()]).optional().describe(`Record ID`),title:M().optional().describe(`Form title`),description:M().optional().describe(`Form description`),fields:A(M()).optional().describe(`Included fields`),customFields:A(k()).optional().describe(`Custom field configs`),initialData:C(M(),k()).optional().describe(`Initial data`),groups:A(D({title:M().optional(),description:M().optional(),fields:A(M()),collapsible:T().optional(),defaultCollapsed:T().optional()})).optional().describe(`Field groups`),layout:j([`vertical`,`horizontal`,`inline`,`grid`]).optional().describe(`Form layout`),columns:O().optional().describe(`Grid columns`),showSubmit:T().optional().describe(`Show submit button`),submitText:M().optional().describe(`Submit button text`),successMessage:M().optional().describe(`Success toast text after create/update when no onSuccess handler is given`),navigateOnSuccess:M().optional().describe(`DEPRECATED, write submitBehavior instead: navigate here after success (relative path only; {id}/{recordId} interpolated and URL-escaped); precedes the toast`),resetOnSuccess:T().optional().describe(`Reset the form after a successful create for another entry`),submitBehavior:w([D({kind:E(`thank-you`),title:M().optional(),message:M().optional()}),D({kind:E(`redirect`),url:M(),delayMs:O().optional()}),D({kind:E(`continue`)}),D({kind:E(`next-record`)})]).optional().describe(`Declarative post-submit behavior; takes precedence over successMessage/navigateOnSuccess/resetOnSuccess`),showCancel:T().optional().describe(`Show cancel button`),cancelText:M().optional().describe(`Cancel button text`),showReset:T().optional().describe(`Show reset button`),initialValues:C(M(),k()).optional().describe(`Initial values`),readOnly:T().optional().describe(`Read-only mode`)}),Uu=$.extend({type:E(`object-view`),objectName:M().describe(`ObjectQL object name`),title:M().optional().describe(`View title`),description:M().optional().describe(`View description`),layout:j([`drawer`,`modal`,`page`]).optional().describe(`Layout mode`),table:_e(()=>Vu.omit({type:!0,objectName:!0}).partial()).optional().describe(`Table config`),form:_e(()=>Hu.omit({type:!0,objectName:!0,mode:!0}).partial()).optional().describe(`Form config`),showSearch:T().optional().describe(`Show search`),showFilters:T().optional().describe(`Show filters`),showSort:T().optional().describe(`Show sort controls`),showCreate:T().optional().describe(`Show create button`),showRefresh:T().optional().describe(`Show refresh button`),operations:D({create:T().optional(),read:T().optional(),update:T().optional(),delete:T().optional()}).optional().describe(`Enabled operations`)}),Wu=D({label:M().describe(`Option display label`),value:w([M(),O(),T()]).describe(`Option value`),color:M().optional().describe(`Option badge color`)}),Gu=D({field:M().describe(`Field name to filter on`),label:M().optional().describe(`Display label`),type:j([`select`,`multi-select`,`boolean`,`date-range`,`text`]).optional().describe(`Filter input type`),options:A(Wu).optional().describe(`Static options`),showCount:T().optional().describe(`Show record count per option`),defaultValues:A(w([M(),O(),T()])).optional().describe(`Default selected values`)}),Ku=D({field:M().describe(`Field name to filter on`),operator:M().describe(`Filter operator (equals, not_equals, contains, in, greater_than, less_than, …)`),value:k().optional().describe(`Filter value`)}),qu=D({name:M().optional().describe(`Unique tab identifier (snake_case)`),label:M().describe(`Tab display label`),filter:A(Ku).optional().describe(`Filter rules applied when this tab is active`),icon:M().optional().describe(`Lucide icon name`),isDefault:T().optional().describe(`Whether this tab is active by default`),id:M().optional().describe(`@deprecated use name`),filters:A(w([A(k()),M()])).optional().describe(`@deprecated use filter`),default:T().optional().describe(`@deprecated use isDefault`)}).refine(e=>!!(e.name||e.id),{message:`tab requires a name`}),Ju=D({element:j([`dropdown`,`tabs`]).describe(`UI element type`),fields:A(Gu).optional().describe(`Field-level filters`),tabs:A(qu).optional().describe(`Named filter presets`),allowAddTab:T().optional().describe(`Allow adding new tabs`),showAllRecords:T().optional().describe(`Show All records tab`)}),Yu=[`type`,`columns`,`name`,`label`,`description`,`userFilters`,`userActions`,`aria`,`conditionalFormatting`,`exportOptions`,`kanban`,`calendar`,`gallery`,`timeline`],Xu=ne.partial().extend({groupField:M().optional().describe(`Deprecated alias for groupByField`),cardFields:A(M()).optional().describe(`Deprecated alias for columns`)}).passthrough(),Zu=c.partial().extend({defaultView:j([`month`,`week`,`day`]).optional().describe(`Initial calendar view mode — 'month' | 'week' | 'day' ('agenda' was retired: objectui#5784)`)}).passthrough(),Qu=te.partial().extend({imageField:M().optional().describe(`Deprecated alias for coverField`)}).passthrough(),$u=f.partial().extend({dateField:M().optional().describe(`Deprecated alias for startDateField`)}).passthrough(),ed=m.shape.type.removeDefault(),td=ae.extend({group:T().optional().describe(`Allow users to group records`),hideFields:T().optional().describe(`Allow users to show/hide columns`),rowColor:T().optional().describe(`Allow users to color rows by a field value`)}),nd=$.extend(Nu(m.shape,Yu).shape).extend({type:E(`list-view`),objectName:M().describe(`Object Name`),viewType:ed.optional().describe(`View Type`),columns:w([A(M()),A(Lu)]).optional().describe(`Columns definition`),fields:A(M()).optional().describe(`Legacy alias for string[] columns`),filters:A(w([A(k()),M()])).optional().describe(`Filter conditions (legacy)`),showSearch:T().optional().describe(`Show search in toolbar`),showSort:T().optional().describe(`Show sort controls in toolbar`),showFilters:T().optional().describe(`Show filter controls in toolbar`),showHideFields:T().optional().describe(`Show hide-fields button in toolbar`),showGroup:T().optional().describe(`Show group button in toolbar`),showColor:T().optional().describe(`Show color button in toolbar`),showDensity:T().optional().describe(`Show density/row-height button in toolbar`),showDescription:T().optional().describe(`Show field descriptions`),allowExport:T().optional().describe(`Allow data export`),densityMode:j([`compact`,`comfortable`,`spacious`]).optional().describe(`Density mode`),color:M().optional().describe(`Color field for row/card coloring`),fieldTextColor:M().optional().describe(`Field for custom text color`),prefixField:M().optional().describe(`Prefix field before title`),wrapHeaders:T().optional().describe(`Wrap column headers`),clickIntoRecordDetails:T().optional().describe(`Navigate to detail on row click`),addRecordViaForm:T().optional().describe(`Add records via form dialog`),addDeleteRecordsInline:T().optional().describe(`Enable inline add/delete`),collapseAllByDefault:T().optional().describe(`Collapse all groups by default`),options:C(M(),k()).optional().describe(`Component overrides (legacy)`),operations:D({create:T().optional(),read:T().optional(),update:T().optional(),delete:T().optional(),export:T().optional(),import:T().optional()}).optional().describe(`Enabled operations`),userFilters:Ju.optional().describe(`User filters configuration (accepts legacy tab shapes)`),userActions:td.optional().describe(`User action toggles for the view toolbar`),aria:re.extend({live:j([`polite`,`assertive`,`off`]).optional().describe(`aria-live politeness for the list region (objectui-only — promote rather than grow this extension)`)}).optional().describe(`ARIA attributes`),conditionalFormatting:A(w([D({field:M(),operator:j([`equals`,`not_equals`,`contains`,`greater_than`,`less_than`,`in`]),value:k(),backgroundColor:M().optional(),textColor:M().optional(),borderColor:M().optional(),expression:M().optional()}),D({condition:M(),style:C(M(),M())})])).optional().describe(`Conditional formatting rules`),exportOptions:w([A(j([`csv`,`xlsx`,`json`,`pdf`])),D({formats:A(j([`csv`,`xlsx`,`json`,`pdf`])).optional(),maxRecords:O().optional(),includeHeaders:T().optional(),fileNamePrefix:M().optional()})]).optional().describe(`Export options`),kanban:Xu.optional().describe(`Kanban-specific configuration`),calendar:Zu.optional().describe(`Calendar-specific configuration`),gallery:Qu.optional().describe(`Gallery-specific configuration`),timeline:$u.optional().describe(`Timeline-specific configuration`)}),rd=D({latitudeField:M().optional().describe(`Field containing latitude`),longitudeField:M().optional().describe(`Field containing longitude`),locationField:M().optional().describe(`Field with a combined location value`),titleField:M().optional().describe(`Field used as the marker title`),descriptionField:M().optional().describe(`Field used as the marker description`),zoom:O().optional().describe(`Zoom level (1-20); declaring it opts out of the auto-fit`),center:Ce([O(),O()]).optional().describe(`Center [lat, lng]; declaring it opts out of the auto-fit`),style:M().optional().describe(`MapLibre style URL/spec (overrides the public demo default)`)}),id=[`data`,`staticData`,`objectName`];function ad(e){return(t,n)=>{id.some(e=>t[e]!==void 0)||n.addIssue({code:`custom`,path:[],params:{code:`RECORD_SOURCE_REQUIRED`},message:`\`${e}\` has no record source: declare one of \`data\`, \`staticData\` or \`objectName\``})}}var od=$.extend({type:E(`object-map`),objectName:M().optional().describe(`ObjectQL object name — the THIRD record source getDataConfig resolves, after data and staticData; one of the three must be present (objectui#6939)`),data:Iu.optional().describe(`Data source configuration — read FIRST by getDataConfig`),staticData:A(k()).optional().describe(`Inline records — read SECOND by getDataConfig, wrapped into a { provider: value } config`),filter:A(k()).optional().describe(`Query filter, forwarded as $filter`),sort:w([M(),A(Bu)]).optional().describe(`Sort configuration, forwarded as $orderby`),map:rd.optional().describe(`Map configuration (the author face)`),enableClustering:T().optional().describe(`Group nearby markers into clusters`),navigation:x.optional().describe(`Record navigation behaviour (drawer/dialog/page)`),locationField:M().optional().describe(`Location field (internal flat form; prefer map.locationField)`),titleField:M().optional().describe(`Title field (internal flat form; prefer map.titleField)`),mapStyle:M().optional().describe(`MapLibre style URL/spec (overrides the public demo default)`)}).superRefine(ad(`object-map`)),sd=$.extend({type:E(`object-tree`),objectName:M().describe(`ObjectQL object name`),parentField:M().optional().describe(`Single-parent pointer field (auto-detected when omitted)`),labelField:M().optional().describe(`Field rendered indented in the first column`),fields:A(M()).optional().describe(`Additional flat columns`),defaultExpandedDepth:O().optional().describe(`Default expansion depth (0 = roots only)`)}),cd={borderColorField:M().optional().describe(`Record field carrying a per-task alert stroke colour`),lockField:M().optional().describe(`Record field marking a row view-only (truthy → locked)`),objectField:M().optional().describe(`Record field carrying the row's own object API name`),summaryExtent:j([`children`,`self`]).optional().describe(`How a summary bar's span is computed`),defaultCollapsedDepth:O().optional().describe(`Auto-collapse tree nodes at/below this 0-indexed depth`),dependencyTypes:T().optional().describe(`Whether the store persists dependency link TYPES (fs/ss/ff/sf)`),timeZone:M().optional().describe(`Business time zone (IANA name) the chart's calendar renders in`),exportFileName:M().optional().describe(`Base name for exported PNG/PDF files`),interactions:D({move:T().optional().describe(`Bar / subtree dragging`),resize:T().optional().describe(`Edge resize grips`),progress:T().optional().describe(`The progress drag handle`),link:T().optional().describe(`Dependency UI: drag-to-link dots and the create/delete menu`)}).optional().describe(`Per-interaction switches, each defaulting to true`),timeSegments:D({dayStart:M().optional().describe(`Clock time the shift-day begins, 'HH:mm'`),bands:A(D({key:M().optional().describe(`Stable band id`),label:M().describe(`Display label`),start:M().describe(`Band start, 'HH:mm'`),end:M().describe(`Band end, 'HH:mm'`),color:M().optional().describe(`Accent colour for the column tint`)})).describe(`Ordered bands covering the 24h shift-day`),showMidnight:T().optional().describe(`Draw the dashed calendar-midnight cue`)}).optional().describe(`Shift segmentation for the day-mode timeline`)},ld=$.extend({type:E(`object-gantt`),objectName:M().optional().describe(`ObjectQL object name — the THIRD record source getDataConfig resolves, after data and staticData; one of the three must be present (objectui#6939)`),data:Iu.optional().describe(`Data source configuration — read FIRST by getDataConfig; undeclared on either face until objectui#6939`),startDateField:M().optional().describe(`Start date field`),endDateField:M().optional().describe(`End date field`),titleField:M().optional().describe(`Title field`),dependencyField:M().optional().describe(`Deprecated alias for dependenciesField`),progressField:M().optional().describe(`Progress field`),viewMode:S.shape.viewMode.describe(`Initial timeline granularity, honoured by both renderer branches; when omitted, a persisted layout may seed it`),skipWeekends:T().optional().describe(`Skip weekends in duration / auto-schedule math (working calendar)`),holidays:A(M()).optional().describe(`Non-working dates for the working calendar, ISO 'yyyy-mm-dd' (UTC)`),persistLayout:T().optional().describe(`Opt OUT of layout persistence — only an explicit false disables it`),viewName:M().optional().describe("Layout-persistence scope; storage key is `objectName:viewName` (default 'default')"),navigation:x.optional().describe(`Record navigation behaviour on task click (drawer/dialog/page)`),markers:A(D({date:M().describe(`Marker position, ISO date or datetime string`),label:M().optional().describe(`Text drawn against the line`),color:M().optional().describe(`Line colour — any CSS colour`)})).optional().describe(`Extra vertical reference lines drawn like the Today marker`),criticalPath:T().optional().describe(`Seed the critical-path highlight ON (toolbar toggle stays available)`),showBaselines:T().optional().describe(`Render planned-vs-actual baseline bars — defaults ON, only an explicit false disables`),readOnly:T().optional().describe(`Disable every write path and lock the record drawer`),mobileReadOnly:T().optional().describe(`Auto read-only on narrow viewports — defaults ON, only an explicit false disables`),colorField:S.shape.colorField,dependenciesField:S.shape.dependenciesField,parentField:S.shape.parentField,typeField:S.shape.typeField,tooltipFields:S.shape.tooltipFields,baselineStartField:S.shape.baselineStartField,baselineEndField:S.shape.baselineEndField,groupByField:S.shape.groupByField,resourceView:S.shape.resourceView,assigneeField:S.shape.assigneeField,effortField:S.shape.effortField,capacity:S.shape.capacity,quickFilters:S.shape.quickFilters,autoZoomToFilter:S.shape.autoZoomToFilter,...cd,gantt:S.extend(cd).optional().describe(`Nested gantt config block — the authoring face, and the winner over the flattened top-level keys whenever present`),staticData:A(k()).optional().describe(`Inline records, wrapped into a { provider: value } data config — read SECOND by getDataConfig`),filter:A(k()).optional().describe(`Query filter, forwarded verbatim as $filter`),sort:w([M(),A(Bu)]).optional().describe(`Sort configuration, forwarded as $orderby`)}).superRefine(ad(`object-gantt`)),ud=$.extend({type:E(`object-calendar`),objectName:M().describe(`ObjectQL object name`),startDateField:M().optional().describe(`Start date field`),endDateField:M().optional().describe(`End date field`),titleField:M().optional().describe(`Title field`),defaultView:j([`month`,`week`,`day`]).optional().describe(`Default view — 'month' | 'week' | 'day', the renderer's rendered set ('agenda' was retired: objectui#5784)`)}),dd=w([D({field:M().describe(`Field name to check`),operator:j([`equals`,`not_equals`,`contains`,`in`]).describe(`Comparison operator`),value:w([M(),A(M())]).describe(`Value to compare against`),backgroundColor:M().optional().describe(`Background color`),borderColor:M().optional().describe(`Border color`)}),D({condition:M().describe(`CEL predicate evaluated against the card record`),style:C(M(),M()).describe(`CSS styles applied when the condition is true`)})]),fd=$.extend({type:E(`object-kanban`),objectName:M().describe(`ObjectQL object name`),groupField:M().describe(`Group field`),titleField:M().optional().describe(`Title field`),cardFields:A(M()).optional().describe(`Card fields`),quickAdd:T().optional().describe(`Enable Quick Add button at column bottom`),coverImageField:M().optional().describe(`Field name for cover image on cards`),allowCollapse:T().optional().describe(`Allow columns to collapse/expand`),conditionalFormatting:A(dd).optional().describe(`Card conditional formatting rules`)}),pd=$.extend({type:E(`object-chart`),objectName:M().optional().describe(`ObjectQL object name (legacy inline path)`),chartType:j([`bar`,`column`,`horizontal-bar`,`line`,`area`,`pie`,`donut`,`scatter`]).describe(`Chart type`),xAxisField:M().optional().describe(`X axis field (legacy inline path)`),yAxisFields:A(M()).optional().describe(`Y axis fields (legacy)`),aggregation:j([`cardinality`,`sum`,`avg`,`min`,`max`]).optional().describe(`Aggregation (legacy)`),dataset:M().optional().describe(`Semantic-layer dataset name (ADR-0021)`),dimensions:A(M()).optional().describe(`Dataset dimension names`),values:A(M()).optional().describe(`Dataset measure names`),colors:w([A(M()),C(M(),M())]).optional().describe(`Positional palette (string[]) OR a value→color map ({ value: color }, kanban-style). Select/lookup option colors and explicit maps win over the palette per category.`)});$.extend({type:E(`object-gallery`),objectName:M().optional().describe(`ObjectQL object name`),filter:Se().optional().describe(`Query filter, forwarded verbatim as $filter`),data:A(C(M(),Se())).optional().describe(`Inline records`),gallery:te.optional().describe(`Gallery configuration (@objectstack/spec GalleryConfig)`),navigation:x.optional().describe(`Record navigation behaviour (drawer/dialog/page)`),grouping:v.optional().describe(`Grouping configuration for sectioned display`),imageField:M().optional().describe(`DEPRECATED — use gallery.coverField`),titleField:M().optional().describe(`DEPRECATED — use gallery.titleField`)}),$.extend({type:E(`object-data-table`),objectName:M().optional().describe(`ObjectQL object name`),dataProvider:D({provider:M(),object:M().optional()}).optional().describe(`Data-provider binding carried from the dashboard widget definition`),filter:k().optional().describe(`Query filter, resolved through the filter scope and forwarded as $filter`),data:A(k()).optional().describe(`Inline rows`),columns:A(k()).optional().describe(`Column definitions (names or column objects)`),searchable:T().optional().describe(`Forwarded to the rendered data-table`),pagination:T().optional().describe(`Forwarded to the rendered data-table`),onRowClick:ku(`onRowClick`,`runtime-slot`,`Row click handler (overrides drill-to-record)`)}),w([Vu,Hu,Uu,od,sd,ld,ud,fd,pd,nd]);export{Uc as $,Zn as $n,Ie as $r,vo as $t,Fl as A,Xi as An,jt as Ar,ds as At,ll as B,oi as Bn,pt as Br,Go as Bt,Yl as C,Ca as Cn,Kt as Cr,_s as Ct,Ul as D,ra as Dn,Pt as Dr,rs as Dt,Gl as E,na as En,It as Er,vs as Et,ml as F,xi as Fn,wt as Fr,es as Ft,Jc as G,Er as Gn,ot as Gr,Vo as Gt,ol as H,Wr as Hn,dt as Hr,Fo as Ht,hl as I,ui as In,Et as Ir,Qo as It,$c as J,_r as Jn,Ge as Jr,Ao as Jt,Xc as K,Dr as Kn,st as Kr,Po as Kt,dl as L,li as Ln,Tt as Lr,Uo as Lt,bl as M,Wi as Mn,Dt as Mr,Y as Mt,yl as N,Ei as Nn,Ot as Nr,$o as Nt,Hl as O,Yi as On,Nt as Or,us as Ot,gl as P,Si as Pn,At as Pr,ts as Pt,zc as Q,L as Qn,N as Qr,Co as Qt,fl as R,si as Rn,Ct as Rr,Wo as Rt,Zl as S,wa as Sn,Ut as Sr,ps as St,Kl as T,va as Tn,zt as Tr,ms as Tt,nl as U,Ur as Un,lt as Ur,Bo as Ut,al as V,ei as Vn,ft as Vr,Ho as Vt,rl as W,Or as Wn,it as Wr,Io as Wt,Kc as X,cr as Xn,Ue as Xr,To as Xt,el as Y,xr as Yn,He as Yr,Eo as Yt,qc as Z,R as Zn,Be as Zr,wo as Zt,tu as _,Aa as _n,Xt as _r,X as _t,Tu as a,co as an,Pn as ar,Oc as at,au as b,Oa as bn,Wt as br,ws as bt,_u as c,Ha as cn,sn as cr,Ec as ct,yu as d,no as dn,fn as dr,xc as dt,Ee as ei,go as en,Bn as er,Vc as et,lu as f,to as fn,dn as fr,yc as ft,du as g,Ua as gn,tn as gr,Xs as gt,fu as h,Ya as hn,Zt as hr,gc as ht,Cu as i,lo as in,Ln as ir,Q as it,Tl as j,Gi as jn,Mt as jr,as as jt,Vl as k,Zi as kn,Ft as kr,is as kt,vu as l,Ga as ln,un as lr,Dc as lt,uu as m,ro as mn,rn as mr,_c as mt,Du as n,po as nn,Rn as nr,Wc as nt,wu as o,Ka as on,Nn as or,kc as ot,mu as p,Wa as pn,nn as pr,bc as pt,Yc as q,gr as qn,P as qr,No as qt,Su as r,uo as rn,En as rr,Hc as rt,xu as s,qa as sn,yn as sr,Ac as st,rd as t,we as ti,_o as tn,zn as tr,Bc as tt,gu as u,Ia as un,cn as ur,wc as ut,nu as v,ja as vn,Yt as vr,Ts as vt,ql as w,ya as wn,Ht as wr,hs as wt,Ql as x,Da as xn,Gt as xr,Ss as xt,iu as y,ka as yn,qt as yr,xs as yt,cl as z,ci as zn,_t as zr,Zo as zt};