db-studio 1.24.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-aKKQKRJX.js +1 -0
- package/dist/web-dist/assets/_pathlessLayout-s6cwJxH6.js +2 -0
- package/dist/web-dist/assets/_queryId-DnPgn-AJ.js +1 -0
- package/dist/web-dist/assets/_table-Bgt0zJ9m.js +1 -0
- package/dist/web-dist/assets/_table-CU8PHZQE.js +1 -0
- package/dist/web-dist/assets/_table-DIbpzW3q.js +1 -0
- package/dist/web-dist/assets/abap-DQayJW6v.js +1 -0
- package/dist/web-dist/assets/apex-Djzlm7in.js +1 -0
- package/dist/web-dist/assets/azcli-Bbikkqe4.js +1 -0
- package/dist/web-dist/assets/badge-HtbO9hWg.js +1 -0
- package/dist/web-dist/assets/bat-BUFda2RT.js +1 -0
- package/dist/web-dist/assets/{bicep-DR-9-QmA.js → bicep-CuUgDHWX.js} +1 -1
- package/dist/web-dist/assets/browser-B6gU7HWo.js +1 -0
- package/dist/web-dist/assets/bundle-mjs-DEMZsBkP.js +1 -0
- package/dist/web-dist/assets/cameligo-DITobApP.js +1 -0
- package/dist/web-dist/assets/{chat-sidebar-BX995Yr1.js → chat-sidebar-Cr2fVFDF.js} +6 -6
- package/dist/web-dist/assets/clojure-DTFcSI8F.js +1 -0
- package/dist/web-dist/assets/{code-editor-DLaMoTPg.js → code-editor-BpsclD2u.js} +1 -1
- package/dist/web-dist/assets/coffee-CmIRg0oP.js +1 -0
- package/dist/web-dist/assets/connect-BM4hZPnz.js +1 -0
- package/dist/web-dist/assets/{constants-CK9YDygv.js → constants-BBxXyYPa.js} +3 -3
- package/dist/web-dist/assets/cpp-BwBWpZT1.js +1 -0
- package/dist/web-dist/assets/csharp-BnWK75m3.js +1 -0
- package/dist/web-dist/assets/csp-Dohj3XYI.js +1 -0
- package/dist/web-dist/assets/{css-BdpC37eA.js → css-DN4GbnxY.js} +1 -1
- package/dist/web-dist/assets/cssMode-CiAtMuTk.js +1 -0
- package/dist/web-dist/assets/cypher-CKAK8eD4.js +1 -0
- package/dist/web-dist/assets/dart-imWXBTLy.js +1 -0
- package/dist/web-dist/assets/database.store-73Wsz2L5.js +57 -0
- package/dist/web-dist/assets/dist-D4HUXaJv.js +1 -0
- package/dist/web-dist/assets/{dist-BW-TarB3.js → dist-DwRWhVwY.js} +1 -1
- package/dist/web-dist/assets/dockerfile-CXOK4zpC.js +1 -0
- package/dist/web-dist/assets/ecl-lOrW9o9k.js +1 -0
- package/dist/web-dist/assets/{editor.api-C3XWCrXI.js → editor.api-DSevzNN8.js} +1 -1
- package/dist/web-dist/assets/elixir-DgvzEwPU.js +1 -0
- package/dist/web-dist/assets/{esm-DvtsWsZW.js → esm-DC8GK2En.js} +1 -1
- package/dist/web-dist/assets/flow9-l3BJy5NQ.js +1 -0
- package/dist/web-dist/assets/format-cell-value-CuhjnBNV.js +1 -0
- package/dist/web-dist/assets/{freemarker2-CVTLPKvC.js → freemarker2-73G2DeCz.js} +1 -1
- package/dist/web-dist/assets/fsharp-sfou20I_.js +1 -0
- package/dist/web-dist/assets/go-DnjkNg4Q.js +1 -0
- package/dist/web-dist/assets/graphql-BJFXvNDL.js +1 -0
- package/dist/web-dist/assets/handlebars-DXg2L0KG.js +1 -0
- package/dist/web-dist/assets/hcl-B4FYtDde.js +1 -0
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-Bi4CQl8I.js +1 -0
- package/dist/web-dist/assets/html-BvAUQUXw.js +1 -0
- package/dist/web-dist/assets/htmlMode-hZ3EloXT.js +1 -0
- package/dist/web-dist/assets/icons-CheF8KGp.js +1 -0
- package/dist/web-dist/assets/index-YCx2RIFq.js +34 -0
- package/dist/web-dist/assets/index-mbFBVmHb.css +2 -0
- package/dist/web-dist/assets/indexes-BYqaS45O.js +1 -0
- package/dist/web-dist/assets/ini-H3EW14Oa.js +1 -0
- package/dist/web-dist/assets/java-Cu5qHMXc.js +1 -0
- package/dist/web-dist/assets/javascript-bJHYh6Or.js +1 -0
- package/dist/web-dist/assets/json-editor-ZcSS1MRc.js +1 -0
- package/dist/web-dist/assets/{jsonMode-CyOYWfPp.js → jsonMode-CDMOUPss.js} +1 -1
- package/dist/web-dist/assets/julia-CZ0npMib.js +1 -0
- package/dist/web-dist/assets/keys-By5o7bPm.js +1 -0
- package/dist/web-dist/assets/kotlin-BpW0qHIt.js +1 -0
- package/dist/web-dist/assets/label-C93T1BbF.js +1 -0
- package/dist/web-dist/assets/less-DTBM-Kxp.js +2 -0
- package/dist/web-dist/assets/lexon-CLOvNp8v.js +1 -0
- package/dist/web-dist/assets/liquid-IpfBCIUY.js +1 -0
- package/dist/web-dist/assets/logs-CnLvqVtL.js +1 -0
- package/dist/web-dist/assets/lspLanguageFeatures-CnYZSn_O.js +4 -0
- package/dist/web-dist/assets/lua-BERpVknn.js +1 -0
- package/dist/web-dist/assets/m3-B_gILjHh.js +1 -0
- package/dist/web-dist/assets/markdown-DamaZSqy.js +1 -0
- package/dist/web-dist/assets/mdx-BTw_ghf-.js +1 -0
- package/dist/web-dist/assets/mermaid-GHXKKRXX-B7fOqMvZ.js +1 -0
- package/dist/web-dist/assets/middleware-DKaxoFZs.js +1 -0
- package/dist/web-dist/assets/mips-BkjI-_01.js +1 -0
- package/dist/web-dist/assets/module-BbdCXsK0.js +2 -0
- package/dist/web-dist/assets/{monaco-theme-tSfqYsPo.js → monaco-theme-DkPj5STI.js} +4 -4
- package/dist/web-dist/assets/msdax-5OSOIuww.js +1 -0
- package/dist/web-dist/assets/mysql-CMtxQW5J.js +1 -0
- package/dist/web-dist/assets/objective-c-CoW52So-.js +1 -0
- package/dist/web-dist/assets/overlay.store-BL-3zX6X.js +1 -0
- package/dist/web-dist/assets/pascal-BxyU4sPJ.js +1 -0
- package/dist/web-dist/assets/pascaligo-C63_040U.js +1 -0
- package/dist/web-dist/assets/perl-ayfptt23.js +1 -0
- package/dist/web-dist/assets/personal-preferences.store-BIr71Re8.js +1 -0
- package/dist/web-dist/assets/pgsql-CPGqMVI3.js +1 -0
- package/dist/web-dist/assets/php-DA-YJ6wI.js +1 -0
- package/dist/web-dist/assets/pla-DesDCKWW.js +1 -0
- package/dist/web-dist/assets/postiats-B8yhii_n.js +1 -0
- package/dist/web-dist/assets/powerquery-CG8tCOct.js +1 -0
- package/dist/web-dist/assets/powershell-C68aZHza.js +1 -0
- package/dist/web-dist/assets/preload-helper-DZhPwQp1.js +1 -0
- package/dist/web-dist/assets/{protobuf-DvBD3fs_.js → protobuf-OaVxpJrs.js} +1 -1
- package/dist/web-dist/assets/pug-0lOSC2rA.js +1 -0
- package/dist/web-dist/assets/python-C8ab8TeJ.js +1 -0
- package/dist/web-dist/assets/qsharp-BmHeDwNl.js +1 -0
- package/dist/web-dist/assets/queries.store-Dwdw-Gej.js +1 -0
- package/dist/web-dist/assets/{query-runner-C0YRZT1P.js → query-runner-C430BH5I.js} +5 -5
- package/dist/web-dist/assets/r-DoHxhOJg.js +1 -0
- package/dist/web-dist/assets/radix-ui-ByvuE8TW.js +51 -0
- package/dist/web-dist/assets/razor-DynaHCXX.js +1 -0
- package/dist/web-dist/assets/react-CKF1H7h0.js +1 -0
- package/dist/web-dist/assets/{react-dom-B0mgdSUa.js → react-dom-DQQG0g0D.js} +1 -1
- package/dist/web-dist/assets/redis-CSL-jfR-.js +1 -0
- package/dist/web-dist/assets/redis-value-Bf0tOet0.js +1 -0
- package/dist/web-dist/assets/redshift-Cb-LWZ8f.js +1 -0
- package/dist/web-dist/assets/restructuredtext-DTqnvYsu.js +1 -0
- package/dist/web-dist/assets/rolldown-runtime-0wqQW3ea.js +1 -0
- package/dist/web-dist/assets/ruby-DbgDuslH.js +1 -0
- package/dist/web-dist/assets/runner-DFzqBXp0.js +1 -0
- package/dist/web-dist/assets/rust-CWzrsIL_.js +1 -0
- package/dist/web-dist/assets/sb-BghszYt-.js +1 -0
- package/dist/web-dist/assets/scala-Cw9RU1Qz.js +1 -0
- package/dist/web-dist/assets/schema-B_EtHxTf.js +1 -0
- package/dist/web-dist/assets/schema-iTfBKwXl.js +1 -0
- package/dist/web-dist/assets/scheme-DeYmvmAH.js +1 -0
- package/dist/web-dist/assets/{scss-bqQKlHUB.js → scss-D_S6B2H1.js} +1 -1
- package/dist/web-dist/assets/select-DU0HoKZ4.js +1 -0
- package/dist/web-dist/assets/separator-CZgXYjVQ.js +1 -0
- package/dist/web-dist/assets/sheet-sidebar-KvxY47ZZ.js +1 -0
- package/dist/web-dist/assets/shell-B59ItoUV.js +1 -0
- package/dist/web-dist/assets/solidity-De0h6YhL.js +1 -0
- package/dist/web-dist/assets/sophia-DWmKHYE0.js +1 -0
- package/dist/web-dist/assets/sparql-0sKQlAae.js +1 -0
- package/dist/web-dist/assets/spinner-FJ-tXoFX.js +1 -0
- package/dist/web-dist/assets/sql-Cafrv7gm.js +1 -0
- package/dist/web-dist/assets/st-qkFqcB41.js +1 -0
- package/dist/web-dist/assets/swift-CDPKFfVs.js +1 -0
- package/dist/web-dist/assets/systemverilog-rjtBmhAJ.js +1 -0
- package/dist/web-dist/assets/table-DmoKTp5U.js +1 -0
- package/dist/web-dist/assets/tables-By-PTDwU.js +13 -0
- package/dist/web-dist/assets/{tanstack-B9dfs2ya.js → tanstack-Cb7WFPRi.js} +1 -1
- package/dist/web-dist/assets/tcl-C0NrUCCP.js +1 -0
- package/dist/web-dist/assets/{tsMode-C7nq1NR4.js → tsMode-C2yuf0pi.js} +1 -1
- package/dist/web-dist/assets/twig-RBrBABOf.js +1 -0
- package/dist/web-dist/assets/typescript-DWkZjHjp.js +1 -0
- package/dist/web-dist/assets/typespec-DfQiGud4.js +1 -0
- package/dist/web-dist/assets/use-database-engine-Mwmv8X7V.js +1 -0
- package/dist/web-dist/assets/use-theme-BLw5dtZV.js +1 -0
- package/dist/web-dist/assets/utils-awMbhLwX.js +1 -0
- package/dist/web-dist/assets/vb-BslxQW9i.js +1 -0
- package/dist/web-dist/assets/visualizer-LoD_yU5U.js +1 -0
- package/dist/web-dist/assets/vscode-Ba8jYSS7.js +1 -0
- package/dist/web-dist/assets/{wgsl-DmW6KOpe.js → wgsl-Bq67ZIFU.js} +1 -1
- package/dist/web-dist/assets/workers-rMl5Xrk2.js +1 -0
- package/dist/web-dist/assets/xml-PfDqoe6w.js +1 -0
- package/dist/web-dist/assets/yaml-CIuY3cB5.js +1 -0
- package/dist/web-dist/index.html +31 -31
- package/package.json +2 -3
- package/dist/web-dist/assets/_pathlessLayout-BdGKkBoI.js +0 -2
- package/dist/web-dist/assets/_pathlessLayout-DR0xmAEe.js +0 -1
- package/dist/web-dist/assets/_queryId-B366cOMu.js +0 -1
- package/dist/web-dist/assets/_table--08cFUXm.js +0 -1
- package/dist/web-dist/assets/_table-BUhoKmyX.js +0 -1
- package/dist/web-dist/assets/_table-MYNamF30.js +0 -1
- package/dist/web-dist/assets/abap-Cr3Wj4u-.js +0 -1
- package/dist/web-dist/assets/apex-CkolLxTe.js +0 -1
- package/dist/web-dist/assets/azcli-EQzWRQuF.js +0 -1
- package/dist/web-dist/assets/badge-DDylQPR6.js +0 -1
- package/dist/web-dist/assets/bat-Lmimo2RD.js +0 -1
- package/dist/web-dist/assets/browser-BSPQwshU.js +0 -1
- package/dist/web-dist/assets/bundle-mjs-CkOje67l.js +0 -1
- package/dist/web-dist/assets/cameligo-BD_SJlqP.js +0 -1
- package/dist/web-dist/assets/clojure-CR2FIkS9.js +0 -1
- package/dist/web-dist/assets/coffee-_RMK1-Uq.js +0 -1
- package/dist/web-dist/assets/connect-Db8e3ev_.js +0 -1
- package/dist/web-dist/assets/cpp-Dkqi_fZY.js +0 -1
- package/dist/web-dist/assets/csharp-82U4022-.js +0 -1
- package/dist/web-dist/assets/csp-BGvk2oOh.js +0 -1
- package/dist/web-dist/assets/cssMode-B3Jx5dyf.js +0 -1
- package/dist/web-dist/assets/cypher-BK9DaNjE.js +0 -1
- package/dist/web-dist/assets/dart-BPjrsICI.js +0 -1
- package/dist/web-dist/assets/database.store-COTWzU5x.js +0 -57
- package/dist/web-dist/assets/dist-BbTrC9ET.js +0 -1
- package/dist/web-dist/assets/dockerfile-CNJRHICn.js +0 -1
- package/dist/web-dist/assets/ecl-BnT5zX3_.js +0 -1
- package/dist/web-dist/assets/elixir-1M4R8B5k.js +0 -1
- package/dist/web-dist/assets/flow9-CxVom3E4.js +0 -1
- package/dist/web-dist/assets/format-cell-value-DeIyb5qF.js +0 -1
- package/dist/web-dist/assets/fsharp-CU6NZgCg.js +0 -1
- package/dist/web-dist/assets/go-Cet0LxBY.js +0 -1
- package/dist/web-dist/assets/graphql-BRqDg70d.js +0 -1
- package/dist/web-dist/assets/handlebars-xtUVXWSH.js +0 -1
- package/dist/web-dist/assets/hcl-DqcZcEQX.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-BlIYTcDK.js +0 -1
- package/dist/web-dist/assets/html-BJ_1aKKi.js +0 -1
- package/dist/web-dist/assets/htmlMode-Hg4GfZvB.js +0 -1
- package/dist/web-dist/assets/icons-CR59yTaA.js +0 -1
- package/dist/web-dist/assets/index-BDPIeMPK.js +0 -34
- package/dist/web-dist/assets/index-DqujaEeP.css +0 -2
- package/dist/web-dist/assets/indexes-ez4OmPR7.js +0 -1
- package/dist/web-dist/assets/ini-DAVBBvGM.js +0 -1
- package/dist/web-dist/assets/java-CPUr-3oI.js +0 -1
- package/dist/web-dist/assets/javascript-CvzYHnHf.js +0 -1
- package/dist/web-dist/assets/json-editor-C-7HFGJ2.js +0 -1
- package/dist/web-dist/assets/julia-Cu-j-vXr.js +0 -1
- package/dist/web-dist/assets/keys-VBmR2NsV.js +0 -1
- package/dist/web-dist/assets/kotlin-D2vv2tT1.js +0 -1
- package/dist/web-dist/assets/label-hsxz5VOl.js +0 -1
- package/dist/web-dist/assets/less-CKzCbMvG.js +0 -2
- package/dist/web-dist/assets/lexon-DKD4i4jk.js +0 -1
- package/dist/web-dist/assets/liquid-s8v6KVAN.js +0 -1
- package/dist/web-dist/assets/logs-DlQvMAY7.js +0 -1
- package/dist/web-dist/assets/lspLanguageFeatures-D9k63sBz.js +0 -4
- package/dist/web-dist/assets/lua-BjtFPVFc.js +0 -1
- package/dist/web-dist/assets/m3-CW0-q7dZ.js +0 -1
- package/dist/web-dist/assets/markdown-0274iNTO.js +0 -1
- package/dist/web-dist/assets/mdx-CZ8q31gq.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-CQ1xUr5j.js +0 -1
- package/dist/web-dist/assets/middleware-DF6TlQS2.js +0 -1
- package/dist/web-dist/assets/mips-FR3oRusR.js +0 -1
- package/dist/web-dist/assets/module-Bek148sg.js +0 -2
- package/dist/web-dist/assets/msdax-CntWW6qe.js +0 -1
- package/dist/web-dist/assets/mysql-CJACC3-m.js +0 -1
- package/dist/web-dist/assets/objective-c-BUNGcP5B.js +0 -1
- package/dist/web-dist/assets/pascal-BKy15MaV.js +0 -1
- package/dist/web-dist/assets/pascaligo-DWESqQVQ.js +0 -1
- package/dist/web-dist/assets/perl-CBAgjcGX.js +0 -1
- package/dist/web-dist/assets/personal-preferences.store-Bfb2buXG.js +0 -1
- package/dist/web-dist/assets/pgsql-BqeSk0nE.js +0 -1
- package/dist/web-dist/assets/php-CzFJAlvL.js +0 -1
- package/dist/web-dist/assets/pla-DRvt3H-m.js +0 -1
- package/dist/web-dist/assets/postiats-ZvjXAa_2.js +0 -1
- package/dist/web-dist/assets/powerquery-DryHEA6Q.js +0 -1
- package/dist/web-dist/assets/powershell-QEI9APgx.js +0 -1
- package/dist/web-dist/assets/preload-helper-LZO0i3yF.js +0 -1
- package/dist/web-dist/assets/pug-CDF3vmYa.js +0 -1
- package/dist/web-dist/assets/python-BsOu3xjW.js +0 -1
- package/dist/web-dist/assets/qsharp-BbZVBun6.js +0 -1
- package/dist/web-dist/assets/queries.store-Dn4T9Cna.js +0 -1
- package/dist/web-dist/assets/r-CpYjNGnw.js +0 -1
- package/dist/web-dist/assets/radix-ui-CGydzmrQ.js +0 -51
- package/dist/web-dist/assets/razor-DAnkRgyU.js +0 -1
- package/dist/web-dist/assets/react-ffmTauEL.js +0 -1
- package/dist/web-dist/assets/redis-QErEcnOD.js +0 -1
- package/dist/web-dist/assets/redis-value--1z4IxUa.js +0 -1
- package/dist/web-dist/assets/redshift-CXgK11sI.js +0 -1
- package/dist/web-dist/assets/restructuredtext-BBt1qpNc.js +0 -1
- package/dist/web-dist/assets/rolldown-runtime-C5zEKjJh.js +0 -1
- package/dist/web-dist/assets/ruby-CgCIxh0i.js +0 -1
- package/dist/web-dist/assets/runner-KV8hbPPA.js +0 -1
- package/dist/web-dist/assets/rust-Copg69WU.js +0 -1
- package/dist/web-dist/assets/sb-BuyF0y3x.js +0 -1
- package/dist/web-dist/assets/scala-CZ7bI4SO.js +0 -1
- package/dist/web-dist/assets/schema-DR8Tuvdp.js +0 -1
- package/dist/web-dist/assets/schema-ruIelo5n.js +0 -1
- package/dist/web-dist/assets/scheme-BI3ohyII.js +0 -1
- package/dist/web-dist/assets/select-BedKPksO.js +0 -1
- package/dist/web-dist/assets/separator-Cd_a7h-Q.js +0 -1
- package/dist/web-dist/assets/sheet-sidebar-V9ImpjT9.js +0 -1
- package/dist/web-dist/assets/shell-CXx2Kidi.js +0 -1
- package/dist/web-dist/assets/solidity-DQP2nWvP.js +0 -1
- package/dist/web-dist/assets/sophia-DA8TX309.js +0 -1
- package/dist/web-dist/assets/sparql-CVI98ZbO.js +0 -1
- package/dist/web-dist/assets/spinner-J26L87h5.js +0 -1
- package/dist/web-dist/assets/sql-BRi0aIjG.js +0 -1
- package/dist/web-dist/assets/st-DlSkr5cV.js +0 -1
- package/dist/web-dist/assets/swift-DrB4uoi-.js +0 -1
- package/dist/web-dist/assets/systemverilog-DHk_Dhpc.js +0 -1
- package/dist/web-dist/assets/table-CT86qs6B.js +0 -1
- package/dist/web-dist/assets/tables-TbUO18cr.js +0 -13
- package/dist/web-dist/assets/tcl-BB6i8hBF.js +0 -1
- package/dist/web-dist/assets/tooltip-Bcb91KP1.js +0 -1
- package/dist/web-dist/assets/twig-DtkDzK6Y.js +0 -1
- package/dist/web-dist/assets/typescript-CfEpyYkn.js +0 -1
- package/dist/web-dist/assets/typespec-Cxei4Exd.js +0 -1
- package/dist/web-dist/assets/use-database-engine-Ds7pAy-l.js +0 -1
- package/dist/web-dist/assets/use-theme-BrgSRf8C.js +0 -1
- package/dist/web-dist/assets/utils-Bcpfbua-.js +0 -1
- package/dist/web-dist/assets/vb-CAxS_9xB.js +0 -1
- package/dist/web-dist/assets/visualizer-DMSktlIB.js +0 -1
- package/dist/web-dist/assets/vscode-D8MAi5Oo.js +0 -1
- package/dist/web-dist/assets/workers-9Tb8vu2S.js +0 -1
- package/dist/web-dist/assets/xml-Awyed4za.js +0 -1
- package/dist/web-dist/assets/yaml-VoM4GTAy.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as n}from"./tanstack-Cb7WFPRi.js";import{jt as a}from"./radix-ui-ByvuE8TW.js";import{t as o}from"./use-database-engine-Mwmv8X7V.js";import"./index-YCx2RIFq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a4ba724e-d30b-4f65-830b-f89adc4095de",e._sentryDebugIdIdentifier="sentry-dbid-a4ba724e-d30b-4f65-830b-f89adc4095de")}catch{}})();var r=a();function b(){return o()?.dataModel==="key-value"?(0,r.jsx)(n,{to:"/browser"}):(0,r.jsx)("main",{className:"flex-1 flex items-center justify-center",children:"Select a tab to get started"})}export{b as component};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chat-sidebar-Cr2fVFDF.js","assets/rolldown-runtime-0wqQW3ea.js","assets/icons-CheF8KGp.js","assets/radix-ui-ByvuE8TW.js","assets/bundle-mjs-DEMZsBkP.js","assets/utils-awMbhLwX.js","assets/overlay.store-BL-3zX6X.js","assets/react-CKF1H7h0.js","assets/sheet-sidebar-KvxY47ZZ.js","assets/label-C93T1BbF.js","assets/constants-BBxXyYPa.js","assets/database.store-73Wsz2L5.js","assets/preload-helper-DZhPwQp1.js","assets/separator-CZgXYjVQ.js","assets/index-YCx2RIFq.js","assets/tanstack-Cb7WFPRi.js","assets/react-dom-DQQG0g0D.js","assets/dist-D4HUXaJv.js","assets/spinner-FJ-tXoFX.js","assets/dist-DwRWhVwY.js","assets/schema-B_EtHxTf.js","assets/badge-HtbO9hWg.js","assets/use-database-engine-Mwmv8X7V.js","assets/keys-By5o7bPm.js","assets/format-cell-value-CuhjnBNV.js","assets/tables-By-PTDwU.js","assets/select-DU0HoKZ4.js","assets/middleware-DKaxoFZs.js","assets/personal-preferences.store-BIr71Re8.js","assets/vscode-Ba8jYSS7.js","assets/use-theme-BLw5dtZV.js","assets/index-mbFBVmHb.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as cs,r as ds}from"./rolldown-runtime-0wqQW3ea.js";import{_ as oe,b as he,f as us,g as qe,n as hs,s as J,v as te,w as ms}from"./tanstack-Cb7WFPRi.js";import{$ as xs,A as fs,Ct as bs,E as ee,Et as ps,G as gs,H as vs,It as js,N as ys,Ot as Cs,P as He,Q as Ss,R as Ns,T as Ve,X as ws,Z as Ue,_ as ks,a as Ts,b as Ne,bt as Fe,ct as Es,f as _s,g as Ds,k as we,m as Rs,mt as Is,nt as Os,p as Fs,r as As,rt as Ls,s as ke,tt as Ms,ut as zs,v as Ps,x as $s}from"./icons-CheF8KGp.js";import{a as Ks,i as Qs,jt as Bs,n as qs,o as Hs,r as Vs,t as Us}from"./radix-ui-ByvuE8TW.js";import{n as z}from"./dist-D4HUXaJv.js";import{t as T}from"./utils-awMbhLwX.js";import{t as Gs}from"./spinner-FJ-tXoFX.js";import{a as Te,c as Ee,n as S,o as _e,t as Z}from"./overlay.store-BL-3zX6X.js";import{n as L}from"./dist-DwRWhVwY.js";import{C as Ws,G as V,J as U,K as G,S as Ys,W,Y,c as Ge,d as Ce,f as We,h as Ye,l as Xs,m as Xe,n as Js,p as Je,q as X,s as Ze,u as R,v as De}from"./schema-B_EtHxTf.js";import{n as M,t as Ae}from"./label-C93T1BbF.js";import{i as Zs,n as et,s as st,t as tt}from"./sheet-sidebar-KvxY47ZZ.js";import{c as at,d as se,l as rt,r as nt,s as es,u as lt}from"./tables-By-PTDwU.js";import{B as it,r as ot,t as I}from"./constants-BBxXyYPa.js";import{i as ct,t as ss}from"./database.store-73Wsz2L5.js";import{t as dt}from"./preload-helper-DZhPwQp1.js";import{c as ut,d as ht,f as mt,l as xt,o as ft,p as bt,s as pt,t as gt,u as vt}from"./badge-HtbO9hWg.js";import{a as ae,i as re,n as ne,r as P,t as le}from"./select-DU0HoKZ4.js";import{t as Q}from"./use-database-engine-Mwmv8X7V.js";import{t as jt}from"./keys-By5o7bPm.js";import{r as yt,t as Ct}from"./separator-CZgXYjVQ.js";import{r as Re}from"./personal-preferences.store-BIr71Re8.js";import{t as St}from"./use-theme-BLw5dtZV.js";import{S as Nt,a as wt,b as kt,c as Tt,g as Et,h as _t,l as Dt,p as Rt,u as It,v as q,x as H,y as Le}from"./index-YCx2RIFq.js";import{t as me}from"./queries.store-Dwdw-Gej.js";import{i as Ot,n as je,o as Ft,r as At,s as Lt}from"./redis-value-Bf0tOet0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="e1245d49-f6b0-47d2-93cc-0839c894f12a",s._sentryDebugIdIdentifier="sentry-dbid-e1245d49-f6b0-47d2-93cc-0839c894f12a")}catch{}})();var Me={AUTHOR:"Hüsam 🥑 <husam@ql3.dev>",AUTHOR_NAME:"Hüsam",AUTHOR_AVATAR:"/avocado.png",AUTHOR_USERNAME:"husamql3",AUTHOR_GITHUB_LINK:"https://github.com/husamql3",SITE_DESCRIPTION:"Every database. One studio. Browse tables, edit records, and run queries in a free, open-source database GUI.",SITE_KEYWORDS:["database studio","database client","database gui","database browser","sql editor","postgresql client","mysql client","table editor","ai sql","er diagram"],SITE_TITLE:"db-studio",SITE_NAME:"dbstudio.sh",SITE_URL:"https://dbstudio.sh",SITE_X_LINK:"https://x.com/dbstudio_sh",SITE_GITHUB_LINK:"https://github.com/husamql3/db-studio",SITE_GITHUB_NEW_ISSUE_LINK:"https://github.com/husamql3/db-studio/issues/new/choose",SITE_DOCS_LINK:"https://dbstudio.sh/docs",SITE_CHANGELOG_LINK:"https://dbstudio.sh/changelog",SITE_ROADMAP_LINK:"https://dbstudio.sh/roadmap",SITE_IMAGE:"https://dbstudio.sh/og-image.png",SITE_IMAGE_WIDTH:"1200",SITE_IMAGE_HEIGHT:"630",SITE_IMAGE_ALT:"db-studio | Every database. One studio",SITE_COLOR:"#1447e6"},l=ds(js(),1),Mt=({enabled:s=!0}={})=>{const{data:t,isLoading:a,error:r,refetch:n}=ms({queryKey:jt.rateLimit(),queryFn:async()=>(await it()).data,enabled:s});return{rateLimit:t,isLoadingRateLimit:a,errorRateLimit:r,refetchRateLimit:n}},ts={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ze=l.createContext&&l.createContext(ts),zt=["attr","size","title"];function Pt(s,t){if(s==null)return{};var a,r,n=$t(s,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(s);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(s,a)&&(n[a]=s[a])}return n}function $t(s,t){if(s==null)return{};var a={};for(var r in s)if({}.hasOwnProperty.call(s,r)){if(t.indexOf(r)!==-1)continue;a[r]=s[r]}return a}function de(){return de=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(s[r]=a[r])}return s},de.apply(null,arguments)}function Pe(s,t){var a=Object.keys(s);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),a.push.apply(a,r)}return a}function ue(s){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(a),!0).forEach(function(r){Kt(s,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(a)):Pe(Object(a)).forEach(function(r){Object.defineProperty(s,r,Object.getOwnPropertyDescriptor(a,r))})}return s}function Kt(s,t,a){return(t=Qt(t))in s?Object.defineProperty(s,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):s[t]=a,s}function Qt(s){var t=Bt(s,"string");return typeof t=="symbol"?t:t+""}function Bt(s,t){if(typeof s!="object"||!s)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var r=a.call(s,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(s)}function as(s){return s&&s.map((t,a)=>l.createElement(t.tag,ue({key:a},t.attr),as(t.child)))}function qt(s){return t=>l.createElement(Ht,de({attr:ue({},s.attr)},t),as(s.child))}function Ht(s){var t=a=>{var{attr:r,size:n,title:o}=s,c=Pt(s,zt),i=n||a.size||"1em",d;return a.className&&(d=a.className),s.className&&(d=(d?d+" ":"")+s.className),l.createElement("svg",de({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},a.attr,r,c,{className:d,style:ue(ue({color:s.color||a.color},a.style),s.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),o&&l.createElement("title",null,o),s.children)};return ze!==void 0?l.createElement(ze.Consumer,null,a=>t(a)):t(ts)}function Vt(s){return qt({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"},child:[]},{tag:"path",attr:{d:"M9 18c-4.51 2-5-2-7-2"},child:[]}]})(s)}var e=Bs(),Se=()=>dt(()=>import("./chat-sidebar-Cr2fVFDF.js").then(s=>s.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])),Ut=(0,l.lazy)(()=>Se().then(s=>({default:s.ChatSidebar}))),Gt=()=>{const{openOverlay:s,isOverlayOpen:t}=Z(),[a,r]=(0,l.useState)(!1);t("chat.assistant")&&!a&&r(!0);const{dbType:n}=ss(),{provider:o}=Dt(),c=It(Rt),i=wt(),d=c.status[o],h=d?.state==="set"||d?.state==="locked",{rateLimit:g,isLoadingRateLimit:m,errorRateLimit:f}=Mt({enabled:i&&o==="gemini"&&!h}),{remaining:p=0,limit:x=0}=g??{remaining:0,limit:0},y=h?"bg-emerald-500":m||f?"bg-zinc-500":o!=="gemini"||p===0?"bg-red-500":p<=5?"bg-yellow-500":"bg-emerald-500";return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(Te,{children:[(0,e.jsx)(Ee,{asChild:!0,children:(0,e.jsxs)(S,{variant:"ghost",className:"rounded-none size-12 relative text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Open AI assistant",onPointerEnter:Se,onFocus:Se,onClick:()=>{s("chat.assistant"),n&&ct.capture("chat_opened",{db_type:n})},children:[(0,e.jsx)(ks,{className:"size-5"}),(0,e.jsx)("span",{"data-testid":"chat-status-indicator",className:T("absolute top-2 right-2 h-2 w-2 rounded-full ring-2 ring-background",y)})]})}),(0,e.jsx)(_e,{side:"right",className:"text-xs",children:h?(0,e.jsxs)("p",{children:["AI Assistant · personal ",o," key"]}):!m&&!f?p>0?(0,e.jsxs)("p",{children:[p,"/",x," messages remaining"]}):(0,e.jsx)("p",{children:"AI Assistant"}):(0,e.jsx)("p",{children:"AI status unavailable"})})]}),a&&(0,e.jsx)(l.Suspense,{children:(0,e.jsx)(Ut,{})})]})},Wt={table:_s,runner:Ds,schema:zs,indexes:Ns,logs:$s,visualizer:As,browser:Ss},xe="relative flex size-12 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",Ie=({label:s,children:t})=>(0,e.jsxs)(Te,{children:[(0,e.jsx)(Ee,{asChild:!0,children:t}),(0,e.jsx)(_e,{side:"right",children:(0,e.jsx)("p",{className:"capitalize",children:s})})]}),Yt=()=>{const{pathname:s}=J(),t=he({strict:!1}),a=Q(),r=s.split("/")[1]||"table",n=a?.dataModel==="key-value"?["browser","runner","logs"]:ot.filter(i=>(i!=="indexes"||a?.indexes)&&(i!=="logs"||a?.serverLogs)),o=t.table,c=De();return n.map(i=>{const d=Wt[i],h=(i==="table"||i==="schema"||i==="indexes")&&o,g=r===i;return(0,e.jsx)(Ie,{label:i,children:(0,e.jsx)(qe,{to:h?`/${i}/$table`:`/${i}`,params:h?{table:o}:void 0,search:h?{[I.TABLE_SCHEMA]:c}:void 0,"aria-label":i,"aria-current":g?"page":void 0,className:T(xe,g&&"bg-muted text-foreground"),children:(0,e.jsx)(d,{className:"size-5"})})},i)})},Xt=()=>{const{sidebar:{isOpen:s},setSidebarOpen:t,setSidebarPinned:a}=Re();return(0,e.jsx)(Ie,{label:s?"Hide sidebar":"Show sidebar",children:(0,e.jsx)("button",{type:"button","aria-label":"Toggle sidebar",className:xe,onClick:()=>{t(!s),a(!s)},children:(0,e.jsx)(fs,{className:"size-5"})})})},$e=[{value:"light",label:"Light",icon:Fs},{value:"dark",label:"Dark",icon:ys},{value:"system",label:"System",icon:He}],Jt=()=>{const{theme:s,setTheme:t}=St(),a=$e.find(r=>r.value===s)?.icon??He;return(0,e.jsxs)(Ze,{children:[(0,e.jsx)(Ye,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":"More",className:xe,children:(0,e.jsx)(Ms,{className:"size-5"})})}),(0,e.jsxs)(Ge,{side:"right",align:"end",sideOffset:8,className:"w-48",children:[(0,e.jsxs)(We,{children:[(0,e.jsxs)(Xe,{children:[(0,e.jsx)(a,{}),"Theme"]}),(0,e.jsx)(Je,{children:$e.map(({value:r,label:n,icon:o})=>(0,e.jsxs)(R,{onClick:()=>t(r),children:[(0,e.jsx)(o,{}),n,s===r&&(0,e.jsx)(bs,{className:"ml-auto"})]},r))})]}),(0,e.jsx)(Ce,{}),(0,e.jsx)(R,{asChild:!0,children:(0,e.jsxs)("a",{href:Me.SITE_GITHUB_NEW_ISSUE_LINK,target:"_blank",rel:"noopener noreferrer",children:[(0,e.jsx)(ps,{}),"Report a bug"]})}),(0,e.jsx)(R,{asChild:!0,children:(0,e.jsxs)("a",{href:Me.SITE_GITHUB_LINK,target:"_blank",rel:"noopener noreferrer",children:[(0,e.jsx)(Vt,{}),"View on GitHub"]})})]})]})},Ke=()=>(0,e.jsx)("div",{className:"h-px w-full shrink-0 bg-border"}),Zt=()=>{const{openOverlay:s}=Z(),{pathname:t}=J(),a=t.split("/")[1]!=="visualizer";return(0,e.jsxs)("nav",{"aria-label":"Main",className:"flex shrink-0 flex-col border-r border-border bg-background",style:{width:I.RAIL_WIDTH},children:[a&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Xt,{}),(0,e.jsx)(Ke,{})]}),(0,e.jsx)(Yt,{}),(0,e.jsxs)("div",{className:"mt-auto flex flex-col",children:[(0,e.jsx)(Ke,{}),(0,e.jsx)(Gt,{}),(0,e.jsx)(Ie,{label:"Settings",children:(0,e.jsx)("button",{type:"button","aria-label":"Open settings",className:xe,onClick:()=>s("settings.app"),children:(0,e.jsx)(Ps,{className:"size-5"})})}),(0,e.jsx)(Jt,{})]})]})};function rs({...s}){return(0,e.jsx)(Qs,{"data-slot":"context-menu",...s})}function ns({className:s,...t}){return(0,e.jsx)(Hs,{"data-slot":"context-menu-trigger",className:T("select-none",s),...t})}function ls({className:s,...t}){return(0,e.jsx)(Vs,{children:(0,e.jsx)(Us,{"data-slot":"context-menu-content",className:T("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-150 data-closed:duration-100 ease-out z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",s),...t})})}function $({className:s,inset:t,variant:a="default",...r}){return(0,e.jsx)(qs,{"data-slot":"context-menu-item","data-inset":t,"data-variant":a,className:T("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-sm px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",s),...r})}function Qe({className:s,...t}){return(0,e.jsx)(Ks,{"data-slot":"context-menu-separator",className:T("bg-border/50 -mx-1 my-1 h-px",s),...t})}var ye=({folderId:s,isExpanded:t,onToggle:a,count:r,name:n,showContextMenu:o=!1})=>{const c=te(),{deleteFolder:i,getQueriesByFolder:d,addQuery:h,updateFolder:g}=me(),[m,f]=(0,l.useState)(!1),[p,x]=(0,l.useState)(""),[v,y]=(0,l.useState)(!1),b=(0,l.useCallback)(()=>{if(s){if(d(s).length>0){y(!0);return}i(s)}},[i,s,d]),w=(0,l.useCallback)(()=>{s&&(i(s),y(!1))},[i,s]),E=(0,l.useCallback)(()=>{const k=h(void 0,s);c({to:"/runner/$queryId",params:{queryId:k}})},[h,s,c]),u=(0,l.useCallback)(()=>{x(n),f(!0)},[n]),j=(0,l.useCallback)(()=>{s&&p.trim()&&(g(s,{name:p.trim()}),f(!1),x(""))},[s,p,g]);return(0,e.jsxs)(e.Fragment,{children:[o?(0,e.jsxs)(rs,{children:[(0,e.jsx)(ns,{asChild:!0,children:(0,e.jsxs)("button",{type:"button",onClick:a,className:T("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-sidebar-accent/50 hover:text-sidebar-foreground focus:outline-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground","text-sidebar-foreground/70 items-center"),children:[(0,e.jsx)(Fe,{className:T("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,e.jsx)("span",{className:"flex-1",children:n}),(0,e.jsx)(se,{children:r})]})}),(0,e.jsxs)(ls,{children:[(0,e.jsxs)($,{onClick:E,children:[(0,e.jsx)(ee,{className:"size-4"}),"Add a new query"]}),(0,e.jsxs)($,{onClick:u,children:[(0,e.jsx)(we,{className:"size-4"}),"Rename folder"]}),(0,e.jsxs)($,{onClick:b,children:[(0,e.jsx)(ke,{className:"size-4"}),"Delete folder"]})]})]}):(0,e.jsxs)("button",{type:"button",onClick:a,className:T("w-full flex gap-2 px-4 py-2 text-sm transition-colors text-left","hover:bg-sidebar-accent/50 hover:text-sidebar-foreground focus:outline-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground","text-sidebar-foreground/70 items-center"),children:[(0,e.jsx)(Fe,{className:T("size-4 transition-transform duration-200",t?"rotate-90":"")}),(0,e.jsx)("span",{className:"flex-1",children:n}),(0,e.jsx)(se,{children:r})]}),(0,e.jsx)(W,{open:m,onOpenChange:f,children:(0,e.jsxs)(V,{children:[(0,e.jsxs)(U,{children:[(0,e.jsx)(Y,{children:"Rename Folder"}),(0,e.jsx)(G,{children:"Enter a new name for this folder."})]}),(0,e.jsx)(M,{value:p,onChange:k=>x(k.target.value),placeholder:"Folder name",onKeyDown:k=>{k.key==="Enter"&&j()},autoFocus:!0}),(0,e.jsxs)(X,{children:[(0,e.jsx)(S,{variant:"outline",onClick:()=>{f(!1),x("")},children:"Cancel"}),(0,e.jsx)(S,{onClick:j,disabled:!p.trim(),children:"Rename"})]})]})}),(0,e.jsx)(ft,{open:v,onOpenChange:y,children:(0,e.jsxs)(xt,{children:[(0,e.jsxs)(mt,{children:[(0,e.jsx)(bt,{children:"Delete Folder"}),(0,e.jsxs)(vt,{children:["This folder contains ",r," ",r===1?"query":"queries",". Deleting this folder will also delete all queries inside it. This action cannot be undone."]})]}),(0,e.jsxs)(ht,{children:[(0,e.jsx)(ut,{children:"Cancel"}),(0,e.jsx)(pt,{onClick:w,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Folder"})]})]})})]})},ce=({id:s,tableName:t,isNested:a=!1,showContextMenu:r=!0})=>{const n=te(),{deleteQuery:o,addQuery:c,getQuery:i,toggleFavorite:d,updateQuery:h,moveQuery:g,folders:m,addFolder:f}=me(),{queryId:p}=he({strict:!1}),x=p===s,v=i(s),y=v?.isFavorite??!1,[b,w]=(0,l.useState)(!1),[E,u]=(0,l.useState)(""),[j,k]=(0,l.useState)(!1),[B,O]=(0,l.useState)(void 0),[F,_]=(0,l.useState)(!1),[D,A]=(0,l.useState)(""),ie=(0,l.useCallback)(()=>{n({to:"/runner/$queryId",params:{queryId:s}})},[n,s]),fe=(0,l.useCallback)(()=>{o(s),p===s&&n({to:"/runner"}),z.success("Query deleted successfully")},[o,s,n,p]),be=(0,l.useCallback)(()=>{const C=i(s),os=c(`${C?.name} (Copy)`);n({to:"/runner/$queryId",params:{queryId:os}}),z.success("Query duplicated successfully")},[c,i,n,s]),pe=(0,l.useCallback)(()=>{d(s),z.success("Query favorited successfully")},[d,s]),ge=(0,l.useCallback)(()=>{u(v?.name??""),w(!0)},[v?.name]),N=(0,l.useCallback)(()=>{E.trim()&&(h(s,{name:E.trim()}),w(!1),u(""),z.success("Query renamed successfully"))},[s,E,h]),ve=(0,l.useCallback)(()=>{O(v?.folderId),_(!1),A(""),k(!0)},[v?.folderId]),is=(0,l.useCallback)(C=>{C==="__create_new__"?(_(!0),O(void 0)):(_(!1),O(C==="__none__"?void 0:C))},[]),Oe=(0,l.useCallback)(()=>{if(F&&D.trim()){const C=Math.random().toString(36).substring(2,15);f({id:C,name:D.trim(),isExpanded:!0,isFavorite:!1}),g(s,C),z.success("Query moved to new folder successfully")}else F||(g(s,B),z.success("Query moved to selected folder successfully"));k(!1),_(!1),A(""),O(void 0)},[F,D,B,s,f,g]);return(0,e.jsxs)("li",{className:"relative",children:[r?(0,e.jsxs)(rs,{children:[(0,e.jsx)(ns,{asChild:!0,children:(0,e.jsxs)("button",{type:"button",onClick:ie,className:T("w-full flex gap-2 py-2 text-sm transition-colors text-left justify-start items-center focus:outline-none",x?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground",a?"px-4 pl-12":"px-4"),children:[x&&(0,e.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,e.jsx)("span",{className:"flex-1",children:t})]})}),(0,e.jsxs)(ls,{children:[(0,e.jsxs)($,{onClick:ge,children:[(0,e.jsx)(we,{className:"size-4"}),"Rename query"]}),(0,e.jsxs)($,{onClick:be,children:[(0,e.jsx)(Es,{className:"size-4"}),"Duplicate query"]}),(0,e.jsxs)($,{onClick:pe,children:[(0,e.jsx)(Rs,{className:y?"size-4 fill-current":"size-4"}),y?"Remove from favorites":"Add to favorites"]}),(0,e.jsx)(Qe,{}),(0,e.jsxs)($,{onClick:ve,children:[(0,e.jsx)(ws,{className:"size-4"}),"Move to folder"]}),(0,e.jsx)(Qe,{}),(0,e.jsxs)($,{onClick:fe,children:[(0,e.jsx)(ke,{className:"size-4"}),"Delete query"]})]})]}):(0,e.jsxs)("button",{type:"button",onClick:ie,className:T("w-full flex gap-2 py-2 text-sm transition-colors text-left justify-start items-center focus:outline-none",x?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground",a?"px-4 pl-12":"px-4"),children:[x&&(0,e.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary"}),(0,e.jsx)("span",{className:"flex-1",children:t})]}),(0,e.jsx)(W,{open:b,onOpenChange:w,children:(0,e.jsxs)(V,{children:[(0,e.jsxs)(U,{children:[(0,e.jsx)(Y,{children:"Rename Query"}),(0,e.jsx)(G,{children:"Enter a new name for this query."})]}),(0,e.jsx)(M,{value:E,onChange:C=>u(C.target.value),placeholder:"Query name",onKeyDown:C=>{C.key==="Enter"&&N()},autoFocus:!0}),(0,e.jsxs)(X,{children:[(0,e.jsx)(S,{variant:"outline",onClick:()=>{w(!1),u("")},children:"Cancel"}),(0,e.jsx)(S,{onClick:N,disabled:!E.trim(),children:"Rename"})]})]})}),(0,e.jsx)(W,{open:j,onOpenChange:C=>{k(C),C||(_(!1),A(""),O(void 0))},children:(0,e.jsxs)(V,{children:[(0,e.jsxs)(U,{children:[(0,e.jsx)(Y,{children:"Move to Folder"}),(0,e.jsx)(G,{children:"Select a folder to move this query to."})]}),(0,e.jsx)("div",{className:"space-y-4",children:F?(0,e.jsx)(M,{value:D,onChange:C=>A(C.target.value),placeholder:"Folder name",onKeyDown:C=>{C.key==="Enter"&&D.trim()&&Oe(),C.key==="Escape"&&(_(!1),A(""))},autoFocus:!0}):(0,e.jsxs)(le,{value:B??"__none__",onValueChange:is,children:[(0,e.jsx)(re,{className:"w-full",children:(0,e.jsx)(ae,{placeholder:"Select a folder"})}),(0,e.jsxs)(ne,{children:[(0,e.jsx)(P,{value:"__none__",children:"No folder"}),m.map(C=>(0,e.jsx)(P,{value:C.id,children:C.name},C.id)),(0,e.jsx)(P,{value:"__create_new__",children:(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(Ue,{className:"size-4"}),"Create a new folder"]})})]})]})}),(0,e.jsxs)(X,{children:[(0,e.jsx)(S,{variant:"outline",onClick:()=>{k(!1),_(!1),A(""),O(void 0)},children:"Cancel"}),(0,e.jsx)(S,{onClick:Oe,disabled:F&&!D.trim(),children:F?"Create & Move":"Move"})]})]})})]})},ea=()=>{const[s]=L(I.SIDEBAR_SEARCH,{defaultValue:""}),{folders:t,queries:a,getFavoriteQueries:r,getQueriesByFolder:n,toggleFolder:o}=me(),[c,i]=(0,l.useState)(!0),[d,h]=(0,l.useState)(!0),g=a.filter(x=>!x.isFavorite).length,m=r(),f=m.length,p=a.filter(x=>!x.folderId&&!x.isFavorite);if(s){const x=a.filter(v=>v.name.toLowerCase().includes(s.toLowerCase()));return x.length===0?(0,e.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:"No queries found matching"}):(0,e.jsx)("div",{className:"flex-1 overflow-y-auto",children:x.map(v=>(0,e.jsx)(ce,{id:v.id,tableName:v.name},v.id))})}return(0,e.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,e.jsx)(ye,{name:"Favorites",isExpanded:c,onToggle:()=>i(!c),count:f}),c&&m.map(x=>(0,e.jsx)(ce,{id:x.id,tableName:x.name},x.id)),(0,e.jsx)(Ct,{className:"bg-sidebar-border"}),(0,e.jsx)(ye,{name:"Queries",isExpanded:d,onToggle:()=>h(!d),count:g}),d&&(0,e.jsxs)(e.Fragment,{children:[t.map(x=>{const v=n(x.id),y=v.length;return(0,e.jsxs)("div",{children:[(0,e.jsx)(ye,{folderId:x.id,name:x.name,isExpanded:x.isExpanded,onToggle:()=>o(x.id),count:y,showContextMenu:!0}),x.isExpanded&&v.map(b=>(0,e.jsx)(ce,{id:b.id,tableName:b.name,isNested:!0,showContextMenu:!0},b.id))]},x.id)}),p.map(x=>(0,e.jsx)(ce,{id:x.id,tableName:x.name,showContextMenu:!0},x.id))]})]})},sa=()=>{const{addQuery:s,addFolder:t}=me(),a=te(),r=(0,l.useRef)(null),[n,o]=L(I.SIDEBAR_SEARCH,{defaultValue:""}),c=h=>{o(h.target.value)},i=()=>{const h=s();a({to:"/runner/$queryId",params:{queryId:h}})},d=()=>{const h=Math.random().toString(36).substring(2,15);t({id:h,name:"New Folder",isExpanded:!0,isFavorite:!1})};return(0,e.jsxs)("div",{className:"p-3 space-y-2 border-b border-sidebar-border",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsxs)(S,{className:"flex-1 justify-start h-8",onClick:i,children:[(0,e.jsx)(ee,{className:"size-4"}),"Add Query"]}),(0,e.jsxs)(S,{className:"flex-1 justify-start h-8",onClick:d,children:[(0,e.jsx)(Ue,{className:"size-4"}),"Add Folder"]})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)(Ne,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,e.jsx)(M,{ref:r,placeholder:"Search queries",value:n??"",onChange:c,className:"rounded-sm h-8 pl-8 pr-8"}),(0,e.jsx)(se,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]})]})},ta=()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(sa,{}),(0,e.jsx)(ea,{})]}),aa=({tableName:s,schemaName:t})=>{const a=te(),r=he({strict:!1}),{pathname:n}=J(),o=De(),{copyTableSchema:c,isCopyingSchema:i}=Nt(),{exportFile:d,isExportingFile:h}=rt(),{deleteTable:g,forceDeleteTable:m,isDeletingTable:f}=lt(),{renameTable:p,isRenamingTable:x}=at({tableName:s,schemaName:t}),{openOverlay:v,closeOverlay:y,isOverlayOpen:b}=Z(),{setEditingTable:w}=Ws(),E=Js(),[u,j]=(0,l.useState)(s),[k,B]=(0,l.useState)([]),O=t?`${t}.${s}`:s,F=`tables.rename-table.${O}`,_=`tables.delete-table.${O}`,D=`tables.force-delete-table.${O}`,A=N=>{N?(j(s),v(F)):y(F)},ie=async()=>{const N=u.trim();if(!(!N||N===s))try{if(await p({newTableName:N,schemaName:t}),A(!1),r.table===s&&o===t){const ve=n.startsWith("/schema")?"/schema/$table":n.startsWith("/indexes")?"/indexes/$table":"/table/$table";a({to:ve,params:{table:N},search:{[I.TABLE_SCHEMA]:t}})}}catch{}},fe=()=>{navigator.clipboard.writeText(s),z.success("Table name copied to clipboard")},be=async()=>{const N=await g(s,t);N.fkViolation?(B(N.relatedRecords),y(_),v(D)):(y(_),a({to:"/"}))},pe=async()=>{await m(s,t),y(D),a({to:"/"})},ge=()=>{y(D),B([])};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(Ze,{children:[(0,e.jsx)(Ye,{asChild:!0,children:(0,e.jsx)(S,{variant:"ghost",size:"icon-sm",onClick:N=>{N.stopPropagation(),N.preventDefault()},onPointerDown:N=>{N.stopPropagation()},children:(0,e.jsx)(Os,{})})}),(0,e.jsx)(Ge,{className:"w-56",align:"start",children:(0,e.jsxs)(Xs,{children:[(0,e.jsxs)(R,{onClick:fe,children:[(0,e.jsx)(Is,{className:"size-4"}),"Copy name"]}),(0,e.jsxs)(R,{onClick:()=>c(s,t),disabled:i,children:[(0,e.jsx)(xs,{className:"size-4"}),"Copy table schema"]}),(0,e.jsx)(Ce,{}),(0,e.jsxs)(R,{onClick:()=>A(!0),children:[(0,e.jsx)(Ts,{className:"size-4"}),"Rename table"]}),!E&&(0,e.jsxs)(R,{onClick:()=>{w({tableName:s,schemaName:t}),v("schema.edit-table")},children:[(0,e.jsx)(we,{className:"size-4"}),"Edit table"]}),(0,e.jsxs)(We,{children:[(0,e.jsxs)(Xe,{children:[(0,e.jsx)(Ls,{className:"size-4"}),"Export data"]}),(0,e.jsxs)(Je,{children:[(0,e.jsx)(R,{onClick:()=>d({tableName:s,schemaName:t,format:"csv"}),disabled:h,children:"Export as CSV"}),(0,e.jsx)(R,{onClick:()=>d({tableName:s,schemaName:t,format:"json"}),disabled:h,children:"Export as JSON"}),(0,e.jsx)(R,{onClick:()=>d({tableName:s,schemaName:t,format:"xlsx"}),disabled:h,children:"Export as Excel"})]})]}),(0,e.jsx)(Ce,{}),(0,e.jsxs)(R,{variant:"destructive",onClick:()=>v(_),children:[(0,e.jsx)(ke,{className:"size-4"}),"Delete table"]})]})})]}),(0,e.jsx)(ra,{tableName:s,newTableName:u,setNewTableName:j,isOpen:b(F),onOpenChange:A,onRename:ie,isRenaming:x}),(0,e.jsx)(na,{isOpen:b(_),onOpenChange:N=>{N||y(_)},tableName:s,onDelete:be,isDeleting:f}),(0,e.jsx)(la,{isOpen:b(D),onOpenChange:N=>{N||y(D)},tableName:s,relatedRecords:k,onForceDelete:pe,onCancel:ge,isDeleting:f})]})},ra=({tableName:s,newTableName:t,setNewTableName:a,isOpen:r,onOpenChange:n,onRename:o,isRenaming:c})=>{const i=t.trim(),d=!i||i===s;return(0,e.jsx)(W,{open:r,onOpenChange:n,children:(0,e.jsxs)(V,{className:"max-w-md",children:[(0,e.jsxs)(U,{children:[(0,e.jsx)(Y,{children:"Rename Table"}),(0,e.jsx)(G,{children:"Update the table name while keeping all data and schema unchanged."})]}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(Ae,{htmlFor:"current-table-name",children:"Current name"}),(0,e.jsx)(M,{id:"current-table-name",value:s,readOnly:!0,disabled:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(Ae,{htmlFor:"new-table-name",children:"New name"}),(0,e.jsx)(M,{id:"new-table-name",value:t,onChange:h=>a(h.target.value),placeholder:"table_name",autoFocus:!0,disabled:c,onKeyDown:h=>{h.key==="Enter"&&!d&&!c&&o()}})]})]}),(0,e.jsxs)(X,{className:"gap-2",children:[(0,e.jsx)(S,{variant:"outline",onClick:()=>n(!1),disabled:c,children:"Cancel"}),(0,e.jsx)(S,{onClick:o,disabled:d||c,children:c?"Renaming...":"Rename Table"})]})]})})},na=({isOpen:s,onOpenChange:t,tableName:a,onDelete:r,isDeleting:n})=>(0,e.jsx)(W,{open:s,onOpenChange:t,children:(0,e.jsxs)(V,{className:"max-w-md",children:[(0,e.jsxs)(U,{children:[(0,e.jsx)(Y,{children:"Delete Table"}),(0,e.jsxs)(G,{children:["Are you sure you want to delete the table"," ",(0,e.jsxs)("span",{className:"font-semibold text-foreground",children:['"',a,'"']}),"? This action cannot be undone and all data will be permanently lost."]})]}),(0,e.jsxs)(X,{className:"gap-2",children:[(0,e.jsx)(S,{variant:"outline",onClick:()=>t(!1),disabled:n,children:"Cancel"}),(0,e.jsx)(S,{variant:"destructive",onClick:r,disabled:n,children:n?"Deleting...":"Delete Table"})]})]})}),la=({isOpen:s,onOpenChange:t,tableName:a,relatedRecords:r,onForceDelete:n,onCancel:o,isDeleting:c})=>(0,e.jsx)(W,{open:s,onOpenChange:t,children:(0,e.jsxs)(V,{className:"max-w-xl! max-h-[calc(100vh-1rem)]!",children:[(0,e.jsxs)(U,{children:[(0,e.jsx)(Y,{children:"Cannot Delete - Foreign Key Constraint"}),(0,e.jsxs)(G,{children:["The table ",(0,e.jsxs)("span",{className:"font-semibold text-foreground",children:['"',a,'"']})," ","cannot be deleted because it is referenced by records in other tables. You can either cancel the operation or force delete, which will also delete all related records."]})]}),(0,e.jsx)("div",{className:"space-y-4 max-h-64 overflow-y-auto",children:r.map((i,d)=>(0,e.jsxs)("div",{className:"border border-border rounded-md p-3",children:[(0,e.jsxs)("div",{className:"font-medium text-sm mb-2",children:["Table: ",(0,e.jsx)("span",{className:"text-primary",children:i.tableName}),(0,e.jsxs)("span",{className:"text-muted-foreground ml-2",children:["(",i.records.length," record",i.records.length!==1?"s":"",")"]})]}),(0,e.jsxs)("div",{className:"text-xs text-muted-foreground mb-2",children:["References column: ",i.columnName]}),(0,e.jsx)("div",{className:"bg-muted rounded p-2 text-xs overflow-x-auto",children:(0,e.jsxs)("pre",{className:"whitespace-pre-wrap",children:[JSON.stringify(i.records.slice(0,5),null,2),i.records.length>5&&(0,e.jsxs)("div",{className:"text-muted-foreground mt-2",children:["... and ",i.records.length-5," more"]})]})})]},`${i.tableName}-${i.columnName}-${d}`))}),(0,e.jsxs)(X,{className:"gap-2",children:[(0,e.jsx)(S,{variant:"outline",onClick:o,disabled:c,children:"Cancel"}),(0,e.jsx)(S,{variant:"destructive",onClick:n,disabled:c,children:c?"Deleting...":"Force Delete All"})]})]})}),ia=({tableName:s,rowCount:t,rowCountEstimated:a,schemaName:r,showSchemaName:n})=>{const o=he({strict:!1}),{pathname:c}=J(),i=o.table,d=De(),h=i===s&&(d===void 0||d===r),g=c.startsWith("/schema")?"/schema/$table":c.startsWith("/indexes")?"/indexes/$table":"/table/$table",m=(0,e.jsxs)("span",{className:"flex-1 truncate",children:[n&&r&&r!=="public"&&(0,e.jsxs)("span",{className:"text-muted-foreground/60",children:[r,"."]}),s]});return(0,e.jsxs)("li",{className:"relative group",children:[h&&(0,e.jsx)("span",{className:"absolute left-0 top-0 bottom-0 w-1 bg-primary z-10"}),(0,e.jsxs)("div",{className:T("w-full flex gap-0.5 pl-4 pr-2 py-1.5 text-sm transition-colors text-left justify-start items-center focus:outline-none",h?"text-sidebar-accent-foreground bg-sidebar-accent font-medium":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/50 focus:bg-sidebar-accent focus:text-sidebar-accent-foreground"),children:[(0,e.jsx)(qe,{to:g,params:{table:s},search:{[I.TABLE_SCHEMA]:r},className:"flex-1 flex items-center gap-1 min-w-0 focus:outline-none",children:m}),(0,e.jsxs)("div",{className:"flex items-center gap-1 h-5 shrink-0",children:[(0,e.jsx)("div",{className:T(h?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),children:(0,e.jsx)(aa,{tableName:s,schemaName:r})}),(0,e.jsxs)(se,{children:[a&&"~",t]})]})]})]})},oa=()=>{const[s]=L(I.SIDEBAR_SEARCH,{defaultValue:""}),[t,a]=L(I.ACTIVE_SCHEMA,{defaultValue:"all"}),r=Q(),{tablesList:n=[],isLoadingTablesList:o,errorTablesList:c}=es(),i=(0,l.useMemo)(()=>Array.from(new Set(n.reduce((m,f)=>(f.schemaName&&m.push(f.schemaName),m),[]))).sort(),[n]),d=(r?.schemaSelector??!1)&&i.length>1,h=t==="all"&&i.length>1,g=n?.filter(m=>{const f=t==="all"||m.schemaName===t,p=m.tableName.toLowerCase().includes(s.toLowerCase());return f&&p});return(0,l.useEffect)(()=>{!d||t==="all"||i.includes(t)||a("all")},[i,t,a,d]),o?(0,e.jsx)("div",{className:"flex-1 h-full overflow-y-auto pb-3 flex items-center justify-center",children:(0,e.jsx)(Gs,{size:"size-6"})}):c?(0,e.jsxs)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:["Error: ",c.message]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"flex-1 overflow-y-auto pb-3",children:g&&g.length>0?(0,e.jsx)("ul",{children:g?.map(m=>(0,e.jsx)(ia,{schemaName:m.schemaName,showSchemaName:h,tableName:m.tableName,rowCount:m.rowCount,rowCountEstimated:m.rowCountEstimated},m.schemaName?`${m.schemaName}.${m.tableName}`:m.tableName))}):s?(0,e.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables found matching"}):(0,e.jsx)("div",{className:"flex-1 overflow-y-auto pb-3 h-full flex items-center justify-center",children:"No tables available"})}),(0,e.jsx)(Ys,{})]})},ca=()=>{const s=(0,l.useRef)(null),[t,a]=L(I.SIDEBAR_SEARCH,{defaultValue:""}),{openOverlay:r}=Z(),n=Q();return nt("/",o=>{o.preventDefault(),s.current&&s.current.focus()},{preventDefault:!0}),(0,e.jsx)("div",{className:"px-3 pb-3 pt-2 space-y-2",children:(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,e.jsx)(Ne,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,e.jsx)(M,{ref:s,variant:"outline",placeholder:"Search tables",value:t??"",onChange:o=>a(o.target.value.trim()),className:"rounded-sm h-8 pl-8 pr-8"}),(0,e.jsx)(se,{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs",children:"/"})]}),n?.dataModel!=="document"&&(0,e.jsx)(S,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>r("table-builder.create-table"),"aria-label":"Add table",children:(0,e.jsx)(ee,{className:"size-4"})})]})})},da=()=>{const[s,t]=L(I.ACTIVE_SCHEMA,{defaultValue:"all"}),a=Q(),{tablesList:r=[]}=es(),n=(0,l.useMemo)(()=>Array.from(new Set(r.reduce((o,c)=>(c.schemaName&&o.push(c.schemaName),o),[]))).sort(),[r]);return(a?.schemaSelector??!1)&&n.length>1?(0,e.jsx)("div",{className:"px-3 pt-3",children:(0,e.jsxs)(le,{value:s,onValueChange:t,children:[(0,e.jsx)(re,{variant:"outline",className:"h-8! w-full justify-between rounded-sm",children:(0,e.jsx)(ae,{placeholder:"Select schema"})}),(0,e.jsxs)(ne,{children:[(0,e.jsx)(P,{value:"all",children:"All schemas"}),n.map(o=>(0,e.jsx)(P,{value:o,children:o},o))]})]})}):null},Be=()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(da,{}),(0,e.jsx)(ca,{}),(0,e.jsx)(yt,{className:"flex-1 overflow-y-auto pb-3 block h-full w-full [&_[data-slot=scroll-area-viewport]>div]:block!",children:(0,e.jsx)(oa,{})})]});function ua(){const{databases:s,isLoadingDatabases:t,refetchDatabases:a,isRefetchingDatabases:r}=Et(),{selectedDatabase:n,setSelectedDatabase:o}=ss(),c=Q(),i=te(),d=t||r,h=m=>{o(m),i({to:c?.dataModel==="key-value"?"/browser":"/table",search:{}})},g=async()=>{await a(),z.success("Databases refreshed")};return(0,e.jsxs)("div",{className:"mt-auto flex h-11 items-center gap-0.5 border-t border-sidebar-border bg-sidebar px-2 text-sidebar-foreground",children:[(0,e.jsx)(_t,{databasesCount:s?.length??0}),(0,e.jsx)("span",{"aria-hidden":!0,className:"text-xs text-muted-foreground/50",children:"/"}),(0,e.jsxs)(le,{value:n||"",onValueChange:h,children:[(0,e.jsx)(re,{variant:"outline","aria-label":"Database",disabled:d,className:"h-7 min-w-0 flex-1 border-0 px-2 font-mono shadow-none hover:bg-muted/60",children:(0,e.jsx)(ae,{placeholder:"Select database…"})}),(0,e.jsx)(ne,{children:s?.map(m=>(0,e.jsx)(P,{value:m.name,className:"font-mono text-xs",children:m.name},m.name))})]}),(0,e.jsxs)(Te,{children:[(0,e.jsx)(Ee,{asChild:!0,children:(0,e.jsx)(S,{variant:"ghost",size:"icon-sm","aria-label":"Refresh databases",onClick:g,disabled:d,children:(0,e.jsx)(Ve,{className:T(d&&"animate-spin")})})}),(0,e.jsx)(_e,{children:"Refresh databases"})]})]})}var ha=({children:s})=>{const{sidebar:{width:t,isOpen:a,isPinned:r},setSidebarWidth:n,setSidebarOpen:o}=Re(),c=(0,l.useRef)(!1),i=(0,l.useRef)(0),d=(0,l.useRef)(0),h=(0,l.useRef)(null),g=(0,l.useRef)(u=>{}),m=(0,l.useRef)(()=>{}),f=(0,l.useRef)(()=>{}),p=(0,l.useRef)(()=>{}),x=(0,l.useCallback)(u=>{c.current&&requestAnimationFrame(()=>{const j=u.clientX-i.current,k=d.current+j;n(Math.abs(k-300)<=16?300:k)})},[n]),v=(0,l.useCallback)(()=>{c.current=!1,Object.assign(document.body.style,{cursor:"",userSelect:""});const u=document.getElementById("resize-overlay");u&&u.remove()},[]),y=(0,l.useCallback)(u=>{u.preventDefault(),c.current=!0,i.current=u.clientX,d.current=t,Object.assign(document.body.style,{cursor:"col-resize",userSelect:"none"});const j=document.createElement("div");j.id="resize-overlay",j.style.cssText="position:fixed;inset:0;z-index:9999;cursor:col-resize;",document.body.appendChild(j)},[t]),b=(0,l.useCallback)(()=>{r||o(!0)},[r,o]),w=(0,l.useCallback)(()=>{r||o(!1)},[r,o]);g.current=x,m.current=v,f.current=b,p.current=w;const E=u=>{r||o(u)};return(0,l.useEffect)(()=>{const u=k=>g.current(k),j=()=>m.current();return document.addEventListener("mousemove",u),document.addEventListener("mouseup",j),()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",j)}},[]),(0,l.useEffect)(()=>{const u=h.current;if(!u)return;const j=()=>f.current(),k=()=>p.current();return u.addEventListener("mouseenter",j),u.addEventListener("mouseleave",k),()=>{u.removeEventListener("mouseenter",j),u.removeEventListener("mouseleave",k)}},[]),(0,e.jsxs)(et,{open:a,onOpenChange:E,modal:!1,children:[(0,e.jsx)(st,{className:"sr-only",children:"Open Sidebar"}),(0,e.jsx)(Zs,{ref:h,side:"left",showCloseButton:!1,isPinned:r,className:"sidebar-behind-rail bg-sidebar border-r border-sidebar-border text-sidebar-foreground p-0",style:{width:`${t}px`,left:`${I.RAIL_WIDTH}px`},onOpenAutoFocus:u=>u.preventDefault(),children:(0,e.jsxs)("div",{className:"relative h-full flex flex-col",children:[s,(0,e.jsx)("div",{role:"button",tabIndex:0,onMouseDown:y,className:T("absolute inset-y-0 -right-1.5 w-3 cursor-col-resize z-50 outline-none","after:absolute after:inset-y-0 after:left-1/2 after:w-px after:transition-colors","hover:after:bg-blue-400/70 active:after:bg-blue-400/70 focus-visible:after:bg-blue-400/70"),title:"Drag to resize sidebar"})]})})]})},ma=["string","hash","list","set","zset","stream"],K=Ot(""),xa=()=>{const{closeOverlay:s,isOverlayOpen:t}=Z(),[a,r]=(0,l.useState)(K),[n,o]=(0,l.useState)("string"),[c,i]=(0,l.useState)(K),[d,h]=(0,l.useState)(K),[g,m]=(0,l.useState)("0"),[f,p]=(0,l.useState)(""),{createKey:x,isPending:v}=Ft(),y=t("redis-browser.create-key"),b=n==="hash"||n==="stream",w=a===null||c===null||b&&d===null,E=async()=>{const u=b?d:K;if(a===null||c===null||u===null)return;let j;switch(n){case"string":j={kind:"string",value:c};break;case"hash":j={kind:"hash",entries:[{field:c,value:u}]};break;case"list":j={kind:"list",entries:[c]};break;case"set":j={kind:"set",members:[c]};break;case"zset":j={kind:"zset",entries:[{member:c,score:Number(g)}]};break;case"stream":j={kind:"stream",id:"*",fields:[{field:c,value:u}]}}await x({key:a,type:n,value:j,ttlMs:f?Number(f)*1e3:null}),r(K),o("string"),i(K),h(K),m("0"),p(""),s("redis-browser.create-key")};return(0,e.jsxs)(tt,{title:"Create Redis key",description:"Creates the key atomically and never overwrites an existing key.",open:y,onOpenChange:u=>{u||s("redis-browser.create-key")},size:"sm:max-w-md!",headerClassName:"border-b border-border p-4",titleClassName:"text-sm font-medium",contentClassName:"space-y-4 px-4 py-4",children:[(0,e.jsxs)(kt,{className:"gap-4",children:[(0,e.jsxs)(q,{children:[(0,e.jsx)(H,{htmlFor:"redis-key-name",children:"Key"}),(0,e.jsx)(je,{id:"redis-key-name",value:a,onChange:r,className:"h-8",placeholder:"cache:user:42"}),(0,e.jsx)(Le,{children:"Text, hexadecimal, and Base64 keys are supported."})]}),(0,e.jsxs)(q,{children:[(0,e.jsx)(H,{htmlFor:"redis-key-type",children:"Type"}),(0,e.jsxs)(le,{value:n,onValueChange:u=>o(u),children:[(0,e.jsx)(re,{id:"redis-key-type",className:"h-8!",children:(0,e.jsx)(ae,{})}),(0,e.jsx)(ne,{children:ma.map(u=>(0,e.jsx)(P,{value:u,children:u},u))})]})]}),(0,e.jsxs)(q,{children:[(0,e.jsx)(H,{htmlFor:"redis-key-first-value",children:n==="hash"||n==="stream"?"Initial field":n==="zset"?"Initial member":"Initial value"}),(0,e.jsx)(je,{id:"redis-key-first-value",value:c,onChange:i})]}),(n==="hash"||n==="stream")&&(0,e.jsxs)(q,{children:[(0,e.jsx)(H,{htmlFor:"redis-key-second-value",children:"Initial value"}),(0,e.jsx)(je,{id:"redis-key-second-value",value:d,onChange:h})]}),n==="zset"&&(0,e.jsxs)(q,{children:[(0,e.jsx)(H,{htmlFor:"redis-key-score",children:"Score"}),(0,e.jsx)(M,{id:"redis-key-score",type:"number",value:g,onChange:u=>m(u.target.value),className:"font-mono"})]}),(0,e.jsxs)(q,{children:[(0,e.jsx)(H,{htmlFor:"redis-key-ttl",children:"TTL in seconds"}),(0,e.jsx)(M,{id:"redis-key-ttl",type:"number",min:1,value:f,onChange:u=>p(u.target.value),placeholder:"Persistent",className:"font-mono h-8"}),(0,e.jsx)(Le,{children:"Leave empty to create a persistent key."})]})]}),(0,e.jsxs)("div",{className:"flex justify-end gap-2 border-t border-border pt-4",children:[(0,e.jsx)(S,{variant:"outline",onClick:()=>s("redis-browser.create-key"),children:"Cancel"}),(0,e.jsx)(S,{disabled:v||w,onClick:E,children:"Create key"})]})]})},fa=["string","hash","list","set","zset","stream"],ba={string:"STR",hash:"HASH",list:"LIST",set:"SET",zset:"ZSET",stream:"XSTR"},pa=s=>s===-1?"∞":s<0?"gone":s<1e3?`${s}ms`:s<6e4?`${Math.ceil(s/1e3)}s`:s<36e5?`${Math.ceil(s/6e4)}m`:`${Math.ceil(s/36e5)}h`,ga=s=>s===null?"—":s<1024?`${s} B`:`${(s/1024).toFixed(1)} KiB`,va=(s,t)=>t!==void 0?t||"(empty key)":`0x${Array.from(At(s),a=>a.toString(16).padStart(2,"0")).join("")}`,ja=()=>{const{openOverlay:s}=Z(),[t,a]=L("key"),[r,n]=L("search",{defaultValue:""}),[o,c]=(0,l.useState)(r),[i,d]=L("type",{defaultValue:""}),[h,g]=L("glob",{defaultValue:"false"}),m=h==="true",f=Lt({search:o,type:i,exactPattern:m}),p=(0,l.useMemo)(()=>f.data?.pages.flatMap(b=>b.keys)??[],[f.data]),x=(0,l.useRef)(null),v=hs({count:p.length,getScrollElement:()=>x.current,estimateSize:()=>33,overscan:10}),y=v.getVirtualItems();return(0,l.useEffect)(()=>{const b=window.setTimeout(()=>c(r),250);return()=>window.clearTimeout(b)},[r]),(0,l.useEffect)(()=>{const b=y.at(-1);b&&b.index>=p.length-5&&f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()},[y,p.length,f.hasNextPage,f.isFetchingNextPage,f.fetchNextPage]),(0,e.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col bg-background font-mono",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"space-y-2 px-3 pb-3 pt-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,e.jsx)(Ne,{className:"absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),(0,e.jsx)(M,{variant:"outline",value:r,onChange:b=>n(b.target.value),placeholder:m?"Redis glob pattern":"Find keys","aria-label":"Find Redis keys",className:"h-8 rounded-sm pl-8"})]}),(0,e.jsx)(S,{variant:"outline",size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>z.promise(f.refetch({throwOnError:!0}),{loading:"Refreshing Redis keys...",success:"Redis keys refreshed",error:"Failed to refresh Redis keys"}),disabled:f.isFetching,"aria-label":"Refresh Redis keys",children:(0,e.jsx)(Ve,{className:T(f.isFetching&&"animate-spin")})}),(0,e.jsx)(S,{size:"icon-lg",className:"shrink-0 rounded-sm",onClick:()=>s("redis-browser.create-key"),"aria-label":"Create Redis key",children:(0,e.jsx)(ee,{})})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)(le,{value:i||"all",onValueChange:b=>d(b==="all"?"":b),children:[(0,e.jsx)(re,{variant:"outline","aria-label":"Filter Redis key type",className:"h-8! min-w-0 flex-1 justify-between rounded-sm",children:(0,e.jsx)(ae,{})}),(0,e.jsxs)(ne,{children:[(0,e.jsx)(P,{value:"all",children:"All types"}),fa.map(b=>(0,e.jsx)(P,{value:b,children:b},b))]})]}),(0,e.jsxs)(Tt,{variant:"outline",size:"lg",pressed:m,onPressedChange:b=>g(b?"true":"false"),className:"shrink-0 rounded-sm px-2 text-xs/relaxed uppercase","aria-label":"Use Redis glob pattern",children:[(0,e.jsx)(Cs,{className:"size-4"})," Glob"]})]})]}),(0,e.jsxs)("div",{className:"flex h-6 items-center justify-between px-4 text-[9px] uppercase tracking-wider text-muted-foreground",children:[(0,e.jsxs)("span",{children:[p.length," loaded"]}),(0,e.jsx)("span",{children:f.dataUpdatedAt>0?new Date(f.dataUpdatedAt).toLocaleTimeString():"not scanned"})]})]}),(0,e.jsxs)("div",{ref:x,className:"min-h-0 flex-1 overflow-auto",children:[f.isLoading?(0,e.jsx)("div",{className:"px-3 py-4 text-xs text-muted-foreground",children:"Scanning keyspace…"}):p.length===0?(0,e.jsxs)("div",{className:"flex min-h-32 flex-col items-center justify-center gap-2 px-4 text-center text-muted-foreground",children:[(0,e.jsx)(vs,{className:"size-4"}),(0,e.jsx)("span",{className:"text-xs",children:"No keys in this scan."}),(0,e.jsxs)(S,{variant:"outline",size:"sm",onClick:()=>s("redis-browser.create-key"),children:[(0,e.jsx)(ee,{})," Create key"]})]}):(0,e.jsx)("div",{className:"relative w-full",style:{height:`${v.getTotalSize()}px`},children:y.map(b=>{const w=p[b.index],E=w.key.base64||"-",u=va(w.key.base64,w.key.utf8);return(0,e.jsxs)(S,{variant:"ghost",onClick:()=>a(E),className:T("absolute left-0 top-0 h-auto w-full justify-start gap-2 rounded-none px-4 py-1.5 text-sm font-normal transition-colors",t===E?"bg-sidebar-accent text-sidebar-accent-foreground font-medium before:absolute before:inset-y-0 before:left-0 before:w-1 before:bg-primary":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),style:{transform:`translateY(${b.start}px)`},title:u,children:[(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-left text-current",children:u}),(0,e.jsx)(gt,{variant:"outline",className:"h-4 w-10 shrink-0 justify-center rounded-sm px-1 text-[8px] font-normal text-muted-foreground",children:ba[w.type]??"?"}),(0,e.jsxs)("span",{className:"shrink-0 text-[9px] text-muted-foreground",children:[ga(w.memoryBytes)," ·"," ",w.ttlMs===-1?(0,e.jsx)(gs,{className:"inline size-3 align-[-2px]","aria-label":"No expiry"}):pa(w.ttlMs)]})]},`${E}-${b.index}`)})}),f.isFetchingNextPage&&(0,e.jsx)("div",{className:"px-2 py-1 text-center text-[10px] text-muted-foreground",children:"Scanning more…"})]}),(0,e.jsx)(xa,{})]})},ya=()=>{const{pathname:s}=J(),t=s.split("/")[1],a=Q()?.dataModel==="key-value",r=(0,l.useMemo)(()=>{if(a&&t!=="runner")return(0,e.jsx)(ja,{});switch(t){case"":case"table":case"schema":case"indexes":return(0,e.jsx)(Be,{});case"runner":return(0,e.jsx)(ta,{});default:return(0,e.jsx)(Be,{})}},[a,t]);return(0,e.jsxs)(ha,{children:[r,(0,e.jsx)(ua,{})]})},Wa=cs({component:()=>Ca});function Ca(){const s=Q(),t=s?.dataModel==="key-value",{pathname:a}=J(),r=a.split("/")[1],{sidebar:{isPinned:n,width:o}}=Re();if(t&&r!=="browser"&&r!=="runner"&&r!=="logs")return(0,e.jsx)(oe,{to:"/browser"});if(!t&&r==="browser")return(0,e.jsx)(oe,{to:"/"});if(s&&!s.indexes&&r==="indexes")return(0,e.jsx)(oe,{to:"/table"});if(s&&!s.serverLogs&&r==="logs")return(0,e.jsx)(oe,{to:"/table"});const c=r!=="visualizer";return(0,e.jsxs)("div",{className:"bg-background text-foreground w-dvw flex h-dvh max-h-dvh overflow-hidden relative",children:[(0,e.jsx)(Zt,{}),c&&(0,e.jsx)(ya,{}),(0,e.jsx)("div",{className:"rail-content relative flex-1 flex flex-col h-full overflow-hidden",style:{marginLeft:c&&n?`${o}px`:"0"},children:(0,e.jsx)(us,{})})]})}export{Ca as component,Mt as n,Wa as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as r}from"./radix-ui-ByvuE8TW.js";import{n as t}from"./index-YCx2RIFq.js";import{t as o}from"./query-runner-C430BH5I.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="69eb2631-2aee-477c-bd29-7a26b3141d45",e._sentryDebugIdIdentifier="sentry-dbid-69eb2631-2aee-477c-bd29-7a26b3141d45")}catch{}})();var d=r();function b(){const{queryId:e}=t.useParams();return(0,d.jsx)(o,{queryId:e})}export{b as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as Y}from"./rolldown-runtime-0wqQW3ea.js";import{C as $,E,g as H,w as J}from"./tanstack-Cb7WFPRi.js";import{E as L,I as W,It as X,T as Z,f as ee,o as se,s as ne}from"./icons-CheF8KGp.js";import{jt as te}from"./radix-ui-ByvuE8TW.js";import{n as R}from"./dist-D4HUXaJv.js";import{t as ae}from"./utils-awMbhLwX.js";import{t as P}from"./spinner-FJ-tXoFX.js";import{a as re,c as ie,n as u,o as de,t as f}from"./overlay.store-BL-3zX6X.js";import{G as oe,J as le,K as ce,M as xe,O as me,W as ue,Y as he,_ as F,b as fe,k as O,q as pe,v as I,w as ge,y as je}from"./schema-B_EtHxTf.js";import{n as A,t as g}from"./label-C93T1BbF.js";import{t as be}from"./sheet-sidebar-KvxY47ZZ.js";import"./tables-By-PTDwU.js";import{t as ye}from"./react-CKF1H7h0.js";import{h as ve,o as Ne,u as Ie}from"./constants-BBxXyYPa.js";import{o as Ce,t as C}from"./database.store-73Wsz2L5.js";import{t as b}from"./badge-HtbO9hWg.js";import{a as Se,i as De,n as Te,r as ze,t as ke}from"./select-DU0HoKZ4.js";import{t as we}from"./use-database-engine-Mwmv8X7V.js";import{i as S}from"./keys-By5o7bPm.js";import{i as qe}from"./index-YCx2RIFq.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"db-studio@2.0.1"};var a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="9ca32f58-7043-4e81-b890-b4ff859dad53",s._sentryDebugIdIdentifier="sentry-dbid-9ca32f58-7043-4e81-b890-b4ff859dad53")}catch{}})();var N=Y(X(),1),_e=({tableName:s,schemaName:a})=>{const r=E(),{closeOverlay:i}=f(),{selectedDatabase:o}=C(),{mutateAsync:x,isPending:l}=$({mutationFn:async d=>(await Ne({tableName:s,schemaName:a,data:d,db:o})).data.data,onSuccess:async()=>{await r.invalidateQueries({queryKey:S.byTable(s),exact:!1}),i("indexes.create-index")}});return{createIndex:async d=>R.promise(x(d),{loading:"Creating index...",success:n=>n||"Index created successfully",error:n=>typeof n.details=="string"&&n.details||n.message||"Failed to create index"}),isCreatingIndex:l}},e=te(),Fe=({tableName:s})=>{const{closeOverlay:a}=f(),r=I(),{createIndex:i,isCreatingIndex:o}=_e({tableName:s,schemaName:r}),{tableCols:x,isLoadingTableCols:l}=ge({tableName:s,schemaName:r}),m=we(),d=m?.indexes||null,n=d?.methods??[],{control:h,register:K,handleSubmit:U,setValue:D,watch:V,formState:{errors:y,dirtyFields:B,isSubmitted:T}}=xe({mode:"onSubmit",defaultValues:{indexName:"",columns:[],isUnique:!1,method:n[0]},resolver:me(Ce)}),p=V("columns"),Q=m?.dataModel==="document",[z,G]=(0,N.useState)([]),[v,k]=(0,N.useState)(""),w=[...new Set([...x?.map(({columnName:t})=>t)??[],...z])],q=t=>{const c=p.includes(t)?p.filter(j=>j!==t):[...p,t];D("columns",c,{shouldValidate:T}),B.indexName||D("indexName",c.length?`${s}_${c.join("_").replaceAll(".","_")}_idx`:"",{shouldValidate:T})},_=()=>{const t=v.trim();t&&(w.includes(t)||G([...z,t]),p.includes(t)||q(t),k(""))};return(0,e.jsxs)("form",{onSubmit:U(t=>i(t)),className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(g,{className:"text-xs",children:"Columns, in index order"}),l?(0,e.jsx)(P,{size:"size-5"}):(0,e.jsx)("div",{className:"space-y-1",children:w.map(t=>{const c=p.indexOf(t),j=`create-index-column-${t}`;return(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(F,{id:j,checked:c!==-1,onCheckedChange:()=>q(t)}),(0,e.jsx)(g,{htmlFor:j,className:"font-mono font-normal cursor-pointer",children:t}),c!==-1&&(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:["#",c+1]})]},t)})}),Q&&(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(A,{value:v,onChange:t=>k(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),_())},placeholder:"Add field path, e.g. address.city","aria-label":"Add field path",className:"font-mono"}),(0,e.jsx)(u,{type:"button",variant:"outline",onClick:_,disabled:!v.trim(),children:"Add"})]}),y.columns&&(0,e.jsx)("p",{className:"text-xs text-destructive",children:"Select at least one column."})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(g,{htmlFor:"create-index-name",className:"text-xs",children:"Name"}),(0,e.jsx)(A,{id:"create-index-name",...K("indexName"),placeholder:`${s}_column_idx`,className:ae("font-mono",y.indexName&&"border-destructive ring-destructive ring-1")}),y.indexName&&(0,e.jsx)("p",{className:"text-xs text-destructive",children:"Enter an index name."})]}),(0,e.jsxs)("div",{className:"flex items-center gap-6",children:[(0,e.jsx)(O,{control:h,name:"isUnique",render:({field:t})=>(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(F,{id:"create-index-unique",checked:t.value,onCheckedChange:c=>t.onChange(c===!0)}),(0,e.jsx)(g,{htmlFor:"create-index-unique",className:"cursor-pointer",children:"Unique"})]})}),n.length>0&&(0,e.jsx)(O,{control:h,name:"method",render:({field:t})=>(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(g,{htmlFor:"create-index-method",children:"Method"}),(0,e.jsxs)(ke,{value:t.value,onValueChange:t.onChange,children:[(0,e.jsx)(De,{id:"create-index-method",className:"font-mono",children:(0,e.jsx)(Se,{})}),(0,e.jsx)(Te,{children:n.map(c=>(0,e.jsx)(ze,{value:c,className:"font-mono",children:c},c))})]})]})})]}),d?.createNote&&(0,e.jsxs)("p",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,e.jsx)(se,{className:"size-3.5 shrink-0"}),d.createNote]}),(0,e.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,e.jsx)(u,{type:"button",variant:"outline",size:"lg",onClick:()=>a("indexes.create-index"),disabled:o,children:"Cancel"}),(0,e.jsx)(u,{type:"submit",variant:"default",size:"lg",disabled:o,children:o?"Creating...":"Create index"})]})]})},Oe=({tableName:s})=>{const{closeOverlay:a,isOverlayOpen:r}=f();return(0,e.jsx)(be,{title:"Create index",description:`Create an index on "${s}".`,open:r("indexes.create-index"),onOpenChange:i=>{i||a("indexes.create-index")},children:(0,e.jsx)(Fe,{tableName:s})})},Ae=({tableName:s,schemaName:a})=>{const r=E(),{closeOverlay:i}=f(),{selectedDatabase:o}=C(),{mutateAsync:x,isPending:l}=$({mutationFn:async d=>(await Ie({tableName:s,schemaName:a,indexName:d,db:o})).data.data,onSuccess:async()=>{await r.invalidateQueries({queryKey:S.byTable(s),exact:!1}),i("indexes.drop-index")}});return{dropIndex:async d=>R.promise(x(d),{loading:"Dropping index...",success:n=>n||"Index dropped successfully",error:n=>typeof n.details=="string"&&n.details||n.message||"Failed to drop index"}),isDroppingIndex:l}},M=ye()(s=>({droppingIndex:null,setDroppingIndex:a=>s({droppingIndex:a})})),$e=({tableName:s})=>{const{closeOverlay:a,isOverlayOpen:r}=f(),{droppingIndex:i}=M(),o=I(),{dropIndex:x,isDroppingIndex:l}=Ae({tableName:s,schemaName:o});return i?(0,e.jsx)(ue,{open:r("indexes.drop-index"),onOpenChange:m=>{m||a("indexes.drop-index")},children:(0,e.jsxs)(oe,{className:"max-w-md",children:[(0,e.jsxs)(le,{children:[(0,e.jsx)(he,{children:"Drop Index"}),(0,e.jsxs)(ce,{children:["Drop the index"," ",(0,e.jsxs)("span",{className:"font-semibold text-foreground",children:['"',i.indexName,'"']})," ","from table ",(0,e.jsxs)("span",{className:"font-semibold text-foreground",children:['"',s,'"']}),"? No rows are deleted, but queries that rely on this index may get slower."]})]}),(0,e.jsxs)(pe,{className:"gap-2",children:[(0,e.jsx)(u,{variant:"outline",onClick:()=>a("indexes.drop-index"),disabled:l,children:"Cancel"}),(0,e.jsx)(u,{variant:"destructive",onClick:()=>x(i.indexName),disabled:l,children:l?"Dropping...":"Drop Index"})]})]})}):null},Ee=({index:s})=>{const{openOverlay:a}=f(),{setDroppingIndex:r}=M();return s.kind!=="index"?(0,e.jsxs)(re,{children:[(0,e.jsx)(ie,{asChild:!0,children:(0,e.jsx)("span",{className:"inline-flex text-muted-foreground/40",children:(0,e.jsx)(W,{className:"size-3.5"})})}),(0,e.jsx)(de,{side:"left",children:(0,e.jsx)("p",{children:"Backs a constraint. Drop the constraint to remove it."})})]}):(0,e.jsx)(u,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive","aria-label":`Drop index ${s.indexName}`,onClick:()=>{r(s),a("indexes.drop-index")},children:(0,e.jsx)(ne,{className:"size-3.5"})})},Le=({tableName:s,refetch:a,isRefetching:r=!1})=>{const{openOverlay:i}=f();return(0,e.jsxs)("header",{className:"max-h-8 overflow-hidden border-b border-border w-full flex items-center bg-background text-foreground sticky top-0 left-0 right-0 z-0",children:[(0,e.jsx)(u,{type:"button",variant:"ghost",className:"size-8! aspect-square border-x-0 border-y-0 border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors",onClick:()=>{a()},"aria-label":`Refetch indexes for ${s}`,disabled:r,children:(0,e.jsx)(Z,{className:"size-4"})}),(0,e.jsx)(u,{variant:"ghost",asChild:!0,className:"h-8! border-l border-y-0 border-r-0 border-border rounded-none flex items-center gap-2 text-muted-foreground hover:text-foreground",children:(0,e.jsxs)(H,{to:"/table/$table",params:{table:s},"aria-label":`View data for ${s}`,children:[(0,e.jsx)(ee,{className:"size-4"}),"View data"]})}),(0,e.jsxs)(u,{type:"button",variant:"default",className:"h-8! border-l border-y-0 border-r-0 border-border rounded-none flex items-center gap-2",onClick:()=>i("indexes.create-index"),children:[(0,e.jsx)(L,{className:"size-4"}),"Create Index"]})]})},Re=({tableName:s,schemaName:a})=>{const{selectedDatabase:r}=C(),{data:i,isLoading:o,isRefetching:x,error:l,refetch:m}=J({queryKey:S.table(s,r,a),queryFn:()=>ve(s,r,a),select:d=>d.data.data,enabled:!!s&&!!r});return{tableIndexes:i,isLoadingTableIndexes:o,isRefetchingTableIndexes:x,errorTableIndexes:l,refetchTableIndexes:m}},Pe={primary:"Primary","unique-constraint":"Unique constraint",index:null},Me=({tableName:s})=>{const{tableIndexes:a,isLoadingTableIndexes:r,isRefetchingTableIndexes:i,errorTableIndexes:o,refetchTableIndexes:x}=Re({tableName:s,schemaName:I()}),{openOverlay:l}=f(),m=!!a?.some(n=>n.method!==null),d=(0,N.useMemo)(()=>[{id:"indexName",header:"Name",accessorKey:"indexName",cell:({row:n})=>{const h=Pe[n.original.kind];return(0,e.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,e.jsx)("span",{className:"font-mono text-foreground font-medium truncate",children:n.original.indexName}),h&&(0,e.jsx)(b,{variant:"secondary",className:"text-[0.6rem] px-1.5 shrink-0",children:h}),n.original.isSparse&&(0,e.jsx)(b,{variant:"secondary",className:"text-[0.6rem] px-1.5 shrink-0",children:"Sparse"}),n.original.expireAfterSeconds!==void 0&&(0,e.jsxs)(b,{variant:"secondary",className:"text-[0.6rem] px-1.5 shrink-0",children:["TTL (",n.original.expireAfterSeconds,"s)"]})]})},size:340,minSize:160},{id:"columns",header:"Columns",accessorFn:n=>n.columns.join(", "),cell:({getValue:n})=>(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground truncate",children:n()}),size:220,minSize:120},{id:"isUnique",header:"Unique",cell:({row:n})=>n.original.isUnique?(0,e.jsx)(b,{variant:"secondary",className:"text-[0.6rem] px-1.5",children:"Unique"}):(0,e.jsx)("span",{className:"text-xs text-muted-foreground/50",children:"no"}),size:90,minSize:80},...m?[{id:"method",header:"Method",cell:({row:n})=>(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:n.original.method}),size:100,minSize:80}]:[],{id:"definition",header:"Definition",accessorKey:"definition",cell:({getValue:n})=>{const h=n();return h?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground truncate",children:h}):(0,e.jsx)("span",{className:"text-muted-foreground/50",children:"—"})},size:360,minSize:120},{id:"actions",header:"",cell:({row:n})=>(0,e.jsx)("div",{className:"flex flex-1 justify-center items-center",children:(0,e.jsx)(Ee,{index:n.original})}),size:50,enableResizing:!1}],[m]);return r?(0,e.jsx)("div",{className:"size-full flex items-center justify-center",children:(0,e.jsx)(P,{size:"size-7"})}):o?(0,e.jsxs)("div",{className:"size-full flex flex-col items-center justify-center gap-2",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Failed to load indexes"}),(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:o.message})]}):(0,e.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,e.jsx)(Le,{tableName:s,refetch:x,isRefetching:i}),a?.length?(0,e.jsx)(fe,{columns:d,data:a,renderCellAccessory:n=>(0,e.jsx)(je,{value:n})}):(0,e.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-3",children:[(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"This table has no indexes yet."}),(0,e.jsxs)(u,{type:"button",onClick:()=>l("indexes.create-index"),children:[(0,e.jsx)(L,{className:"size-4"}),"Create index"]})]}),(0,e.jsx)(Oe,{tableName:s}),(0,e.jsx)($e,{tableName:s})]})};function os(){const{table:s}=qe.useParams();return(0,e.jsx)("main",{className:"flex-1 flex flex-col overflow-hidden",children:(0,e.jsx)(Me,{tableName:s})})}export{os as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as n}from"./radix-ui-ByvuE8TW.js";import{n as a,t as o}from"./tables-By-PTDwU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1f90e252-45fe-4ac0-9caa-0861976ed6a5",e._sentryDebugIdIdentifier="sentry-dbid-1f90e252-45fe-4ac0-9caa-0861976ed6a5")}catch{}})();var r=n();function f(){const{table:e}=a.useParams();return(0,r.jsx)(o,{tableName:e})}export{f as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jt as o}from"./radix-ui-ByvuE8TW.js";import{t as r}from"./schema-B_EtHxTf.js";import{t as d}from"./index-YCx2RIFq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f981509a-b6fe-4f4a-92d0-86f23bddc39c",e._sentryDebugIdIdentifier="sentry-dbid-f981509a-b6fe-4f4a-92d0-86f23bddc39c")}catch{}})();var n=o();function l(){const{table:e}=d.useParams();return(0,n.jsx)("main",{className:"flex-1 flex flex-col overflow-hidden",children:(0,n.jsx)(r,{tableName:e})})}export{l as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3c39b1bc-0997-4627-b32e-a588be4711ba",e._sentryDebugIdIdentifier="sentry-dbid-3c39b1bc-0997-4627-b32e-a588be4711ba")}catch{}})();var i={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},s={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=><!~?&+\-*\/\^%#@]+/,tokenizer:{root:[[/[a-z_\/$%@]([\w\/$%]|-(?!>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}};export{i as conf,s as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b63b13e9-254d-4208-948c-98ef9dce408e",e._sentryDebugIdIdentifier="sentry-dbid-b63b13e9-254d-4208-948c-98ef9dce408e")}catch{}})();var r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},n=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],o=e=>e.charAt(0).toUpperCase()+e.substr(1),t=[];n.forEach(e=>{t.push(e),t.push(e.toUpperCase()),t.push(o(e))});var a={defaultToken:"",tokenPostfix:".apex",keywords:t,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}};export{r as conf,a as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bf9ae677-ef2b-449e-b821-9b20d55f8b83",e._sentryDebugIdIdentifier="sentry-dbid-bf9ae677-ef2b-449e-b821-9b20d55f8b83")}catch{}})();var o={comments:{lineComment:"#"}},s={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}};export{o as conf,s as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as l,gt as u,ht as c,o as g}from"./icons-CheF8KGp.js";import{B as f,G as m,H as p,J as x,K as b,U as v,V as h,W as j,X as y,Y as C,Z as w,ft as z,jt as A,q as D,z as k}from"./radix-ui-ByvuE8TW.js";import{t as o}from"./utils-awMbhLwX.js";import{i as N,n as s}from"./overlay.store-BL-3zX6X.js";import{i as _}from"./label-C93T1BbF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="0f4f74d4-fbae-4a19-8614-3a1ca1c14a5f",e._sentryDebugIdIdentifier="sentry-dbid-0f4f74d4-fbae-4a19-8614-3a1ca1c14a5f")}catch{}})();var t=A(),T={info:{icon:l,containerClass:"border-blue-500/50 bg-blue-50/50 text-blue-600 dark:bg-blue-950/20",iconClass:"text-blue-500"},warning:{icon:g,containerClass:"border-amber-500/50 bg-amber-50/50 text-amber-600 dark:bg-amber-950/20",iconClass:"text-amber-500"},error:{icon:u,containerClass:"border-red-500/50 bg-red-50/50 text-red-600 dark:bg-red-950/20",iconClass:"text-red-500"},success:{icon:c,containerClass:"border-emerald-500/50 bg-emerald-50/50 text-emerald-600 dark:bg-emerald-950/20",iconClass:"text-emerald-500"}},H=({variant:e,title:a,message:r,className:i})=>{const n=T[e],d=n.icon;return(0,t.jsxs)("div",{className:o("rounded-md border px-4 py-3",n.containerClass,i),children:[(0,t.jsxs)("p",{className:o("text-sm flex items-center gap-2",r?"mb-1":""),children:[(0,t.jsx)(d,{"aria-hidden":"true",className:o("-mt-0.5 inline-flex opacity-80",n.iconClass),size:16}),(0,t.jsx)("span",{className:"font-medium",children:a})]}),r&&(0,t.jsx)("p",{className:"text-xs opacity-90 ml-7",children:r})]})};function O({...e}){return(0,t.jsx)(y,{"data-slot":"alert-dialog",...e})}function I({...e}){return(0,t.jsx)(C,{"data-slot":"alert-dialog-portal",...e})}function P({className:e,...a}){return(0,t.jsx)(x,{"data-slot":"alert-dialog-overlay",className:o("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",e),...a})}function W({className:e,size:a="default",...r}){return(0,t.jsxs)(I,{children:[(0,t.jsx)(P,{}),(0,t.jsx)(b,{"data-slot":"alert-dialog-content","data-size":a,className:o("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-3 rounded-xl p-4 ring-1 duration-150 data-closed:duration-100 ease-out data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r})]})}function Y({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:o("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function $({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function F({className:e,...a}){return(0,t.jsx)(w,{"data-slot":"alert-dialog-title",className:o("text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function G({className:e,...a}){return(0,t.jsx)(D,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",e),...a})}function J({className:e,variant:a="default",size:r="default",...i}){return(0,t.jsx)(s,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(j,{"data-slot":"alert-dialog-action",className:o(e),...i})})}function K({className:e,variant:a="outline",size:r="default",...i}){return(0,t.jsx)(s,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(m,{"data-slot":"alert-dialog-cancel",className:o(e),...i})})}function L({modal:e,...a}){const r=_();return(0,t.jsx)(p,{"data-slot":"popover",modal:e??(r?!0:void 0),...a})}function U({...e}){return(0,t.jsx)(v,{"data-slot":"popover-trigger",...e})}function X({className:e,align:a="center",sideOffset:r=4,...i}){return(0,t.jsx)(h,{children:(0,t.jsx)(f,{"data-slot":"popover-content",align:a,sideOffset:r,className:o("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-4 rounded-lg p-2.5 text-xs shadow-md ring-1 duration-150 data-closed:duration-100 ease-out z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden",e),...i})})}function Z({...e}){return(0,t.jsx)(k,{"data-slot":"popover-anchor",...e})}var E=N("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-colors has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-colors overflow-hidden group/badge",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function M({className:e,variant:a="default",asChild:r=!1,...i}){return(0,t.jsx)(r?z:"span",{"data-slot":"badge","data-variant":a,className:o(E({variant:a}),e),...i})}export{U as a,K as c,$ as d,Y as f,X as i,W as l,H as m,L as n,O as o,F as p,Z as r,J as s,M as t,G as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="249f5ce5-b92e-40d9-8b24-1d5a7cdcea72",e._sentryDebugIdIdentifier="sentry-dbid-249f5ce5-b92e-40d9-8b24-1d5a7cdcea72")}catch{}})();var t={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},n={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=><!~?&|+\-*\/\^;\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)(rem(?:\s.*|))$/,["","comment"]],[/(\@?)(@keywords)(?!\w)/,[{token:"keyword"},{token:"keyword.$2"}]],[/[ \t\r\n]+/,""],[/setlocal(?!\w)/,"keyword.tag-setlocal"],[/endlocal(?!\w)/,"keyword.tag-setlocal"],[/[a-zA-Z_]\w*/,""],[/:\w*/,"metatag"],[/%[^%]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],string:[[/[^\\"'%]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/%[\w ]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/$/,"string","@popall"]]}};export{t as conf,n as language};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6f8aa1b6-e914-4261-b615-33cc7f55ccba",e._sentryDebugIdIdentifier="sentry-dbid-6f8aa1b6-e914-4261-b615-33cc7f55ccba")}catch{}})();var t=e=>`\\b${e}\\b`,o=t("[_a-zA-Z][_a-zA-Z0-9]*"),r=["targetScope","resource","module","param","var","output","for","in","if","existing"],i=["true","false","null"],a="[ \\t\\r\\n]",s="[0-9]+",g={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])'
|
|
2
2
|
`,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},l={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~?:&|+\-*/^%]+/,keywords:r,namedLiterals:i,escapes:"\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:"(|'|'')[^']",action:{token:"string"}},{regex:"'''",action:{token:"string.quote",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"[^\\\\'$]+",action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:"'",action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:a},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:"'''",action:{token:"string.quote",next:"@stringVerbatim"}},{regex:"'",action:{token:"string.quote",next:"@stringLiteral"}},{regex:s,action:{token:"number"}},{regex:o,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}}]}};export{g as conf,l as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as me}from"./rolldown-runtime-0wqQW3ea.js";import{v as he}from"./tanstack-Cb7WFPRi.js";import{Ct as xe,E as ee,It as fe,Mt as be,S as B,T as pe,at as ge,b as ve,ct as je,k as ye,s as M,u as Ne}from"./icons-CheF8KGp.js";import{jt as ke}from"./radix-ui-ByvuE8TW.js";import{n as we}from"./dist-D4HUXaJv.js";import{t as q}from"./utils-awMbhLwX.js";import{t as Se}from"./spinner-FJ-tXoFX.js";import{a as Z,c as Q,n as m,o as W,t as Ce}from"./overlay.store-BL-3zX6X.js";import{n as Re}from"./dist-DwRWhVwY.js";import{n as J}from"./label-C93T1BbF.js";import{w as De}from"./constants-BBxXyYPa.js";import{t as Me}from"./database.store-73Wsz2L5.js";import{a as Le,c as _e,d as Te,f as Ee,i as $e,l as Fe,m as P,n as Oe,o as Ae,p as ze,s as Ie,t as Pe,u as Be}from"./badge-HtbO9hWg.js";import{b as Je,o as Ke,s as ie,v as Y,x as X,y as Ue}from"./index-YCx2RIFq.js";import{t as Ge}from"./queries.store-Dwdw-Gej.js";import{a as He,i as Ve,n as S,o as qe,r as Ze,t as D}from"./redis-value-Bf0tOet0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"db-studio@2.0.1"};var r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="b21f679e-0ca6-4f2f-ad50-15073918ac92",s._sentryDebugIdIdentifier="sentry-dbid-b21f679e-0ca6-4f2f-ad50-15073918ac92")}catch{}})();var p=me(fe(),1),e=ke(),oe=({text:s,label:r,className:t})=>{const[a,i]=(0,p.useState)(!1);return(0,e.jsxs)(Z,{children:[(0,e.jsx)(Q,{asChild:!0,children:(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:t,onClick:async()=>{await navigator.clipboard.writeText(typeof s=="function"?s():s),i(!0),window.setTimeout(()=>i(!1),1200)},"aria-label":r,children:a?(0,e.jsx)(xe,{}):(0,e.jsx)(je,{})})}),(0,e.jsx)(W,{children:a?"Copied":r})]})},Qe=[{label:"60s",ttlMs:6e4},{label:"10m",ttlMs:6e5},{label:"1h",ttlMs:36e5},{label:"1d",ttlMs:864e5},{label:"7d",ttlMs:6048e5}],We=s=>s===null?"—":s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KiB`:`${(s/1048576).toFixed(1)} MiB`,Ye=s=>{const r=Math.max(0,Math.ceil(s/1e3));if(r<60)return`${r}s`;const t=Math.floor(r/60);if(t<60)return`${t}m ${r%60}s`;const a=Math.floor(t/60);return a<24?`${a}h ${t%60}m`:`${Math.floor(a/24)}d ${a%24}h`},Xe=s=>{const[,r]=(0,p.useReducer)(t=>t+1,0);(0,p.useEffect)(()=>{if(!s)return;const t=window.setInterval(r,1e3);return()=>window.clearInterval(t)},[s])},es=({detail:s,label:r,loadedCount:t,fetchedAt:a,isFetching:i,pending:n,command:o,act:l,onRefresh:d,onOpenRunner:h,onDelete:c})=>{const[b,u]=(0,p.useState)(s.key),[L,U]=(0,p.useState)("");Xe(s.ttlMs>0);const C=s.ttlMs>0?s.ttlMs-(Date.now()-a):s.ttlMs,N=s.ttlMs===-1,x=!N&&C<=0,z=[{name:"TTL",value:N?"∞":x?"expired":Ye(C),hint:N?"No expiry — the key persists until deleted.":x?"The TTL elapsed; Redis has evicted or is about to evict this key.":`Expires ${new Date(a+s.ttlMs).toLocaleString()}`,alert:x},{name:"MEM",value:We(s.memoryBytes),hint:"Approximate memory usage reported by MEMORY USAGE."},{name:"LEN",value:s.length?.toLocaleString()??"—",hint:t!==null&&s.length!==null?`${t.toLocaleString()} of ${s.length.toLocaleString()} entries loaded in this view.`:"Length reported by Redis (entries, or bytes for strings)."},{name:"REV",value:s.revision.slice(0,8),hint:"Optimistic-lock revision. Writes are rejected when the key changed since this fetch."},{name:"AT",value:new Date(a).toLocaleTimeString(),hint:"When this snapshot was fetched from Redis."}];return(0,e.jsx)("header",{className:"border-b border-border",children:(0,e.jsxs)("div",{className:"flex min-h-10 items-stretch justify-between",children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 items-stretch overflow-x-auto",children:[(0,e.jsxs)("div",{className:"flex min-w-0 max-w-[min(36rem,45vw)] shrink items-center gap-1 px-3 py-1.5",children:[(0,e.jsx)("code",{className:"min-w-0 truncate text-sm text-foreground",title:r,children:r||"(empty key)"}),(0,e.jsx)(oe,{text:s.key.utf8??s.key.base64,label:"Copy key name",className:"shrink-0 text-muted-foreground"}),(0,e.jsx)(Pe,{variant:"outline",className:"h-4 shrink-0 rounded-sm px-1.5 text-[8px] font-normal uppercase text-muted-foreground",children:s.type})]}),z.map(({name:v,value:I,hint:_,alert:T},E)=>(0,e.jsxs)(Z,{children:[(0,e.jsx)(Q,{asChild:!0,children:(0,e.jsxs)("div",{className:q("flex shrink-0 cursor-default items-center gap-1.5 border-s border-border px-2 text-[10px]",E===z.length-1&&"border-e"),children:[(0,e.jsx)("span",{className:"text-muted-foreground",children:v}),(0,e.jsx)("span",{className:q("tabular-nums",T?"text-destructive":"text-foreground"),children:I})]})}),(0,e.jsx)(W,{side:"bottom",children:_})]},v))]}),(0,e.jsxs)("div",{className:"flex shrink-0 items-stretch",children:[(0,e.jsxs)(m,{variant:"ghost",size:"sm",className:"h-auto rounded-none border-y-0 border-s border-e-0 border-border px-2",onClick:d,disabled:i,children:[(0,e.jsx)(pe,{className:q(i&&"animate-spin")})," Refresh"]}),o&&(0,e.jsxs)(Z,{children:[(0,e.jsx)(Q,{asChild:!0,children:(0,e.jsxs)(m,{variant:"ghost",size:"sm",className:"h-auto rounded-none border-y-0 border-s border-e-0 border-border px-2",onClick:h,children:[(0,e.jsx)(Ne,{})," Runner"]})}),(0,e.jsxs)(W,{side:"bottom",children:["Open in the query runner as ",(0,e.jsx)("code",{className:"font-mono",children:o})]})]}),(0,e.jsxs)(Oe,{children:[(0,e.jsx)(Le,{asChild:!0,children:(0,e.jsxs)(m,{variant:"ghost",size:"sm",className:"h-auto rounded-none border-y-0 border-s border-e-0 border-border px-2",children:[(0,e.jsx)(ye,{})," Edit"]})}),(0,e.jsx)($e,{align:"end",className:"w-72 rounded-sm p-3 font-mono",children:(0,e.jsxs)(Je,{className:"gap-4",children:[(0,e.jsxs)(Y,{className:"gap-1.5",children:[(0,e.jsx)(X,{htmlFor:"redis-key-rename",children:"Rename key"}),(0,e.jsxs)("form",{className:"flex",onSubmit:v=>{v.preventDefault(),!(b===null||b.base64===s.key.base64||n)&&l({action:"rename",newKey:b})},children:[(0,e.jsx)(S,{id:"redis-key-rename",value:b,onChange:u,className:"rounded-e-none font-mono"}),(0,e.jsx)(m,{type:"submit",size:"icon",className:"h-auto self-stretch rounded-s-none border-0 bg-clip-border",disabled:b===null||b.base64===s.key.base64||n,"aria-label":"Rename key",children:(0,e.jsx)(be,{})})]})]}),(0,e.jsxs)(Y,{className:"gap-1.5",children:[(0,e.jsx)(X,{htmlFor:"redis-key-ttl-operation",children:"TTL in seconds"}),(0,e.jsxs)("form",{className:"flex",onSubmit:v=>{v.preventDefault(),!n&&l({action:"setTtl",ttlMs:L?Number(L)*1e3:null})},children:[(0,e.jsx)(J,{id:"redis-key-ttl-operation",type:"number",min:1,value:L,onChange:v=>U(v.target.value),placeholder:s.ttlMs>0?String(Math.ceil(s.ttlMs/1e3)):"Persistent",className:"rounded-e-none font-mono"}),(0,e.jsx)(m,{type:"submit",className:"h-auto self-stretch rounded-s-none border-0 bg-clip-border",disabled:n,children:"Apply"})]}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-1",children:[Qe.map(v=>(0,e.jsx)(m,{type:"button",variant:"outline",size:"xs",disabled:n,onClick:()=>l({action:"setTtl",ttlMs:v.ttlMs}),children:v.label},v.label)),(0,e.jsx)(m,{type:"button",variant:"outline",size:"xs",disabled:n||N,onClick:()=>l({action:"setTtl",ttlMs:null}),children:"Persist"})]}),(0,e.jsx)(Ue,{children:"Leave empty to persist the key."})]})]})})]}),(0,e.jsxs)(m,{variant:"destructive",size:"sm",className:"h-auto rounded-none border-y-0 border-s border-e-0 border-border px-2",disabled:n,onClick:c,children:[(0,e.jsx)(M,{})," Delete"]})]})]})})},w=Ve(""),j=s=>s.utf8??`base64:${s.base64}`,$=(s,...r)=>r.some(t=>String(t).toLowerCase().includes(s)),F=s=>{switch(s.kind){case"string":return JSON.stringify(j(s.value),null,2);case"hash":return JSON.stringify(Object.fromEntries(s.entries.map(r=>[j(r.field),j(r.value)])),null,2);case"list":return JSON.stringify(s.entries.map(r=>j(r.value)),null,2);case"set":return JSON.stringify(s.members.map(j),null,2);case"zset":return JSON.stringify(s.entries.map(r=>({member:j(r.member),score:r.score})),null,2);case"stream":return JSON.stringify(s.entries.map(r=>({id:r.id,fields:Object.fromEntries(r.fields.map(t=>[j(t.field),j(t.value)]))})),null,2);default:return""}},K=(s,r)=>{const[t,a]=(0,p.useState)(s),[i,n]=(0,p.useState)(r);return i!==r&&(n(r),a(s)),[t,a]},O=({filtered:s})=>(0,e.jsx)("div",{className:"flex h-10 items-center justify-center px-2 text-xs text-muted-foreground",children:s?"No loaded entries match the filter.":"No entries loaded."}),A=({filter:s,onFilterChange:r,shownCount:t,loadedCount:a,totalCount:i,copyJson:n,extra:o,header:l,children:d,footer:h})=>(0,e.jsxs)("div",{className:"overflow-hidden border border-border",children:[(0,e.jsxs)("div",{className:"flex h-8 items-center gap-1 border-b border-border bg-muted/10 px-1",children:[(0,e.jsx)(ve,{className:"ms-1 size-3 shrink-0 text-muted-foreground"}),(0,e.jsx)(J,{variant:"outline",value:s,onChange:c=>r(c.target.value),placeholder:"Filter loaded entries","aria-label":"Filter loaded entries",className:"h-6 flex-1 rounded-none border-none px-1 font-mono focus-visible:ring-0"}),o,(0,e.jsx)("span",{className:"shrink-0 px-1 text-[10px] tabular-nums text-muted-foreground",children:s?`${t} / ${a}`:i!==null&&i>a?`${a.toLocaleString()} of ${i.toLocaleString()}`:a.toLocaleString()}),(0,e.jsx)(oe,{text:n,label:"Copy loaded entries as JSON"})]}),l,d,h]}),se=({labels:s,onSave:r,pending:t,score:a=!1})=>{const[i,n]=(0,p.useState)(w),[o,l]=(0,p.useState)(w),[d,h]=(0,p.useState)("0"),c=i===null||!a&&o===null,b=async u=>{u.preventDefault(),!(i===null||o===null)&&await r(i,a?Number(d):o)&&(n(w),l(w),h("0"))};return(0,e.jsxs)("form",{onSubmit:b,className:"grid grid-cols-[1fr_1fr_auto] items-center gap-2 border-t border-border bg-muted/10 p-2",children:[(0,e.jsx)(S,{value:i,onChange:n,placeholder:s[0]}),a?(0,e.jsx)(J,{type:"number",step:"any",value:d,onChange:u=>h(u.target.value),placeholder:s[1],className:"font-mono"}):(0,e.jsx)(S,{value:o,onChange:l,placeholder:s[1]}),(0,e.jsxs)(m,{type:"submit",disabled:t||c,children:[(0,e.jsx)(ee,{})," Add"]})]})},ss=({value:s,truncated:r,act:t,pending:a,onLoadFull:i,onDownload:n})=>{const[o,l]=K(s,s.base64),d=o!==null&&o.base64!==s.base64;return(0,e.jsxs)("div",{className:"space-y-3",children:[r&&(0,e.jsxs)("div",{className:"grid gap-2 border-b border-border pb-3 sm:grid-cols-[1fr_auto] sm:items-center",children:[(0,e.jsx)(P,{variant:"warning",title:"Preview truncated",message:"Load the full value before editing (up to the 8 MiB response cap).",className:"rounded-sm"}),(0,e.jsx)(m,{variant:"outline",onClick:i,children:"Load full"})]}),(0,e.jsx)(D,{value:s,onDownload:n}),(0,e.jsxs)("form",{onSubmit:h=>{h.preventDefault(),o!==null&&d&&t({action:"setString",value:o})},className:"border border-border p-3",children:[(0,e.jsxs)(Y,{className:"gap-1.5",children:[(0,e.jsx)(X,{htmlFor:"redis-string-value",children:"Replace value"}),(0,e.jsx)(S,{id:"redis-string-value",value:o,onChange:l})]}),(0,e.jsxs)(m,{type:"submit",className:"mt-3",disabled:r||a||!d,children:[(0,e.jsx)(B,{})," Save value"]})]})]})},rs=({field:s,value:r,act:t,pending:a})=>{const[i,n]=K(r,r.base64),o=i!==null&&i.base64!==r.base64;return(0,e.jsxs)("div",{className:"grid min-h-8 grid-cols-[minmax(10rem,0.7fr)_1fr_5rem] items-center gap-2 border-b border-border px-2 py-1",children:[(0,e.jsx)(D,{value:s,compact:!0}),(0,e.jsx)(S,{value:i,onChange:n}),(0,e.jsxs)("div",{className:"flex",children:[(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:o?"text-primary":void 0,disabled:a||!o,onClick:()=>i!==null&&t({action:"upsertHash",field:s,value:i}),"aria-label":"Save hash value",children:(0,e.jsx)(B,{})}),(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive",disabled:a,onClick:()=>t({action:"deleteHash",field:s}),"aria-label":"Delete hash field",children:(0,e.jsx)(M,{})})]})]})},ts=({value:s,total:r,act:t,pending:a})=>{const[i,n]=(0,p.useState)(""),o=i.trim().toLowerCase(),l=o?s.entries.filter(d=>$(o,j(d.field),j(d.value))):s.entries;return(0,e.jsx)(A,{filter:i,onFilterChange:n,shownCount:l.length,loadedCount:s.entries.length,totalCount:r,copyJson:()=>F(s),header:(0,e.jsxs)("div",{className:"grid h-8 grid-cols-[minmax(10rem,0.7fr)_1fr_5rem] items-center border-b border-border bg-muted/20 px-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[(0,e.jsx)("span",{children:"Field"}),(0,e.jsx)("span",{children:"Value"}),(0,e.jsx)("span",{})]}),footer:(0,e.jsx)(se,{labels:["field","value"],pending:a,onSave:(d,h)=>t({action:"upsertHash",field:d,value:h})}),children:l.length===0?(0,e.jsx)(O,{filtered:o.length>0}):l.map(d=>(0,e.jsx)(rs,{field:d.field,value:d.value,act:t,pending:a},d.field.base64))})},as=({index:s,value:r,revision:t,act:a,pending:i})=>{const[n,o]=K(r,`${t}:${r.base64}`),l=n!==null&&n.base64!==r.base64;return(0,e.jsxs)("div",{className:"grid min-h-8 grid-cols-[3rem_1fr_5rem] items-center gap-2 border-b border-border px-2 py-1",children:[(0,e.jsx)("code",{className:"text-xs text-muted-foreground",children:s}),(0,e.jsx)(S,{value:n,onChange:o}),(0,e.jsxs)("div",{className:"flex",children:[(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:l?"text-primary":void 0,disabled:i||!l,onClick:()=>n!==null&&a({action:"setList",index:s,value:n}),"aria-label":`Save list item ${s}`,children:(0,e.jsx)(B,{})}),(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive",disabled:i,onClick:()=>a({action:"deleteList",index:s}),"aria-label":`Delete list item ${s}`,children:(0,e.jsx)(M,{})})]})]})},ns=({value:s,revision:r,total:t,act:a,pending:i})=>{const[n,o]=(0,p.useState)(""),[l,d]=(0,p.useState)(w),h=n.trim().toLowerCase(),c=h?s.entries.filter(u=>$(h,u.index,j(u.value))):s.entries,b=async u=>{l!==null&&await a({action:"pushList",side:u,value:l})&&d(w)};return(0,e.jsx)(A,{filter:n,onFilterChange:o,shownCount:c.length,loadedCount:s.entries.length,totalCount:t,copyJson:()=>F(s),header:(0,e.jsxs)("div",{className:"grid h-8 grid-cols-[3rem_1fr_5rem] items-center border-b border-border bg-muted/20 px-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[(0,e.jsx)("span",{children:"Index"}),(0,e.jsx)("span",{children:"Value"}),(0,e.jsx)("span",{})]}),footer:(0,e.jsxs)("form",{onSubmit:u=>{u.preventDefault(),b("right")},className:"grid grid-cols-[1fr_auto_auto] items-center gap-2 border-t border-border bg-muted/10 p-2",children:[(0,e.jsx)(S,{value:l,onChange:d,placeholder:"new item"}),(0,e.jsx)(m,{type:"button",variant:"outline",disabled:i||l===null,onClick:()=>b("left"),children:"Push left"}),(0,e.jsx)(m,{type:"submit",disabled:i||l===null,children:"Push right"})]}),children:c.length===0?(0,e.jsx)(O,{filtered:h.length>0}):c.map(u=>(0,e.jsx)(as,{index:u.index,value:u.value,revision:r,act:a,pending:i},u.index))})},is=({value:s,total:r,act:t,pending:a})=>{const[i,n]=(0,p.useState)(""),[o,l]=(0,p.useState)(w),d=i.trim().toLowerCase(),h=d?s.members.filter(c=>$(d,j(c))):s.members;return(0,e.jsx)(A,{filter:i,onFilterChange:n,shownCount:h.length,loadedCount:s.members.length,totalCount:r,copyJson:()=>F(s),header:(0,e.jsxs)("div",{className:"grid h-8 grid-cols-[1fr_2rem] items-center border-b border-border bg-muted/20 px-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[(0,e.jsx)("span",{children:"Member"}),(0,e.jsx)("span",{})]}),footer:(0,e.jsxs)("form",{onSubmit:async c=>{c.preventDefault(),o!==null&&await t({action:"addSet",member:o})&&l(w)},className:"grid grid-cols-[1fr_auto] items-center gap-2 border-t border-border bg-muted/10 p-2",children:[(0,e.jsx)(S,{value:o,onChange:l,placeholder:"new member"}),(0,e.jsxs)(m,{type:"submit",disabled:a||o===null,children:[(0,e.jsx)(ee,{})," Add member"]})]}),children:h.length===0?(0,e.jsx)(O,{filtered:d.length>0}):h.map(c=>(0,e.jsxs)("div",{className:"flex min-h-8 items-center gap-2 border-b border-border px-2 py-1",children:[(0,e.jsx)("span",{className:"min-w-0 flex-1",children:(0,e.jsx)(D,{value:c,compact:!0})}),(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive",disabled:a,onClick:()=>t({action:"removeSet",member:c}),"aria-label":"Remove set member",children:(0,e.jsx)(M,{})})]},c.base64))})},os=({member:s,score:r,act:t,pending:a})=>{const[i,n]=K(String(r),String(r)),o=Number(i),l=i!==String(r);return(0,e.jsxs)("div",{className:"grid min-h-8 grid-cols-[1fr_8rem_5rem] items-center gap-2 border-b border-border px-2 py-1",children:[(0,e.jsx)(D,{value:s,compact:!0}),(0,e.jsx)(J,{inputMode:"decimal",value:i,onChange:d=>n(d.target.value),"aria-label":"Sorted set score",className:"font-mono"}),(0,e.jsxs)("div",{className:"flex",children:[(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:l?"text-primary":void 0,disabled:a||!l||!Number.isFinite(o),onClick:()=>t({action:"upsertZset",member:s,score:o}),"aria-label":"Save sorted set score",children:(0,e.jsx)(B,{})}),(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive",disabled:a,onClick:()=>t({action:"removeZset",member:s}),"aria-label":"Remove sorted set member",children:(0,e.jsx)(M,{})})]})]})},ls=({value:s,total:r,act:t,pending:a})=>{const[i,n]=(0,p.useState)(""),o=i.trim().toLowerCase(),l=o?s.entries.filter(d=>$(o,j(d.member),d.score)):s.entries;return(0,e.jsx)(A,{filter:i,onFilterChange:n,shownCount:l.length,loadedCount:s.entries.length,totalCount:r,copyJson:()=>F(s),header:(0,e.jsxs)("div",{className:"grid h-8 grid-cols-[1fr_8rem_5rem] items-center border-b border-border bg-muted/20 px-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[(0,e.jsx)("span",{children:"Member"}),(0,e.jsx)("span",{children:"Score"}),(0,e.jsx)("span",{})]}),footer:(0,e.jsx)(se,{score:!0,labels:["member","score"],pending:a,onSave:(d,h)=>t({action:"upsertZset",member:d,score:h})}),children:l.length===0?(0,e.jsx)(O,{filtered:o.length>0}):l.map(d=>(0,e.jsx)(os,{member:d.member,score:d.score,act:t,pending:a},d.member.base64))})},ds=({value:s,total:r,act:t,pending:a,direction:i,onDirectionChange:n})=>{const[o,l]=(0,p.useState)(""),d=o.trim().toLowerCase(),h=d?s.entries.filter(c=>$(d,c.id,...c.fields.flatMap(b=>[j(b.field),j(b.value)]))):s.entries;return(0,e.jsx)(A,{filter:o,onFilterChange:l,shownCount:h.length,loadedCount:s.entries.length,totalCount:r,copyJson:()=>F(s),extra:(0,e.jsxs)(Ke,{type:"single",variant:"ghost",size:"sm",value:i,onValueChange:c=>c&&n(c),"aria-label":"Stream order",className:"shrink-0 rounded-none",children:[(0,e.jsx)(ie,{value:"forward",className:"h-6 rounded-none px-2 text-[10px]",children:"Oldest first"}),(0,e.jsx)(ie,{value:"backward",className:"h-6 rounded-none px-2 text-[10px]",children:"Newest first"})]}),header:(0,e.jsxs)("div",{className:"grid h-8 grid-cols-[10rem_1fr_2rem] items-center border-b border-border bg-muted/20 px-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:[(0,e.jsx)("span",{children:"Entry ID"}),(0,e.jsx)("span",{children:"Fields"}),(0,e.jsx)("span",{})]}),footer:(0,e.jsx)(se,{labels:["field","value"],pending:a,onSave:(c,b)=>t({action:"appendStream",id:"*",fields:[{field:c,value:b}]})}),children:h.length===0?(0,e.jsx)(O,{filtered:d.length>0}):h.map(c=>(0,e.jsxs)("div",{className:"grid grid-cols-[10rem_1fr_2rem] border-b border-border",children:[(0,e.jsx)("code",{className:"border-e border-border px-2 py-1.5 text-xs text-primary",children:c.id}),(0,e.jsx)("div",{className:"grid gap-1 px-2 py-1.5",children:c.fields.map(b=>(0,e.jsxs)("div",{className:"grid grid-cols-[minmax(8rem,0.4fr)_1fr] gap-3",children:[(0,e.jsx)(D,{value:b.field,compact:!0}),(0,e.jsx)(D,{value:b.value,compact:!0})]},b.field.base64))}),(0,e.jsx)(m,{variant:"ghost",size:"icon-sm",className:"rounded-none text-muted-foreground hover:text-destructive",disabled:a,onClick:()=>t({action:"deleteStream",id:c.id}),"aria-label":`Delete stream entry ${c.id}`,children:(0,e.jsx)(M,{})})]},c.id))})},cs=({detail:s,act:r,pending:t,onLoadFull:a,onDownload:i,streamDirection:n,onStreamDirectionChange:o})=>{const l=s.value;switch(l.kind){case"string":return(0,e.jsx)(ss,{value:l.value,truncated:l.truncated,act:r,pending:t,onLoadFull:a,onDownload:i});case"hash":return(0,e.jsx)(ts,{value:l,total:s.length,act:r,pending:t});case"list":return(0,e.jsx)(ns,{value:l,revision:s.revision,total:s.length,act:r,pending:t});case"set":return(0,e.jsx)(is,{value:l,total:s.length,act:r,pending:t});case"zset":return(0,e.jsx)(ls,{value:l,total:s.length,act:r,pending:t});case"stream":return(0,e.jsx)(ds,{value:l,total:s.length,act:r,pending:t,direction:n,onDirectionChange:o});default:return(0,e.jsx)(P,{variant:"info",title:"Metadata only",message:"This Redis module type cannot be edited in this release.",className:"rounded-sm"})}},us=s=>{if(s.key.utf8===void 0)return null;const r=JSON.stringify(s.key.utf8);switch(s.type){case"string":return`GET ${r}`;case"hash":return`HGETALL ${r}`;case"list":return`LRANGE ${r} 0 -1`;case"set":return`SMEMBERS ${r}`;case"zset":return`ZRANGE ${r} 0 -1 WITHSCORES`;case"stream":return`XRANGE ${r} - + COUNT 100`;default:return null}},ms=s=>{switch(s.value.kind){case"hash":case"list":case"zset":case"stream":return s.value.entries.length;case"set":return s.value.members.length;default:return null}},hs=()=>{const s=he(),{selectedDatabase:r}=Me(),{openOverlay:t}=Ce(),{addQuery:a,updateQuery:i}=Ge(),[n,o]=Re("key"),[l,d]=(0,p.useState)(null),[h,c]=(0,p.useState)(null),b=h===n?"backward":"forward",u=He(n,l===n,b),{applyAction:L,deleteKey:U,isPending:C}=qe(),N=u.data?.pages,x=N?.[0],[z,v]=(0,p.useState)(!1),[I,_]=(0,p.useState)(null),T=x?.key.utf8??(x?`binary:${x.key.base64}`:""),E=x?us(x):null,R=(0,p.useMemo)(()=>{if(!x||!N||N.length===1)return x;const f=structuredClone(x);for(const g of N.slice(1))f.value.kind==="hash"&&g.value.kind==="hash"&&f.value.entries.push(...g.value.entries),f.value.kind==="list"&&g.value.kind==="list"&&f.value.entries.push(...g.value.entries),f.value.kind==="set"&&g.value.kind==="set"&&f.value.members.push(...g.value.members),f.value.kind==="zset"&&g.value.kind==="zset"&&f.value.entries.push(...g.value.entries),f.value.kind==="stream"&&g.value.kind==="stream"&&f.value.entries.push(...g.value.entries);return f},[x,N]),G=R?ms(R):null,H=async(f,g=!1)=>{if(!n||!x)return!1;try{const k=await L(n,{expectedRevision:x.revision,force:g,operation:f});return _(null),k.deleted?o(null):(k.key.base64||"-")!==n&&o(k.key.base64||"-"),!0}catch(k){return k.status===409&&_(f),!1}},le=()=>{if(!E)return;const f=a(`redis: ${T.slice(0,40)}`);i(f,{query:E}),s({to:"/runner/$queryId",params:{queryId:f}})},de=async()=>{if(!n||!x||x.type!=="string")return;const f=[];let g=0,k=!0;for(;k;){const y=(await De({db:r??"",key:n,offset:g,expectedRevision:x.revision})).data.data;if(f.push(Ze(y.chunk.base64)),k=y.hasMore,y.hasMore&&(y.nextOffset===null||y.nextOffset<=g))throw new Error("Redis download made no forward progress");g=y.nextOffset??g}const ce=f.reduce((y,ue)=>y+ue.length,0),te=new Uint8Array(ce);let ae=0;for(const y of f)te.set(y,ae),ae+=y.length;const ne=URL.createObjectURL(new Blob([te.buffer])),V=document.createElement("a");V.href=ne,V.download=`${x.key.utf8?.replaceAll(/[^\w.-]+/g,"_")||"redis-value"}.bin`,V.click(),URL.revokeObjectURL(ne)};if(!n)return(0,e.jsx)("main",{className:"flex flex-1 items-center justify-center bg-background font-mono",children:(0,e.jsxs)("div",{className:"max-w-sm text-center",children:[(0,e.jsx)(ge,{className:"mx-auto mb-3 size-5 text-muted-foreground"}),(0,e.jsx)("h1",{className:"text-sm font-medium text-foreground",children:"No key selected"}),(0,e.jsx)("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:"Select a key from the navigator or create one to inspect its value."}),(0,e.jsxs)(m,{variant:"outline",className:"mt-3",onClick:()=>t("redis-browser.create-key"),children:[(0,e.jsx)(ee,{})," Create key"]})]})});if(u.isLoading)return(0,e.jsx)("main",{className:"flex flex-1 items-center justify-center",children:(0,e.jsx)(Se,{})});if(u.error||!x||!R)return(0,e.jsx)("main",{className:"flex flex-1 items-center justify-center bg-background p-4",children:(0,e.jsxs)("div",{className:"w-full max-w-md text-center",children:[(0,e.jsx)(P,{variant:"error",title:"Unable to load key",message:u.error?.message??"The key no longer exists.",className:"rounded-sm text-start"}),(0,e.jsx)(m,{variant:"outline",className:"mt-4",onClick:()=>o(null),children:"Back to keyspace"})]})});const re=R.length!==null&&G!==null?Math.max(0,R.length-G):null;return(0,e.jsxs)("main",{className:"flex min-h-0 flex-1 flex-col bg-background font-mono",children:[(0,e.jsx)(es,{detail:x,label:T,loadedCount:G,fetchedAt:u.dataUpdatedAt,isFetching:u.isFetching,pending:C,command:E,act:H,onRefresh:()=>u.refetch(),onOpenRunner:le,onDelete:()=>v(!0)},x.key.base64),(0,e.jsx)(Ae,{open:z,onOpenChange:v,children:(0,e.jsxs)(Fe,{children:[(0,e.jsxs)(Ee,{children:[(0,e.jsx)(ze,{children:"Delete key"}),(0,e.jsxs)(Be,{children:["Are you sure you want to delete"," ",(0,e.jsx)("code",{className:"break-all text-foreground",children:T||"(empty key)"}),"? This action cannot be undone."]})]}),(0,e.jsxs)(Te,{children:[(0,e.jsx)(_e,{children:"Cancel"}),(0,e.jsx)(Ie,{variant:"destructive",onClick:async()=>{v(!1);try{await U(n,x.revision),o(null)}catch{}},children:"Delete"})]})]})}),I&&(0,e.jsxs)("div",{className:"grid gap-2 border-b border-border p-2 sm:grid-cols-[1fr_auto] sm:items-center",children:[(0,e.jsx)(P,{variant:"warning",title:"Revision conflict",message:"This key changed on the server. Reload it or overwrite with the pending change.",className:"rounded-sm py-2"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(m,{variant:"outline",onClick:()=>{_(null),u.refetch()},children:"Reload"}),(0,e.jsx)(m,{disabled:C,onClick:()=>H(I,!0),children:"Overwrite"})]})]}),(0,e.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,e.jsxs)("section",{className:"p-3",children:[(0,e.jsx)(cs,{detail:R,act:H,pending:C,onLoadFull:()=>d(n),onDownload:()=>{we.promise(de(),{loading:"Downloading original Redis bytes…",success:"Redis value downloaded",error:f=>f.message||"Download failed"})},streamDirection:b,onStreamDirectionChange:f=>c(f==="backward"?n:null)},x.key.base64),u.hasNextPage&&(0,e.jsx)(m,{variant:"outline",className:"mt-3 w-full",onClick:()=>u.fetchNextPage(),disabled:u.isFetchingNextPage,children:u.isFetchingNextPage?"Loading…":x.type==="stream"&&b==="backward"?"Load 100 older entries":`Load next 100${re!==null?` (${re.toLocaleString()} remaining)`:""}`})]})})]})},Ls=hs;export{Ls as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0c22cec3-3254-4679-8351-8f0071891afb",e._sentryDebugIdIdentifier="sentry-dbid-0c22cec3-3254-4679-8351-8f0071891afb")}catch{}})();function xe(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=xe(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Cr(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=xe(e))&&(r&&(r+=" "),r+=t);return r}var Ne=(e,t)=>{const o=new Array(e.length+t.length);for(let r=0;r<e.length;r++)o[r]=e[r];for(let r=0;r<t.length;r++)o[e.length+r]=t[r];return o},Le=(e,t)=>({classGroupId:e,validator:t}),ye=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),K="-",fe=[],Ve="arbitrary..",_e=e=>{const t=We(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Fe(i);const b=i.split(K),l=b[0]===""&&b.length>1?1:0;return ze(b,l,t)},getConflictingClassGroupIds:(i,b)=>{if(b){const l=r[i],u=o[i];return l?u?Ne(u,l):l:u||fe}return o[i]||fe}}},ze=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const r=e[t],n=o.nextPart.get(r);if(n){const l=ze(e,t+1,n);if(l)return l}const m=o.validators;if(m===null)return;const i=t===0?e.join(K):e.slice(t).join(K),b=m.length;for(let l=0;l<b;l++){const u=m[l];if(u.validator(i))return u.classGroupId}},Fe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),r=t.slice(0,o);return r?Ve+r:void 0})(),We=e=>{const{theme:t,classGroups:o}=e;return Be(o,t)},Be=(e,t)=>{const o=ye();for(const r in e){const n=e[r];ae(n,o,r,t)}return o},ae=(e,t,o,r)=>{const n=e.length;for(let m=0;m<n;m++){const i=e[m];De(i,t,o,r)}},De=(e,t,o,r)=>{if(typeof e=="string"){$e(e,t,o);return}if(typeof e=="function"){Ue(e,t,o,r);return}Ye(e,t,o,r)},$e=(e,t,o)=>{const r=e===""?t:Ce(t,e);r.classGroupId=o},Ue=(e,t,o,r)=>{if(qe(e)){ae(e(r),t,o,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Le(o,e))},Ye=(e,t,o,r)=>{const n=Object.entries(e),m=n.length;for(let i=0;i<m;i++){const[b,l]=n[i];ae(l,Ce(t,b),o,r)}},Ce=(e,t)=>{let o=e;const r=t.split(K),n=r.length;for(let m=0;m<n;m++){const i=r[m];let b=o.nextPart.get(i);b||(b=ye(),o.nextPart.set(i,b)),o=b}return o},qe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),r=Object.create(null);const n=(m,i)=>{o[m]=i,t++,t>e&&(t=0,r=o,o=Object.create(null))};return{get(m){let i=o[m];if(i!==void 0)return i;if((i=r[m])!==void 0)return n(m,i),i},set(m,i){m in o?o[m]=i:n(m,i)}}},se="!",ge=":",Je=[],he=(e,t,o,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:r,isExternal:n}),He=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const m=[];let i=0,b=0,l=0,u;const w=n.length;for(let z=0;z<w;z++){const k=n[z];if(i===0&&b===0){if(k===ge){m.push(n.slice(l,z)),l=z+1;continue}if(k==="/"){u=z;continue}}k==="["?i++:k==="]"?i--:k==="("?b++:k===")"&&b--}const y=m.length===0?n:n.slice(l);let A=y,T=!1;y.endsWith(se)?(A=y.slice(0,-1),T=!0):y.startsWith(se)&&(A=y.slice(1),T=!0);const G=u&&u>l?u-l:void 0;return he(m,T,A,G)};if(t){const n=t+ge,m=r;r=i=>i.startsWith(n)?m(i.slice(n.length)):he(Je,!1,i,void 0,!0)}if(o){const n=r;r=m=>o({className:m,parseClassName:n})}return r},Ke=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,r)=>{t.set(o,1e6+r)}),o=>{const r=[];let n=[];for(let m=0;m<o.length;m++){const i=o[m],b=i[0]==="[",l=t.has(i);b||l?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(i)):n.push(i)}return n.length>0&&(n.sort(),r.push(...n)),r}},Qe=e=>({cache:Xe(e.cacheSize),parseClassName:He(e),sortModifiers:Ke(e),..._e(e)}),Ze=/\s+/,er=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:m}=t,i=[],b=e.trim().split(Ze);let l="";for(let u=b.length-1;u>=0;u-=1){const w=b[u],{isExternal:y,modifiers:A,hasImportantModifier:T,baseClassName:G,maybePostfixModifierPosition:z}=o(w);if(y){l=w+(l.length>0?" "+l:l);continue}let k=!!z,P=r(k?G.substring(0,z):G);if(!P){if(!k){l=w+(l.length>0?" "+l:l);continue}if(P=r(G),!P){l=w+(l.length>0?" "+l:l);continue}k=!1}const D=A.length===0?"":A.length===1?A[0]:m(A).join(":"),F=T?D+se:D,L=F+P;if(i.indexOf(L)>-1)continue;i.push(L);const V=n(P,k);for(let E=0;E<V.length;++E){const W=V[E];i.push(F+W)}l=w+(l.length>0?" "+l:l)}return l},rr=(...e)=>{let t=0,o,r,n="";for(;t<e.length;)(o=e[t++])&&(r=Ae(o))&&(n&&(n+=" "),n+=r);return n},Ae=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Ae(e[r]))&&(o&&(o+=" "),o+=t);return o},or=(e,...t)=>{let o,r,n,m;const i=l=>{const u=t.reduce((w,y)=>y(w),e());return o=Qe(u),r=o.cache.get,n=o.cache.set,m=b,b(l)},b=l=>{const u=r(l);if(u)return u;const w=er(l,o);return n(l,w),w};return m=i,(...l)=>m(rr(...l))},tr=[],f=e=>{const t=o=>o[e]||tr;return t.isThemeGetter=!0,t},Se=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ie=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ar=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ir=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>sr.test(e),p=e=>!!e&&!Number.isNaN(Number(e)),R=e=>!!e&&Number.isInteger(Number(e)),te=e=>e.endsWith("%")&&p(e.slice(0,-1)),S=e=>ar.test(e),Re=()=>!0,dr=e=>nr.test(e)&&!ir.test(e),ne=()=>!1,mr=e=>lr.test(e),pr=e=>cr.test(e),br=e=>!s(e)&&!a(e),ur=e=>M(e,Ge,ne),s=e=>Se.test(e),j=e=>M(e,Pe,dr),ve=e=>M(e,yr,p),fr=e=>M(e,Oe,Re),gr=e=>M(e,Ee,ne),we=e=>M(e,Me,ne),hr=e=>M(e,Te,pr),J=e=>M(e,je,mr),a=e=>Ie.test(e),B=e=>N(e,Pe),vr=e=>N(e,Ee),ke=e=>N(e,Me),wr=e=>N(e,Ge),kr=e=>N(e,Te),H=e=>N(e,je,!0),xr=e=>N(e,Oe,!0),M=(e,t,o)=>{const r=Se.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},N=(e,t,o=!1)=>{const r=Ie.exec(e);return r?r[1]?t(r[1]):o:!1},Me=e=>e==="position"||e==="percentage",Te=e=>e==="image"||e==="url",Ge=e=>e==="length"||e==="size"||e==="bg-size",Pe=e=>e==="length",yr=e=>e==="number",Ee=e=>e==="family-name",Oe=e=>e==="number"||e==="weight",je=e=>e==="shadow",zr=()=>{const e=f("color"),t=f("font"),o=f("text"),r=f("font-weight"),n=f("tracking"),m=f("leading"),i=f("breakpoint"),b=f("container"),l=f("spacing"),u=f("radius"),w=f("shadow"),y=f("inset-shadow"),A=f("text-shadow"),T=f("drop-shadow"),G=f("blur"),z=f("perspective"),k=f("aspect"),P=f("ease"),D=f("animate"),F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...L(),a,s],E=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],c=()=>[a,s,l],x=()=>[I,"full","auto",...c()],ie=()=>[R,"none","subgrid",a,s],le=()=>["auto",{span:["full",R,a,s]},R,a,s],$=()=>[R,"auto",a,s],ce=()=>["auto","min","max","fr",a,s],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...c()],O=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...c()],Z=()=>[I,"screen","full","dvw","lvw","svw","min","max","fit",...c()],ee=()=>[I,"screen","full","lh","dvh","lvh","svh","min","max","fit",...c()],d=()=>[e,a,s],de=()=>[...L(),ke,we,{position:[a,s]}],me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],pe=()=>["auto","cover","contain",wr,ur,{size:[a,s]}],re=()=>[te,B,j],h=()=>["","none","full",u,a,s],v=()=>["",p,B,j],U=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],g=()=>[p,te,ke,we],ue=()=>["","none",G,a,s],Y=()=>["none",p,a,s],q=()=>["none",p,a,s],oe=()=>[p,a,s],X=()=>[I,"full",...c()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[S],breakpoint:[S],color:[Re],container:[S],"drop-shadow":[S],ease:["in","out","in-out"],font:[br],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[S],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[S],shadow:[S],spacing:["px",p],text:[S],"text-shadow":[S],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,s,a,k]}],container:["container"],columns:[{columns:[p,s,a,b]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{"inset-s":x(),start:x()}],end:[{"inset-e":x(),end:x()}],"inset-bs":[{"inset-bs":x()}],"inset-be":[{"inset-be":x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[R,"auto",a,s]}],basis:[{basis:[I,"full","auto",b,...c()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[p,I,"auto","initial","none",s]}],grow:[{grow:["",p,a,s]}],shrink:[{shrink:["",p,a,s]}],order:[{order:[R,"first","last","none",a,s]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:c()}],"gap-x":[{"gap-x":c()}],"gap-y":[{"gap-y":c()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:c()}],px:[{px:c()}],py:[{py:c()}],ps:[{ps:c()}],pe:[{pe:c()}],pbs:[{pbs:c()}],pbe:[{pbe:c()}],pt:[{pt:c()}],pr:[{pr:c()}],pb:[{pb:c()}],pl:[{pl:c()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mbs:[{mbs:C()}],mbe:[{mbe:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":c()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":c()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[b,"screen",...O()]}],"min-w":[{"min-w":[b,"screen","none",...O()]}],"max-w":[{"max-w":[b,"screen","none","prose",{screen:[i]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",o,B,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,xr,fr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",te,s]}],"font-family":[{font:[vr,gr,t]}],"font-features":[{"font-features":[s]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,a,s]}],"line-clamp":[{"line-clamp":[p,"none",a,ve]}],leading:[{leading:[m,...c()]}],"list-image":[{"list-image":["none",a,s]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",a,s]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:d()}],"text-color":[{text:d()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[p,"from-font","auto",a,j]}],"text-decoration-color":[{decoration:d()}],"underline-offset":[{"underline-offset":[p,"auto",a,s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",a,s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",a,s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:me()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},R,a,s],radial:["",a,s],conic:[R,a,s]},kr,hr]}],"bg-color":[{bg:d()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:d()}],"gradient-via":[{via:d()}],"gradient-to":[{to:d()}],rounded:[{rounded:h()}],"rounded-s":[{"rounded-s":h()}],"rounded-e":[{"rounded-e":h()}],"rounded-t":[{"rounded-t":h()}],"rounded-r":[{"rounded-r":h()}],"rounded-b":[{"rounded-b":h()}],"rounded-l":[{"rounded-l":h()}],"rounded-ss":[{"rounded-ss":h()}],"rounded-se":[{"rounded-se":h()}],"rounded-ee":[{"rounded-ee":h()}],"rounded-es":[{"rounded-es":h()}],"rounded-tl":[{"rounded-tl":h()}],"rounded-tr":[{"rounded-tr":h()}],"rounded-br":[{"rounded-br":h()}],"rounded-bl":[{"rounded-bl":h()}],"border-w":[{border:v()}],"border-w-x":[{"border-x":v()}],"border-w-y":[{"border-y":v()}],"border-w-s":[{"border-s":v()}],"border-w-e":[{"border-e":v()}],"border-w-bs":[{"border-bs":v()}],"border-w-be":[{"border-be":v()}],"border-w-t":[{"border-t":v()}],"border-w-r":[{"border-r":v()}],"border-w-b":[{"border-b":v()}],"border-w-l":[{"border-l":v()}],"divide-x":[{"divide-x":v()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":v()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:d()}],"border-color-x":[{"border-x":d()}],"border-color-y":[{"border-y":d()}],"border-color-s":[{"border-s":d()}],"border-color-e":[{"border-e":d()}],"border-color-bs":[{"border-bs":d()}],"border-color-be":[{"border-be":d()}],"border-color-t":[{"border-t":d()}],"border-color-r":[{"border-r":d()}],"border-color-b":[{"border-b":d()}],"border-color-l":[{"border-l":d()}],"divide-color":[{divide:d()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[p,a,s]}],"outline-w":[{outline:["",p,B,j]}],"outline-color":[{outline:d()}],shadow:[{shadow:["","none",w,H,J]}],"shadow-color":[{shadow:d()}],"inset-shadow":[{"inset-shadow":["none",y,H,J]}],"inset-shadow-color":[{"inset-shadow":d()}],"ring-w":[{ring:v()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:d()}],"ring-offset-w":[{"ring-offset":[p,j]}],"ring-offset-color":[{"ring-offset":d()}],"inset-ring-w":[{"inset-ring":v()}],"inset-ring-color":[{"inset-ring":d()}],"text-shadow":[{"text-shadow":["none",A,H,J]}],"text-shadow-color":[{"text-shadow":d()}],opacity:[{opacity:[p,a,s]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[p]}],"mask-image-linear-from-pos":[{"mask-linear-from":g()}],"mask-image-linear-to-pos":[{"mask-linear-to":g()}],"mask-image-linear-from-color":[{"mask-linear-from":d()}],"mask-image-linear-to-color":[{"mask-linear-to":d()}],"mask-image-t-from-pos":[{"mask-t-from":g()}],"mask-image-t-to-pos":[{"mask-t-to":g()}],"mask-image-t-from-color":[{"mask-t-from":d()}],"mask-image-t-to-color":[{"mask-t-to":d()}],"mask-image-r-from-pos":[{"mask-r-from":g()}],"mask-image-r-to-pos":[{"mask-r-to":g()}],"mask-image-r-from-color":[{"mask-r-from":d()}],"mask-image-r-to-color":[{"mask-r-to":d()}],"mask-image-b-from-pos":[{"mask-b-from":g()}],"mask-image-b-to-pos":[{"mask-b-to":g()}],"mask-image-b-from-color":[{"mask-b-from":d()}],"mask-image-b-to-color":[{"mask-b-to":d()}],"mask-image-l-from-pos":[{"mask-l-from":g()}],"mask-image-l-to-pos":[{"mask-l-to":g()}],"mask-image-l-from-color":[{"mask-l-from":d()}],"mask-image-l-to-color":[{"mask-l-to":d()}],"mask-image-x-from-pos":[{"mask-x-from":g()}],"mask-image-x-to-pos":[{"mask-x-to":g()}],"mask-image-x-from-color":[{"mask-x-from":d()}],"mask-image-x-to-color":[{"mask-x-to":d()}],"mask-image-y-from-pos":[{"mask-y-from":g()}],"mask-image-y-to-pos":[{"mask-y-to":g()}],"mask-image-y-from-color":[{"mask-y-from":d()}],"mask-image-y-to-color":[{"mask-y-to":d()}],"mask-image-radial":[{"mask-radial":[a,s]}],"mask-image-radial-from-pos":[{"mask-radial-from":g()}],"mask-image-radial-to-pos":[{"mask-radial-to":g()}],"mask-image-radial-from-color":[{"mask-radial-from":d()}],"mask-image-radial-to-color":[{"mask-radial-to":d()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[p]}],"mask-image-conic-from-pos":[{"mask-conic-from":g()}],"mask-image-conic-to-pos":[{"mask-conic-to":g()}],"mask-image-conic-from-color":[{"mask-conic-from":d()}],"mask-image-conic-to-color":[{"mask-conic-to":d()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:me()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",a,s]}],filter:[{filter:["","none",a,s]}],blur:[{blur:ue()}],brightness:[{brightness:[p,a,s]}],contrast:[{contrast:[p,a,s]}],"drop-shadow":[{"drop-shadow":["","none",T,H,J]}],"drop-shadow-color":[{"drop-shadow":d()}],grayscale:[{grayscale:["",p,a,s]}],"hue-rotate":[{"hue-rotate":[p,a,s]}],invert:[{invert:["",p,a,s]}],saturate:[{saturate:[p,a,s]}],sepia:[{sepia:["",p,a,s]}],"backdrop-filter":[{"backdrop-filter":["","none",a,s]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[p,a,s]}],"backdrop-contrast":[{"backdrop-contrast":[p,a,s]}],"backdrop-grayscale":[{"backdrop-grayscale":["",p,a,s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p,a,s]}],"backdrop-invert":[{"backdrop-invert":["",p,a,s]}],"backdrop-opacity":[{"backdrop-opacity":[p,a,s]}],"backdrop-saturate":[{"backdrop-saturate":[p,a,s]}],"backdrop-sepia":[{"backdrop-sepia":["",p,a,s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":c()}],"border-spacing-x":[{"border-spacing-x":c()}],"border-spacing-y":[{"border-spacing-y":c()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",a,s]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[p,"initial",a,s]}],ease:[{ease:["linear","initial",P,a,s]}],delay:[{delay:[p,a,s]}],animate:[{animate:["none",D,a,s]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[z,a,s]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[a,s,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:d()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:d()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",a,s]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mbs":[{"scroll-mbs":c()}],"scroll-mbe":[{"scroll-mbe":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pbs":[{"scroll-pbs":c()}],"scroll-pbe":[{"scroll-pbe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",a,s]}],fill:[{fill:["none",...d()]}],"stroke-w":[{stroke:[p,B,j,ve]}],stroke:[{stroke:["none",...d()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ar=or(zr);export{Cr as n,Ar as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="99bab104-7d35-4d68-99bd-805292f57f5c",e._sentryDebugIdIdentifier="sentry-dbid-99bab104-7d35-4d68-99bd-805292f57f5c")}catch{}})();var n={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},s={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};export{n as conf,s as language};
|