decocms 3.14.1 → 3.15.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.
- package/dist/client/assets/{AlertCircle-DRHyGf9c.js → AlertCircle-Df--0_5Q.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DjmYJmJn.js → ArrowUpRight-Wc2xzvxd.js} +1 -1
- package/dist/client/assets/{Check-BAGX6byc.js → Check-ZkuDtttp.js} +1 -1
- package/dist/client/assets/{CheckCircle-DW_P_GKI.js → CheckCircle-DAASL3Hm.js} +1 -1
- package/dist/client/assets/{ChevronDown-CAL288na.js → ChevronDown-DKCz1h41.js} +1 -1
- package/dist/client/assets/{ChevronLeft-BVCqE6CZ.js → ChevronLeft-Bvs4PNx0.js} +1 -1
- package/dist/client/assets/{ChevronRight-B4KDDW68.js → ChevronRight-Dr4wvCOu.js} +1 -1
- package/dist/client/assets/{ChevronUp-DcWZUkYe.js → ChevronUp-BzaXTHHh.js} +1 -1
- package/dist/client/assets/{Container-CkHLfXTd.js → Container-CVqEnWeC.js} +1 -1
- package/dist/client/assets/{DotsVertical-gompzLUn.js → DotsVertical-BGB5-qM0.js} +1 -1
- package/dist/client/assets/{Eye-DK_Ae8cN.js → Eye-CPcdeK6K.js} +1 -1
- package/dist/client/assets/{FilterLines-CXU5uRE0.js → FilterLines-9is4o141.js} +1 -1
- package/dist/client/assets/{Globe01-DAVfQNsE.js → Globe01-DEWZ_bOJ.js} +1 -1
- package/dist/client/assets/{HardDrive-BzYgoXK_.js → HardDrive-CGlANrVi.js} +1 -1
- package/dist/client/assets/{Key01-BOSdzDty.js → Key01-BU9HGJmj.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CkrP3nq5.js → LayoutLeft-3VD9aG4E.js} +1 -1
- package/dist/client/assets/{LinkExternal01-HxwAFN31.js → LinkExternal01-02045GaZ.js} +1 -1
- package/dist/client/assets/{Monitor01-DYzzIMYG.js → Monitor01-CV9bw0kY.js} +1 -1
- package/dist/client/assets/{Palette-CLbrrcGD.js → Palette-xEHQ3aBe.js} +1 -1
- package/dist/client/assets/{Play-CTKY7A8m.js → Play-5HKq03ZR.js} +1 -1
- package/dist/client/assets/{Plus-BOyy6rsR.js → Plus-Btickb8y.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Qj8_hife.js → RefreshCcw01-C_mUet_f.js} +1 -1
- package/dist/client/assets/{SearchMd-DbevFKdn.js → SearchMd-CSGt90rv.js} +1 -1
- package/dist/client/assets/{Settings02-ZOvBqClo.js → Settings02-Dh9Pt9-q.js} +1 -1
- package/dist/client/assets/{Shield01-UzvsC85x.js → Shield01-DjEfDyyq.js} +1 -1
- package/dist/client/assets/{Star01-wYZZkssu.js → Star01-XgbiVkg2.js} +1 -1
- package/dist/client/assets/{Stars01-BR6r6QoS.js → Stars01-CC5N0Bec.js} +1 -1
- package/dist/client/assets/{Stars02-B6H9eFsw.js → Stars02-DDQwULVc.js} +1 -1
- package/dist/client/assets/{Sun-Be-RSNpE.js → Sun-DuFY8SWo.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CyasnDok.js → SwitchHorizontal01--RTdTVqL.js} +1 -1
- package/dist/client/assets/{Tool01-CZo3Ws8r.js → Tool01-D22uHwE_.js} +1 -1
- package/dist/client/assets/{Trash01-BkHwMBCz.js → Trash01-DctMpPfs.js} +1 -1
- package/dist/client/assets/{Upload01-fLxvHH57.js → Upload01-CxqliuyJ.js} +1 -1
- package/dist/client/assets/{User01-B9vfb0Zb.js → User01-BeN0bF8u.js} +1 -1
- package/dist/client/assets/{Users01-C08_7Fjf.js → Users01-6l0pP4x6.js} +1 -1
- package/dist/client/assets/{Users03-DU0NRLVn.js → Users03-CbrpXqB6.js} +1 -1
- package/dist/client/assets/{X-D3ujm-1f.js → X-DneTOM9r.js} +1 -1
- package/dist/client/assets/{XCircle-BLueW2Cc.js → XCircle-D8-yNZp6.js} +1 -1
- package/dist/client/assets/{XClose-a6X9Feth.js → XClose-C2WAq9ZW.js} +1 -1
- package/dist/client/assets/{Zap-XxIeeL11.js → Zap-C-iGB2_y.js} +1 -1
- package/dist/client/assets/{ZapSquare-om6I8Bmn.js → ZapSquare-DB8OAhrV.js} +1 -1
- package/dist/client/assets/{ZoomOut-Df2vwqAx.js → ZoomOut-p4a8cjrW.js} +1 -1
- package/dist/client/assets/{access-gate-wXW-GaXL.js → access-gate-CxHFTBH3.js} +1 -1
- package/dist/client/assets/{accordion-P4xzTtjZ.js → accordion-CPhMOplM.js} +1 -1
- package/dist/client/assets/{add-section-modal-BmrLR2MD.js → add-section-modal-DD_4cCYE.js} +1 -1
- package/dist/client/assets/{agent-capabilities-D46Ant2h.js → agent-capabilities-BDuitfxd.js} +1 -1
- package/dist/client/assets/{agent-icon-Dk3o9tJI.js → agent-icon-CmNu5csL.js} +1 -1
- package/dist/client/assets/{agent-icons-BpBwDjJL.js → agent-icons-DGaqPUoY.js} +1 -1
- package/dist/client/assets/{agents-list-BCw_iRb9.js → agents-list-DxoDCldD.js} +1 -1
- package/dist/client/assets/{ai-providers-Bzjk8Jpl.js → ai-providers-DP7sa-PI.js} +1 -1
- package/dist/client/assets/{alert-le_WorN3.js → alert-BFf06Uf5.js} +1 -1
- package/dist/client/assets/{alert-dialog-1F9r3gli.js → alert-dialog-BEWsACaV.js} +1 -1
- package/dist/client/assets/app-editor-CPJ1EFDS.js +1 -0
- package/dist/client/assets/{auth-catchall-CC6xGWbq.js → auth-catchall-CnwhJ3wJ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BobH9sQi.js → auth-split-layout-BFygRv3U.js} +1 -1
- package/dist/client/assets/{automation-list-row-CchT7OU-.js → automation-list-row-RoeLIMRW.js} +1 -1
- package/dist/client/assets/{automation-runs-D_dLs0QM.js → automation-runs-Bxl5TsjT.js} +1 -1
- package/dist/client/assets/{automations-B-JIaea5.js → automations-CwUlL7MX.js} +1 -1
- package/dist/client/assets/{avatar-BlzGb3te.js → avatar-3MdQGx6K.js} +1 -1
- package/dist/client/assets/{badge-C0_EnXa2.js → badge-CCn3uA8-.js} +1 -1
- package/dist/client/assets/{brand-context-eT3lZUSM.js → brand-context-fLN3aocM.js} +1 -1
- package/dist/client/assets/{buckets-DPDW8MU3.js → buckets-C-D0SRth.js} +1 -1
- package/dist/client/assets/{calendar-DTDq7lVW.js → calendar-Ywqm_fFz.js} +1 -1
- package/dist/client/assets/{capability-load-error-BtSdq2xW.js → capability-load-error-Dls3VumK.js} +1 -1
- package/dist/client/assets/{card-DSraIeCP.js → card-C43artm1.js} +1 -1
- package/dist/client/assets/{chat-context-C3WrnjU8.js → chat-context-DldCrGqT.js} +7 -7
- package/dist/client/assets/{checkbox-DdLNN5eS.js → checkbox-Ds3nyU8T.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DVxHM_iw.js → cli-auth-success-KKiAnaCG.js} +1 -1
- package/dist/client/assets/{collection-detail-CjbIuH2_.js → collection-detail-B9i5jJut.js} +1 -1
- package/dist/client/assets/{collection-display-button-BPRZNPyr.js → collection-display-button-Dl2gVzgT.js} +1 -1
- package/dist/client/assets/{collection-search-CmZGvBVT.js → collection-search-CXA4O0vV.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-lIqgwsua.js → collection-table-wrapper-D42hM2q7.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dl2GPuUu.js → collection-tabs-BQDEl94v.js} +1 -1
- package/dist/client/assets/{collections-Bi47WTeq.js → collections-B7hppPnk.js} +1 -1
- package/dist/client/assets/{command-D0MppK-a.js → command-BLTADjc5.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-C9YS_bz9.js → connect-desktop-dialog-Ceh43qBx.js} +1 -1
- package/dist/client/assets/{connection-card-D_KGIcBN.js → connection-card-Bcu_5lji.js} +1 -1
- package/dist/client/assets/{connection-detail-Cw6jCL1I.js → connection-detail-B2MqdV4L.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DFI2tLxh.js → connection-form-helpers-S-LtuX-S.js} +1 -1
- package/dist/client/assets/{connections-4k2W5seA.js → connections-CCShJ8Jd.js} +1 -1
- package/dist/client/assets/{constants-CchlhUbt.js → constants-DmaRUO24.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BipbG8vI.js → decopilot-sse-pool-wrlj3aUh.js} +1 -1
- package/dist/client/assets/{dialog-BRg3BNrG.js → dialog-B1Nc8xMS.js} +1 -1
- package/dist/client/assets/{domain-settings-6x8EY-xd.js → domain-settings-BTlsDKzu.js} +1 -1
- package/dist/client/assets/{drawer-CVWNuQoC.js → drawer-Cu_Hz6ej.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DjX6wJxC.js → dropdown-menu-DAw-TsUh.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DrvMw3Wi.js → dynamic-plugin-layout-n4Pp3nMM.js} +1 -1
- package/dist/client/assets/{empty-state-CCWDHbCq.js → empty-state-B0rmuxtf.js} +1 -1
- package/dist/client/assets/{empty-state-BofFpaIz.js → empty-state-D8YpqqWF.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cs1ssq5g.js → extract-connection-data-CuAZT2OH.js} +1 -1
- package/dist/client/assets/{features-lV1JR9k-.js → features-DJJvOC8g.js} +1 -1
- package/dist/client/assets/{file-explorer-Byxa9l4J.js → file-explorer-C4wewMBR.js} +1 -1
- package/dist/client/assets/{file-type-icon-CPB7v-0e.js → file-type-icon-CRpuc9By.js} +1 -1
- package/dist/client/assets/{files-H4WBqN-U.js → files-DjUVCU5R.js} +1 -1
- package/dist/client/assets/{form-g-POIM5X.js → form-C-dfFokk.js} +1 -1
- package/dist/client/assets/{general-DKxYTl0i.js → general-W9GEdary.js} +1 -1
- package/dist/client/assets/{generate-id-DqAQBrmg.js → generate-id-CqgpLwYi.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bt3J8Wj4.js → github-repo-picker-BSDJXwP2.js} +1 -1
- package/dist/client/assets/{header-tab-button-Duubm1bw.js → header-tab-button-C0TSKHWx.js} +1 -1
- package/dist/client/assets/{hover-card-Cxv3P0dK.js → hover-card-CAB_Kd0p.js} +1 -1
- package/dist/client/assets/{image-field-Da0LtAsZ.js → image-field-WdJ5dNPQ.js} +1 -1
- package/dist/client/assets/{index-D_jAJc0k.js → index-BL7ED5Jm.js} +12 -12
- package/dist/client/assets/{index-BWnY6vRQ.js → index-BcgIo76F.js} +1 -1
- package/dist/client/assets/{index-CctNRZIv.js → index-BfZEPbTj.js} +1 -1
- package/dist/client/assets/{index-CWTDsV5y.js → index-Bq5N-i53.js} +1 -1
- package/dist/client/assets/{index-DGDBHdoz.js → index-Cu-Nm1Q5.js} +1 -1
- package/dist/client/assets/{index-ByJxS8oA.js → index-D_dvdHbe.js} +1 -1
- package/dist/client/assets/{index-Bu1PhwAh.js → index-DgSp521R.js} +1 -1
- package/dist/client/assets/{index-CfW1HA_W.js → index-Ds7PGR-e.js} +1 -1
- package/dist/client/assets/{index-mKVde0sm.js → index-Dsr3BDUV.js} +1 -1
- package/dist/client/assets/{index-CgapDNem.js → index-FRuYnQzT.js} +1 -1
- package/dist/client/assets/{index-CMJiKe4w.js → index-_MzYLGFn.js} +1 -1
- package/dist/client/assets/{index-6hztKnkS.js → index-dWHz6OPT.js} +1 -1
- package/dist/client/assets/{index-BeczTsNk.js → index-iZ-4ATHL.js} +4 -4
- package/dist/client/assets/{index-wjXmpMX5.js → index-rJrNPatq.js} +1 -1
- package/dist/client/assets/{index-redirect-vzPjF3ZP.js → index-redirect-DvvIeb7J.js} +1 -1
- package/dist/client/assets/{index-D1xj5FAr.js → index-uMtjN0JU.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-B0cytVdm.js → infiniteQueryObserver-B-UH5PZ2.js} +1 -1
- package/dist/client/assets/{input-BQvnWAlP.js → input-B0CAb5tP.js} +1 -1
- package/dist/client/assets/{integration-icon-CCbJw4Df.js → integration-icon-DSPfInxC.js} +1 -1
- package/dist/client/assets/{label-Wu6y_QrM.js → label-DFo6dQ5z.js} +1 -1
- package/dist/client/assets/{layout-C1OSyyos.js → layout-tvyQudOW.js} +1 -1
- package/dist/client/assets/{login-BB9gwxjU.js → login-DrAJNKFu.js} +1 -1
- package/dist/client/assets/{members-B39qONKS.js → members-A7O9orMQ.js} +1 -1
- package/dist/client/assets/{monaco-editor-7TCUkOom.js → monaco-editor-DfVpRxzN.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BbpMsxFq.js → monitoring-stats-row-BoPOwLlO.js} +1 -1
- package/dist/client/assets/{oauth-callback-BmNb3XSd.js → oauth-callback-Y-Ss89wU.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-MzAoXtUS.js → oauth-callback-ai-provider-DyXOazIp.js} +1 -1
- package/dist/client/assets/{onboarding-C4_LXUb4.js → onboarding-D5Cy4Aat.js} +1 -1
- package/dist/client/assets/org-install-DXY43AFq.js +1 -0
- package/dist/client/assets/{org-layout-C_TI2CiW.js → org-layout-Bf2kJW_j.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-UltkkD2j.js → org-plugin-layout-1zAnbcsA.js} +1 -1
- package/dist/client/assets/{page-seo-form-Bdx-1zHu.js → page-seo-form-BWcjBueB.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CY1WUlD8.js +1 -0
- package/dist/client/assets/{pair-BOBd45LL.js → pair-DMVlPtIb.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C0HaTSPj.js → plugin-empty-state-DrTWRmCz.js} +1 -1
- package/dist/client/assets/{plugin-header-ohvQzYYa.js → plugin-header-CaiRHVgw.js} +1 -1
- package/dist/client/assets/{plugin-layout-Dl-oej49.js → plugin-layout-rYQH9Rom.js} +1 -1
- package/dist/client/assets/{popover-DB8RwMTv.js → popover-2JRoMGQ1.js} +1 -1
- package/dist/client/assets/{post-editor-C4kWghHd.js → post-editor-bJV0J-sh.js} +1 -1
- package/dist/client/assets/{primitives-CE10nscH.js → primitives-BNT6TicY.js} +1 -1
- package/dist/client/assets/{profile-BbFKF_wj.js → profile-CdcwthLM.js} +1 -1
- package/dist/client/assets/project-app-view-DTn7Umuo.js +1 -0
- package/dist/client/assets/record-editor-CNz99W1I.js +1 -0
- package/dist/client/assets/registry-Cj2jdbrX.js +2 -0
- package/dist/client/assets/{registry-layout-FvVQ3GYs.js → registry-layout-CfFaTYBQ.js} +1 -1
- package/dist/client/assets/{require-capability-D0ePdC9i.js → require-capability-Byp5rsdZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DR9ycLbp.js → required-auth-layout-4c_UmntX.js} +1 -1
- package/dist/client/assets/{reset-password-ohONz0VV.js → reset-password-B8x6QYxI.js} +1 -1
- package/dist/client/assets/{resizable-BwqYtXcq.js → resizable-CnzEyMgo.js} +1 -1
- package/dist/client/assets/{roles-BnqboAG0.js → roles-C8qnb6ZX.js} +1 -1
- package/dist/client/assets/{save-status-CvqE2br_.js → save-status-DT0y0HCr.js} +1 -1
- package/dist/client/assets/{schema-form-BwqDtsw2.js → schema-form-B8A0bR7q.js} +1 -1
- package/dist/client/assets/{scroll-area-W85_YjjB.js → scroll-area-m6ufwC0t.js} +1 -1
- package/dist/client/assets/{search-input-BpLQ3Rey.js → search-input-Bky_sS-L.js} +1 -1
- package/dist/client/assets/{secrets-DhOIV3Ou.js → secrets-BtQC7jVq.js} +1 -1
- package/dist/client/assets/{sections-editor-QBMDCDMY.js → sections-editor-BjlKjz_2.js} +1 -1
- package/dist/client/assets/{select-CSZDlwXz.js → select-Bh2kfZ6z.js} +1 -1
- package/dist/client/assets/{select-model-Dg9OvB5N.js → select-model-Dsz8H3dS.js} +1 -1
- package/dist/client/assets/{seo-editor-BWuA8wAl.js → seo-editor-BcGYlMO4.js} +1 -1
- package/dist/client/assets/{settings-layout-smiCNW1L.js → settings-layout-C81zADe9.js} +1 -1
- package/dist/client/assets/{settings-section-BPEynfiI.js → settings-section-D-pHreEx.js} +1 -1
- package/dist/client/assets/{sheet-n3cyaiN3.js → sheet-30kRmIVx.js} +1 -1
- package/dist/client/assets/{shell-controls-DfU76cnn.js → shell-controls-0yy0BMcF.js} +1 -1
- package/dist/client/assets/shell-layout-2Zhd4W8H.js +1 -0
- package/dist/client/assets/shell-route-loading-CrrHP8y7.js +1 -0
- package/dist/client/assets/{sidebar-B_zSrzNg.js → sidebar-BfhmTvY-.js} +1 -1
- package/dist/client/assets/{skeleton-KqrpqQS-.js → skeleton-CbtmOeqp.js} +1 -1
- package/dist/client/assets/{sortable.esm-Bf2I0oDR.js → sortable.esm-DjFx1Fy8.js} +1 -1
- package/dist/client/assets/{spinner-qS-BQJKn.js → spinner-B0GcNJtN.js} +1 -1
- package/dist/client/assets/{sso-YAGaW8UI.js → sso-B0tL87gC.js} +1 -1
- package/dist/client/assets/{store-CFGe9nD6.js → store-BKYvGMZZ.js} +1 -1
- package/dist/client/assets/store-registry-DZDbzrGJ.js +2 -0
- package/dist/client/assets/{switch-odrBRb7G.js → switch-D_MF3Bj7.js} +1 -1
- package/dist/client/assets/{tab-id-DEjCsgUV.js → tab-id-odobwGy2.js} +1 -1
- package/dist/client/assets/{table-DCBMN899.js → table-DduZyGdW.js} +1 -1
- package/dist/client/assets/{tabs-DPk409vx.js → tabs-BTENS4uZ.js} +1 -1
- package/dist/client/assets/{task-status-07JSsEqQ.js → task-status-CvLGFhCw.js} +1 -1
- package/dist/client/assets/{textarea-XAp-lQeV.js → textarea-CJl7KzlA.js} +1 -1
- package/dist/client/assets/{toggle-group-C5wuDpuu.js → toggle-group-BfM2TyzL.js} +1 -1
- package/dist/client/assets/{toolbar-CHYgUdR4.js → toolbar-WTgJ8tYc.js} +1 -1
- package/dist/client/assets/{tools-list-Bs8gnQXG.js → tools-list-C_7E6xRg.js} +1 -1
- package/dist/client/assets/{tooltip-CxHHunbb.js → tooltip-D9lPICMI.js} +1 -1
- package/dist/client/assets/{types-CITFBDru.js → types-BLVCvzxc.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D5D05iJh.js → use-ai-providers-DL3JPJMp.js} +1 -1
- package/dist/client/assets/{use-automations-GHzH5z9k.js → use-automations-Dso5PYtO.js} +1 -1
- package/dist/client/assets/{use-capability-D278qqcL.js → use-capability-Cdw_LwAj.js} +1 -1
- package/dist/client/assets/{use-collections-CCiVEkC_.js → use-collections-CyhktIAn.js} +1 -1
- package/dist/client/assets/{use-connection-oqaPqJLh.js → use-connection-DfgGi9Jz.js} +1 -1
- package/dist/client/assets/{use-copy-Bjm30VZi.js → use-copy-C4SEAV2l.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Pd8gPOlf.js → use-create-virtual-mcp-CpaOItoQ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-UliHPN2L.js → use-debounced-autosave-CMcGOrlx.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BmG13cRf.js → use-delete-connection-D88FBRpE.js} +1 -1
- package/dist/client/assets/{use-file-configs-D6tyCaXX.js → use-file-configs-DH5tbzz2.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DinnrQxZ.js → use-infinite-scroll-xL0tTOXC.js} +1 -1
- package/dist/client/assets/{use-list-state-CRY2JPUc.js → use-list-state-UV2k94-t.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Blv-j3l_.js → use-mcp-prompts-Cw7p9nzf.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B__W4Nfa.js → use-mcp-tools-Bx_lYrhA.js} +1 -1
- package/dist/client/assets/{use-members-BXgzT3ks.js → use-members-BPdEIfS7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-4S8AueWp.js → use-navigate-to-agent-BiLxvaOq.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BoX8glSL.js → use-org-auth-client-Cg2WSxUm.js} +1 -1
- package/dist/client/assets/{use-org-sso-BOhIg_PE.js → use-org-sso-DlqH3PdH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CkVmEIg-.js → use-organization-roles-B2wZwXS-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-uvkE8qc9.js → use-organization-settings-Cshc6i9s.js} +1 -1
- package/dist/client/assets/{use-registry-connections-gQYusLCB.js → use-registry-connections-BMUq41pY.js} +1 -1
- package/dist/client/assets/{use-secrets-Bg9n1hs4.js → use-secrets-ROZ2tsv-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CpgSTA7q.js → use-status-sounds-DGcZu37Y.js} +1 -1
- package/dist/client/assets/{use-view-mode-7VFqXibv.js → use-view-mode-BNQVCGlx.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Dn-h5sJo.js → use-virtual-mcp-DL_9_YeE.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CK5VjHNR.js +1 -0
- package/dist/client/assets/{useRouterState-tUdXSza0.js → useRouterState-CCztxae-.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CWF06506.js +1 -0
- package/dist/client/assets/{user-D_M-Cm8P.js → user-C5Awwgf8.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BYQfoq2D.js → view-mode-toggle-DXHtDiBK.js} +1 -1
- package/dist/client/assets/{workflow-BjvR84sg.js → workflow-Civ4Pgau.js} +1 -1
- package/dist/client/assets/workflow-detail-D6S01PJ0.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +390 -390
- package/dist/server/server.js +262 -262
- package/package.json +1 -1
- package/dist/client/assets/app-editor-Dg4o1VkS.js +0 -1
- package/dist/client/assets/org-install-BZqJsoNR.js +0 -1
- package/dist/client/assets/page-seo-sheet-CEVYnhWU.js +0 -1
- package/dist/client/assets/project-app-view-YDksIkIL.js +0 -1
- package/dist/client/assets/record-editor-AUsUCBEv.js +0 -1
- package/dist/client/assets/registry-jnotEfN7.js +0 -2
- package/dist/client/assets/shell-layout-pejFYVWl.js +0 -1
- package/dist/client/assets/shell-route-loading-B5UWefMR.js +0 -1
- package/dist/client/assets/store-registry-DzRu5mqY.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BAcSwqz7.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-R0G2gtCz.js +0 -1
- package/dist/client/assets/workflow-detail-CEU7zY_H.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as w,q as be,a as Ne,K as ke,j as t,E as we,r as $,c as de,B as Y,l as Ce,P as Ie,o as Q}from"./index-D_jAJc0k.js";import{a as W}from"./Tool01-CZo3Ws8r.js";import{s as Se}from"./Trash01-BkHwMBCz.js";import{i as fe}from"./Upload01-fLxvHH57.js";import{I as _e}from"./input-BQvnWAlP.js";import{L as Pe}from"./label-Wu6y_QrM.js";import{i as Ue}from"./AlertCircle-DRHyGf9c.js";import{i as ge}from"./Check-BAGX6byc.js";import{a as $e}from"./Eye-DK_Ae8cN.js";import{i as De}from"./DotsVertical-gompzLUn.js";import{G as ze}from"./agent-icon-Dk3o9tJI.js";import{n as Fe}from"./LinkExternal01-HxwAFN31.js";import{D as Te,c as Ee,e as Le,b as Oe,a as Ae}from"./dialog-BRg3BNrG.js";import{c as ce,a as Re,D as Ge,b as Me}from"./dropdown-menu-DjX6wJxC.js";import{S as Be}from"./skeleton-KqrpqQS-.js";import{T as Ve,a as Ke,b as qe,c as Je}from"./tabs-DPk409vx.js";import{u as Qe,c as Ye}from"./use-file-configs-D6tyCaXX.js";import{u as We}from"./useInfiniteQuery-BAcSwqz7.js";import{S as He,u as Xe}from"./constants-CchlhUbt.js";import{u as Ze}from"./unwrap-tool-result-BYXdCQMg.js";function et(s){if(typeof s=="string")return s;if(!s||typeof s!="object")return"";const e=s;if(Array.isArray(e.variants)){const n=e.variants,l=n.find(o=>o.rule?.__resolveType?.includes("always"));if(typeof l?.value=="string")return l.value;const i=n.find(o=>typeof o.value=="string");if(i)return i.value}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function tt(s){const e=w.c(13),{org:n}=be();let l;e[0]!==n.id||e[1]!==n.slug?(l={connectionId:He,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=l):l=e[2];const i=Xe(l);let o;e[3]!==n.id||e[4]!==s.configId?(o=ke.filePickerObjects(n.id,s.configId),e[3]=n.id,e[4]=s.configId,e[5]=o):o=e[5];const a=s.enabled!==!1&&!!s.configId;let r;e[6]!==i||e[7]!==s.configId?(r=async c=>{const{pageParam:g}=c,f=await i.callTool({name:"FILE_OBJECTS_LIST",arguments:{configId:s.configId,cursor:g??void 0}});return Ze(f)},e[6]=i,e[7]=s.configId,e[8]=r):r=e[8];let d;return e[9]!==o||e[10]!==a||e[11]!==r?(d={queryKey:o,enabled:a,staleTime:3e4,initialPageParam:null,queryFn:r,getNextPageParam:st},e[9]=o,e[10]=a,e[11]=r,e[12]=d):d=e[12],We(d)}function st(s){return s.nextCursor??void 0}function je(){const s=w.c(2),{org:e}=be();let n;return s[0]!==e?(n={mutationFn:async l=>{const i=l.file.type||"application/octet-stream",o=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(l.configId)}/upload?filename=${encodeURIComponent(l.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:l.file});if(!o.ok){const a=await o.text().catch(nt);let r=`${o.status} ${o.statusText}`;try{const d=JSON.parse(a);d.message&&(r=d.message)}catch{a&&(r=a.slice(0,200))}throw new Error(`Upload failed: ${r}`)}return await o.json()}},s[0]=e,s[1]=n):n=s[1],Ne(n)}function nt(){return""}const ue="file-picker:last-config-id";function it(s){const e=w.c(18),n=s.mode==="image"?"Pick an image":"Pick a file";let l;e[0]!==n?(l=t.jsx(Ee,{children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{children:"Upload a new file or pick one previously uploaded to a configured bucket."}),e[2]=i):i=e[2];let o;e[3]!==l?(o=t.jsxs(Oe,{children:[l,i]}),e[3]=l,e[4]=o):o=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Be,{className:"h-64 w-full"}),e[5]=a):a=e[5];let r;e[6]!==s?(r=f=>{s.onSelect(f),s.onOpenChange(!1)},e[6]=s,e[7]=r):r=e[7];let d;e[8]!==s.mode||e[9]!==r?(d=t.jsx(we,{fallback:lt,children:t.jsx($.Suspense,{fallback:a,children:t.jsx(ot,{mode:s.mode,onSelect:r})})}),e[8]=s.mode,e[9]=r,e[10]=d):d=e[10];let c;e[11]!==o||e[12]!==d?(c=t.jsxs(Ae,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[o,d]}),e[11]=o,e[12]=d,e[13]=c):c=e[13];let g;return e[14]!==s.onOpenChange||e[15]!==s.open||e[16]!==c?(g=t.jsx(Te,{open:s.open,onOpenChange:s.onOpenChange,children:c}),e[14]=s.onOpenChange,e[15]=s.open,e[16]=c,e[17]=g):g=e[17],g}function lt(s){const{error:e}=s;return t.jsx(rt,{error:e??new Error("Failed to load buckets")})}function rt(s){const e=w.c(3),{error:n}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ue,{size:16}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n.message})]}),e[1]=n.message,e[2]=i):i=e[2],i}function ot(s){const e=w.c(23),{mode:n,onSelect:l}=s,i=Qe();if(i.length===0){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(dt,{}),e[0]=u):u=e[0],u}if(i.length===1){const u=i[0];let p;return e[1]!==u||e[2]!==n||e[3]!==l?(p=t.jsx(pe,{config:u,mode:n,onSelect:l}),e[1]=u,e[2]=n,e[3]=l,e[4]=p):p=e[4],p}let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=typeof window<"u"?window.localStorage.getItem(ue):null,e[5]=o):o=e[5];const a=o;let r;e[6]!==i?(r=i.find(u=>u.id===a)?.id??i[0].id,e[6]=i,e[7]=r):r=e[7];const d=r;let c;e[8]!==i?(c=i.map(at),e[8]=i,e[9]=c):c=e[9];let g;e[10]!==c?(g=t.jsx(Ke,{className:"self-start",children:c}),e[10]=c,e[11]=g):g=e[11];let f;if(e[12]!==i||e[13]!==n||e[14]!==l){let u;e[16]!==n||e[17]!==l?(u=p=>t.jsx(qe,{value:p.id,className:"min-h-0 flex-1 overflow-hidden",children:t.jsx(pe,{config:p,mode:n,onSelect:l})},p.id),e[16]=n,e[17]=l,e[18]=u):u=e[18],f=i.map(u),e[12]=i,e[13]=n,e[14]=l,e[15]=f}else f=e[15];let x;return e[19]!==d||e[20]!==g||e[21]!==f?(x=t.jsxs(Je,{defaultValue:d,onValueChange:ct,className:"min-h-0 flex-1 flex flex-col",children:[g,f]}),e[19]=d,e[20]=g,e[21]=f,e[22]=x):x=e[22],x}function at(s){return t.jsx(Ve,{value:s.id,children:s.name},s.id)}function ct(s){typeof window<"u"&&window.localStorage.setItem(ue,s)}function dt(){const s=w.c(3);let e,n;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(fe,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No bucket configured"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Add an S3-compatible bucket in Settings before you can upload files."})]}),s[0]=e,s[1]=n):(e=s[0],n=s[1]);let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[e,n,t.jsx(Y,{asChild:!0,size:"sm",className:"mt-2",children:t.jsx(Ie,{to:"/settings/files",children:"Configure a bucket"})})]}),s[2]=l):l=s[2],l}function pe({config:s,mode:e,onSelect:n}){const l=tt({configId:s.id}),i=je(),[o,a]=$.useState(!1),r=$.useRef(null),d=e==="image"?"image/*":void 0;async function c(m){if(!m)return;const y=Array.from(m);if(y.length===0)return;let k=null;const b=[];for(const N of y)try{const h=await i.mutateAsync({configId:s.id,file:N});k??=h.publicUrl}catch(h){b.push(`${N.name} (${h instanceof Error?h.message:"upload failed"})`)}await l.refetch(),b.length>0&&Q.error(b.length===y.length?`Upload failed: ${b.join("; ")}`:`Some files failed: ${b.join("; ")}`),k&&n(k)}function g(m){m.preventDefault(),a(!0)}function f(){a(!1)}function x(m){m.preventDefault(),a(!1),c(m.dataTransfer.files)}const p=(l.data?.pages??[]).flatMap(m=>m.items),j=p.filter(m=>e==="image"?ye(m.key):!0);return t.jsxs("div",{className:"flex flex-col gap-3 min-h-0 h-full",children:[t.jsxs("button",{type:"button",onClick:()=>r.current?.click(),onDragOver:g,onDragLeave:f,onDrop:x,className:de("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",o&&"border-primary bg-primary/5",i.isPending&&"opacity-60 pointer-events-none"),children:[t.jsx(fe,{size:18,className:"text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium",children:i.isPending?"Uploading…":"Drop files here or click to upload"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to 100 MB."," ",e==="image"?"Images only (PNG, JPEG, WebP, GIF, SVG, AVIF).":"Common image, video, audio, and document types."]}),t.jsx("input",{ref:r,type:"file",accept:d,multiple:!0,className:"hidden",onChange:m=>{const y=m.target.files;m.target.value="",c(y)}})]}),l.isFetching&&!l.isFetchingNextPage?t.jsx("div",{className:"flex justify-end",children:t.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading…"})}):null,t.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[j.length===0?e==="image"&&p.length>0?t.jsx(ut,{}):t.jsx(ft,{}):e==="image"?t.jsx(gt,{items:j,onSelect:n}):t.jsx(pt,{items:j,onSelect:n}),l.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(Y,{type:"button",variant:"outline",size:"sm",disabled:l.isFetchingNextPage,onClick:()=>l.fetchNextPage(),children:l.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ce,{size:14,className:"animate-spin"}),"Loading…"]}):"Load more"})})]})]})}function ft(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(W,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No files in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Drop a file above to get started."})]}),s[0]=e):e=s[0],e}function ut(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(W,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No images in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"The bucket has other files, but none match common image formats."})]}),s[0]=e):e=s[0],e}function ye(s){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(s)}function mt(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"file":s.slice(e+1).toLowerCase()}function gt(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx(ve,{item:r,variant:"image",onSelect:l},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:i}),e[5]=i,e[6]=o):o=e[6],o}function pt(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx("li",{children:t.jsx(ve,{item:r,variant:"row",onSelect:l})},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:i}),e[5]=i,e[6]=o):o=e[6],o}function ve(s){const e=w.c(58),{item:n,variant:l,onSelect:i}=s;let o;e[0]!==n.key?(o=mt(n.key),e[0]=n.key,e[1]=o):o=e[1];const a=o;if(l==="image"){let b;e[2]!==n.publicUrl||e[3]!==i?(b=()=>i(n.publicUrl),e[2]=n.publicUrl,e[3]=i,e[4]=b):b=e[4];let N;e[5]!==n.key||e[6]!==n.publicUrl?(N=t.jsx("img",{src:n.publicUrl,alt:n.key,loading:"lazy",className:"h-full w-full object-cover",onError:xt}),e[5]=n.key,e[6]=n.publicUrl,e[7]=N):N=e[7];let h;e[8]!==n.key||e[9]!==b||e[10]!==N?(h=t.jsx("button",{type:"button",onClick:b,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:n.key,children:N}),e[8]=n.key,e[9]=b,e[10]=N,e[11]=h):h=e[11];let C;e[12]!==a?(C=t.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-[10px] font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=C):C=e[13];let S;e[14]!==n||e[15]!==i?(S=t.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx(xe,{item:n,onSelect:i})}),e[14]=n,e[15]=i,e[16]=S):S=e[16];let I;e[17]!==n.key?(I=he(n.key),e[17]=n.key,e[18]=I):I=e[18];let _;e[19]!==I?(_=t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx("p",{className:"truncate text-xs text-white",children:I})}),e[19]=I,e[20]=_):_=e[20];let P;return e[21]!==h||e[22]!==C||e[23]!==S||e[24]!==_?(P=t.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[h,C,S,_]}),e[21]=h,e[22]=C,e[23]=S,e[24]=_,e[25]=P):P=e[25],P}let r;e[26]!==n.publicUrl||e[27]!==i?(r=()=>i(n.publicUrl),e[26]=n.publicUrl,e[27]=i,e[28]=r):r=e[28];let d;e[29]!==n.key?(d=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:ye(n.key)?t.jsx(W,{size:16,className:"text-muted-foreground"}):t.jsx(ze,{size:16,className:"text-muted-foreground"})}),e[29]=n.key,e[30]=d):d=e[30];let c;e[31]!==n.key?(c=he(n.key),e[31]=n.key,e[32]=c):c=e[32];let g;e[33]!==c?(g=t.jsx("p",{className:"truncate text-sm font-medium",children:c}),e[33]=c,e[34]=g):g=e[34];let f;e[35]!==n.key?(f=t.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:n.key}),e[35]=n.key,e[36]=f):f=e[36];let x;e[37]!==g||e[38]!==f?(x=t.jsxs("div",{className:"min-w-0 flex-1",children:[g,f]}),e[37]=g,e[38]=f,e[39]=x):x=e[39];let u;e[40]!==a?(u=t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=u):u=e[41];let p;e[42]!==n.size?(p=yt(n.size),e[42]=n.size,e[43]=p):p=e[43];let j;e[44]!==p?(j=t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:p}),e[44]=p,e[45]=j):j=e[45];let m;e[46]!==j||e[47]!==r||e[48]!==d||e[49]!==x||e[50]!==u?(m=t.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[d,x,u,j]}),e[46]=j,e[47]=r,e[48]=d,e[49]=x,e[50]=u,e[51]=m):m=e[51];let y;e[52]!==n||e[53]!==i?(y=t.jsx(xe,{item:n,onSelect:i}),e[52]=n,e[53]=i,e[54]=y):y=e[54];let k;return e[55]!==m||e[56]!==y?(k=t.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-muted/50",children:[m,y]}),e[55]=m,e[56]=y,e[57]=k):k=e[57],k}function xt(s){s.target.style.display="none"}function xe(s){const e=w.c(22),{item:n,onSelect:l}=s,[i,o]=$.useState(!1);let a;e[0]!==n.publicUrl?(a=async function(b){b.preventDefault(),b.stopPropagation();try{await navigator.clipboard.writeText(n.publicUrl),o(!0),window.setTimeout(()=>o(!1),1500)}catch{Q.error("Failed to copy URL")}},e[0]=n.publicUrl,e[1]=a):a=e[1];const r=a;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Re,{asChild:!0,children:t.jsx(Y,{type:"button",variant:"ghost",size:"icon",className:"size-7 rounded-md bg-background/80 backdrop-blur-sm",onClick:jt,"aria-label":"Asset actions",children:t.jsx(De,{size:14})})}),e[2]=d):d=e[2];let c;e[3]!==n.publicUrl||e[4]!==l?(c=()=>l(n.publicUrl),e[3]=n.publicUrl,e[4]=l,e[5]=c):c=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(ge,{size:14}),e[6]=g):g=e[6];let f;e[7]!==c?(f=t.jsxs(ce,{onClick:c,children:[g,"Use this"]}),e[7]=c,e[8]=f):f=e[8];let x;e[9]!==i?(x=i?t.jsx(ge,{size:14}):t.jsx($e,{size:14}),e[9]=i,e[10]=x):x=e[10];const u=i?"Copied":"Copy URL";let p;e[11]!==r||e[12]!==x||e[13]!==u?(p=t.jsxs(ce,{onClick:r,children:[x,u]}),e[11]=r,e[12]=x,e[13]=u,e[14]=p):p=e[14];let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Fe,{size:14}),e[15]=j):j=e[15];let m;e[16]!==n.publicUrl?(m=t.jsx(ce,{asChild:!0,children:t.jsxs("a",{href:n.publicUrl,target:"_blank",rel:"noreferrer",onClick:ht,children:[j,"Open in new tab"]})}),e[16]=n.publicUrl,e[17]=m):m=e[17];let y;return e[18]!==m||e[19]!==f||e[20]!==p?(y=t.jsxs(Ge,{children:[d,t.jsxs(Me,{align:"end",onClick:bt,children:[f,p,m]})]}),e[18]=m,e[19]=f,e[20]=p,e[21]=y):y=e[21],y}function ht(s){return s.stopPropagation()}function bt(s){return s.stopPropagation()}function jt(s){return s.stopPropagation()}function he(s){const e=s.split("/");return e[e.length-1]??s}function yt(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function vt(s){try{const e=new URL(s).pathname;return decodeURIComponent(e.split("/").pop()??s)}catch{return s.split("/").pop()??s}}function Nt(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"":s.slice(e+1).toLowerCase()}const kt=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Kt(s){const e=w.c(79),{schema:n,value:l,onChange:i,path:o,label:a}=s,r=et(l),[d,c]=$.useState(!1),[g,f]=$.useState(!1),[x,u]=$.useState(!1),[p,j]=$.useState(!1),m=r?vt(r):"",y=m?Nt(m):"",k=Ye(),b=je();let N;e[0]!==i||e[1]!==j||e[2]!==u?(N=function(v){u(!1),j(!1),i(v)},e[0]=i,e[1]=j,e[2]=u,e[3]=N):N=e[3];const h=N;let C;e[4]!==k.data?.configs?(C=function(){const v=k.data?.configs??[];if(v.length===1)return v[0].id;if(v.length===0)return null;const D=typeof window<"u"?window.localStorage.getItem(ue):null;return v.some(te=>te.id===D)?D:null},e[4]=k.data?.configs,e[5]=C):C=e[5];const S=C;let I;e[6]!==S||e[7]!==c||e[8]!==h||e[9]!==b?(I=async function(v){if(!v)return;const D=Array.from(v).filter(wt);if(D.length===0){Q.error("Only image files are accepted here.");return}const te=S();if(!te){c(!0);return}try{const ae=await b.mutateAsync({configId:te,file:D[0]});h(ae.publicUrl),D.length>1&&Q.info(`Uploaded ${D[0].name}; extra files were ignored (single-select field).`)}catch(ae){const me=ae;Q.error(me instanceof Error?me.message:"Upload failed")}},e[6]=S,e[7]=c,e[8]=h,e[9]=b,e[10]=I):I=e[10];const _=I;let P;e[11]!==f?(P=function(v){v.preventDefault(),v.dataTransfer.types.includes("Files")&&f(!0)},e[11]=f,e[12]=P):P=e[12];const se=P;let H;e[13]!==f?(H=function(v){v.currentTarget===v.target&&f(!1)},e[13]=f,e[14]=H):H=e[14];const ne=H;let X;e[15]!==_||e[16]!==f?(X=function(v){v.preventDefault(),f(!1),_(v.dataTransfer.files)},e[15]=_,e[16]=f,e[17]=X):X=e[17];const ie=X;let z;e[18]!==a||e[19]!==o?(z=t.jsx(Pe,{htmlFor:o,className:"text-muted-foreground",children:a}),e[18]=a,e[19]=o,e[20]=z):z=e[20];let F;e[21]!==n.description?(F=n.description&&t.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=F):F=e[22];let T;e[23]!==z||e[24]!==F?(T=t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[z,F]}),e[23]=z,e[24]=F,e[25]=T):T=e[25];const le=g&&"border-primary ring-2 ring-primary/30",re=b.isPending&&"pointer-events-none opacity-60";let E;e[26]!==le||e[27]!==re?(E=de("group relative w-full overflow-hidden rounded-xl border border-border/60 bg-muted/30 transition",le,re),e[26]=le,e[27]=re,e[28]=E):E=e[28];let L;e[29]!==y||e[30]!==m||e[31]!==p||e[32]!==x||e[33]!==a||e[34]!==j||e[35]!==u||e[36]!==c||e[37]!==r||e[38]!==b.isPending?(L=r?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"relative h-40 w-full bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",children:[!p&&t.jsx("img",{src:r,alt:a,className:de("h-full w-full object-contain transition-opacity",!x&&"opacity-0"),onLoad:()=>u(!0),onError:()=>j(!0)},r),p&&t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[t.jsx(W,{size:20}),t.jsx("p",{className:"text-xs",children:"Preview unavailable"})]}),!x&&!p&&t.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"})]}),t.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:m}),y&&t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:y})]})]}):t.jsxs("button",{type:"button",onClick:()=>c(!0),className:"flex h-40 w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[t.jsx(W,{size:20}),t.jsx("span",{className:"text-sm font-medium",children:b.isPending?"Uploading…":"Drop an image or click to browse"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPEG, WebP, GIF, SVG, AVIF — up to 100 MB"})]}),e[29]=y,e[30]=m,e[31]=p,e[32]=x,e[33]=a,e[34]=j,e[35]=u,e[36]=c,e[37]=r,e[38]=b.isPending,e[39]=L):L=e[39];let O;e[40]!==g?(O=g&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:t.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow",children:"Drop to upload"})}),e[40]=g,e[41]=O):O=e[41];let A;e[42]!==ne||e[43]!==se||e[44]!==ie||e[45]!==E||e[46]!==L||e[47]!==O?(A=t.jsxs("div",{onDragOver:se,onDragLeave:ne,onDrop:ie,className:E,children:[L,O]}),e[42]=ne,e[43]=se,e[44]=ie,e[45]=E,e[46]=L,e[47]=O,e[48]=A):A=e[48];let R;e[49]!==h?(R=U=>h(U.target.value),e[49]=h,e[50]=R):R=e[50];let G;e[51]!==o||e[52]!==r||e[53]!==R?(G=t.jsx(_e,{id:o,type:"url",value:r,onChange:R,placeholder:"https://...",className:"h-9 min-w-0 flex-1"}),e[51]=o,e[52]=r,e[53]=R,e[54]=G):G=e[54];let M;e[55]!==c?(M=()=>c(!0),e[55]=c,e[56]=M):M=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(fe,{size:14}),e[57]=Z):Z=e[57];const oe=r?"Replace":"Browse";let B;e[58]!==M||e[59]!==oe?(B=t.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:M,className:"h-9 shrink-0",children:[Z,oe]}),e[58]=M,e[59]=oe,e[60]=B):B=e[60];let V;e[61]!==h||e[62]!==r?(V=r&&t.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>h(""),className:"h-9 shrink-0","aria-label":"Remove image",children:t.jsx(Se,{size:14})}),e[61]=h,e[62]=r,e[63]=V):V=e[63];let K;e[64]!==G||e[65]!==B||e[66]!==V?(K=t.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[G,B,V]}),e[64]=G,e[65]=B,e[66]=V,e[67]=K):K=e[67];let q;e[68]!==h?(q=U=>h(U),e[68]=h,e[69]=q):q=e[69];let J;e[70]!==d||e[71]!==c||e[72]!==q?(J=t.jsx(it,{open:d,onOpenChange:c,mode:"image",onSelect:q}),e[70]=d,e[71]=c,e[72]=q,e[73]=J):J=e[73];let ee;return e[74]!==A||e[75]!==K||e[76]!==J||e[77]!==T?(ee=t.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[T,A,K,J]}),e[74]=A,e[75]=K,e[76]=J,e[77]=T,e[78]=ee):ee=e[78],ee}function wt(s){return kt.has(s.type||"")}export{it as F,Kt as I,ue as L,et as e,je as u};
|
|
1
|
+
import{e as w,q as be,a as Ne,K as ke,j as t,E as we,r as $,c as de,B as Y,l as Ce,P as Ie,o as Q}from"./index-BL7ED5Jm.js";import{a as W}from"./Tool01-D22uHwE_.js";import{s as Se}from"./Trash01-DctMpPfs.js";import{i as fe}from"./Upload01-CxqliuyJ.js";import{I as _e}from"./input-B0CAb5tP.js";import{L as Pe}from"./label-DFo6dQ5z.js";import{i as Ue}from"./AlertCircle-Df--0_5Q.js";import{i as ge}from"./Check-ZkuDtttp.js";import{a as $e}from"./Eye-CPcdeK6K.js";import{i as De}from"./DotsVertical-BGB5-qM0.js";import{G as ze}from"./agent-icon-CmNu5csL.js";import{n as Fe}from"./LinkExternal01-02045GaZ.js";import{D as Te,c as Ee,e as Le,b as Oe,a as Ae}from"./dialog-B1Nc8xMS.js";import{c as ce,a as Re,D as Ge,b as Me}from"./dropdown-menu-DAw-TsUh.js";import{S as Be}from"./skeleton-CbtmOeqp.js";import{T as Ve,a as Ke,b as qe,c as Je}from"./tabs-BTENS4uZ.js";import{u as Qe,c as Ye}from"./use-file-configs-DH5tbzz2.js";import{u as We}from"./useInfiniteQuery-CK5VjHNR.js";import{S as He,u as Xe}from"./constants-DmaRUO24.js";import{u as Ze}from"./unwrap-tool-result-BYXdCQMg.js";function et(s){if(typeof s=="string")return s;if(!s||typeof s!="object")return"";const e=s;if(Array.isArray(e.variants)){const n=e.variants,l=n.find(o=>o.rule?.__resolveType?.includes("always"));if(typeof l?.value=="string")return l.value;const i=n.find(o=>typeof o.value=="string");if(i)return i.value}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function tt(s){const e=w.c(13),{org:n}=be();let l;e[0]!==n.id||e[1]!==n.slug?(l={connectionId:He,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=l):l=e[2];const i=Xe(l);let o;e[3]!==n.id||e[4]!==s.configId?(o=ke.filePickerObjects(n.id,s.configId),e[3]=n.id,e[4]=s.configId,e[5]=o):o=e[5];const a=s.enabled!==!1&&!!s.configId;let r;e[6]!==i||e[7]!==s.configId?(r=async c=>{const{pageParam:g}=c,f=await i.callTool({name:"FILE_OBJECTS_LIST",arguments:{configId:s.configId,cursor:g??void 0}});return Ze(f)},e[6]=i,e[7]=s.configId,e[8]=r):r=e[8];let d;return e[9]!==o||e[10]!==a||e[11]!==r?(d={queryKey:o,enabled:a,staleTime:3e4,initialPageParam:null,queryFn:r,getNextPageParam:st},e[9]=o,e[10]=a,e[11]=r,e[12]=d):d=e[12],We(d)}function st(s){return s.nextCursor??void 0}function je(){const s=w.c(2),{org:e}=be();let n;return s[0]!==e?(n={mutationFn:async l=>{const i=l.file.type||"application/octet-stream",o=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(l.configId)}/upload?filename=${encodeURIComponent(l.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:l.file});if(!o.ok){const a=await o.text().catch(nt);let r=`${o.status} ${o.statusText}`;try{const d=JSON.parse(a);d.message&&(r=d.message)}catch{a&&(r=a.slice(0,200))}throw new Error(`Upload failed: ${r}`)}return await o.json()}},s[0]=e,s[1]=n):n=s[1],Ne(n)}function nt(){return""}const ue="file-picker:last-config-id";function it(s){const e=w.c(18),n=s.mode==="image"?"Pick an image":"Pick a file";let l;e[0]!==n?(l=t.jsx(Ee,{children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{children:"Upload a new file or pick one previously uploaded to a configured bucket."}),e[2]=i):i=e[2];let o;e[3]!==l?(o=t.jsxs(Oe,{children:[l,i]}),e[3]=l,e[4]=o):o=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Be,{className:"h-64 w-full"}),e[5]=a):a=e[5];let r;e[6]!==s?(r=f=>{s.onSelect(f),s.onOpenChange(!1)},e[6]=s,e[7]=r):r=e[7];let d;e[8]!==s.mode||e[9]!==r?(d=t.jsx(we,{fallback:lt,children:t.jsx($.Suspense,{fallback:a,children:t.jsx(ot,{mode:s.mode,onSelect:r})})}),e[8]=s.mode,e[9]=r,e[10]=d):d=e[10];let c;e[11]!==o||e[12]!==d?(c=t.jsxs(Ae,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[o,d]}),e[11]=o,e[12]=d,e[13]=c):c=e[13];let g;return e[14]!==s.onOpenChange||e[15]!==s.open||e[16]!==c?(g=t.jsx(Te,{open:s.open,onOpenChange:s.onOpenChange,children:c}),e[14]=s.onOpenChange,e[15]=s.open,e[16]=c,e[17]=g):g=e[17],g}function lt(s){const{error:e}=s;return t.jsx(rt,{error:e??new Error("Failed to load buckets")})}function rt(s){const e=w.c(3),{error:n}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ue,{size:16}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n.message})]}),e[1]=n.message,e[2]=i):i=e[2],i}function ot(s){const e=w.c(23),{mode:n,onSelect:l}=s,i=Qe();if(i.length===0){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(dt,{}),e[0]=u):u=e[0],u}if(i.length===1){const u=i[0];let p;return e[1]!==u||e[2]!==n||e[3]!==l?(p=t.jsx(pe,{config:u,mode:n,onSelect:l}),e[1]=u,e[2]=n,e[3]=l,e[4]=p):p=e[4],p}let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=typeof window<"u"?window.localStorage.getItem(ue):null,e[5]=o):o=e[5];const a=o;let r;e[6]!==i?(r=i.find(u=>u.id===a)?.id??i[0].id,e[6]=i,e[7]=r):r=e[7];const d=r;let c;e[8]!==i?(c=i.map(at),e[8]=i,e[9]=c):c=e[9];let g;e[10]!==c?(g=t.jsx(Ke,{className:"self-start",children:c}),e[10]=c,e[11]=g):g=e[11];let f;if(e[12]!==i||e[13]!==n||e[14]!==l){let u;e[16]!==n||e[17]!==l?(u=p=>t.jsx(qe,{value:p.id,className:"min-h-0 flex-1 overflow-hidden",children:t.jsx(pe,{config:p,mode:n,onSelect:l})},p.id),e[16]=n,e[17]=l,e[18]=u):u=e[18],f=i.map(u),e[12]=i,e[13]=n,e[14]=l,e[15]=f}else f=e[15];let x;return e[19]!==d||e[20]!==g||e[21]!==f?(x=t.jsxs(Je,{defaultValue:d,onValueChange:ct,className:"min-h-0 flex-1 flex flex-col",children:[g,f]}),e[19]=d,e[20]=g,e[21]=f,e[22]=x):x=e[22],x}function at(s){return t.jsx(Ve,{value:s.id,children:s.name},s.id)}function ct(s){typeof window<"u"&&window.localStorage.setItem(ue,s)}function dt(){const s=w.c(3);let e,n;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(fe,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No bucket configured"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Add an S3-compatible bucket in Settings before you can upload files."})]}),s[0]=e,s[1]=n):(e=s[0],n=s[1]);let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[e,n,t.jsx(Y,{asChild:!0,size:"sm",className:"mt-2",children:t.jsx(Ie,{to:"/settings/files",children:"Configure a bucket"})})]}),s[2]=l):l=s[2],l}function pe({config:s,mode:e,onSelect:n}){const l=tt({configId:s.id}),i=je(),[o,a]=$.useState(!1),r=$.useRef(null),d=e==="image"?"image/*":void 0;async function c(m){if(!m)return;const y=Array.from(m);if(y.length===0)return;let k=null;const b=[];for(const N of y)try{const h=await i.mutateAsync({configId:s.id,file:N});k??=h.publicUrl}catch(h){b.push(`${N.name} (${h instanceof Error?h.message:"upload failed"})`)}await l.refetch(),b.length>0&&Q.error(b.length===y.length?`Upload failed: ${b.join("; ")}`:`Some files failed: ${b.join("; ")}`),k&&n(k)}function g(m){m.preventDefault(),a(!0)}function f(){a(!1)}function x(m){m.preventDefault(),a(!1),c(m.dataTransfer.files)}const p=(l.data?.pages??[]).flatMap(m=>m.items),j=p.filter(m=>e==="image"?ye(m.key):!0);return t.jsxs("div",{className:"flex flex-col gap-3 min-h-0 h-full",children:[t.jsxs("button",{type:"button",onClick:()=>r.current?.click(),onDragOver:g,onDragLeave:f,onDrop:x,className:de("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",o&&"border-primary bg-primary/5",i.isPending&&"opacity-60 pointer-events-none"),children:[t.jsx(fe,{size:18,className:"text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium",children:i.isPending?"Uploading…":"Drop files here or click to upload"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to 100 MB."," ",e==="image"?"Images only (PNG, JPEG, WebP, GIF, SVG, AVIF).":"Common image, video, audio, and document types."]}),t.jsx("input",{ref:r,type:"file",accept:d,multiple:!0,className:"hidden",onChange:m=>{const y=m.target.files;m.target.value="",c(y)}})]}),l.isFetching&&!l.isFetchingNextPage?t.jsx("div",{className:"flex justify-end",children:t.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading…"})}):null,t.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[j.length===0?e==="image"&&p.length>0?t.jsx(ut,{}):t.jsx(ft,{}):e==="image"?t.jsx(gt,{items:j,onSelect:n}):t.jsx(pt,{items:j,onSelect:n}),l.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(Y,{type:"button",variant:"outline",size:"sm",disabled:l.isFetchingNextPage,onClick:()=>l.fetchNextPage(),children:l.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ce,{size:14,className:"animate-spin"}),"Loading…"]}):"Load more"})})]})]})}function ft(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(W,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No files in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Drop a file above to get started."})]}),s[0]=e):e=s[0],e}function ut(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(W,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No images in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"The bucket has other files, but none match common image formats."})]}),s[0]=e):e=s[0],e}function ye(s){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(s)}function mt(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"file":s.slice(e+1).toLowerCase()}function gt(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx(ve,{item:r,variant:"image",onSelect:l},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:i}),e[5]=i,e[6]=o):o=e[6],o}function pt(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx("li",{children:t.jsx(ve,{item:r,variant:"row",onSelect:l})},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:i}),e[5]=i,e[6]=o):o=e[6],o}function ve(s){const e=w.c(58),{item:n,variant:l,onSelect:i}=s;let o;e[0]!==n.key?(o=mt(n.key),e[0]=n.key,e[1]=o):o=e[1];const a=o;if(l==="image"){let b;e[2]!==n.publicUrl||e[3]!==i?(b=()=>i(n.publicUrl),e[2]=n.publicUrl,e[3]=i,e[4]=b):b=e[4];let N;e[5]!==n.key||e[6]!==n.publicUrl?(N=t.jsx("img",{src:n.publicUrl,alt:n.key,loading:"lazy",className:"h-full w-full object-cover",onError:xt}),e[5]=n.key,e[6]=n.publicUrl,e[7]=N):N=e[7];let h;e[8]!==n.key||e[9]!==b||e[10]!==N?(h=t.jsx("button",{type:"button",onClick:b,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:n.key,children:N}),e[8]=n.key,e[9]=b,e[10]=N,e[11]=h):h=e[11];let C;e[12]!==a?(C=t.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-[10px] font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=C):C=e[13];let S;e[14]!==n||e[15]!==i?(S=t.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx(xe,{item:n,onSelect:i})}),e[14]=n,e[15]=i,e[16]=S):S=e[16];let I;e[17]!==n.key?(I=he(n.key),e[17]=n.key,e[18]=I):I=e[18];let _;e[19]!==I?(_=t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx("p",{className:"truncate text-xs text-white",children:I})}),e[19]=I,e[20]=_):_=e[20];let P;return e[21]!==h||e[22]!==C||e[23]!==S||e[24]!==_?(P=t.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[h,C,S,_]}),e[21]=h,e[22]=C,e[23]=S,e[24]=_,e[25]=P):P=e[25],P}let r;e[26]!==n.publicUrl||e[27]!==i?(r=()=>i(n.publicUrl),e[26]=n.publicUrl,e[27]=i,e[28]=r):r=e[28];let d;e[29]!==n.key?(d=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:ye(n.key)?t.jsx(W,{size:16,className:"text-muted-foreground"}):t.jsx(ze,{size:16,className:"text-muted-foreground"})}),e[29]=n.key,e[30]=d):d=e[30];let c;e[31]!==n.key?(c=he(n.key),e[31]=n.key,e[32]=c):c=e[32];let g;e[33]!==c?(g=t.jsx("p",{className:"truncate text-sm font-medium",children:c}),e[33]=c,e[34]=g):g=e[34];let f;e[35]!==n.key?(f=t.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:n.key}),e[35]=n.key,e[36]=f):f=e[36];let x;e[37]!==g||e[38]!==f?(x=t.jsxs("div",{className:"min-w-0 flex-1",children:[g,f]}),e[37]=g,e[38]=f,e[39]=x):x=e[39];let u;e[40]!==a?(u=t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=u):u=e[41];let p;e[42]!==n.size?(p=yt(n.size),e[42]=n.size,e[43]=p):p=e[43];let j;e[44]!==p?(j=t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:p}),e[44]=p,e[45]=j):j=e[45];let m;e[46]!==j||e[47]!==r||e[48]!==d||e[49]!==x||e[50]!==u?(m=t.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[d,x,u,j]}),e[46]=j,e[47]=r,e[48]=d,e[49]=x,e[50]=u,e[51]=m):m=e[51];let y;e[52]!==n||e[53]!==i?(y=t.jsx(xe,{item:n,onSelect:i}),e[52]=n,e[53]=i,e[54]=y):y=e[54];let k;return e[55]!==m||e[56]!==y?(k=t.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-muted/50",children:[m,y]}),e[55]=m,e[56]=y,e[57]=k):k=e[57],k}function xt(s){s.target.style.display="none"}function xe(s){const e=w.c(22),{item:n,onSelect:l}=s,[i,o]=$.useState(!1);let a;e[0]!==n.publicUrl?(a=async function(b){b.preventDefault(),b.stopPropagation();try{await navigator.clipboard.writeText(n.publicUrl),o(!0),window.setTimeout(()=>o(!1),1500)}catch{Q.error("Failed to copy URL")}},e[0]=n.publicUrl,e[1]=a):a=e[1];const r=a;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Re,{asChild:!0,children:t.jsx(Y,{type:"button",variant:"ghost",size:"icon",className:"size-7 rounded-md bg-background/80 backdrop-blur-sm",onClick:jt,"aria-label":"Asset actions",children:t.jsx(De,{size:14})})}),e[2]=d):d=e[2];let c;e[3]!==n.publicUrl||e[4]!==l?(c=()=>l(n.publicUrl),e[3]=n.publicUrl,e[4]=l,e[5]=c):c=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(ge,{size:14}),e[6]=g):g=e[6];let f;e[7]!==c?(f=t.jsxs(ce,{onClick:c,children:[g,"Use this"]}),e[7]=c,e[8]=f):f=e[8];let x;e[9]!==i?(x=i?t.jsx(ge,{size:14}):t.jsx($e,{size:14}),e[9]=i,e[10]=x):x=e[10];const u=i?"Copied":"Copy URL";let p;e[11]!==r||e[12]!==x||e[13]!==u?(p=t.jsxs(ce,{onClick:r,children:[x,u]}),e[11]=r,e[12]=x,e[13]=u,e[14]=p):p=e[14];let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Fe,{size:14}),e[15]=j):j=e[15];let m;e[16]!==n.publicUrl?(m=t.jsx(ce,{asChild:!0,children:t.jsxs("a",{href:n.publicUrl,target:"_blank",rel:"noreferrer",onClick:ht,children:[j,"Open in new tab"]})}),e[16]=n.publicUrl,e[17]=m):m=e[17];let y;return e[18]!==m||e[19]!==f||e[20]!==p?(y=t.jsxs(Ge,{children:[d,t.jsxs(Me,{align:"end",onClick:bt,children:[f,p,m]})]}),e[18]=m,e[19]=f,e[20]=p,e[21]=y):y=e[21],y}function ht(s){return s.stopPropagation()}function bt(s){return s.stopPropagation()}function jt(s){return s.stopPropagation()}function he(s){const e=s.split("/");return e[e.length-1]??s}function yt(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function vt(s){try{const e=new URL(s).pathname;return decodeURIComponent(e.split("/").pop()??s)}catch{return s.split("/").pop()??s}}function Nt(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"":s.slice(e+1).toLowerCase()}const kt=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Kt(s){const e=w.c(79),{schema:n,value:l,onChange:i,path:o,label:a}=s,r=et(l),[d,c]=$.useState(!1),[g,f]=$.useState(!1),[x,u]=$.useState(!1),[p,j]=$.useState(!1),m=r?vt(r):"",y=m?Nt(m):"",k=Ye(),b=je();let N;e[0]!==i||e[1]!==j||e[2]!==u?(N=function(v){u(!1),j(!1),i(v)},e[0]=i,e[1]=j,e[2]=u,e[3]=N):N=e[3];const h=N;let C;e[4]!==k.data?.configs?(C=function(){const v=k.data?.configs??[];if(v.length===1)return v[0].id;if(v.length===0)return null;const D=typeof window<"u"?window.localStorage.getItem(ue):null;return v.some(te=>te.id===D)?D:null},e[4]=k.data?.configs,e[5]=C):C=e[5];const S=C;let I;e[6]!==S||e[7]!==c||e[8]!==h||e[9]!==b?(I=async function(v){if(!v)return;const D=Array.from(v).filter(wt);if(D.length===0){Q.error("Only image files are accepted here.");return}const te=S();if(!te){c(!0);return}try{const ae=await b.mutateAsync({configId:te,file:D[0]});h(ae.publicUrl),D.length>1&&Q.info(`Uploaded ${D[0].name}; extra files were ignored (single-select field).`)}catch(ae){const me=ae;Q.error(me instanceof Error?me.message:"Upload failed")}},e[6]=S,e[7]=c,e[8]=h,e[9]=b,e[10]=I):I=e[10];const _=I;let P;e[11]!==f?(P=function(v){v.preventDefault(),v.dataTransfer.types.includes("Files")&&f(!0)},e[11]=f,e[12]=P):P=e[12];const se=P;let H;e[13]!==f?(H=function(v){v.currentTarget===v.target&&f(!1)},e[13]=f,e[14]=H):H=e[14];const ne=H;let X;e[15]!==_||e[16]!==f?(X=function(v){v.preventDefault(),f(!1),_(v.dataTransfer.files)},e[15]=_,e[16]=f,e[17]=X):X=e[17];const ie=X;let z;e[18]!==a||e[19]!==o?(z=t.jsx(Pe,{htmlFor:o,className:"text-muted-foreground",children:a}),e[18]=a,e[19]=o,e[20]=z):z=e[20];let F;e[21]!==n.description?(F=n.description&&t.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=F):F=e[22];let T;e[23]!==z||e[24]!==F?(T=t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[z,F]}),e[23]=z,e[24]=F,e[25]=T):T=e[25];const le=g&&"border-primary ring-2 ring-primary/30",re=b.isPending&&"pointer-events-none opacity-60";let E;e[26]!==le||e[27]!==re?(E=de("group relative w-full overflow-hidden rounded-xl border border-border/60 bg-muted/30 transition",le,re),e[26]=le,e[27]=re,e[28]=E):E=e[28];let L;e[29]!==y||e[30]!==m||e[31]!==p||e[32]!==x||e[33]!==a||e[34]!==j||e[35]!==u||e[36]!==c||e[37]!==r||e[38]!==b.isPending?(L=r?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"relative h-40 w-full bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",children:[!p&&t.jsx("img",{src:r,alt:a,className:de("h-full w-full object-contain transition-opacity",!x&&"opacity-0"),onLoad:()=>u(!0),onError:()=>j(!0)},r),p&&t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[t.jsx(W,{size:20}),t.jsx("p",{className:"text-xs",children:"Preview unavailable"})]}),!x&&!p&&t.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"})]}),t.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:m}),y&&t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:y})]})]}):t.jsxs("button",{type:"button",onClick:()=>c(!0),className:"flex h-40 w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[t.jsx(W,{size:20}),t.jsx("span",{className:"text-sm font-medium",children:b.isPending?"Uploading…":"Drop an image or click to browse"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPEG, WebP, GIF, SVG, AVIF — up to 100 MB"})]}),e[29]=y,e[30]=m,e[31]=p,e[32]=x,e[33]=a,e[34]=j,e[35]=u,e[36]=c,e[37]=r,e[38]=b.isPending,e[39]=L):L=e[39];let O;e[40]!==g?(O=g&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:t.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow",children:"Drop to upload"})}),e[40]=g,e[41]=O):O=e[41];let A;e[42]!==ne||e[43]!==se||e[44]!==ie||e[45]!==E||e[46]!==L||e[47]!==O?(A=t.jsxs("div",{onDragOver:se,onDragLeave:ne,onDrop:ie,className:E,children:[L,O]}),e[42]=ne,e[43]=se,e[44]=ie,e[45]=E,e[46]=L,e[47]=O,e[48]=A):A=e[48];let R;e[49]!==h?(R=U=>h(U.target.value),e[49]=h,e[50]=R):R=e[50];let G;e[51]!==o||e[52]!==r||e[53]!==R?(G=t.jsx(_e,{id:o,type:"url",value:r,onChange:R,placeholder:"https://...",className:"h-9 min-w-0 flex-1"}),e[51]=o,e[52]=r,e[53]=R,e[54]=G):G=e[54];let M;e[55]!==c?(M=()=>c(!0),e[55]=c,e[56]=M):M=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(fe,{size:14}),e[57]=Z):Z=e[57];const oe=r?"Replace":"Browse";let B;e[58]!==M||e[59]!==oe?(B=t.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:M,className:"h-9 shrink-0",children:[Z,oe]}),e[58]=M,e[59]=oe,e[60]=B):B=e[60];let V;e[61]!==h||e[62]!==r?(V=r&&t.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>h(""),className:"h-9 shrink-0","aria-label":"Remove image",children:t.jsx(Se,{size:14})}),e[61]=h,e[62]=r,e[63]=V):V=e[63];let K;e[64]!==G||e[65]!==B||e[66]!==V?(K=t.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[G,B,V]}),e[64]=G,e[65]=B,e[66]=V,e[67]=K):K=e[67];let q;e[68]!==h?(q=U=>h(U),e[68]=h,e[69]=q):q=e[69];let J;e[70]!==d||e[71]!==c||e[72]!==q?(J=t.jsx(it,{open:d,onOpenChange:c,mode:"image",onSelect:q}),e[70]=d,e[71]=c,e[72]=q,e[73]=J):J=e[73];let ee;return e[74]!==A||e[75]!==K||e[76]!==J||e[77]!==T?(ee=t.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[T,A,K,J]}),e[74]=A,e[75]=K,e[76]=J,e[77]=T,e[78]=ee):ee=e[78],ee}function wt(s){return kt.has(s.type||"")}export{it as F,Kt as I,ue as L,et as e,je as u};
|