zframes 0.7.0 → 0.8.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/dist/index.js +1787 -217
- package/package.json +6 -6
- package/runtime/assets/bar-chart-DCMbxUJx.js +1 -0
- package/runtime/assets/{bitcoin-dominance-rskkp4h2.js → bitcoin-dominance-BqoH90r5.js} +1 -1
- package/runtime/assets/{breakeven-DyCA3ya5.js → breakeven-1Kr-v9pE.js} +1 -1
- package/runtime/assets/{breathing-C8Y-Izs8.js → breathing-NOTeAM6N.js} +1 -1
- package/runtime/assets/btc-block-size-bars-BgwX4eu_.js +1 -0
- package/runtime/assets/{btc-blocks-BxS4aEAB.js → btc-blocks-D6TscPNp.js} +1 -1
- package/runtime/assets/{btc-difficulty-CNFxEiPh.js → btc-difficulty-BhSve3vk.js} +1 -1
- package/runtime/assets/btc-difficulty-chart-Yqxof0b6.js +1 -0
- package/runtime/assets/{btc-fees-Db-5JKh9.js → btc-fees-C-Za_OxK.js} +1 -1
- package/runtime/assets/btc-hashrate-5xnTYpft.js +1 -0
- package/runtime/assets/{btc-mempool-DFgUVk8y.js → btc-mempool-0WFrtuQR.js} +1 -1
- package/runtime/assets/{btc-shared-DeqDaCze.js → btc-shared-yOWoU9Im.js} +1 -1
- package/runtime/assets/bubbles-shared-DlmjtiIA.js +1 -0
- package/runtime/assets/{calculator-v01_FkZv.js → calculator-CcLe2vqJ.js} +1 -1
- package/runtime/assets/capital-structure-bars-SEyFIReK.js +1 -0
- package/runtime/assets/{chain-activity-CuA1eiPY.js → chain-activity-CCO3t0hA.js} +1 -1
- package/runtime/assets/chain-activity-bars-DHYCDKWT.js +1 -0
- package/runtime/assets/chain-activity-scatter-DeusbLku.js +1 -0
- package/runtime/assets/chain-price-movers-SeTwhqsM.js +1 -0
- package/runtime/assets/chart-utils-DGogNvJT.js +1 -0
- package/runtime/assets/checklist-orMUS_qt.js +1 -0
- package/runtime/assets/{clock-BWFux5om.js → clock-9PqJvMgi.js} +1 -1
- package/runtime/assets/coin-momentum-heatmap-DvfWWzSD.js +1 -0
- package/runtime/assets/coin-momentum-scatter-Cf4Y29lp.js +1 -0
- package/runtime/assets/{coin-movers-BcXfoFc6.js → coin-movers-D3cmI-tT.js} +1 -1
- package/runtime/assets/{countdown-CXSOeUWD.js → countdown-tMz3FsXT.js} +1 -1
- package/runtime/assets/custom-data-DPPNQ2QQ.js +1 -0
- package/runtime/assets/{cycle-shared-pyXzkgt1.js → cycle-shared-XoGVsOjC.js} +1 -1
- package/runtime/assets/{cycle-signals-BrKJX2c6.js → cycle-signals-DJYUIjas.js} +1 -1
- package/runtime/assets/cycle-valuation-composite-DO_Pda0n.js +1 -0
- package/runtime/assets/d3-ibrLIlQc.js +1 -0
- package/runtime/assets/{daily-analysis-CWluVygw.js → daily-analysis-BVEvATPa.js} +1 -1
- package/runtime/assets/{day-meter-Bi5OZCC4.js → day-meter-DmbSq9YK.js} +1 -1
- package/runtime/assets/{defi-revenue-CFNSNfG7.js → defi-revenue-DPazGCl4.js} +1 -1
- package/runtime/assets/dex-hot-pools-BeuuV2Cj.js +1 -0
- package/runtime/assets/dex-pool-bubbles-BLUbqZ4v.js +1 -0
- package/runtime/assets/dex-pool-liquidity-scatter-Civ63yej.js +1 -0
- package/runtime/assets/{dex-pool-treemap-DqvlN1Jo.js → dex-pool-treemap-ecoWHB8O.js} +1 -1
- package/runtime/assets/dex-volume-bubbles-CX9SfXmZ.js +1 -0
- package/runtime/assets/dex-volume-chart-Bgdepem0.js +1 -0
- package/runtime/assets/dex-volume-share-area-uDfe8wQZ.js +1 -0
- package/runtime/assets/{dex-volume-treemap-qyEBx4ll.js → dex-volume-treemap-BlrxYmk-.js} +1 -1
- package/runtime/assets/{dice-CuzcQipj.js → dice-BOUHMLs6.js} +1 -1
- package/runtime/assets/dino-game-BBIAIplk.js +1 -0
- package/runtime/assets/divider-B-nMbdhH.js +1 -0
- package/runtime/assets/dominance-bars-BjKMZR8V.js +1 -0
- package/runtime/assets/dominance-gauge-DVITO-Eg.js +1 -0
- package/runtime/assets/{drawdy-Bxr7eJ-7.js → drawdy-gpdcuxey.js} +1 -1
- package/runtime/assets/{dxy-CVbZmRsT.js → dxy-DfHaYZsj.js} +1 -1
- package/runtime/assets/dxy-chart-CidtFThk.js +1 -0
- package/runtime/assets/editor-C9dj6xX0.css +1 -0
- package/runtime/assets/editor-yifYG0tI.js +68 -0
- package/runtime/assets/etf-flow-bars-NYq3d_-U.js +1 -0
- package/runtime/assets/etf-flow-calendar-BI18BrWM.js +1 -0
- package/runtime/assets/{etf-flows-chart-B4Im9TVy.js → etf-flows-chart-BzKKqHh4.js} +1 -1
- package/runtime/assets/{etf-flows-Cl1WliDl.js → etf-flows-cufmZrd_.js} +1 -1
- package/runtime/assets/etf-issuer-bars-Dl9H_CZC.js +1 -0
- package/runtime/assets/etf-issuer-treemap-IhYjIP-y.js +1 -0
- package/runtime/assets/eth-issuance-impact-BLHuDvGQ.js +1 -0
- package/runtime/assets/{eth-staking-_q2b8DEx.js → eth-staking-CzidwFMK.js} +1 -1
- package/runtime/assets/{eth-supply-55OpYYBL.js → eth-supply-C7KDK-97.js} +1 -1
- package/runtime/assets/{fear-greed-CywOCckQ.js → fear-greed-DTLHRhif.js} +1 -1
- package/runtime/assets/fear-greed-chart-N1vM_QJ7.js +1 -0
- package/runtime/assets/{filings-feed-CosEi4NL.js → filings-feed-Dpz6nWMU.js} +1 -1
- package/runtime/assets/filings-mix-7ykY8NsE.js +1 -0
- package/runtime/assets/{financial-stress-DBCae4TA.js → financial-stress-BcnDhPO4.js} +1 -1
- package/runtime/assets/{flappy-bird-CBVgwfgX.js → flappy-bird-Vp7j7ceN.js} +1 -1
- package/runtime/assets/format-DxkEZcwQ.js +1 -0
- package/runtime/assets/fundamentals-BIesVoJt.js +1 -0
- package/runtime/assets/funding-bars-BNVCUVqC.js +1 -0
- package/runtime/assets/funding-carry-area-BqCrQOi5.js +1 -0
- package/runtime/assets/funding-comparison-BynnnDDf.js +1 -0
- package/runtime/assets/funding-crowding-scatter-BTzQUtFn.js +1 -0
- package/runtime/assets/funding-heatmap-DUOcDAeX.js +1 -0
- package/runtime/assets/funding-leaderboard-bars-CpYvO_Cs.js +1 -0
- package/runtime/assets/{funding-rate-chart-Da9WMKyJ.js → funding-rate-chart-CANXPS3a.js} +1 -1
- package/runtime/assets/funding-spread-bars-BgA-vSh-.js +1 -0
- package/runtime/assets/funding-venue-heatmap-jKiQGgLb.js +1 -0
- package/runtime/assets/{fx-board-CxhwDBHO.js → fx-board-CTnlbWGJ.js} +1 -1
- package/runtime/assets/fx-cross-heatmap-CDORG9Cx.js +1 -0
- package/runtime/assets/fx-movers-bars-WKvSm3Ry.js +1 -0
- package/runtime/assets/fx-trend-chart-uITTwyv8.js +1 -0
- package/runtime/assets/{game-ui-Dy_QYsPr.js → game-ui-BiMS2KJf.js} +1 -1
- package/runtime/assets/heading-Cidi7R-_.js +1 -0
- package/runtime/assets/hero-number-p8eaQmkA.js +1 -0
- package/runtime/assets/{holiday-calendar-C77t3m6c.js → holiday-calendar-ErapPWhY.js} +1 -1
- package/runtime/assets/image-BQQ0gSaW.js +1 -0
- package/runtime/assets/image-gallery-CNa-8BAA.js +1 -0
- package/runtime/assets/index-BHlJHScr.js +1108 -0
- package/runtime/assets/{index-DKixdHYB.js → index-BpPIfN5S.js} +1 -1
- package/runtime/assets/index-Bw1aFtyx.js +1 -0
- package/runtime/assets/index-DuNO-RcB.js +1 -0
- package/runtime/assets/index-yv-SCb9g.css +1 -0
- package/runtime/assets/indicators-Cw7CVPn4.js +1 -0
- package/runtime/assets/inflation-pulse-B54HwpAO.js +1 -0
- package/runtime/assets/{journal-log-BDu39CBE.js → journal-log-0CruSC_H.js} +1 -1
- package/runtime/assets/{journal-open-FejLOzlA.js → journal-open-DIwxMMCH.js} +1 -1
- package/runtime/assets/{journal-results-CtKy6MZM.js → journal-results-BM_i_JJ3.js} +1 -1
- package/runtime/assets/{journal-score-Bd7IDYl4.js → journal-score-He6DdYtU.js} +1 -1
- package/runtime/assets/{journal-store-KCRoPnI_.js → journal-store-DVDSxNMj.js} +1 -1
- package/runtime/assets/{journal-ui-C_htu3aM.js → journal-ui-CP9YblNJ.js} +1 -1
- package/runtime/assets/labor-force-flow-8HLQsbKV.js +1 -0
- package/runtime/assets/labor-market-If23zBQK.js +1 -0
- package/runtime/assets/{lightning-stats-botYMCIX.js → lightning-stats-DhrfBtX6.js} +1 -1
- package/runtime/assets/{link-grid-DFuD6XVK.js → link-grid-CsnxpE4z.js} +1 -1
- package/runtime/assets/liquidity-basis-bars-CaU5YtBA.js +1 -0
- package/runtime/assets/{ma-multiplier-s6ix-kL8.js → ma-multiplier-BBN7qsdV.js} +1 -1
- package/runtime/assets/{macro-calendar-Dhnx2n5Q.js → macro-calendar-cKBRneX9.js} +1 -1
- package/runtime/assets/market-bubbles-BKNkvOTg.js +1 -0
- package/runtime/assets/{market-cap-treemap-BWtivvac.js → market-cap-treemap-BSBU8mjq.js} +1 -1
- package/runtime/assets/market-hours-B10lWec_.js +1 -0
- package/runtime/assets/market-scatter-CVUa4ZQ_.js +1 -0
- package/runtime/assets/{marquee-NHBiLJUk.js → marquee-BS_quB4S.js} +1 -1
- package/runtime/assets/mayer-multiple-iiKonfXX.js +1 -0
- package/runtime/assets/mempool-fee-curve-CQ4nzab8.js +1 -0
- package/runtime/assets/{mini-line-chart-QWeuTPfP.js → mini-line-chart-DyG55cVW.js} +1 -1
- package/runtime/assets/{mining-pools-BxipfJmv.js → mining-pools-DROnvkZS.js} +1 -1
- package/runtime/assets/mining-pools-share-BhHh0hUJ.js +1 -0
- package/runtime/assets/misery-index-DpG7yLgX.js +1 -0
- package/runtime/assets/mover-row-Bz-YpFL3.js +1 -0
- package/runtime/assets/movers-bars-CEFjsHnv.js +1 -0
- package/runtime/assets/movers-bubbles-C-SriZvR.js +1 -0
- package/runtime/assets/{mvrv-BIwCiyRN.js → mvrv-Cg0t6U5X.js} +1 -1
- package/runtime/assets/mvrv-zscore-chart-qyOkheJb.js +1 -0
- package/runtime/assets/national-debt-BRX09_U_.js +1 -0
- package/runtime/assets/news-feed-DQHSPzk5.js +1 -0
- package/runtime/assets/nft-activity-bars-BmNs4RMC.js +1 -0
- package/runtime/assets/nft-bubbles-0f9wAld0.js +1 -0
- package/runtime/assets/{nft-collections-sD-yDfKU.js → nft-collections-Czp0t7ZU.js} +1 -1
- package/runtime/assets/nft-scatter-BHULn6_-.js +1 -0
- package/runtime/assets/{nft-treemap-Bqhk41Of.js → nft-treemap-D2Kj3AuL.js} +1 -1
- package/runtime/assets/note-BdVtsqXo.js +3 -0
- package/runtime/assets/{nupl-U-WHVDJ0.js → nupl-BrK2rcgi.js} +1 -1
- package/runtime/assets/nupl-cycle-chart-BlXOLj4A.js +1 -0
- package/runtime/assets/nyfed-fed-funds-band-gauge-DnzVhh9I.js +1 -0
- package/runtime/assets/nyfed-reference-rate-bars-CxLwUFUY.js +1 -0
- package/runtime/assets/nyfed-sofr-term-averages-bars-DxzLVO9o.js +1 -0
- package/runtime/assets/ofr-stress-category-area-TXpXiMP-.js +1 -0
- package/runtime/assets/ohlcv-volume-bars-BQZiJJ3u.js +1 -0
- package/runtime/assets/oi-treemap-BEusAMZU.js +1 -0
- package/runtime/assets/onchain-oscillator-overlay-BPa_jULR.js +1 -0
- package/runtime/assets/{open-interest-C0_M6MkH.js → open-interest-BqO1-ZYo.js} +1 -1
- package/runtime/assets/options-flow-skew-Cy0SUhs0.js +1 -0
- package/runtime/assets/{options-iv-CIHzBULM.js → options-iv-RsCKjmmC.js} +1 -1
- package/runtime/assets/options-max-pain-B2pA7KJP.js +1 -0
- package/runtime/assets/options-max-pain-multi-BLfX8Qe6.js +1 -0
- package/runtime/assets/options-oi-ladder-heatmap-Do8eYI3h.js +1 -0
- package/runtime/assets/options-oi-skew-D869gcp7.js +1 -0
- package/runtime/assets/{options-oi-strike-Db8lP27S.js → options-oi-strike-CKWXk22Q.js} +1 -1
- package/runtime/assets/{options-put-call-5ex7Ablt.js → options-put-call-DcSwyIIX.js} +1 -1
- package/runtime/assets/options-vol-smile-CqP0-CSw.js +1 -0
- package/runtime/assets/options-vol-spread-DMXdphxM.js +1 -0
- package/runtime/assets/payrolls-bars-15U_DxmS.js +1 -0
- package/runtime/assets/{pi-cycle-eACZGQhd.js → pi-cycle-tqHUEYSe.js} +1 -1
- package/runtime/assets/pie-chart-BIxKuHm-.js +1 -0
- package/runtime/assets/{pomodoro-CaS6y-eQ.js → pomodoro-DSswMPuv.js} +1 -1
- package/runtime/assets/portfolio-allocation-DHN6r6fl.js +1 -0
- package/runtime/assets/portfolio-common-e3o9U7qd.js +1 -0
- package/runtime/assets/{portfolio-holdings-D-SG9B5X.js → portfolio-holdings-Bf6vOm0e.js} +1 -1
- package/runtime/assets/portfolio-movers-DmaGwFtS.js +1 -0
- package/runtime/assets/{portfolio-value-DPKyirHc.js → portfolio-value-DLQHtwCl.js} +1 -1
- package/runtime/assets/portfolio-value-bars-B8XP7r22.js +1 -0
- package/runtime/assets/prediction-market-bars-Du1RxZc_.js +1 -0
- package/runtime/assets/prediction-market-scatter-bdlr6r_V.js +1 -0
- package/runtime/assets/{prediction-markets-Cnf0KZba.js → prediction-markets-DNDg43g9.js} +1 -1
- package/runtime/assets/prediction-markets-bubble-ccP01yj3.js +1 -0
- package/runtime/assets/{price-chart-BEnpZLyb.js → price-chart-Cw8OXmKH.js} +1 -1
- package/runtime/assets/{price-compare-8LvkF-xq.js → price-compare-txGWDCHD.js} +1 -1
- package/runtime/assets/{price-liveline-DkTeXuC2.js → price-liveline-F7uJKuTS.js} +1 -1
- package/runtime/assets/price-ticker-DQFyiHmW.js +1 -0
- package/runtime/assets/protocol-fees-bubbles-oV66t8AJ.js +1 -0
- package/runtime/assets/{protocol-fees-treemap-fvVOfUFt.js → protocol-fees-treemap-CsZhFjxB.js} +1 -1
- package/runtime/assets/protocol-fees-vs-tvl-scatter-CtLKoDeh.js +1 -0
- package/runtime/assets/protocol-tvl-bubbles-CuULi2KY.js +1 -0
- package/runtime/assets/protocol-tvl-by-category-BV2yIdZ_.js +1 -0
- package/runtime/assets/{protocol-tvl-chart-BfrszRqq.js → protocol-tvl-chart-BRPlR_kj.js} +1 -1
- package/runtime/assets/protocol-tvl-share-area-BeWSgocA.js +1 -0
- package/runtime/assets/{protocol-tvl-treemap-v5kaQdP4.js → protocol-tvl-treemap-BYECslhG.js} +1 -1
- package/runtime/assets/{puell-multiple-BdOLF9Wh.js → puell-multiple-akyTNZyp.js} +1 -1
- package/runtime/assets/put-call-gauge-CwrHYfdq.js +1 -0
- package/runtime/assets/{quote-slpulzHo.js → quote-6JmbHxfg.js} +1 -1
- package/runtime/assets/radial-gauge-0BzRQ6fO.js +1 -0
- package/runtime/assets/{rates-board-B6hHyiDM.js → rates-board-CiY6mWMz.js} +1 -1
- package/runtime/assets/real-wages-BTBOxvjP.js +1 -0
- package/runtime/assets/realized-price-CbjZ3Sqj.js +1 -0
- package/runtime/assets/{reserve-risk-_07r_h5w.js → reserve-risk-UlEv8oS1.js} +1 -1
- package/runtime/assets/returns-projector-qPZeZ-n9.js +1 -0
- package/runtime/assets/{risk-reward-Baq_TRho.js → risk-reward-DWcu9j4_.js} +1 -1
- package/runtime/assets/{rsi-momentum-B6oTu5W6.js → rsi-momentum-BuasFcVH.js} +1 -1
- package/runtime/assets/{rules-card-D98hKEwY.js → rules-card-DkjHPbht.js} +1 -1
- package/runtime/assets/scatter-chart-B78EA7lD.js +1 -0
- package/runtime/assets/sector-bars-JKmedArM.js +1 -0
- package/runtime/assets/sector-bubbles-DLXckuua.js +1 -0
- package/runtime/assets/{sector-performance-DlnYIM-L.js → sector-performance-C_2-xbIq.js} +1 -1
- package/runtime/assets/{sector-treemap-C3sX3Q9o.js → sector-treemap-DquBCyc3.js} +1 -1
- package/runtime/assets/sentiment-gauge-CuNvuk1q.js +1 -0
- package/runtime/assets/{session-progress-BYwNuuP-.js → session-progress-BDhJHQEn.js} +1 -1
- package/runtime/assets/{short-volume-CxBDSjP6.js → short-volume-Deb7fra_.js} +1 -1
- package/runtime/assets/short-volume-bars-DRjpg7RS.js +1 -0
- package/runtime/assets/{snake-CGV0Kg4z.js → snake-B9EEDroM.js} +1 -1
- package/runtime/assets/{sopr-DAn99w9D.js → sopr-DM_gpDem.js} +1 -1
- package/runtime/assets/{spotify-embed-BBfim9vk.js → spotify-embed-Dxt1RnUX.js} +1 -1
- package/runtime/assets/{stablecoin-chains-D4EKi_YR.js → stablecoin-chains-LzYMilQE.js} +1 -1
- package/runtime/assets/{stablecoin-supply-1m6FGR7-.js → stablecoin-supply-69kqOBoU.js} +1 -1
- package/runtime/assets/stopwatch-ClPrrveo.js +1 -0
- package/runtime/assets/{top-movers-CAqBZOUL.js → top-movers-BRiiYOPQ.js} +1 -1
- package/runtime/assets/treasury-auction-demand-scatter-yYNPz1VC.js +1 -0
- package/runtime/assets/treasury-auction-size-bars-CGD6MeAz.js +1 -0
- package/runtime/assets/{treasury-auctions-Bl19yaM_.js → treasury-auctions-Z_4MtXmL.js} +1 -1
- package/runtime/assets/treasury-avg-rate-bars-FXGz1a7e.js +1 -0
- package/runtime/assets/treasury-debt-composition-area-5yRh0K6a.js +1 -0
- package/runtime/assets/{treemap-leaf-A45Ge4-e.js → treemap-leaf-QG-L-SIG.js} +1 -1
- package/runtime/assets/trending-bars-z_cjmEXN.js +1 -0
- package/runtime/assets/trending-bubbles-nwoxKQEW.js +1 -0
- package/runtime/assets/{trending-coins-Dm9R9zGQ.js → trending-coins-9vrbEbBm.js} +1 -1
- package/runtime/assets/tvl-bars-BkJcttcu.js +1 -0
- package/runtime/assets/tvl-bubbles-D4tahOC6.js +1 -0
- package/runtime/assets/tvl-treemap-B7kWI7o0.js +1 -0
- package/runtime/assets/{video-CkvIGlHg.js → video-Dsc13Zja.js} +1 -1
- package/runtime/assets/volume-movers-scatter-BA8Wmoil.js +1 -0
- package/runtime/assets/volume-profile-DcSNvDqP.js +1 -0
- package/runtime/assets/volume-share-donut-3MenMO-V.js +1 -0
- package/runtime/assets/yield-composition-scatter-rfxC16n2.js +1 -0
- package/runtime/assets/{yield-curve-DlXQg4sl.js → yield-curve-DXsfXy4P.js} +1 -1
- package/runtime/assets/yield-momentum-bars-B9nKuItO.js +1 -0
- package/runtime/assets/yield-risk-pie-DUxkXYIQ.js +1 -0
- package/runtime/assets/yield-scanner-sCBXpQTV.js +1 -0
- package/runtime/assets/yield-scatter-BZHOhFcm.js +1 -0
- package/runtime/index.html +2 -2
- package/runtime/widget-icons/custom-data.png +0 -0
- package/runtime/assets/btc-hashrate-Dy2c30Gb.js +0 -1
- package/runtime/assets/chart-utils-Ct7WziT9.js +0 -1
- package/runtime/assets/checklist-Be_y1aTE.js +0 -1
- package/runtime/assets/d3-Dr3MHXm3.js +0 -1
- package/runtime/assets/dex-hot-pools-C4TrRB17.js +0 -1
- package/runtime/assets/dex-volume-chart-BLR-L_B0.js +0 -1
- package/runtime/assets/dino-game-CiGWzsag.js +0 -1
- package/runtime/assets/divider-DvK5oM9v.js +0 -1
- package/runtime/assets/editor-CQM8mtD8.css +0 -1
- package/runtime/assets/editor-EOEtB4_n.js +0 -68
- package/runtime/assets/format-CfAcS4D8.js +0 -1
- package/runtime/assets/fundamentals-zRwGUcmb.js +0 -1
- package/runtime/assets/funding-comparison-wCNoCb1H.js +0 -1
- package/runtime/assets/funding-heatmap-a4zdnKi9.js +0 -1
- package/runtime/assets/heading-b5H33lig.js +0 -1
- package/runtime/assets/image-C8ZSUHEx.js +0 -1
- package/runtime/assets/index-C-VdMqKb.css +0 -1
- package/runtime/assets/index-kB-TyxKi.js +0 -1073
- package/runtime/assets/indicators-CogwjDn9.js +0 -1
- package/runtime/assets/inflation-pulse-CoXcuabd.js +0 -1
- package/runtime/assets/labor-market-DR0j05Gy.js +0 -1
- package/runtime/assets/market-hours-wSrW5Elv.js +0 -1
- package/runtime/assets/mayer-multiple-CZC5q6ra.js +0 -1
- package/runtime/assets/mover-row-CUd1i2yt.js +0 -1
- package/runtime/assets/national-debt-DwC5azy3.js +0 -1
- package/runtime/assets/news-feed-BhAsJ6gt.js +0 -1
- package/runtime/assets/note-C1-RPOvR.js +0 -1
- package/runtime/assets/portfolio-allocation-NR-4wbGL.js +0 -1
- package/runtime/assets/portfolio-common-Cfpnudvk.js +0 -1
- package/runtime/assets/price-ticker-DgDJ3k4b.js +0 -1
- package/runtime/assets/realized-price-dn6bApj-.js +0 -1
- package/runtime/assets/returns-projector-NBs7iGAV.js +0 -1
- package/runtime/assets/stopwatch-CCqsSaII.js +0 -1
- package/runtime/assets/tvl-treemap-CSM9ioUr.js +0 -1
- package/runtime/assets/volume-profile-UJPTgNwV.js +0 -1
- package/runtime/assets/yield-scanner-Qm88hZuv.js +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import{r,j as e,c as aa,a as Ns}from"./react-qoZPGuNy.js";import{G as vs}from"./gridstack-BxxvPIFU.js";import{t as St,u as ra,B as Fe,T as ks,F as ws,a as na,b as ia,c as la,d as ca,N as Ss,e as Cs,s as oa}from"./index-BHlJHScr.js";function ua(t){const a=t.trim().toLowerCase();return a?a.split(/\s+/):[]}function ma(t,a,n){if(n.length===0)return!0;const m=`${t.label} ${t.description??""} ${t.name} ${a}`.toLowerCase();return n.every(j=>m.includes(j))}/**
|
|
2
|
+
* @license lucide-react v1.21.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Ls=(...t)=>t.filter((a,n,m)=>!!a&&a.trim()!==""&&m.indexOf(a)===n).join(" ").trim();/**
|
|
7
|
+
* @license lucide-react v1.21.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const da=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
12
|
+
* @license lucide-react v1.21.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const fa=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,m)=>m?m.toUpperCase():n.toLowerCase());/**
|
|
17
|
+
* @license lucide-react v1.21.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Rs=t=>{const a=fa(t);return a.charAt(0).toUpperCase()+a.slice(1)};/**
|
|
22
|
+
* @license lucide-react v1.21.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var xt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
27
|
+
* @license lucide-react v1.21.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const ha=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},ga=r.createContext({}),pa=()=>r.useContext(ga),ba=r.forwardRef(({color:t,size:a,strokeWidth:n,absoluteStrokeWidth:m,className:j="",children:d,iconNode:p,...f},i)=>{const{size:g=24,strokeWidth:u=2,absoluteStrokeWidth:b=!1,color:N="currentColor",className:z=""}=pa()??{},v=m??b?Number(n??u)*24/Number(a??g):n??u;return r.createElement("svg",{ref:i,...xt,width:a??g??xt.width,height:a??g??xt.height,stroke:t??N,strokeWidth:v,className:Ls("lucide",z,j),...!d&&!ha(f)&&{"aria-hidden":"true"},...f},[...p.map(([U,E])=>r.createElement(U,E)),...Array.isArray(d)?d:[d]])});/**
|
|
32
|
+
* @license lucide-react v1.21.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Se=(t,a)=>{const n=r.forwardRef(({className:m,...j},d)=>r.createElement(ba,{ref:d,iconNode:a,className:Ls(`lucide-${da(Rs(t))}`,`lucide-${t}`,m),...j}));return n.displayName=Rs(t),n};/**
|
|
37
|
+
* @license lucide-react v1.21.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const xa=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ya=Se("check",xa);/**
|
|
42
|
+
* @license lucide-react v1.21.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const za=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$s=Se("chevron-down",za);/**
|
|
47
|
+
* @license lucide-react v1.21.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const ja=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Na=Se("plus",ja);/**
|
|
52
|
+
* @license lucide-react v1.21.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const va=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Bs=Se("search",va);/**
|
|
57
|
+
* @license lucide-react v1.21.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const ka=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],wa=Se("sliders-horizontal",ka);/**
|
|
62
|
+
* @license lucide-react v1.21.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Sa=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ze=Se("x",Sa),Os=["xyz:XYZ100","xyz:SP500","xyz:NVDA","xyz:TSLA","xyz:AAPL","xyz:MSFT","xyz:GOOGL","xyz:META","xyz:AMZN","xyz:MU","xyz:AMD","xyz:AVGO","xyz:ARM","xyz:TSM","xyz:SKHX","xyz:MSTR","xyz:COIN","xyz:HOOD","xyz:PLTR","xyz:SPCX","xyz:GOLD","xyz:SILVER","xyz:CL","xyz:BRENTOIL","xyz:COPPER","xyz:EUR","xyz:JPY","xyz:SMH","BTC","ETH","SOL","HYPE","BNB","XRP","DOGE","LINK","AVAX","SUI"],Ps=new Map(Os.map((t,a)=>[t,a]));function Te(t){const a=t.indexOf(":");return(a===-1?t:t.slice(a+1)).toUpperCase()}function Ct(t){return t.includes(":")?"Stock":"Crypto"}function Ca(t){const a=t.indexOf(":");if(a!==-1){const n=t.slice(a+1);return`https://assets.parqet.com/logos/symbol/${encodeURIComponent(n)}?format=png`}return`https://assets.coincap.io/assets/icons/${t.toLowerCase()}@2x.png`}function Ra(t){const a=t.trim().replace(/\s+/g,"");if(!a)return"";const n=a.indexOf(":");return n===-1?a.toUpperCase():`${a.slice(0,n).toLowerCase()}:${a.slice(n+1).toUpperCase()}`}function Nt(t,a,n=Ps.get(t)??1e4){return{symbol:t,ticker:Te(t),kind:Ct(t),markPx:a==null?void 0:a.markPx,changePct:a==null?void 0:a.changePct,rank:n}}function Hs(t){if(!Number.isFinite(t))return"";const a=t;return a>=1e3?`$${a.toLocaleString(void 0,{maximumFractionDigits:0})}`:a>=100?`$${a.toFixed(2)}`:a>=1?`$${a.toFixed(3)}`:`$${a.toPrecision(3)}`}function Ma(t){if(!Number.isFinite(t))return"";const a=t;return`${a>=0?"+":""}${a.toFixed(2)}%`}function Ds(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function B(t,a){return t!=null&&t.type?Array.isArray(t.type)?t.type.includes(a):t.type===a:!1}function Gs(t){const a=t==null?void 0:t.items;return!!a&&B(t,"array")&&B(a,"string")}function Aa(t){var a,n,m;try{const d=St(t.schema,{io:"input"}).properties??{};if(B(d.symbol,"string"))return{kind:"single"};if(Gs(d.symbols))return{kind:"symbols",minItems:(a=d.symbols)==null?void 0:a.minItems,maxItems:(n=d.symbols)==null?void 0:n.maxItems};const p=d.holdings,f=((m=p==null?void 0:p.items)==null?void 0:m.properties)??{};if(B(p,"array")&&B(f.symbol,"string"))return{kind:"holdings",minItems:p==null?void 0:p.minItems,maxItems:p==null?void 0:p.maxItems}}catch{}return t.name==="price-chart"?{kind:"single"}:["price-liveline","price-ticker","funding-rate-chart","funding-heatmap","price-compare"].includes(t.name)?{kind:"symbols"}:null}function Ea(t,a){return t.kind==="single"?typeof a.symbol=="string"&&a.symbol?[a.symbol]:[]:t.kind==="symbols"?Array.isArray(a.symbols)?a.symbols.filter(n=>typeof n=="string"):[]:Array.isArray(a.holdings)?a.holdings.map(n=>Ds(n)&&typeof n.symbol=="string"?n.symbol:"").filter(Boolean):[]}const Fa=new Set(["symbol","symbols","holdings"]);function Rt(t){const a=t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return a?a.charAt(0).toUpperCase()+a.slice(1):t}function Ta(t){let a;try{a=St(t.schema,{io:"input"})}catch{return[]}return Object.entries(a.properties??{}).filter(([n])=>!Fa.has(n)).map(([n,m])=>({key:n,label:Rt(n),shape:m}))}const Ms=["xyz:TSLA","xyz:NVDA","xyz:AAPL","xyz:MSFT","xyz:SP500","xyz:GOLD","xyz:GOOGL","xyz:AMZN"];function Ia(t,a){return t==="symbol"?Ms[a%Ms.length]:t==="url"?"https://":t==="text"?"New note":t==="title"?"Heading":Rt(t)||"value"}function vt(t,a,n=0){var m;if(t.default!==void 0)return t.default;if(Array.isArray(t.enum)&&t.enum.length)return t.enum[0];if(B(t,"string"))return Ia(a,n);if(B(t,"number")||B(t,"integer"))return t.exclusiveMinimum!==void 0?t.exclusiveMinimum+1:t.minimum??0;if(B(t,"boolean"))return!1;if(B(t,"array")){const j=t.items??{},d=a==="symbols"?"symbol":a;return Array.from({length:t.minItems??0},(p,f)=>vt(j,d,f))}if(B(t,"object")){const j={};for(const d of t.required??[]){const p=(m=t.properties)==null?void 0:m[d];p&&(j[d]=vt(p,d,n))}return j}return null}function La(t){const a=t.schema.safeParse({});if(a.success)return a.data;let n;try{n=St(t.schema,{io:"input"})}catch{return{}}const m={},j=new Set(n.required??[]);for(const[p,f]of Object.entries(n.properties??{}))j.has(p)&&(m[p]=vt(f,p));const d=t.schema.safeParse(m);return d.success?d.data:m}function $a(t,a){const n=r.useMemo(()=>t.find(i=>i.capabilities.includes("day-stats")),[t]),[m,j]=r.useState({}),[d,p]=r.useState(!1);return r.useEffect(()=>{if(!a||!(n!=null&&n.getDayStats)){p(!1);return}let i=!1;return p(!0),Promise.allSettled([n.getDayStats(),n.getDayStats(["xyz:*"])]).then(g=>{if(i)return;const u={};for(const b of g)b.status==="fulfilled"&&Object.assign(u,b.value);j(u)}).finally(()=>{i||p(!1)}),()=>{i=!0}},[a,n]),{options:r.useMemo(()=>{const i=new Map;return Os.forEach((g,u)=>{i.set(g,Nt(g,m[g],u))}),Object.entries(m).forEach(([g,u])=>{i.set(g,Nt(g,u,Ps.get(g)??1e4))}),[...i.values()].sort((g,u)=>g.rank!==u.rank?g.rank-u.rank:g.kind!==u.kind?g.kind==="Stock"?-1:1:g.ticker.localeCompare(u.ticker))},[m]),loading:d}}function Ba({instance:t,registry:a,instancesRef:n,symbolUniverse:m,accentHue:j,inherited:d,onApply:p,onClose:f}){const i=a.get(t.frame),g=r.useMemo(()=>i?Aa(i):null,[i]),u=r.useMemo(()=>i?Ta(i):[],[i]),[b,N]=r.useState(()=>({...t.config??{}})),[z,v]=r.useState(null),[U,E]=r.useState(t.title??""),h=t.id,C=r.useCallback(S=>{if(N(S),i){const W=i.schema.safeParse(S);if(!W.success){v(W.error.issues.map(xe=>`${xe.path.join(".")||"(root)"}: ${xe.message}`).join(`
|
|
67
|
+
`));return}}v(null);const T=n.current.get(h);T&&(n.current.set(h,{...T,config:S}),p(h))},[i,h,n,p]),F=r.useCallback(S=>{E(S);const T=n.current.get(h);if(!T)return;const W=S.trim();n.current.set(h,{...T,title:W===""?void 0:W}),p(h)},[h,n,p]),[be,Ie]=r.useState(()=>({...t.style??{}})),Le=r.useCallback(S=>{const T=Object.fromEntries(Object.entries(S).filter(([,Ce])=>Ce!==void 0));Ie(T);const W=n.current.get(h);if(!W)return;const xe=Object.keys(T).length>0;n.current.set(h,{...W,style:xe?T:void 0}),p(h)},[h,n,p]);r.useEffect(()=>{const S=T=>{T.key==="Escape"&&f()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[f]);const $e=(S,T)=>C({...b,[S]:T}),je=(i==null?void 0:i.label)??t.frame.replace(/-/g," ");return e.jsx("div",{className:"zf-dialog-backdrop",style:{"--zf-accent-hue":j},onMouseDown:S=>{S.target===S.currentTarget&&f()},children:e.jsxs("div",{className:"zf-dialog",role:"dialog","aria-modal":"true","aria-label":`Configure ${je}`,children:[e.jsxs("header",{className:"zf-dialog-head",children:[e.jsxs("h3",{className:"zf-dialog-title",children:["Configure · ",je]}),e.jsx("button",{type:"button",className:"zf-dialog-close",onClick:f,"aria-label":"Close",title:"Close",children:e.jsx(Ze,{size:16,"aria-hidden":"true"})})]}),e.jsxs("div",{className:"zf-dialog-body",children:[(i==null?void 0:i.chrome)!=="bare"&&e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:"zf-instance-title",title:"Card title shown in the frame's chrome.",children:"Title"}),e.jsx("input",{id:"zf-instance-title",className:"zf-input",value:U,placeholder:i!=null&&i.titleContent?"Auto (live)":je,spellCheck:!1,onChange:S=>F(S.target.value)}),e.jsx("p",{className:"zf-field-hint",children:"Leave blank to use the frame’s default."})]}),g&&e.jsx(Ua,{control:g,config:b,loading:m.loading,options:m.options,onChangeSymbol:S=>C({...b,symbol:S}),onChangeSymbols:S=>C({...b,symbols:S}),onChangeHoldings:S=>C({...b,holdings:S})}),u.map(S=>e.jsx(Ha,{field:S,value:b[S.key],onChange:T=>$e(S.key,T)},S.key)),!g&&u.length===0&&e.jsx("p",{className:"zf-rail-empty",children:"This frame has no settings."}),z&&e.jsx("div",{className:"zf-config-error",children:z}),e.jsx(Pa,{style:be,inherited:d,onChange:Le})]}),e.jsx("footer",{className:"zf-dialog-foot",children:e.jsx("button",{type:"button",className:"zf-btn zf-btn--primary",onClick:f,children:"Done"})})]})})}const Oa=[{key:"accentHue",label:"Accent hue",kind:"hue",min:0,max:360,step:1,format:t=>`${Math.round(t)}°`},{key:"accentSat",label:"Accent saturation",kind:"range",min:0,max:100,step:1,format:t=>`${Math.round(t)}%`},{key:"baseHue",label:"Surface tint",kind:"hue",min:0,max:360,step:1,format:t=>`${Math.round(t)}°`},{key:"baseSat",label:"Tint strength",kind:"range",min:0,max:100,step:1,format:t=>`${Math.round(t)}%`},{key:"surfaceOpacity",label:"Card opacity",kind:"range",min:.3,max:1,step:.05,format:t=>`${Math.round(t*100)}%`},{key:"radius",label:"Corner radius",kind:"range",min:0,max:32,step:1,format:t=>`${Math.round(t)}px`},{key:"borderStrength",label:"Border",kind:"range",min:0,max:1,step:.01,format:t=>`${Math.round(t*100)}%`},{key:"density",label:"Density",kind:"range",min:.6,max:1.4,step:.05,format:t=>`${Math.round(t*100)}%`},{key:"elevation",label:"Elevation",kind:"range",min:0,max:2,step:.1,format:t=>`${t.toFixed(1)}×`}];function Pa({style:t,inherited:a,onChange:n}){const[m,j]=r.useState(!1),d=Object.keys(t).length,p=(i,g)=>n({...t,[i]:g}),f=(i,g)=>{if(g)n({...t,[i]:a[i]});else{const u={...t};delete u[i],n(u)}};return e.jsxs("section",{className:m?"zf-style-panel is-open":"zf-style-panel",children:[e.jsxs("button",{type:"button",className:"zf-style-head","aria-expanded":m,onClick:()=>j(i=>!i),children:[e.jsx($s,{size:14,"aria-hidden":"true",className:"zf-style-chevron"}),e.jsx("span",{className:"zf-style-head-label",children:"Style"}),d>0&&e.jsx("span",{className:"zf-style-count",children:d}),d>0&&e.jsx("span",{role:"button",tabIndex:0,className:"zf-style-clear",title:"Reset every override to inherit",onClick:i=>{i.stopPropagation(),n({})},onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopPropagation(),n({}))},children:"Reset all"})]}),m&&e.jsxs("div",{className:"zf-style-body",children:[e.jsx("p",{className:"zf-field-hint",style:{marginBottom:4},children:"Override the dashboard look for this card only. Off = inherit."}),Oa.map(i=>{const g=t[i.key],u=g!==void 0,b=u?g:a[i.key];return e.jsxs("div",{className:"zf-style-field",children:[e.jsxs("div",{className:"zf-theme-row",style:{marginBottom:0},children:[e.jsxs("label",{className:"zf-style-toggle",children:[e.jsx("input",{type:"checkbox",checked:u,"aria-label":`Override ${i.label}`,onChange:N=>f(i.key,N.target.checked)}),e.jsx("span",{className:"zf-theme-val",children:i.label})]}),e.jsx("span",{className:"zf-theme-val",children:u?i.format(b):"Default"})]}),u&&e.jsx("input",{type:"range",className:i.kind==="hue"?"zf-hue-slider":"zf-range",min:i.min,max:i.max,step:i.step,value:b,"aria-label":i.label,onChange:N=>p(i.key,Number(N.target.value))})]},i.key)})]})]})}function Ha({field:t,value:a,onChange:n}){const{key:m,label:j,shape:d}=t,p=`zf-cfg-${m}`,f=d.description;if(B(d,"boolean")){const g=typeof a=="boolean"?a:!!d.default;return e.jsxs("label",{className:"zf-checkbox",title:f,children:[e.jsx("input",{type:"checkbox",checked:g,onChange:u=>n(u.target.checked)}),j]})}const i=Array.isArray(d.enum)&&d.enum.every(g=>typeof g=="string")?d.enum:null;if(i&&i.length>0){const g=typeof d.default=="string"?d.default:i[0],u=typeof a=="string"&&i.includes(a)?a:g;return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:p,title:f,children:j}),e.jsx("select",{id:p,className:"zf-select",value:u,onChange:b=>n(b.target.value),children:i.map(b=>e.jsx("option",{value:b,children:Rt(b)},b))})]})}return B(d,"integer")||B(d,"number")?e.jsx(Da,{id:p,field:t,value:a,onChange:n}):Gs(d)?e.jsx(_a,{id:p,field:t,value:a,onChange:n}):e.jsx(Ga,{id:p,field:t,value:a,onChange:n})}function Da({id:t,field:a,value:n,onChange:m}){const{label:j,shape:d}=a,p=d.description,f=typeof d.minimum=="number"?d.minimum:void 0,i=typeof d.maximum=="number"?d.maximum:void 0,g=B(d,"integer"),u=g?1:"any",b=typeof d.default=="number"?d.default:f??0,N=typeof n=="number"&&Number.isFinite(n)?n:void 0;if(f!==void 0&&i!==void 0){const z=N??b;return e.jsxs("div",{className:"zf-field",children:[e.jsxs("div",{className:"zf-field-row",children:[e.jsx("label",{htmlFor:t,title:p,children:j}),e.jsx("span",{className:"zf-field-num",children:z})]}),e.jsx("input",{id:t,type:"range",className:"zf-range",min:f,max:i,step:u,value:z,onChange:v=>m(g?Math.round(Number(v.target.value)):Number(v.target.value))})]})}return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:p,children:j}),e.jsx("input",{id:t,type:"number",className:"zf-input",min:f,max:i,step:u,value:n==null?"":String(n),onChange:z=>m(z.target.value===""?"":Number(z.target.value))})]})}function Ga({id:t,field:a,value:n,onChange:m}){const{key:j,label:d,shape:p}=a,f=p.description,i=typeof n=="string"?n:"",g=typeof p.default=="string"?p.default:"",u=typeof p.default=="string"&&/^#[0-9a-f]{6}$/i.test(p.default)?p.default:null;if(j==="color"||u){const b=/^#[0-9a-f]{6}$/i.test(i)?i:u??"#8b8df9";return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:f,children:d}),e.jsxs("div",{className:"zf-color-row",children:[e.jsx("input",{type:"color",className:"zf-color",value:b,"aria-label":`${d} swatch`,onChange:N=>m(N.target.value)}),e.jsx("input",{id:t,className:"zf-input",value:i,placeholder:g,spellCheck:!1,onChange:N=>m(N.target.value)})]})]})}return j==="text"?e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:f,children:d}),e.jsx("textarea",{id:t,className:"zf-textarea zf-textarea--prose",value:i,placeholder:g,onChange:b=>m(b.target.value)})]}):e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:f,children:d}),e.jsx("input",{id:t,className:"zf-input",value:i,placeholder:g,spellCheck:!1,onChange:b=>m(b.target.value)})]})}function _a({id:t,field:a,value:n,onChange:m}){const{label:j,shape:d}=a,p=d.description,f=Array.isArray(n)?n.filter(z=>typeof z=="string"):[],[i,g]=r.useState(""),u=typeof d.maxItems=="number"?d.maxItems:void 0,b=u!==void 0&&f.length>=u,N=z=>{const v=z.trim().toUpperCase();g(""),!(!v||f.includes(v)||b)&&m([...f,v])};return e.jsxs("div",{className:"zf-field",children:[e.jsx("label",{htmlFor:t,title:p,children:j}),f.length>0&&e.jsx("div",{className:"zf-taglist",children:f.map(z=>e.jsxs("span",{className:"zf-tag",children:[z,e.jsx("button",{type:"button",className:"zf-symbol-remove","aria-label":`Remove ${z}`,onClick:()=>m(f.filter(v=>v!==z)),children:e.jsx(Ze,{size:12,"aria-hidden":"true"})})]},z))}),e.jsx("input",{id:t,className:"zf-input",value:i,disabled:b,spellCheck:!1,placeholder:b?"Maximum reached":"Type a code, Enter to add",onChange:z=>g(z.target.value),onBlur:()=>N(i),onKeyDown:z=>{z.key==="Enter"||z.key===","?(z.preventDefault(),N(i)):z.key==="Backspace"&&i===""&&f.length>0&&m(f.slice(0,-1))}})]})}function Ua({control:t,config:a,loading:n,options:m,onChangeSymbol:j,onChangeSymbols:d,onChangeHoldings:p}){const f=Ea(t,a);if(t.kind==="single"){const u=f[0]??"";return e.jsxs("div",{className:"zf-symbol-editor",children:[e.jsx(yt,{title:"Ticker",detail:u?Te(u):"None",loading:n}),u?e.jsx(wt,{symbol:u,option:kt(u,m)}):null,e.jsx(zt,{loading:n,options:m,selectedSymbols:u?[u]:[],placeholder:"Search TSLA, BTC...",onSelect:j})]})}if(t.kind==="symbols"){const u=typeof t.maxItems=="number"&&f.length>=t.maxItems;return e.jsxs("div",{className:"zf-symbol-editor",children:[e.jsx(yt,{title:"Tickers",detail:As(f.length,t),loading:n}),e.jsx(Wa,{symbols:f,options:m,onRemove:b=>d(f.filter(N=>N!==b))}),e.jsx(zt,{disabled:u,loading:n,options:m,selectedSymbols:f,placeholder:u?"Maximum tickers added":"Add ticker",keepOpenOnSelect:!0,onSelect:b=>{f.includes(b)||u||d([...f,b])}})]})}const i=Array.isArray(a.holdings)?a.holdings.filter(Ds):[],g=typeof t.maxItems=="number"&&i.length>=t.maxItems;return e.jsxs("div",{className:"zf-symbol-editor",children:[e.jsx(yt,{title:"Holding tickers",detail:As(i.length,t),loading:n}),e.jsx("div",{className:"zf-holding-list",children:i.map((u,b)=>{const N=typeof u.symbol=="string"?u.symbol:"";return e.jsxs("div",{className:"zf-holding-row",children:[e.jsxs("div",{className:"zf-holding-main",children:[N?e.jsx(wt,{symbol:N,option:kt(N,m),compact:!0}):e.jsx("span",{className:"zf-symbol-empty",children:"No ticker"}),typeof u.amount=="number"&&e.jsxs("span",{className:"zf-holding-amount",children:["x ",u.amount]})]}),e.jsx("button",{type:"button",className:"zf-symbol-remove","aria-label":`Remove ${N||"holding"}`,onClick:()=>{p(i.filter((z,v)=>v!==b))},children:e.jsx(Ze,{size:13,"aria-hidden":"true"})})]},`${N}-${b}`)})}),e.jsx(zt,{disabled:g,loading:n,options:m,selectedSymbols:f,placeholder:g?"Maximum holdings added":"Add holding",keepOpenOnSelect:!0,onSelect:u=>{g||p([...i,{symbol:u,amount:1}])}})]})}function yt({title:t,detail:a,loading:n}){return e.jsxs("div",{className:"zf-symbol-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"zf-symbol-label",children:t}),e.jsx("div",{className:"zf-symbol-detail",children:a})]}),e.jsx("span",{className:n?"zf-symbol-source is-loading":"zf-symbol-source",children:n?"Loading":"Live list"})]})}function As(t,a){return typeof a.maxItems=="number"?`${t}/${a.maxItems}`:typeof a.minItems=="number"&&t<a.minItems?`${t}/${a.minItems}+`:String(t)}function kt(t,a){return a.find(n=>n.symbol===t)??Nt(t)}function Wa({symbols:t,options:a,onRemove:n}){return t.length===0?e.jsx("div",{className:"zf-symbol-empty",children:"No tickers selected"}):e.jsx("div",{className:"zf-symbol-chips",children:t.map(m=>e.jsxs("span",{className:"zf-symbol-chip",children:[e.jsx(wt,{symbol:m,option:kt(m,a),compact:!0}),e.jsx("button",{type:"button",className:"zf-symbol-remove","aria-label":`Remove ${m}`,onClick:()=>n(m),children:e.jsx(Ze,{size:13,"aria-hidden":"true"})})]},m))})}function wt({symbol:t,option:a,compact:n=!1}){return e.jsxs("span",{className:n?"zf-selected-symbol is-compact":"zf-selected-symbol",children:[e.jsx(_s,{symbol:t}),e.jsxs("span",{className:"zf-selected-symbol-text",children:[e.jsx("strong",{children:Te(t)}),!n&&e.jsx("em",{children:t})]}),!n&&a.markPx!==void 0&&e.jsx("span",{className:"zf-selected-symbol-price",children:Hs(a.markPx)})]})}function zt({disabled:t=!1,loading:a,options:n,selectedSymbols:m,placeholder:j,keepOpenOnSelect:d=!1,onSelect:p}){const[f,i]=r.useState(""),[g,u]=r.useState(!1),b=r.useMemo(()=>new Set(m),[m]),N=r.useMemo(()=>new Set(n.map(h=>h.symbol)),[n]),z=Ra(f),v=r.useMemo(()=>{const h=f.trim().toLowerCase();return(h?n.filter(F=>F.ticker.toLowerCase().includes(h)||F.symbol.toLowerCase().includes(h)):n.slice(0,28)).slice().sort((F,be)=>Es(F,h)-Es(be,h)).slice(0,36)},[n,f]),U=r.useMemo(()=>{if(!z)return[];const h=z.includes(":")?[z]:[`xyz:${z}`,z];return h.filter((C,F)=>h.indexOf(C)===F&&!N.has(C)&&!b.has(C))},[N,z,b]),E=h=>{!h||d&&b.has(h)||(p(h),i(""),u(d))};return e.jsxs("div",{className:"zf-symbol-combo",onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||u(!1)},children:[e.jsxs("div",{className:t?"zf-symbol-search is-disabled":"zf-symbol-search",children:[e.jsx(Bs,{size:14,"aria-hidden":"true"}),e.jsx("input",{value:f,disabled:t,placeholder:j,"aria-label":j,role:"combobox","aria-expanded":g,onFocus:()=>u(!0),onChange:h=>{i(h.target.value),u(!0)},onKeyDown:h=>{var C;h.key==="Enter"&&(h.preventDefault(),E(((C=v[0])==null?void 0:C.symbol)??U[0]??z))}}),e.jsx($s,{size:14,"aria-hidden":"true"})]}),g&&!t&&e.jsxs("div",{className:"zf-symbol-menu",role:"listbox",children:[a&&e.jsx("div",{className:"zf-symbol-menu-status",children:"Loading live universe..."}),v.map(h=>{const C=b.has(h.symbol);return e.jsxs("button",{type:"button",className:C?"zf-symbol-option is-selected":"zf-symbol-option",disabled:d&&C,role:"option","aria-selected":C,onMouseDown:F=>{F.preventDefault(),E(h.symbol)},onClick:F=>{F.detail===0&&E(h.symbol)},children:[e.jsx(_s,{symbol:h.symbol}),e.jsxs("span",{className:"zf-symbol-option-main",children:[e.jsx("strong",{children:h.ticker}),e.jsx("em",{children:h.symbol})]}),e.jsxs("span",{className:"zf-symbol-option-meta",children:[e.jsx("span",{children:Hs(h.markPx)||h.kind}),h.changePct!==void 0&&e.jsx("span",{className:h.changePct>=0?"zf-symbol-change is-up":"zf-symbol-change is-down",children:Ma(h.changePct)})]}),C&&e.jsx(ya,{size:14,"aria-hidden":"true"})]},h.symbol)}),U.map(h=>e.jsxs("button",{type:"button",className:"zf-symbol-option zf-symbol-option--custom",onMouseDown:C=>{C.preventDefault(),E(h)},onClick:C=>{C.detail===0&&E(h)},children:[e.jsx("span",{className:"zf-symbol-custom-icon",children:e.jsx(Na,{size:13,"aria-hidden":"true"})}),e.jsxs("span",{className:"zf-symbol-option-main",children:[e.jsx("strong",{children:Te(h)}),e.jsx("em",{children:h})]}),e.jsx("span",{className:"zf-symbol-option-meta",children:e.jsx("span",{children:Ct(h)})})]},h)),!a&&v.length===0&&U.length===0&&e.jsx("div",{className:"zf-symbol-menu-status",children:"No matches"})]})]})}function Es(t,a){if(!a)return t.rank;const n=t.ticker.toLowerCase(),m=t.symbol.toLowerCase();return n===a||m===a?-40+t.rank/1e4:n.startsWith(a)?-20+t.rank/1e4:m.startsWith(a)?-10+t.rank/1e4:t.rank}function _s({symbol:t}){const a=Ct(t).toLowerCase(),[n,m]=r.useState(!1);return r.useEffect(()=>m(!1),[t]),n?e.jsx("span",{className:`zf-symbol-avatar zf-symbol-avatar--${a}`,children:Te(t).slice(0,2)}):e.jsx("img",{className:`zf-symbol-avatar zf-symbol-avatar--logo zf-symbol-avatar--${a}`,src:Ca(t),alt:"","aria-hidden":"true",draggable:!1,loading:"lazy",onError:()=>m(!0)})}const qa=24;function Fs(t,a){var n;return a==="flow-horizontal"?(n=t.layouts)==null?void 0:n["flow-horizontal"]:t.position}function Ts(t,a){const n=t.reduce((m,j)=>m+Math.max(1,j.position.w)*Math.min(Math.max(1,j.position.h),a),0);return Math.max(qa,Math.ceil(n/a*1.25)+8)}function Is(t,a,n){var p;const m=new Set,j=(f,i,g,u)=>{for(let b=0;b<g;b++)for(let N=0;N<u;N++){const z=f+b,v=i+N;z>=0&&v>=0&&m.add(`${z},${v}`)}},d=(f,i,g,u)=>{if(f+g>a||i+u>n)return!1;for(let b=0;b<g;b++)for(let N=0;N<u;N++)if(m.has(`${f+b},${i+N}`))return!1;return!0};for(const f of t){const i=(p=f.layouts)==null?void 0:p["flow-horizontal"];i&&j(i.x,i.y,i.w,Math.min(i.h,n))}return t.map(f=>{var b;if((b=f.layouts)!=null&&b["flow-horizontal"])return f;const i=Math.min(Math.max(1,f.position.w),a),g=Math.min(Math.max(1,f.position.h),n);let u={x:0,y:0,w:i,h:g};e:for(let N=0;N<=a-i;N++)for(let z=0;z<=n-g;z++)if(d(N,z,i,g)){u={x:N,y:z,w:i,h:g};break e}return j(u.x,u.y,u.w,u.h),{...f,layouts:{...f.layouts,"flow-horizontal":u}}})}const Ka='<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>';function jt(t){queueMicrotask(()=>t.unmount())}function Za({spec:t,registry:a,onSave:n,customiseButtonTarget:m,onAccentHueChange:j,onAccentSatChange:d,onFontScaleChange:p,onUpColorChange:f,onDownColorChange:i,onModeChange:g,onBackgroundChange:u,onSurfaceChange:b}){const N=ra(),z=r.useRef(null),v=r.useRef(null),U=r.useRef(!1),E=r.useRef(t.grid.mode),h=r.useRef(new Map),C=r.useRef(new Map),F=r.useRef(new Map),be=r.useRef([]),Ie=r.useRef(t.theme.accentHue),Le=r.useRef(t.theme.accentSat),$e=r.useRef(t.theme.baseHue),je=r.useRef(t.theme.baseSat),S=r.useRef(t.theme.upColor),T=r.useRef(t.theme.downColor),W=r.useRef(t.grid.gap),xe=r.useRef(t.grid.paddingX),Ce=r.useRef(t.grid.mode),Re=r.useRef(null),Mt=r.useRef(t.appearance.radius),At=r.useRef(t.appearance.borderStrength),Et=r.useRef(t.appearance.surfaceOpacity),Ft=r.useRef(t.appearance.density),Tt=r.useRef(t.appearance.elevation),It=r.useRef(t.typography.fontFamily),Lt=r.useRef(t.typography.numericStyle),$t=r.useRef(t.typography.scale),Bt=r.useRef(t.background.type),Ot=r.useRef(t.background.projectId),Pt=r.useRef(t.background.opacity),Ht=r.useRef(t.background.color),Dt=r.useRef(t.background.gradientFrom),Gt=r.useRef(t.background.gradientTo),_t=r.useRef(t.background.gradientAngle),Ut=r.useRef(t.background.imageUrl),Wt=r.useRef(t.background.imageFit),qt=r.useRef(t.background.imageBlur),Kt=r.useRef(t.background.overlayOpacity),Vt=r.useRef(t.theme.surface),Xt=r.useRef(0),[I,Je]=r.useState(!1),Us=$a(N,I),[Ws,Me]=r.useState(t.frames.length),[O,Be]=r.useState(t.theme.accentHue),[D,Oe]=r.useState(t.theme.accentSat),[G,Pe]=r.useState(t.theme.baseHue),[_,He]=r.useState(t.theme.baseSat),[Z,Qe]=r.useState(t.theme.upColor),[J,et]=r.useState(t.theme.downColor),[Q,Yt]=r.useState(t.theme.surface),[$,Zt]=r.useState(t.grid.mode),[qs,Jt]=r.useState(!1),[te,tt]=r.useState(t.grid.gap),[me,st]=r.useState(t.grid.paddingX),[q,De]=r.useState(t.appearance.radius),[K,Ge]=r.useState(t.appearance.borderStrength),[V,_e]=r.useState(t.appearance.surfaceOpacity),[X,Ue]=r.useState(t.appearance.density),[Y,We]=r.useState(t.appearance.elevation),[se,at]=r.useState(t.typography.fontFamily),[ae,rt]=r.useState(t.typography.numericStyle),[re,nt]=r.useState(t.typography.scale),[P,it]=r.useState(t.background.type),[ee,lt]=r.useState(t.background.projectId??Fe[0].projectId),[ne,ct]=r.useState(t.background.opacity),[ie,ot]=r.useState(t.background.color),[de,Qt]=r.useState(t.background.gradientFrom),[fe,es]=r.useState(t.background.gradientTo),[le,ut]=r.useState(t.background.gradientAngle),[ye,ts]=r.useState(t.background.imageUrl??""),[he,ss]=r.useState(t.background.imageFit),[ce,mt]=r.useState(t.background.imageBlur),[oe,dt]=r.useState(t.background.overlayOpacity),Ks=r.useCallback(s=>{Be(s.theme.accentHue),Oe(s.theme.accentSat),Pe(s.theme.baseHue),He(s.theme.baseSat),at(s.typography.fontFamily),rt(s.typography.numericStyle),De(s.appearance.radius),Ge(s.appearance.borderStrength),_e(s.appearance.surfaceOpacity),Ue(s.appearance.density),We(s.appearance.elevation);const l=Fe.find(c=>c.key===s.scene);l&&(it("unicorn"),lt(l.projectId))},[]),as=r.useMemo(()=>{var s;return((s=ks.find(l=>{var c;return l.theme.accentHue===O&&l.theme.accentSat===D&&l.theme.baseHue===G&&l.theme.baseSat===_&&l.typography.fontFamily===se&&l.typography.numericStyle===ae&&l.appearance.radius===q&&l.appearance.borderStrength===K&&l.appearance.surfaceOpacity===V&&l.appearance.density===X&&l.appearance.elevation===Y&&P==="unicorn"&&((c=Fe.find(x=>x.key===l.scene))==null?void 0:c.projectId)===ee}))==null?void 0:s.key)??null},[O,D,G,_,se,ae,q,K,V,X,Y,P,ee]),[ge,rs]=r.useState("frames"),[ft,ze]=r.useState(null),ns=r.useRef(null);ns.current=ft,r.useEffect(()=>{j==null||j(O)},[O,j]),r.useEffect(()=>{d==null||d(D)},[D,d]),r.useEffect(()=>{p==null||p(re)},[re,p]),r.useEffect(()=>{f==null||f(Z)},[Z,f]),r.useEffect(()=>{i==null||i(J)},[J,i]),r.useEffect(()=>{E.current=$,g==null||g($)},[$,g]),r.useEffect(()=>{u==null||u({...t.background,type:P,projectId:ee,opacity:ne,color:ie,gradientFrom:de,gradientTo:fe,gradientAngle:le,imageUrl:ye||void 0,imageFit:he,imageBlur:ce,overlayOpacity:oe})},[P,ee,ne,ie,de,fe,le,ye,he,ce,oe,t.background,u]),r.useEffect(()=>{b==null||b(Q)},[Q,b]),r.useEffect(()=>{var s;(s=v.current)==null||s.margin(te/2)},[te]);const is=r.useRef(N);is.current=N;const Ne=r.useRef(a);Ne.current=a;const ve=r.useMemo(()=>{const s=new Map;for(const o of a.values()){const y=o.category??"other",w=s.get(y);w?w.push(o):s.set(y,[o])}const l=ws.map(o=>o.key),c=ws.map(o=>({key:o.key,label:o.label,description:o.description,frames:s.get(o.key)??[]})),x=[...s.entries()].filter(([o])=>!l.includes(o)).flatMap(([,o])=>o);return x.length&&c.push({key:"other",label:"Other",description:"",frames:x}),c.filter(o=>o.frames.length>0).map(o=>({...o,frames:[...o.frames].sort((y,w)=>y.name.localeCompare(w.name))}))},[a]),[ke,ht]=r.useState(""),qe=r.useMemo(()=>ua(ke),[ke]),ls=qe.length>0,cs=r.useMemo(()=>qe.length===0?ve:ve.map(s=>({...s,frames:s.frames.filter(l=>ma(l,s.label,qe))})).filter(s=>s.frames.length>0),[ve,qe]),[os,Vs]=r.useState(()=>new Set(ve[0]?[ve[0].key]:[])),Xs=r.useCallback(s=>{Vs(l=>{const c=new Set(l);return c.has(s)?c.delete(s):c.add(s),c})},[]),Ae=r.useCallback(s=>s?La(s):{},[]),Ke=r.useCallback(s=>{let l=`${s}-${++Xt.current}`;for(;h.current.has(l);)l=`${s}-${++Xt.current}`;return l},[]),Ve=r.useRef(null),ue=r.useCallback(s=>{const l=F.current.get(s),c=h.current.get(s);if(!l||!c)return;let x=C.current.get(s);x||(l.innerHTML="",x=aa.createRoot(l),C.current.set(s,x)),x.render(e.jsx(na,{providers:is.current,children:e.jsx(ia.Provider,{value:o=>{var y;return(y=Ve.current)==null?void 0:y.call(Ve,s,o)},children:e.jsx(la,{instance:c,registry:Ne.current,className:"zf-fill"})})}))},[]),Ys=r.useCallback((s,l)=>{const c=h.current.get(s);c&&(h.current.set(s,{...c,config:{...c.config,...l}}),ue(s))},[ue]);Ve.current=Ys;const us=r.useCallback(s=>{const l=v.current;if(!l)return;const c=s.getAttribute("gs-id");if(c){const x=C.current.get(c);x&&jt(x),C.current.delete(c),F.current.delete(c),h.current.delete(c),ns.current===c&&ze(null)}l.removeWidget(s,!0),Me(l.getGridItems().length)},[]),pe=r.useCallback(s=>{if(!s.querySelector(".zf-cfg-btn")){const l=document.createElement("button");l.className="zf-cfg-btn",l.type="button",l.title="Edit frame",l.setAttribute("aria-label","Edit frame"),l.innerHTML=Ka,l.addEventListener("click",c=>{c.stopPropagation();const x=s.getAttribute("gs-id");x&&ze(x)}),s.appendChild(l)}if(!s.querySelector(".zf-del-btn")){const l=document.createElement("button");l.className="zf-del-btn",l.type="button",l.title="Remove frame",l.innerHTML="×",l.addEventListener("click",c=>{c.stopPropagation(),us(s)}),s.appendChild(l)}},[us]),ms=r.useCallback(s=>{var l,c;(l=s.querySelector(".zf-cfg-btn"))==null||l.remove(),(c=s.querySelector(".zf-del-btn"))==null||c.remove()},[]),Xe=r.useCallback((s,l=!1)=>{const c=E.current,x=c==="flow-horizontal",o=Fs(s,c),y=(o==null?void 0:o.w)??s.position.w,w=(o==null?void 0:o.h)??s.position.h,k=x?Math.min(w,t.grid.rows):w,A=Ne.current.get(s.frame),R=A==null?void 0:A.layout,M=document.createElement("div");M.className="grid-stack-item",M.setAttribute("gs-id",s.id),M.setAttribute("data-frame",s.frame),l||!o?M.setAttribute("gs-auto-position","true"):(M.setAttribute("gs-x",String(o.x)),M.setAttribute("gs-y",String(o.y))),M.setAttribute("gs-w",String(y)),M.setAttribute("gs-h",String(k)),R!=null&&R.minW&&M.setAttribute("gs-min-w",String(R.minW)),R!=null&&R.minH&&M.setAttribute("gs-min-h",String(R.minH)),R!=null&&R.maxW&&M.setAttribute("gs-max-w",String(R.maxW)),R!=null&&R.maxH&&M.setAttribute("gs-max-h",String(R.maxH));const L=document.createElement("div");return L.className="grid-stack-item-content",M.appendChild(L),F.current.set(s.id,L),M},[t.grid.rows]),Ee=r.useCallback(s=>{const l=v.current;if(l){C.current.forEach(jt),C.current.clear(),F.current.clear(),h.current=new Map(s.map(c=>[c.id,c])),l.removeAll(!0),l.el.querySelectorAll(".grid-stack-item").forEach(c=>c.remove()),l.batchUpdate();for(const c of s){const x=Xe(c);l.el.appendChild(x),l.makeWidget(x),ue(c.id)}l.batchUpdate(!1),Me(s.length)}},[Xe,ue]),ds=r.useCallback(s=>{var w,k;const l=v.current;if(!l)return;const c=Ne.current.get(s),x=Ke(s),o={id:x,frame:s,position:{x:0,y:0,w:((w=c==null?void 0:c.layout)==null?void 0:w.w)??4,h:((k=c==null?void 0:c.layout)==null?void 0:k.h)??3},config:Ae(c)};h.current.set(x,o);const y=Xe(o,!0);l.el.appendChild(y),l.makeWidget(y),ue(x),pe(y),Me(l.getGridItems().length),ze(x)},[Xe,pe,Ae,ue,Ke]),Ye=r.useCallback(()=>{var x,o;const s=typeof window<"u"?window.innerHeight:800,l=((o=(x=z.current)==null?void 0:x.parentElement)==null?void 0:o.getBoundingClientRect().top)??120,c=s-l-56;return Math.max(80,Math.floor(c/t.grid.rows))},[t.grid.rows]),gt=r.useCallback(()=>{const s=v.current;if(!s)return;const l=s.el;s.off("dropped"),s.off("removed"),s.off("drag"),s.off("dragstart"),s.off("dragstop"),document.body.classList.remove("zf-dragging"),C.current.forEach(jt),C.current.clear(),F.current.clear(),s.destroy(!1),l&&(l.querySelectorAll(".grid-stack-item").forEach(c=>c.remove()),l.style.width="",l.style.height=""),v.current=null},[]),pt=r.useCallback((s,l)=>{const c=s==="flow-horizontal",x=c?Ye():t.grid.rowHeight,o=vs.init({column:c?l:t.grid.columns,cellHeight:x,margin:t.grid.gap/2,float:!0,...c?{maxRow:t.grid.rows,minRow:t.grid.rows}:{},animate:!0,acceptWidgets:!0,disableDrag:!0,disableResize:!0},z.current);return o.el.style.width=c?`${l*x}px`:"",o.on("dropped",(y,w,k)=>{var zs,js;const A=k==null?void 0:k.el;if(!A)return;const R=A.querySelector(".grid-stack-item-content"),M=A.getAttribute("data-frame");if(!R||!M)return;const L=A.getAttribute("gs-id")||Ke(M);A.setAttribute("gs-id",L);const H=Ne.current.get(M),bs=(k==null?void 0:k.w)??((zs=H==null?void 0:H.layout)==null?void 0:zs.w)??4,xs=(k==null?void 0:k.h)??((js=H==null?void 0:H.layout)==null?void 0:js.h)??3,ys={x:(k==null?void 0:k.x)??0,y:(k==null?void 0:k.y)??0,w:bs,h:xs},sa=E.current==="flow-horizontal"?{id:L,frame:M,position:{x:0,y:0,w:bs,h:xs},layouts:{"flow-horizontal":ys},config:Ae(H)}:{id:L,frame:M,position:ys,config:Ae(H)};h.current.set(L,sa),F.current.set(L,R),ue(L),pe(A),Me(o.getGridItems().length),ze(L)}),o.on("removed",()=>Me(o.getGridItems().length)),o.on("dragstart",()=>document.body.classList.add("zf-dragging")),o.on("dragstop",()=>document.body.classList.remove("zf-dragging")),c&&o.on("drag",y=>{var M,L,H;const w=(M=z.current)==null?void 0:M.parentElement;if(!w)return;const k=w.getBoundingClientRect(),A=y.clientX??((H=(L=y.touches)==null?void 0:L[0])==null?void 0:H.clientX);if(A==null)return;const R=64;A<k.left+R?w.scrollLeft-=18:A>k.right-R&&(w.scrollLeft+=18)}),o},[Ye,t.grid.columns,t.grid.rowHeight,t.grid.rows,t.grid.gap,Ke,Ae,ue,pe]);r.useEffect(()=>{if(!z.current||U.current)return;U.current=!0;const s=E.current==="flow-horizontal",l=s?Ts(t.frames,t.grid.rows):t.grid.columns;return v.current=pt(E.current,l),Ee(s?Is(t.frames,l,t.grid.rows):t.frames),()=>{gt(),U.current=!1}},[]),r.useEffect(()=>{const s=v.current;s&&(s.enableMove(I),s.enableResize(I),I?s.getGridItems().forEach(pe):s.getGridItems().forEach(ms))},[I,pe,ms]),r.useEffect(()=>{const s=v.current;if(!s||E.current!=="flow-horizontal")return;const l=requestAnimationFrame(()=>{const c=Ye();s.cellHeight(c),s.el.style.width=`${s.getColumn()*c}px`});return()=>cancelAnimationFrame(l)},[I,Ye]),r.useEffect(()=>{!I||ge!=="frames"||!v.current||vs.setupDragIn(".zf-newwidget",{appendTo:"body",helper:s=>{var R;const c=(s.closest(".zf-newwidget")??s).dataset.frame??"",x=Ne.current.get(c),o=x==null?void 0:x.layout,y=document.createElement("div");y.className="grid-stack-item",y.setAttribute("data-frame",c),y.setAttribute("gs-w",String((o==null?void 0:o.w)??4)),y.setAttribute("gs-h",String((o==null?void 0:o.h)??3)),o!=null&&o.minW&&y.setAttribute("gs-min-w",String(o.minW)),o!=null&&o.minH&&y.setAttribute("gs-min-h",String(o.minH)),o!=null&&o.maxW&&y.setAttribute("gs-max-w",String(o.maxW)),o!=null&&o.maxH&&y.setAttribute("gs-max-h",String(o.maxH));const w=(R=z.current)==null?void 0:R.closest(".zf-editor");if(w){const M=getComputedStyle(w);for(const L of["--zf-accent-hue","--zf-accent-sat","--font-dmsans"]){const H=M.getPropertyValue(L).trim();H&&y.style.setProperty(L,H)}}const k=c.replace(/-/g," "),A=x!=null&&x.iconUrl?`<img class="zf-drag-ghost-icon" src="${x.iconUrl}" alt="" />`:"";return y.innerHTML=`<div class="grid-stack-item-content zf-drag-ghost" data-frame="${c}">${A}<span class="zf-drag-ghost-name">${k}</span></div>`,y}})},[I,ge,ve,os]);const we=r.useCallback(()=>{const s=v.current,l=[];if(s)for(const c of s.getGridItems()){const x=c.getAttribute("gs-id");if(!x)continue;const o=h.current.get(x);if(!o)continue;const y=c.gridstackNode,w=Fs(o,$)??o.position,k={x:(y==null?void 0:y.x)??w.x,y:(y==null?void 0:y.y)??w.y,w:(y==null?void 0:y.w)??w.w,h:(y==null?void 0:y.h)??w.h};l.push($==="flow-horizontal"?{...o,layouts:{...o.layouts,"flow-horizontal":k}}:{...o,position:k})}return l.sort((c,x)=>c.position.y-x.position.y||c.position.x-x.position.x),{...t,grid:{...t.grid,gap:te,paddingX:me,mode:$},background:{...t.background,type:P,projectId:ee,opacity:ne,color:ie,gradientFrom:de,gradientTo:fe,gradientAngle:le,imageUrl:ye||void 0,imageFit:he,imageBlur:ce,overlayOpacity:oe},theme:{...t.theme,accentHue:O,accentSat:D,baseHue:G,baseSat:_,upColor:Z,downColor:J,surface:Q},typography:{...t.typography,fontFamily:se,numericStyle:ae,scale:re},appearance:{...t.appearance,radius:q,borderStrength:K,surfaceOpacity:V,density:X,elevation:Y},frames:l}},[t,O,D,G,_,Z,J,Q,se,ae,re,te,me,$,q,K,V,X,Y,P,ee,ne,ie,de,fe,le,ye,he,ce,oe]),fs=r.useCallback(s=>{const l=new Blob([`${JSON.stringify(s,null,2)}
|
|
68
|
+
`],{type:"application/json"}),c=URL.createObjectURL(l),x=document.createElement("a");x.href=c,x.download="dashboard.json",x.click(),setTimeout(()=>URL.revokeObjectURL(c),0)},[]),Zs=r.useCallback(()=>{be.current=we().frames,Ie.current=O,Le.current=D,$e.current=G,je.current=_,S.current=Z,T.current=J,W.current=te,xe.current=me,Ce.current=$,Mt.current=q,At.current=K,Et.current=V,Ft.current=X,Tt.current=Y,It.current=se,Lt.current=ae,$t.current=re,Bt.current=P,Ot.current=ee,Pt.current=ne,Ht.current=ie,Dt.current=de,Gt.current=fe,_t.current=le,Ut.current=ye||void 0,Wt.current=he,qt.current=ce,Kt.current=oe,Vt.current=Q,Je(!0)},[we,O,D,G,_,Z,J,Q,te,me,$,q,K,V,X,Y,se,ae,re,P,ee,ne,ie,de,fe,le,ye,he,ce,oe]),Js=r.useCallback(()=>{(Ce.current!==E.current||JSON.stringify(we().frames)!==JSON.stringify(be.current))&&Ee(be.current),Be(Ie.current),Oe(Le.current),Pe($e.current),He(je.current),Qe(S.current),et(T.current),tt(W.current),st(xe.current),Zt(Ce.current),De(Mt.current),Ge(At.current),_e(Et.current),Ue(Ft.current),We(Tt.current),at(It.current),rt(Lt.current),nt($t.current),it(Bt.current),lt(Ot.current??Fe[0].projectId),ct(Pt.current),ot(Ht.current),Qt(Dt.current),es(Gt.current),ut(_t.current),ts(Ut.current??""),ss(Wt.current),mt(qt.current),dt(Kt.current),Yt(Vt.current),ze(null),Je(!1)},[Ee,we]),Qs=r.useCallback(async()=>{const s=we();Je(!1),ze(null),n?await n(s):fs(s)},[we,n,fs]),ea=r.useCallback(()=>{var s;(s=v.current)==null||s.compact(E.current==="flow-horizontal"?"list":"compact")},[]),hs=r.useCallback(()=>{const s=v.current;if(!s)return;const l=E.current;for(const c of s.getGridItems()){const x=c.getAttribute("gs-id");if(!x)continue;const o=h.current.get(x);if(!o)continue;const y=c.gridstackNode;if(!y)continue;const w={x:y.x??0,y:y.y??0,w:y.w??1,h:y.h??1};h.current.set(x,l==="flow-horizontal"?{...o,layouts:{...o.layouts,"flow-horizontal":w}}:{...o,position:w})}},[]),gs=r.useCallback(s=>{var x;if(s===E.current)return;const l=()=>{hs();const o=[...h.current.values()],y=I,w=s==="flow-horizontal",k=w?Ts(o,t.grid.rows):t.grid.columns;gt(),E.current=s,Zt(s);const A=pt(s,k);v.current=A,Ee(w?Is(o,k,t.grid.rows):o),y&&(A.enableMove(!0),A.enableResize(!0),A.getGridItems().forEach(pe))};if(typeof window<"u"&&((x=window.matchMedia)==null?void 0:x.call(window,"(prefers-reduced-motion: reduce)").matches)){l();return}Re.current&&clearTimeout(Re.current),Jt(!0),Re.current=setTimeout(()=>{l(),requestAnimationFrame(()=>Jt(!1))},150)},[I,hs,gt,pt,Ee,pe,t.grid.rows,t.grid.columns]);r.useEffect(()=>()=>{Re.current&&clearTimeout(Re.current)},[]);const ps=()=>e.jsx("button",{type:"button",className:"zf-btn zf-btn--icon",onClick:Zs,"aria-label":"Customise",title:"Customise",children:e.jsx(wa,{size:18,"aria-hidden":"true"})}),bt=I&&ft?h.current.get(ft):void 0,ta=$==="flow-horizontal";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:ca}),m&&!I?Ns.createPortal(ps(),m):null,e.jsxs("div",{className:I?"zf-editor zf-customise":"zf-editor","data-mode":$,"data-surface":Q,"data-wiggle":I&&Ws>12?"off":void 0,style:{"--zf-accent-hue":O,"--zf-accent-sat":`${D}%`,"--zf-base-hue":G,"--zf-base-sat":`${_}%`,...oa(Q),"--zf-up":Z,"--zf-down":J,"--zf-font-family":Cs[se],"--zf-numeric":Ss[ae],"--zf-frame-radius":`${q}px`,"--zf-border-alpha":K,"--zf-surface-opacity":V,"--zf-density":X,"--zf-elevation":Y,"--zf-pad-x":`${me}px`},children:[(I||!m)&&e.jsxs("div",{className:"zf-editor-bar",children:[e.jsx("div",{className:"zf-editor-bar-spacer"}),I?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"zf-btn zf-btn--ghost",onClick:ea,title:"Reclaim empty grid space",children:"Tidy"}),e.jsx("button",{type:"button",className:"zf-btn zf-btn--ghost",onClick:Js,children:"Cancel"}),e.jsx("button",{type:"button",className:"zf-btn zf-btn--primary",onClick:Qs,children:"Save"})]}):ps()]}),e.jsxs("div",{className:"zf-editor-main",children:[e.jsx("div",{className:"zf-editor-grid","data-switching":qs,children:e.jsx("div",{ref:z,className:"grid-stack"})}),e.jsx("aside",{className:"zf-rail","aria-hidden":!I,inert:!I,children:e.jsxs("div",{className:"zf-rail-inner",children:[e.jsxs("div",{className:"zf-rail-tabs",role:"tablist","aria-label":"Customise",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":ge==="frames",className:ge==="frames"?"zf-rail-tab is-active":"zf-rail-tab",onClick:()=>rs("frames"),children:"Frames"}),e.jsx("button",{type:"button",role:"tab","aria-selected":ge==="cosmetics",className:ge==="cosmetics"?"zf-rail-tab is-active":"zf-rail-tab",onClick:()=>rs("cosmetics"),children:"Cosmetics"})]}),ge==="cosmetics"&&e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",style:{margin:0},children:"Presets"}),e.jsx("div",{className:"zf-presets",children:ks.map(s=>e.jsxs("button",{type:"button",className:as===s.key?"zf-preset is-active":"zf-preset",title:s.description,"aria-pressed":as===s.key,onClick:()=>Ks(s),children:[e.jsx("span",{className:"zf-preset-swatch",style:{background:`linear-gradient(135deg, hsl(${s.theme.baseHue} ${s.theme.baseSat}% 16%) 0 52%, hsl(${s.theme.accentHue} ${s.theme.accentSat}% 62%) 52% 100%)`}}),e.jsx("span",{className:"zf-preset-label",children:s.label})]},s.key))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",style:{margin:0},children:"Mode"}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Surface mode",style:{marginTop:10},children:["dark","light"].map(s=>e.jsx("button",{type:"button",className:Q===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":Q===s,onClick:()=>Yt(s),children:s==="dark"?"Dark":"Light"},s))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",style:{margin:0},children:"Accent"}),e.jsxs("div",{className:"zf-theme-row",style:{margin:"10px 0 0"},children:[e.jsxs("span",{className:"zf-theme-val",children:[e.jsx("span",{className:"zf-theme-swatch"}),"Hue ",O,"°"]}),O!==242&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Be(242),children:"Reset"})]}),e.jsx("input",{type:"range",className:"zf-hue-slider",min:0,max:360,value:O,"aria-label":"Accent hue",onChange:s=>Be(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Saturation"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[D!==90&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Oe(90),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[D,"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:100,value:D,"aria-label":"Accent saturation",onChange:s=>Oe(Number(s.target.value))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Surface"}),e.jsxs("div",{className:"zf-theme-row",style:{margin:"10px 0 0"},children:[e.jsxs("span",{className:"zf-theme-val",children:[e.jsx("span",{className:"zf-theme-swatch",style:{background:`hsl(${G} ${_}% 32%)`,boxShadow:"none"}}),"Tint ",G,"°"]}),G!==233&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Pe(233),children:"Reset"})]}),e.jsx("input",{type:"range",className:"zf-hue-slider",min:0,max:360,value:G,"aria-label":"Surface tint hue",onChange:s=>Pe(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Tint strength"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[_!==20&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>He(20),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[_,"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:100,value:_,"aria-label":"Surface tint strength",onChange:s=>He(Number(s.target.value))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Gain / Loss"}),e.jsxs("div",{className:"zf-theme-row",style:{margin:"10px 0 0"},children:[e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:Z,"aria-label":"Gain (up) colour",onChange:s=>Qe(s.target.value)}),"Up ",Z]}),Z.toLowerCase()!=="#3fd08f"&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Qe("#3fd08f"),children:"Reset"})]}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:9},children:[e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:J,"aria-label":"Loss (down) colour",onChange:s=>et(s.target.value)}),"Down ",J]}),J.toLowerCase()!=="#ff6b81"&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>et("#ff6b81"),children:"Reset"})]})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Background"}),e.jsx("div",{className:"zf-bg-seg",role:"group","aria-label":"Background style",children:["none","color","gradient","unicorn","image"].map(s=>e.jsx("button",{type:"button",className:P===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":P===s,onClick:()=>it(s),children:s==="none"?"Glow":s==="color"?"Color":s==="gradient"?"Gradient":s==="unicorn"?"Scene":"Image"},s))}),P==="color"&&e.jsxs("div",{className:"zf-theme-row",style:{marginTop:12},children:[e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:ie,"aria-label":"Background colour",onChange:s=>ot(s.target.value)}),ie]}),ie.toLowerCase()!=="#0a0a12"&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>ot("#0a0a12"),children:"Reset"})]}),P==="gradient"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"zf-theme-row",style:{marginTop:12},children:e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:de,"aria-label":"Gradient start colour",onChange:s=>Qt(s.target.value)}),"From ",de]})}),e.jsx("div",{className:"zf-theme-row",style:{marginTop:9},children:e.jsxs("label",{className:"zf-theme-val",children:[e.jsx("input",{type:"color",className:"zf-color",value:fe,"aria-label":"Gradient end colour",onChange:s=>es(s.target.value)}),"To ",fe]})}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Angle"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[le!==160&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>ut(160),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[le,"°"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:360,value:le,"aria-label":"Gradient angle",onChange:s=>ut(Number(s.target.value))})]}),P==="unicorn"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"zf-presets",style:{marginTop:12},role:"group","aria-label":"Background scene",children:Fe.map(s=>e.jsxs("button",{type:"button",className:ee===s.projectId?"zf-preset is-active":"zf-preset",title:s.description,"aria-pressed":ee===s.projectId,onClick:()=>lt(s.projectId),children:[e.jsx("span",{className:"zf-preset-swatch",style:{background:s.swatch}}),e.jsx("span",{className:"zf-preset-label",children:s.label})]},s.key))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Opacity"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[ne!==.16&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>ct(.16),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(ne*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:.6,step:.02,value:ne,"aria-label":"Background scene opacity",onChange:s=>ct(Math.round(Number(s.target.value)*100)/100)})]}),P==="image"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"zf-field",style:{marginTop:12},children:[e.jsx("label",{htmlFor:"zf-bg-image-url",children:"Image URL"}),e.jsx("input",{id:"zf-bg-image-url",className:"zf-input",type:"url",value:ye,placeholder:"https://… or /hero.png",spellCheck:!1,autoComplete:"off","aria-label":"Background image URL",onChange:s=>ts(s.target.value)}),e.jsx("p",{className:"zf-field-hint",children:"Full-bleed behind the dashboard, with a dark scrim for legibility."})]}),e.jsx("div",{className:"zf-theme-row",children:e.jsx("span",{className:"zf-theme-val",children:"Fit"})}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Background image fit",children:["cover","contain"].map(s=>e.jsx("button",{type:"button",className:he===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":he===s,onClick:()=>ss(s),children:s==="cover"?"Cover":"Contain"},s))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Blur"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[ce!==0&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>mt(0),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[ce,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:40,value:ce,"aria-label":"Background image blur",onChange:s=>mt(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Overlay"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[oe!==.55&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>dt(.55),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(oe*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:1,step:.05,value:oe,"aria-label":"Background image overlay opacity",onChange:s=>dt(Math.round(Number(s.target.value)*100)/100)})]})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Layout"}),e.jsx("div",{className:"zf-theme-row",children:e.jsx("span",{className:"zf-theme-val",children:"Direction"})}),e.jsxs("div",{className:"zf-mode-seg",role:"group","aria-label":"Dashboard layout direction",children:[e.jsx("button",{type:"button",className:$==="flow-vertical"?"zf-mode-seg-btn is-active":"zf-mode-seg-btn","aria-pressed":$==="flow-vertical",onClick:()=>gs("flow-vertical"),children:"Vertical"}),e.jsx("button",{type:"button",className:$==="flow-horizontal"?"zf-mode-seg-btn is-active":"zf-mode-seg-btn","aria-pressed":$==="flow-horizontal",onClick:()=>gs("flow-horizontal"),children:"Horizontal"})]}),ta&&e.jsx("p",{className:"zf-mode-seg-hint",children:"Rows fill the height; the board scrolls sideways. Arrange it freely — this layout is saved separately from Vertical."}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Frame gap"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[te!==12&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>tt(12),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[te,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:12,value:te,"aria-label":"Frame gap",onChange:s=>tt(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Side padding"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[me!==0&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>st(0),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[me,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:96,step:4,value:me,"aria-label":"Grid side padding",onChange:s=>st(Number(s.target.value))})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Appearance"}),e.jsxs("div",{className:"zf-theme-row",children:[e.jsx("span",{className:"zf-theme-val",children:"Corner radius"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[q!==18&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>De(18),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[q,"px"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:32,value:q,"aria-label":"Corner radius",onChange:s=>De(Number(s.target.value))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Border"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[K!==.22&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ge(.22),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(K*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:1,step:.01,value:K,"aria-label":"Border strength",onChange:s=>Ge(Math.round(Number(s.target.value)*100)/100)}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Card opacity"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[V!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>_e(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(V*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:.3,max:1,step:.05,value:V,"aria-label":"Card opacity",onChange:s=>_e(Math.round(Number(s.target.value)*100)/100)}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Density"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[X!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>Ue(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(X*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:.6,max:1.4,step:.05,value:X,"aria-label":"Card density",onChange:s=>Ue(Math.round(Number(s.target.value)*100)/100)}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Elevation"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[Y!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>We(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Y.toFixed(1),"×"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:0,max:2,step:.1,value:Y,"aria-label":"Card elevation",onChange:s=>We(Math.round(Number(s.target.value)*10)/10)})]}),e.jsxs("section",{className:"zf-theme",children:[e.jsx("h3",{className:"zf-rail-title",children:"Typography"}),e.jsx("div",{className:"zf-theme-row",children:e.jsx("span",{className:"zf-theme-val",children:"Font"})}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Font family",children:["sans","mono","serif"].map(s=>e.jsx("button",{type:"button",className:se===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":se===s,style:{fontFamily:Cs[s]},onClick:()=>at(s),children:s==="sans"?"Sans":s==="mono"?"Mono":"Serif"},s))}),e.jsx("div",{className:"zf-theme-row",style:{marginTop:13},children:e.jsx("span",{className:"zf-theme-val",children:"Numbers"})}),e.jsx("div",{className:"zf-seg",role:"group","aria-label":"Numeric style",children:["proportional","tabular"].map(s=>e.jsx("button",{type:"button",className:ae===s?"zf-seg-btn is-active":"zf-seg-btn","aria-pressed":ae===s,onClick:()=>rt(s),children:e.jsx("span",{style:{fontVariantNumeric:Ss[s]},children:s==="proportional"?"Normal 1,071":"Tabular 1,071"})},s))}),e.jsxs("div",{className:"zf-theme-row",style:{marginTop:13},children:[e.jsx("span",{className:"zf-theme-val",children:"Text size"}),e.jsxs("span",{className:"zf-theme-knob-end",children:[re!==1&&e.jsx("button",{type:"button",className:"zf-theme-reset",onClick:()=>nt(1),children:"Reset"}),e.jsxs("span",{className:"zf-theme-val",children:[Math.round(re*100),"%"]})]})]}),e.jsx("input",{type:"range",className:"zf-range",min:.85,max:1.25,step:.05,value:re,"aria-label":"Text size",onChange:s=>nt(Math.round(Number(s.target.value)*100)/100)})]})]}),ge==="frames"&&e.jsxs("section",{children:[e.jsx("h3",{className:"zf-rail-title",children:"Add a frame"}),e.jsx("p",{className:"zf-palette-hint",children:"Search, or open a category, then click a frame to add it — or drag it onto the grid."}),e.jsxs("div",{className:"zf-palette-search",children:[e.jsx(Bs,{size:14,"aria-hidden":"true"}),e.jsx("input",{type:"text",value:ke,placeholder:"Search frames…","aria-label":"Search frames",autoComplete:"off",spellCheck:!1,onChange:s=>ht(s.target.value),onKeyDown:s=>{s.key==="Escape"&&ke&&(s.preventDefault(),ht(""))}}),ke&&e.jsx("button",{type:"button",className:"zf-palette-search-clear","aria-label":"Clear search",onClick:()=>ht(""),children:e.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"zf-palette-cats",children:[ls&&cs.length===0&&e.jsxs("p",{className:"zf-palette-empty",children:["No frames match “",ke.trim(),"”."]}),cs.map(s=>{const l=ls||os.has(s.key);return e.jsxs("div",{className:l?"zf-palette-cat is-open":"zf-palette-cat",children:[e.jsxs("button",{type:"button",className:"zf-palette-cat-header","aria-expanded":l,onClick:()=>Xs(s.key),children:[e.jsx("svg",{className:"zf-palette-cat-chevron",viewBox:"0 0 16 16","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("span",{className:"zf-palette-cat-label",children:s.label}),e.jsx("span",{className:"zf-palette-cat-count",children:s.frames.length})]}),l&&e.jsxs("div",{className:"zf-palette-cat-body",children:[s.description&&e.jsx("p",{className:"zf-palette-cat-desc",children:s.description}),e.jsx("div",{className:"zf-palette",children:s.frames.map(c=>{var x,o,y,w,k,A;return e.jsxs("div",{className:"grid-stack-item zf-newwidget","data-frame":c.name,"gs-w":((x=c.layout)==null?void 0:x.w)??4,"gs-h":((o=c.layout)==null?void 0:o.h)??3,"gs-min-w":(y=c.layout)==null?void 0:y.minW,"gs-min-h":(w=c.layout)==null?void 0:w.minH,"gs-max-w":(k=c.layout)==null?void 0:k.maxW,"gs-max-h":(A=c.layout)==null?void 0:A.maxH,role:"button",tabIndex:0,title:`Drag onto the board, or click to add ${c.label}`,onClick:()=>ds(c.name),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),ds(c.name))},children:[c.iconUrl&&e.jsx("img",{className:"zf-newwidget-icon",src:c.iconUrl,alt:"",loading:"lazy",draggable:!1}),e.jsxs("div",{className:"zf-newwidget-copy",children:[e.jsx("div",{className:"zf-newwidget-name",children:c.label}),e.jsx("div",{className:"zf-newwidget-desc",children:c.description})]})]},c.name)})})]})]},s.key)})]})]})]})})]})]}),bt?Ns.createPortal(e.jsx(Ba,{instance:bt,registry:a,instancesRef:h,symbolUniverse:Us,accentHue:O,inherited:{accentHue:O,accentSat:D,baseHue:G,baseSat:_,surfaceOpacity:V,radius:q,borderStrength:K,density:X,elevation:Y},onApply:s=>ue(s),onClose:()=>ze(null)},bt.id),document.body):null]})}export{Za as DashboardEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as o}from"./react-qoZPGuNy.js";import{f as n,D as f,U as u}from"./format-DxkEZcwQ.js";import{f as p,cc as m,bK as d}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{B as x}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";const h={"1M":30*864e5,"3M":90*864e5,"6M":180*864e5};m.schema;function F(e){const a=new Date(e);return`${a.getMonth()+1}/${a.getDate()}`}function j({config:e}){const a=l.useMemo(()=>Date.now()-h[e.lookback],[e.lookback]),{flows:t,isLoading:c}=d(e.asset),r=l.useMemo(()=>((t==null?void 0:t.history)??[]).filter(s=>s.time>=a).map(s=>({label:F(s.time),value:s.value})),[t,a]);return c?o.jsx(i,{loading:!0,children:"loading ETF flows…"}):r.length===0?o.jsx(i,{children:"ETF flows unavailable"}):o.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[o.jsx(x,{data:r,color:u,negativeColor:f,height:200,formatValue:n,showValues:!1,maxTickLabels:6}),o.jsxs("div",{className:"caption text-soft text-center",children:[e.asset.toUpperCase()," spot-ETF daily net flow · latest"," ",n((t==null?void 0:t.dailyTotalNetInflow)??0)]})]})}const v=p({...m,component:j});export{v as etfFlowBarsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as n}from"./react-qoZPGuNy.js";import{f as u}from"./format-DxkEZcwQ.js";import{f,dA as c,bK as d}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{H as h}from"./index-Bw1aFtyx.js";import"./utils-DxneYyA_.js";const p={"1M":30*864e5,"3M":90*864e5,"6M":180*864e5};c.schema;function m(t){const e=new Date(t);e.setHours(0,0,0,0);const o=(e.getDay()+6)%7;return e.setDate(e.getDate()-o),e.getTime()}function w({data:t,width:e,height:o}){return e<40||o<18?null:n.jsx("div",{className:"flex h-full w-full items-center justify-center",children:n.jsx("span",{className:"caption text-normal tabular-nums",children:u(t.value)})})}function x({config:t}){const{flows:e,isLoading:o}=d(t.asset),r=l.useMemo(()=>m(Date.now()-p[t.lookback]),[t.lookback]),s=l.useMemo(()=>((e==null?void 0:e.history)??[]).filter(a=>a.time>=r).map(a=>({id:String(a.time),row:new Date(m(a.time)).toLocaleDateString("en-US",{month:"short",day:"numeric"}),column:new Date(a.time).toLocaleDateString("en-US",{weekday:"short"}),value:a.value})),[e,r]);return o?n.jsx(i,{loading:!0,children:"loading ETF flows…"}):s.length===0?n.jsx(i,{children:"ETF flows unavailable"}):n.jsx(h,{data:s,CellComponent:w,gap:3,showLabels:!0,rowLabelWidth:56,columnLabelHeight:20})}const j=f({...c,component:x});export{j as etfFlowCalendarFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as s}from"./react-qoZPGuNy.js";import{f as c}from"./format-
|
|
1
|
+
import{r as f,j as s}from"./react-qoZPGuNy.js";import{f as c}from"./format-DxkEZcwQ.js";import{f as h,bS as l,bK as d}from"./index-BHlJHScr.js";import{F as n}from"./ui-Bq3RQsdJ.js";import{a as r,C}from"./chart-utils-DGogNvJT.js";import{M}from"./index-BpPIfN5S.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";const F={"1M":{ms:30*864e5,timeframe:r["1M"]},"3M":{ms:90*864e5,timeframe:r["3M"]},"6M":{ms:180*864e5,timeframe:r.YTD}};l.schema;function S({config:t}){const{ms:o,timeframe:u}=F[t.lookback],m=f.useMemo(()=>Date.now()-o,[o]),{flows:e,isLoading:p}=d(t.asset),i=f.useMemo(()=>[{id:t.asset,name:`${t.asset.toUpperCase()} net flow`,color:C[0],data:((e==null?void 0:e.history)??[]).filter(a=>a.time>=m).map(a=>({date:new Date(a.time).toISOString(),value:a.value}))}],[e,t.asset,m]);return p?s.jsx(n,{loading:!0,children:"loading ETF flows…"}):i[0].data.length===0?s.jsx(n,{children:"ETF flows unavailable"}):s.jsx(M,{series:i,timeframe:u,height:220,formatValue:c})}const R=h({...l,component:S});export{R as etfFlowsChartFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./react-qoZPGuNy.js";import{c as a,f as o}from"./format-
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{c as a,f as o}from"./format-DxkEZcwQ.js";import{M as d}from"./metric-row-BVVhjsjK.js";import{f as m,bJ as n,bK as x}from"./index-BHlJHScr.js";import{F as r,s as p}from"./ui-Bq3RQsdJ.js";n.schema;const i=e=>e>=0?`+${o(e)}`:o(e);function u({config:e}){const{flows:l,isLoading:c}=x(e.asset);if(c)return s.jsx(r,{loading:!0,children:"loading ETF flows…"});if(!l)return s.jsx(r,{children:"ETF flows unavailable"});const f=l.issuers.slice(0,e.limit);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"caption text-soft",children:[e.asset.toUpperCase()," spot ETF · net flow",l.date?` · ${l.date}`:""]}),s.jsx("div",{className:"metric-lg leading-none",style:{color:a(l.dailyTotalNetInflow)},children:i(l.dailyTotalNetInflow)})]}),s.jsx("div",{className:`${p} flex flex-col`,children:f.map(t=>s.jsx(d,{label:t.ticker,meta:t.institute,value:s.jsx("span",{style:{color:a(t.dailyNetInflow)},children:i(t.dailyNetInflow)})},t.ticker))})]})}const g=m({...n,component:u});export{g as etfFlowsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,j as s}from"./react-qoZPGuNy.js";import{f,D as d,U as u}from"./format-DxkEZcwQ.js";import{f as c,dx as i,bK as p}from"./index-BHlJHScr.js";import{F as l}from"./ui-Bq3RQsdJ.js";import{B as x}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";i.schema;function h({config:a}){const{flows:e,isLoading:n}=p(a.asset),r=m.useMemo(()=>[...(e==null?void 0:e.issuers)??[]].sort((t,o)=>Math.abs(o.dailyNetInflow)-Math.abs(t.dailyNetInflow)).slice(0,a.limit).sort((t,o)=>o.dailyNetInflow-t.dailyNetInflow).map(t=>({label:t.ticker,value:t.dailyNetInflow})),[e,a.limit]);return n?s.jsx(l,{loading:!0,children:"loading ETF flows…"}):r.length===0?s.jsx(l,{children:"ETF flows unavailable"}):s.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[s.jsx(x,{data:r,orientation:"horizontal",color:u,negativeColor:d,height:Math.max(r.length*24,96),formatValue:f}),s.jsxs("div",{className:"caption text-soft text-center",children:[a.asset.toUpperCase()," spot-ETF issuers · today's net flow"]})]})}const C=c({...i,component:h});export{C as etfIssuerBarsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as a}from"./react-qoZPGuNy.js";import{f as n}from"./format-DxkEZcwQ.js";import{f,dq as m,bK as u}from"./index-BHlJHScr.js";import{T as p,a as d}from"./treemap-leaf-QG-L-SIG.js";import{F as i}from"./ui-Bq3RQsdJ.js";import"./utils-DxneYyA_.js";import"./d3-ibrLIlQc.js";m.schema;function c({width:r,height:s,data:t}){const o=n(t.netAssets),e=n(t.dailyNetInflow);return a.jsx(d,{width:r,height:s,label:t.id,secondary:o,title:`${t.id} · ${o} AUM · ${t.dailyNetInflow>=0?"+":""}${e} today`})}function w({config:r}){const{flows:s,isLoading:t}=u(r.asset),o=l.useMemo(()=>((s==null?void 0:s.issuers)??[]).filter(e=>e.netAssets>0).slice(0,r.limit).map(e=>({id:e.ticker,value:e.netAssets,netAssets:e.netAssets,dailyNetInflow:e.dailyNetInflow})),[s,r.limit]);return t?a.jsx(i,{loading:!0,children:"loading ETF flows…"}):o.length===0?a.jsx(i,{children:"ETF flows unavailable"}):a.jsx(p,{data:o,LeafComponent:c,getColorValue:e=>e.dailyNetInflow})}const E=f({...m,component:w});export{E as etfIssuerTreemapFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as a}from"./react-qoZPGuNy.js";import{a as r,U as n,D as i}from"./format-DxkEZcwQ.js";import{f as c,d8 as p,bF as m}from"./index-BHlJHScr.js";import{F as o}from"./ui-Bq3RQsdJ.js";import{B as u}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";function f(){const{supply:t,isLoading:s}=m(),e=l.useMemo(()=>t?[{label:"PoS (actual)",value:t.supplyGrowthYearlyPct},{label:"PoW (counterfactual)",value:t.supplyGrowthYearlyPowPct}]:[],[t]);return s?a.jsx(o,{loading:!0,children:"loading ETH issuance…"}):t?a.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[a.jsx(u,{data:e,orientation:"horizontal",color:i,negativeColor:n,height:Math.max(e.length*28,84),formatValue:r}),a.jsxs("div",{className:"caption text-soft text-center",children:["Net"," ",t.supplyGrowthYearlyPct<=0?"deflationary":"inflationary"," ·"," ",r(t.supplyGrowthYearlyPct),"/yr"]})]}):a.jsx(o,{children:"no ETH data yet"})}const E=c({...p,component:f});export{E as ethIssuanceImpactFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./react-qoZPGuNy.js";import{M as e,Z as a}from"./cycle-shared-
|
|
1
|
+
import{j as t}from"./react-qoZPGuNy.js";import{M as e,Z as a}from"./cycle-shared-XoGVsOjC.js";import{U as n,b as s}from"./format-DxkEZcwQ.js";import{f as p,bG as m,bF as l}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";import"./indicators-Cw7CVPn4.js";import"./mini-line-chart-DyG55cVW.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";function u(){const{supply:r,isLoading:o}=l();return o?t.jsx(i,{loading:!0,children:"loading staking APR…"}):r?t.jsx(e,{caption:"ETH Staking APR",headline:s(r.stakingAprPct),headlineColor:n,zone:{label:"validator yield",color:a},sub:"issuance + MEV + tips",sparkline:[],sparkColor:a}):t.jsx(i,{children:"no ETH data yet"})}const b=p({...m,component:u});export{b as ethStakingFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{M as s}from"./cycle-shared-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{M as s}from"./cycle-shared-XoGVsOjC.js";import{U as p,D as l}from"./format-DxkEZcwQ.js";import{f as u,bE as m,bF as y}from"./index-BHlJHScr.js";import{F as a}from"./ui-Bq3RQsdJ.js";import"./indicators-Cw7CVPn4.js";import"./mini-line-chart-DyG55cVW.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";const n=r=>`${Math.round(r).toLocaleString("en-US")} ETH/yr`;function c(){const{supply:r,isLoading:i}=y();if(i)return e.jsx(a,{loading:!0,children:"loading ETH supply…"});if(!r)return e.jsx(a,{children:"no ETH data yet"});const t=r.supplyGrowthYearlyPct,o=t<=0?p:l;return e.jsx(s,{caption:"ETH Net Supply Growth · yr",headline:`${t>=0?"+":""}${t.toFixed(2)}%`,headlineColor:o,zone:{label:t<=0?"Deflationary":"Inflationary",color:o},sub:`burn ${n(r.burnRateYearlyEth)} · issue ${n(r.issuanceRateYearlyEth)}`,sparkline:r.history,sparkColor:o})}const j=u({...m,component:c});export{j as ethSupplyFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{f as u,
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{f as u,H as l,I as m}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{M as p}from"./mini-line-chart-DyG55cVW.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";l.schema;function x(r){return r<=25?"#F21553":r<=45?"#F97316":r<=55?"#F59E0B":r<=75?"#84CC16":"#25A78D"}function f({config:r}){const{points:s,isLoading:o}=m(r.sparklineDays),t=s[0],d=c.useMemo(()=>[...s].reverse().map(n=>({date:new Date(n.time).toISOString(),value:n.value})),[s]);if(o)return e.jsx(i,{loading:!0,children:"loading index…"});if(!t)return e.jsx(i,{children:"no sentiment data yet"});const a=x(t.value);return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2.5",children:[e.jsx("div",{className:"metric-xl leading-none",style:{color:a,textShadow:`0 0 28px ${a}55`},children:t.value}),e.jsx("div",{className:"body-sm rounded-full px-2.5 py-0.5 font-semibold uppercase tracking-wide",style:{color:a,background:`${a}1f`,border:`1px solid ${a}33`},children:t.classification}),e.jsxs("div",{className:"relative w-full max-w-[180px] overflow-hidden rounded-xl",children:[e.jsx("div",{className:"h-[11px] w-full opacity-40",style:{background:"linear-gradient(90deg, #FF1F5F 4.89%, #464646 34.15%, #464646 69.98%, #81FE90 100%)"}}),e.jsx("div",{className:"absolute left-0 top-0 h-full w-full",style:{background:"repeating-linear-gradient(to right, var(--color-background-terminal), var(--color-background-terminal) 2px, transparent 2px, transparent 3px)"}}),e.jsx("div",{className:"absolute top-1/2 h-3 w-[3px] -translate-x-1/2 -translate-y-1/2 rounded-xs",style:{left:`${t.value}%`,background:a}})]}),e.jsx(p,{data:d,width:150,height:30,color:a}),e.jsxs("div",{className:"caption text-soft",children:["crypto fear & greed · ",r.sparklineDays,"d"]})]})}const b=u({...l,component:f});export{b as fearGreedFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as r}from"./react-qoZPGuNy.js";import{f as c,ds as f,I as p}from"./index-BHlJHScr.js";import{F as m}from"./ui-Bq3RQsdJ.js";import{M as F}from"./index-BpPIfN5S.js";import{a as t}from"./chart-utils-DGogNvJT.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";f.schema;function h(e){return e<=25?"#F21553":e<=45?"#F97316":e<=55?"#F59E0B":e<=75?"#84CC16":"#25A78D"}function l(e){return e<=35?t["1M"]:e<=100?t["3M"]:t.YTD}const x=e=>e.toFixed(0);function C({config:e}){const{points:a,isLoading:d}=p(e.days),n=u.useMemo(()=>{const i=[...a].reverse(),o=i.at(-1);return[{id:"fear-greed",name:"Fear & Greed",color:o?h(o.value):"#8b8bff",data:i.map(s=>({date:new Date(s.time).toISOString(),value:s.value}))}]},[a]);return d?r.jsx(m,{loading:!0,children:"loading index…"}):n[0].data.length===0?r.jsx(m,{children:"no sentiment data yet"}):r.jsx(F,{series:n,timeframe:l(e.days),height:220,formatValue:x})}const I=c({...f,component:C});export{I as fearGreedChartFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f,
|
|
1
|
+
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f,J as p,K as h,h as u,A as F}from"./index-BHlJHScr.js";import{F as j}from"./feed-row-mVg1d5Zj.js";import{t as b}from"./format-DxkEZcwQ.js";import{F as a,s as y}from"./ui-Bq3RQsdJ.js";p.schema;const n={"10-K":"Annual report","10-Q":"Quarterly report","8-K":"Material event","20-F":"Annual report (foreign)","40-F":"Annual report (foreign)","6-K":"Foreign interim report","S-1":"Registration","S-3":"Registration","S-4":"Registration (M&A)","DEF 14A":"Proxy statement",DEFA14A:"Proxy materials","SC 13D":"Activist stake","SC 13G":"Passive stake",SD:"Specialized disclosure",3:"Initial insider ownership",4:"Insider transaction",5:"Annual insider ownership",144:"Proposed insider sale","11-K":"Employee benefit plan"},A=/^(10-K|10-Q|8-K|20-F|40-F|6-K|S-|F-|424|DEF |DEFA|DEFM|11-K|SC 13|25)/i,S=/^(3|4|5|144)(\/A)?$/;function l(e){return e.replace(/^SCHEDULE /i,"SC ").trim()}function E(e,s){return s==="all"?!0:s==="insider"?S.test(e):A.test(e)}function D(e){const s=l(e.form);if(n[s])return n[s];const r=s.replace(/\/A$/,"");return r!==s&&n[r]?`${n[r]} (amended)`:e.description&&e.description.toUpperCase()!==e.form.toUpperCase()?e.description:s}function N({filing:e}){return t.jsx(j,{href:e.url,titleAttr:e.form,leading:t.jsx("span",{className:"caption text-strong inline-flex w-16 shrink-0 justify-center truncate rounded bg-white/[0.06] px-1.5 py-1 font-bold",children:l(e.form)}),title:D(e),subtitle:e.reportDate?`period ${e.reportDate}`:e.items?`items ${e.items}`:e.accessionNumber,meta:e.filingDate?b(new Date(e.filingDate).getTime()):void 0})}function v({config:e}){const{data:s,isLoading:r}=h(e.symbol),m=x.useMemo(()=>((s==null?void 0:s.filings)??[]).filter(i=>E(l(i.form),e.forms)).slice(0,e.count),[s==null?void 0:s.filings,e.forms,e.count]);if(r)return t.jsx(a,{loading:!0,children:"loading SEC filings…"});if(!s)return t.jsxs(a,{children:["no SEC data for “",u(e.symbol),"”"]});const o=s.tickers[0],c=e.symbol.includes(":")?e.symbol:o?`xyz:${o}`:null,d=[s.exchanges[0],s.category].filter(Boolean).join(" · ");return t.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c&&t.jsx(F,{symbol:c,size:22}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:s.name||o||u(e.symbol)}),d&&t.jsx("div",{className:"caption text-soft truncate",children:d})]})]}),t.jsx("div",{className:"caption text-soft shrink-0 text-right",children:"filings"})]}),t.jsx("div",{className:y,children:m.length>0?m.map(i=>t.jsx(N,{filing:i},i.accessionNumber)):t.jsxs(a,{children:["no ",e.forms==="all"?"":`${e.forms} `,"filings yet"]})})]})}const k=f({...p,component:v});export{k as filingsFeedFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as s}from"./react-qoZPGuNy.js";import{f as x,dn as c,K as p,h as o}from"./index-BHlJHScr.js";import{b as h}from"./format-DxkEZcwQ.js";import{F as m}from"./ui-Bq3RQsdJ.js";import{C as n}from"./chart-utils-DGogNvJT.js";import{P as g}from"./pie-chart-BIxKuHm-.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";c.schema;const j=/^(10-K|10-Q|8-K|20-F|40-F|6-K|S-|F-|424|DEF |DEFA|DEFM|11-K|SC 13|25)/i,E=/^(3|4|5|144)(\/A)?$/;function b(i){return i.replace(/^SCHEDULE /i,"SC ").trim()}function F(i){const r=b(i);return E.test(r)?"insider":j.test(r)?"important":"other"}const v=[{id:"important",label:"Periodic & material",color:n[0]},{id:"insider",label:"Insider (3/4/5/144)",color:n[2]},{id:"other",label:"Other",color:n[5]}];function N({config:i}){const{data:r,isLoading:f}=p(i.symbol),a=u.useMemo(()=>{const e={important:0,insider:0,other:0};for(const t of(r==null?void 0:r.filings)??[])e[F(t.form)]++;return v.map(t=>({...t,value:e[t.id]})).filter(t=>t.value>0).sort((t,d)=>d.value-t.value)},[r]),l=a.reduce((e,t)=>e+t.value,0);return f?s.jsx(m,{loading:!0,children:"loading SEC filings…"}):a.length===0?s.jsxs(m,{children:["no SEC filings for “",o(i.symbol),"”"]}):s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-4",children:[s.jsx(g,{data:a.map(e=>({name:e.label,value:e.value})),width:200,height:200,innerRadius:58,outerRadius:92,colors:a.map(e=>e.color),children:s.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[s.jsx("span",{className:"caption text-soft",children:(r==null?void 0:r.name)||o(i.symbol)}),s.jsx("span",{className:"metric-lg text-strong",children:l}),s.jsx("span",{className:"caption text-soft",children:"filings"})]})}),s.jsx("div",{className:"flex w-full max-w-xs flex-wrap justify-center gap-x-5 gap-y-1.5",children:a.map(e=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{background:e.color}}),s.jsx("span",{className:"body-sm text-soft",children:e.label}),s.jsx("span",{className:"body-sm text-normal font-bold tabular-nums",children:h(e.value/l*100,0)})]},e.id))})]})}const O=x({...c,component:N});export{O as filingsMixFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{D as m,U as x}from"./format-
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{D as m,U as x}from"./format-DxkEZcwQ.js";import{f as h,P as l,Q as u}from"./index-BHlJHScr.js";import{F as r}from"./ui-Bq3RQsdJ.js";import{M as f}from"./mini-line-chart-DyG55cVW.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";l.schema;function n(t){return t>0?m:x}function p(t){return t>=2.5?"high stress":t>=1?"elevated":t>-1?"near average":"below average"}function j({config:t}){const{stress:s,isLoading:d}=u(),o=c.useMemo(()=>((s==null?void 0:s.trend)??[]).slice(-t.trendDays).map(a=>({date:new Date(a.time).toISOString(),value:a.value})),[t.trendDays,s==null?void 0:s.trend]);if(d)return e.jsx(r,{loading:!0,children:"loading stress index…"});if(!s)return e.jsx(r,{children:"no stress-index data yet"});const i=n(s.value);return e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"OFR FSI"}),e.jsx("div",{className:"body-sm text-normal",children:s.date})]}),e.jsx("div",{className:"caption text-soft text-right",children:"daily"})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"metric-xl leading-none",style:{color:i,textShadow:`0 0 24px ${i}44`},children:[s.value>0?"+":"",s.value.toFixed(2)]}),e.jsx("div",{className:"caption text-soft mt-1",children:p(s.value)})]}),e.jsxs("div",{className:"caption text-soft max-w-[46%] text-right leading-snug",children:["0 = long-run average",e.jsx("br",{}),"higher = more stress"]})]}),e.jsx(f,{data:o,width:210,height:42,color:i}),t.showCategories&&s.categories.length>0&&e.jsx("div",{className:"grid grid-cols-2 gap-1.5 border-t border-white/[0.08] pt-2",children:s.categories.map(a=>e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"caption text-soft truncate",children:a.label}),e.jsxs("span",{className:"body-sm font-bold tabular-nums",style:{color:n(a.value)},children:[a.value>0?"+":"",a.value.toFixed(2)]})]},a.label))})]})}const y=h({...l,component:j});export{y as financialStressFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as x}from"./react-qoZPGuNy.js";import{a as F,d as _,G as I}from"./game-ui-
|
|
1
|
+
import{r as i,j as x}from"./react-qoZPGuNy.js";import{a as F,d as _,G as I}from"./game-ui-BiMS2KJf.js";import{f as L,aL as O}from"./index-BHlJHScr.js";import"./format-DxkEZcwQ.js";const v=.225,j=-3.6,b=52,A=132,z=210,U=1.3,C=64,p=12,M=28,N=28,R={bird:"rgba(255, 255, 255, 0.95)",eye:"rgba(0, 0, 0, 0.8)",pipe:"hsla(160, 64%, 40%, 0.9)",ground:"rgba(255, 255, 255, 0.1)"};function H(t,r,f,d){t.save(),t.translate(C,r),t.rotate(Math.max(-.5,Math.min(.9,f*.06))),t.fillStyle=R.bird,t.beginPath(),t.arc(0,0,p,0,Math.PI*2),t.fill(),t.fillStyle=d,t.fillRect(-p+2,0,10,5),t.fillStyle=R.eye,t.beginPath(),t.arc(5,-4,2,0,Math.PI*2),t.fill(),t.restore()}function V(t,r,f,d,y,h){r.clearRect(0,0,t.width,t.height);const c=t.height-M;r.fillStyle=R.ground,r.fillRect(0,c,t.width,2),H(r,t.height/2,0,h),r.textAlign="center",f==="idle"?(r.fillStyle=I.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText("Press SPACE or tap to fly",t.width/2,t.height/2-40)):(r.fillStyle=I.gameOver,r.font='bold 20px "DM Sans", sans-serif',r.fillText("GAME OVER",t.width/2,t.height/2-50),r.fillStyle=I.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText(`Score: ${d}`,t.width/2,t.height/2-22),r.fillStyle=I.textSoft,r.fillText("Press SPACE or tap to retry",t.width/2,t.height/2+6)),r.textAlign="left",_(t,r,d,y,h)}function X(){const t=i.useRef(null),r=i.useRef(null),[f,d]=i.useState("idle"),[y,h]=i.useState(0),[c,k]=i.useState(()=>{if(typeof window<"u"){const e=localStorage.getItem("zframes-flappy-bird-high-score");return e?parseInt(e,10):0}return 0}),[,B]=i.useState(!1),u=i.useRef(0),g=i.useRef(c),E=i.useRef(f),m=i.useRef(F(null));i.useEffect(()=>{g.current=c,c>0&&localStorage.setItem("zframes-flappy-bird-high-score",String(c))},[c]),i.useEffect(()=>{E.current=f},[f]);const w=i.useRef({birdY:0,birdVel:0,pipes:[],frameCount:0}),G=i.useCallback(e=>{const n=e.height-M,a=N,l=n-N-A;return a+Math.random()*Math.max(0,l-a)},[]),T=i.useCallback(()=>{const e=t.current;e&&(w.current={birdY:e.height/2,birdVel:0,pipes:[{x:e.width+60,gapY:G(e),passed:!1}],frameCount:0},u.current=0,h(0))},[G]),P=i.useCallback(()=>{var e;if((e=r.current)==null||e.focus(),E.current!=="playing"){T(),d("playing");return}w.current.birdVel=j},[T]);return i.useEffect(()=>{const e=a=>{const l=a.target;l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable||(a.code==="Space"||a.code==="ArrowUp")&&(a.preventDefault(),P())},n=r.current;if(n)return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)},[P]),i.useLayoutEffect(()=>{const e=t.current;if(!e)return;const n=()=>{const l=e.parentElement;if(l&&l.clientWidth>0&&l.clientHeight>0){e.width=l.clientWidth,e.height=l.clientHeight,m.current=F(e);const S=e.getContext("2d");E.current!=="playing"&&(w.current.birdY=e.height/2,S&&V(e,S,E.current,u.current,g.current,m.current)),B(Y=>!Y)}};n();const a=new ResizeObserver(n);return a.observe(e.parentElement),()=>a.disconnect()},[]),i.useEffect(()=>{if(f!=="playing")return;const e=t.current,n=e==null?void 0:e.getContext("2d");if(!e||!n)return;let a;const l=e.height-M,S=()=>{u.current>g.current&&(g.current=u.current,k(u.current)),d("gameover")},Y=()=>{const o=w.current;n.clearRect(0,0,e.width,e.height),o.birdVel+=v,o.birdY+=o.birdVel,o.pipes=o.pipes.filter(s=>s.x>-b),o.pipes.forEach(s=>s.x-=U);const D=o.pipes[o.pipes.length-1];if((!D||D.x<e.width-z)&&o.pipes.push({x:e.width,gapY:G(e),passed:!1}),o.birdY-p<=0||o.birdY+p>=l){S();return}for(const s of o.pipes){if(C+p>s.x&&C-p<s.x+b&&(o.birdY-p<s.gapY||o.birdY+p>s.gapY+A)){S();return}!s.passed&&s.x+b<C&&(s.passed=!0,u.current+=1,h(u.current))}n.fillStyle=R.pipe;for(const s of o.pipes)n.fillRect(s.x,0,b,s.gapY),n.fillRect(s.x,s.gapY+A,b,l-(s.gapY+A));n.fillStyle=R.ground,n.fillRect(0,l,e.width,2),H(n,o.birdY,o.birdVel,m.current),_(e,n,u.current,g.current,m.current),o.frameCount++,a=requestAnimationFrame(Y)};return a=requestAnimationFrame(Y),()=>cancelAnimationFrame(a)},[f]),i.useEffect(()=>{if(f==="playing")return;const e=t.current,n=e==null?void 0:e.getContext("2d");!e||!n||V(e,n,f,y,c,m.current)},[f,y,c]),x.jsx("div",{ref:r,tabIndex:0,className:"relative h-full w-full cursor-pointer select-none overflow-hidden outline-none",onClick:P,onTouchStart:P,role:"application","aria-label":"Flappy bird game. Press space or tap to flap.",children:x.jsx("canvas",{ref:t,className:"h-full w-full"})})}const Q=L({...O,component:X});export{Q as flappyBirdFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function f(t){return t>=1e3?`$${t.toLocaleString("en-US",{maximumFractionDigits:0})}`:t>=1?`$${t.toLocaleString("en-US",{maximumFractionDigits:2})}`:`$${t.toPrecision(4)}`}function u(t){return`${t>=0?"+":""}${t.toFixed(2)}%`}function $(t){const n=t>=100?2:4;return t.toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n})}function m(t,n=2){return`${t.toFixed(n)}%`}function d(t){return`${t>=0?"+":""}${t.toFixed(4)}%`}const s="var(--zf-up, #3fd08f)",c="var(--zf-down, #ff6b81)",h="#3fd08f",x="#ff6b81";function F(t){return t>=0?s:c}function a(t){const n=Math.abs(t),r=t<0?"-":"";return n>=1e12?`${r}${(n/1e12).toFixed(2)}T`:n>=1e9?`${r}${(n/1e9).toFixed(2)}B`:n>=1e6?`${r}${(n/1e6).toFixed(2)}M`:n>=1e3?`${r}${(n/1e3).toFixed(1)}K`:`${r}${n.toFixed(0)}`}function g(t){return t<0?`-$${a(-t)}`:`$${a(t)}`}function C(t){return t.split(/[-_]/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function H(t){const n=t/1e8;return n>=100?`${n.toFixed(0)} BTC`:n>=1?`${n.toFixed(2)} BTC`:n>=.001?`${n.toFixed(4)} BTC`:`${Math.round(t).toLocaleString("en-US")} sats`}function S(t){const n=["H/s","kH/s","MH/s","GH/s","TH/s","PH/s","EH/s","ZH/s"];let r=t,o=0;for(;r>=1e3&&o<n.length-1;)r/=1e3,o++;return`${r.toFixed(r>=100?0:r>=10?1:2)} ${n[o]}`}function p(t){const n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return"now";const r=Math.round(n/60);if(r<60)return`${r}m`;const o=Math.round(r/60);if(o<24)return`${o}h`;const e=Math.round(o/24);if(e<7)return`${e}d`;const i=Math.round(e/7);return i<5?`${i}w`:new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric"})}export{c as D,s as U,u as a,m as b,F as c,a as d,f as e,g as f,x as g,d as h,$ as i,H as j,S as k,h as l,C as p,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{f as c,L as r,O as o,h as i}from"./index-BHlJHScr.js";import{e as m,d,f}from"./format-DxkEZcwQ.js";import{F as n,s as u}from"./ui-Bq3RQsdJ.js";r.schema;function x(a){return a.unit==="USD/shares"?m(a.value):a.unit==="shares"?d(a.value):f(a.value)}function h({config:a}){const{data:t,isLoading:l}=o(a.symbol);return l?s.jsx(n,{loading:!0,children:"loading SEC financials…"}):!t||t.metrics.length===0?s.jsxs(n,{children:["no SEC financials for “",i(a.symbol),"”"]}):s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:t.entityName||i(a.symbol)}),s.jsx("div",{className:"caption text-soft truncate",children:"SEC EDGAR · XBRL company facts"})]}),s.jsx("div",{className:"caption text-soft shrink-0 text-right",children:"on filing"})]}),s.jsx("div",{className:`grid grid-cols-2 content-start gap-2 ${u}`,children:t.metrics.map(e=>s.jsxs("div",{className:"rounded bg-white/[0.04] px-3 py-2",children:[s.jsx("div",{className:"caption text-soft truncate",children:e.label}),s.jsx("div",{className:"metric-sm text-strong",children:x(e)}),s.jsx("div",{className:"caption text-soft truncate",children:e.fiscalPeriod})]},e.label))})]})}const N=c({...r,component:h});export{N as fundamentalsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,j as e}from"./react-qoZPGuNy.js";import{D as d,U as f,h as i}from"./format-DxkEZcwQ.js";import{f as p,cb as c,bD as g}from"./index-BHlJHScr.js";import{F as m}from"./ui-Bq3RQsdJ.js";import{B as x}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";c.schema;function h({config:u}){const{comparison:r,isLoading:l}=g(),o=u.coin.trim().toUpperCase(),n=s.useMemo(()=>r.find(a=>a.coin.toUpperCase()===o),[r,o]),t=s.useMemo(()=>((n==null?void 0:n.venues)??[]).map(a=>({label:a.venue,value:a.annualizedPct})),[n]);return l?e.jsx(m,{loading:!0,children:"loading funding…"}):t.length===0?e.jsxs(m,{children:["no cross-venue funding for ",o]}):e.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[e.jsx(x,{data:t,orientation:"horizontal",color:f,negativeColor:d,height:Math.max(t.length*28,84),formatValue:a=>i(a)}),e.jsxs("div",{className:"caption text-soft text-center",children:[o," funding, annualized · spread"," ",i((n==null?void 0:n.spreadPct)??0)]})]})}const P=p({...c,component:h});export{P as fundingBarsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,j as a}from"./react-qoZPGuNy.js";import{f as x,cz as f,Z as A,h as C}from"./index-BHlJHScr.js";import{h as u}from"./format-DxkEZcwQ.js";import{F as c}from"./ui-Bq3RQsdJ.js";import{C as d}from"./chart-utils-DGogNvJT.js";import{S}from"./index-DuNO-RcB.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";const F={"24h":1440*60*1e3,"7D":10080*60*1e3,"1M":720*60*60*1e3};f.schema;function M(r){return r.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function j({config:r}){const o=F[r.lookback],h=m.useMemo(()=>Date.now()-o,[o]),{history:n,isLoading:l}=A(r.symbols,h),s=m.useMemo(()=>r.symbols.map((t,p)=>{let i=0;const g=[...n[t]??[]].sort((e,y)=>e.time-y.time).map(e=>(i+=e.fundingRate*100,{date:new Date(e.time),value:i}));return{id:t,name:C(t),color:d[p%d.length],data:g}}),[r.symbols,n]);return l?a.jsx(c,{loading:!0,children:"loading funding carry…"}):s.every(t=>t.data.length===0)?a.jsx(c,{children:"no funding data yet"}):a.jsx(S,{series:s,height:250,formatXAxis:M,formatYAxis:u,formatValue:u})}const _=x({...f,component:j});export{_ as fundingCarryAreaFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./react-qoZPGuNy.js";import{b as a}from"./format-DxkEZcwQ.js";import{M as l}from"./metric-row-BVVhjsjK.js";import{f as d,bC as r,bD as u}from"./index-BHlJHScr.js";import{F as e,s as f}from"./ui-Bq3RQsdJ.js";r.schema;function p({config:t}){const{comparison:m,isLoading:c}=u(),i=m.slice(0,t.limit);return c?o.jsx(e,{loading:!0,children:"loading funding…"}):i.length===0?o.jsx(e,{children:"no funding data yet"}):o.jsx("div",{className:`${f} flex flex-col`,children:i.map(n=>o.jsx(l,{label:n.coin,meta:n.venues.map(s=>`${s.venue.slice(0,3)} ${a(s.annualizedPct,1)}`).join(" · "),value:`${a(n.spreadPct,1)} sprd`},n.coin))})}const h=d({...r,component:p});export{h as fundingComparisonFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as n}from"./react-qoZPGuNy.js";import{f as u,cD as m,aj as h,aJ as p,h as x}from"./index-BHlJHScr.js";import{c as j,h as S,a as w}from"./format-DxkEZcwQ.js";import{F as g}from"./ui-Bq3RQsdJ.js";import{S as L}from"./scatter-chart-B78EA7lD.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";m.schema;function b({config:i}){const{stats:r,isLoading:d}=h(),{entries:o,isLoading:f}=p(),l=d||f,s=c.useMemo(()=>{const t=new Map;for(const e of o)t.set(e.symbol,e.openInterestUsd);return t},[o]),a=c.useMemo(()=>Object.entries(r).filter(([,t])=>t.funding!==void 0).map(([t,e])=>({id:t,label:x(t),x:e.changePct,y:e.funding*100,weight:s.get(t)??0,color:j(e.changePct)})).filter(t=>t.weight>0).sort((t,e)=>e.weight-t.weight).slice(0,i.limit),[r,s,i.limit]);return l?n.jsx(g,{loading:!0,children:"loading funding…"}):a.length===0?n.jsx(g,{children:"no funding data yet"}):n.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[n.jsx(L,{data:a,zeroXLine:!0,height:210,formatX:w,formatY:S,maxLabels:10}),n.jsxs("div",{className:"caption text-soft text-center",children:["24h change (x) vs funding rate (y) · bubble = open interest · top"," ",a.length]})]})}const O=u({...m,component:b});export{O as fundingCrowdingScatterFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as o}from"./react-qoZPGuNy.js";import{f as y,Y as h,Z as M,h as j}from"./index-BHlJHScr.js";import{h as w}from"./format-DxkEZcwQ.js";import{F as d}from"./ui-Bq3RQsdJ.js";import{H as F}from"./index-Bw1aFtyx.js";import"./utils-DxneYyA_.js";h.schema;const p=1440*60*1e3,H=10080*60*1e3;function C({data:t,width:a}){return a<44?null:o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx("span",{className:"caption text-normal tabular-nums",children:w(t.rate*100)})})}function L({config:t}){const a=f.useMemo(()=>Date.now()-H,[]),{history:i,isLoading:g}=M(t.symbols,a),u=f.useMemo(()=>{const c=[];for(const r of t.symbols){const b=i[r]??[],m=new Map;for(const n of b){const s=Math.floor(n.time/p)*p,e=m.get(s)??{sum:0,n:0};e.sum+=n.fundingRate,e.n+=1,m.set(s,e)}for(const[n,{sum:s,n:e}]of m){const l=s/e,x=new Date(n).toLocaleDateString("en-US",{month:"numeric",day:"numeric"});c.push({id:`${r}-${n}`,row:j(r),column:x,value:l*1e4,rate:l})}}return c},[i,t.symbols]);return g?o.jsx(d,{loading:!0,children:"loading funding…"}):u.length===0?o.jsx(d,{children:"no funding data"}):o.jsx(F,{data:u,CellComponent:C,gap:3,showLabels:!0,rowLabelWidth:48,columnLabelHeight:20})}const O=y({...h,component:L});export{O as fundingHeatmapFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as e}from"./react-qoZPGuNy.js";import{f,cC as d,aj as n,h as c}from"./index-BHlJHScr.js";import{h as g,D as h,U as p}from"./format-DxkEZcwQ.js";import{F as l}from"./ui-Bq3RQsdJ.js";import{B as x}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";d.schema;const j=["xyz:*"];function v({config:i}){const r=n(void 0,6e4),s=n(j,6e4),m=r.isLoading||s.isLoading,o=u.useMemo(()=>Object.entries({...r.stats,...s.stats}).filter(([,t])=>t.funding!==void 0).map(([t,a])=>({label:c(t),value:a.funding*100})).sort((t,a)=>Math.abs(a.value)-Math.abs(t.value)).slice(0,i.limit).sort((t,a)=>a.value-t.value),[r.stats,s.stats,i.limit]);return m?e.jsx(l,{loading:!0,children:"loading funding…"}):o.length===0?e.jsx(l,{children:"no funding data yet"}):e.jsx("div",{className:"flex h-full flex-col justify-center text-normal",children:e.jsx(x,{data:o,orientation:"horizontal",color:p,negativeColor:h,height:Math.max(o.length*24,96),formatValue:g})})}const B=f({...d,component:v});export{B as fundingLeaderboardBarsFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as a}from"./react-qoZPGuNy.js";import{f as l,
|
|
1
|
+
import{r as o,j as a}from"./react-qoZPGuNy.js";import{f as l,_ as d,Z as C,h as M}from"./index-BHlJHScr.js";import{h as R}from"./format-DxkEZcwQ.js";import{F as f}from"./ui-Bq3RQsdJ.js";import{a as r,C as u}from"./chart-utils-DGogNvJT.js";import{M as S}from"./index-BpPIfN5S.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";const x={"24h":{ms:1440*60*1e3,timeframe:r["24h"]},"7D":{ms:10080*60*1e3,timeframe:r["7D"]},"1M":{ms:720*60*60*1e3,timeframe:r["1M"]}};d.schema;function F({config:e}){const{ms:s,timeframe:h}=x[e.lookback],c=o.useMemo(()=>Date.now()-s,[s]),{history:m,isLoading:p}=C(e.symbols,c),i=o.useMemo(()=>e.symbols.map((t,g)=>({id:t,name:M(t),color:u[g%u.length],data:(m[t]??[]).map(n=>({date:new Date(n.time).toISOString(),value:n.fundingRate*100}))})),[e.symbols,m]);return p?a.jsx(f,{loading:!0,children:"loading funding rates…"}):i.every(t=>t.data.length===0)?a.jsx(f,{children:"no funding data yet"}):a.jsx(S,{series:i,timeframe:h,height:250,formatValue:R})}const k=l({...d,component:F});export{k as fundingRateChartFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as d,j as a}from"./react-qoZPGuNy.js";import{b as l}from"./format-DxkEZcwQ.js";import{f as c,cx as i,bD as p}from"./index-BHlJHScr.js";import{F as s}from"./ui-Bq3RQsdJ.js";import{B as u}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";i.schema;function f({config:e}){const{comparison:n,isLoading:o}=p(),r=d.useMemo(()=>[...n].sort((t,m)=>m.spreadPct-t.spreadPct).slice(0,e.limit).map(t=>({label:t.coin,value:t.spreadPct})),[n,e.limit]);return o?a.jsx(s,{loading:!0,children:"loading funding…"}):r.length===0?a.jsx(s,{children:"no funding data yet"}):a.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[a.jsx(u,{data:r,orientation:"horizontal",height:Math.max(r.length*26,96),formatValue:t=>l(t,1)}),a.jsxs("div",{className:"caption text-soft text-center",children:["cross-venue funding spread, annualized · top ",r.length]})]})}const P=c({...i,component:f});export{P as fundingSpreadBarsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as t}from"./react-qoZPGuNy.js";import{b as d}from"./format-DxkEZcwQ.js";import{f,cy as u,bD as p}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{H as h}from"./index-Bw1aFtyx.js";import"./utils-DxneYyA_.js";u.schema;function g({data:a,width:o}){return o<44?null:t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx("span",{className:"caption text-normal tabular-nums",children:d(a.annualizedPct,1)})})}function x({config:a}){const{comparison:o,isLoading:l}=p(),r=c.useMemo(()=>{const m=[...o].sort((n,e)=>Math.abs(e.spreadPct)-Math.abs(n.spreadPct)).slice(0,a.limit),s=[];for(const n of m)for(const e of n.venues)s.push({id:`${n.coin}-${e.venue}`,row:n.coin,column:e.venue,value:e.annualizedPct,annualizedPct:e.annualizedPct});return s},[o,a.limit]);return l?t.jsx(i,{loading:!0,children:"loading funding…"}):r.length===0?t.jsx(i,{children:"no funding data"}):t.jsx(h,{data:r,CellComponent:g,gap:3,showLabels:!0,rowLabelWidth:48,columnLabelHeight:20})}const C=f({...u,component:x});export{C as fundingVenueHeatmapFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{c as x,i as p,a as f}from"./format-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{c as x,i as p,a as f}from"./format-DxkEZcwQ.js";import{f as b,an as d,ao as j}from"./index-BHlJHScr.js";import{F as c}from"./ui-Bq3RQsdJ.js";import{M as u}from"./mini-line-chart-DyG55cVW.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";d.schema;function g({config:a}){var n,o;const{rates:t,isLoading:h}=j(a.base,a.symbols);if(h)return e.jsx(c,{loading:!0,children:"loading FX rates…"});if(!t.length)return e.jsx(c,{children:"no FX data yet"});const r=(o=(n=t[0])==null?void 0:n.history.at(-1))==null?void 0:o.time;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"FX rates"}),e.jsxs("div",{className:"body-sm text-normal",children:["1 ",a.base.toUpperCase()," buys"]})]}),e.jsx("div",{className:"caption text-soft text-right",children:r?new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric"}):"ECB daily"})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:t.map(s=>{const i=x(s.changePct),l=s.history.map(m=>({date:new Date(m.time).toISOString(),value:m.value}));return e.jsxs("div",{className:"flex items-center gap-3 border-b border-white/[0.06] py-1.5 last:border-b-0",children:[e.jsx("span",{className:"body-sm w-9 font-bold text-strong",children:s.symbol}),e.jsx("div",{className:"flex-1"}),a.showSparkline&&l.length>1&&e.jsx(u,{data:l,width:72,height:20,color:i}),e.jsxs("span",{className:"whitespace-nowrap text-right tabular-nums",children:[e.jsx("span",{className:"body-sm text-strong",children:p(s.rate)}),e.jsx("span",{className:"caption ml-2 font-bold",style:{color:i},children:f(s.changePct)})]})]},s.symbol)})})]})}const B=b({...d,component:g});export{B as fxBoardFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as s}from"./react-qoZPGuNy.js";import{a as f,i as y}from"./format-DxkEZcwQ.js";import{f as d,dp as h,ao as C}from"./index-BHlJHScr.js";import{F as p}from"./ui-Bq3RQsdJ.js";import{H as g}from"./index-Bw1aFtyx.js";import"./utils-DxneYyA_.js";h.schema;function j({data:t,width:a}){return a<40?null:s.jsx("div",{className:"flex h-full w-full items-center justify-center",title:`${t.row} → ${t.column} · ${y(t.rate)} · ${f(t.value)}`,children:s.jsx("span",{className:"caption text-normal tabular-nums",children:f(t.value)})})}function w({config:t}){const a=u.useMemo(()=>t.symbols.filter(o=>o!=="USD"),[t.symbols]),{rates:c,isLoading:x}=C("USD",a),m=u.useMemo(()=>{const o=new Map([["USD",{rate:1,changePct:0}]]);for(const e of c)o.set(e.symbol,e);const i=[];for(const e of t.symbols){const n=o.get(e);if(n)for(const r of t.symbols){if(e===r)continue;const l=o.get(r);if(!l)continue;const b=((1+l.changePct/100)/(1+n.changePct/100)-1)*100;i.push({id:`${e}-${r}`,row:e,column:r,value:b,rate:l.rate/n.rate})}}return i},[c,t.symbols]);return x?s.jsx(p,{loading:!0,children:"loading FX crosses…"}):m.length===0?s.jsx(p,{children:"no FX data yet"}):s.jsx(g,{data:m,CellComponent:j,gap:3,showLabels:!0,rowLabelWidth:40,columnLabelHeight:20})}const S=d({...h,component:w});export{S as fxCrossHeatmapFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as a}from"./react-qoZPGuNy.js";import{a as c,D as h,U as x}from"./format-DxkEZcwQ.js";import{f,dv as n,ao as p}from"./index-BHlJHScr.js";import{F as o}from"./ui-Bq3RQsdJ.js";import{B as d}from"./bar-chart-DCMbxUJx.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";n.schema;function u({config:t}){const{rates:s,isLoading:m}=p(t.base,t.symbols),r=l.useMemo(()=>[...s].sort((e,i)=>i.changePct-e.changePct).map(e=>({label:e.symbol,value:e.changePct})),[s]);return m?a.jsx(o,{loading:!0,children:"loading FX rates…"}):r.length===0?a.jsx(o,{children:"no FX data yet"}):a.jsxs("div",{className:"flex h-full flex-col justify-center gap-1 text-normal",children:[a.jsx(d,{data:r,orientation:"horizontal",color:x,negativeColor:h,height:Math.max(r.length*24,96),formatValue:c}),a.jsxs("div",{className:"caption text-soft text-center",children:[t.base.toUpperCase()," FX movers · day change"]})]})}const y=f({...n,component:u});export{y as fxMoversBarsFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as e}from"./react-qoZPGuNy.js";import{a as f}from"./format-DxkEZcwQ.js";import{f as p,dr as h,ao as c}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{C as n,a as C}from"./chart-utils-DGogNvJT.js";import{M as g}from"./index-BpPIfN5S.js";import"./d3-ibrLIlQc.js";import"./utils-DxneYyA_.js";h.schema;function x({config:a}){const{rates:o,isLoading:l}=c(a.base,a.symbols),s=u.useMemo(()=>o.filter(t=>t.history.length>0).map((t,d)=>{const r=t.history[0].value;return{id:t.symbol,name:t.symbol,color:n[d%n.length],data:t.history.map(m=>({date:new Date(m.time).toISOString(),value:r>0?(m.value-r)/r*100:0}))}}),[o]);return l?e.jsx(i,{loading:!0,children:"loading FX trends…"}):s.length===0?e.jsx(i,{children:"no FX data yet"}):e.jsx(g,{series:s,timeframe:C["1M"],height:220,formatValue:f})}const E=p({...h,component:x});export{E as fxTrendChartFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as n}from"./format-
|
|
1
|
+
import{g as n}from"./format-DxkEZcwQ.js";function g(e,t=70,r=1){let l="242",a="90%";if(e){const o=getComputedStyle(e);l=o.getPropertyValue("--zf-accent-hue").trim()||"242",a=o.getPropertyValue("--zf-accent-sat").trim()||"90%"}return`hsla(${l}, ${a}, ${t}%, ${r})`}const i={text:"rgba(255, 255, 255, 0.85)",textSoft:"rgba(255, 255, 255, 0.6)",gameOver:n};function s(e,t,r,l,a){t.font='bold 12px "DM Sans", monospace',t.textAlign="left",t.fillStyle=i.textSoft,t.fillText("HI",10,22),t.fillStyle=a,t.fillText(String(l).padStart(4,"0"),30,22),t.textAlign="right",t.fillStyle=i.text,t.fillText(String(r).padStart(4,"0"),e.width-10,22)}export{i as G,g as a,s as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{f as m,$ as c}from"./index-BHlJHScr.js";c.schema;function p({config:t}){const n=t.accent!==void 0,s=t.align==="center",i=n?{"--zf-accent-hue":String(t.accent)}:void 0,a=n?"hsl(var(--zf-accent-hue) 80% 70% / 0.5)":"hsl(0 0% var(--zf-ink-l, 100%) / 0.16)",l=n?"hsl(var(--zf-accent-hue) 80% 70% / 0.06)":"hsl(0 0% var(--zf-ink-l, 100%) / 0.02)",o=`linear-gradient(90deg, ${a}, ${l} 65%, transparent)`,d=`linear-gradient(90deg, transparent, ${l} 35%, ${a})`,r=x=>e.jsx("span",{className:"mb-[5px] h-px flex-1",style:{background:x}}),h=e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 ${s?"items-center":""}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-[5px] w-[5px] shrink-0 rounded-full",style:{background:"var(--color-highlight)",boxShadow:"0 0 8px var(--color-highlight)"}}),e.jsx("h2",{className:`body-md font-extrabold uppercase leading-none tracking-[0.14em] ${n?"text-highlight":"text-strong"}`,children:t.title})]}),t.subtitle&&e.jsx("p",{className:`caption text-soft leading-none ${s?"":"pl-[13px]"}`,children:t.subtitle})]});return e.jsxs("div",{className:"flex h-full w-full items-end gap-3 pb-2",style:i,children:[s&&r(d),h,r(o)]})}const f=m({...c,component:p});export{f as headingFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./react-qoZPGuNy.js";import{U as t,D as r}from"./format-DxkEZcwQ.js";import{f as o,a0 as l}from"./index-BHlJHScr.js";l.schema;function m({config:e}){const s=e.deltaDir==="up"?t:e.deltaDir==="down"?r:"var(--color-soft)";return a.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-center",children:[e.label&&a.jsx("div",{className:"caption text-soft uppercase tracking-[0.12em]",children:e.label}),a.jsx("div",{className:"metric-lg text-strong break-words leading-none",children:e.value}),e.delta&&a.jsx("div",{className:"body-sm font-semibold tabular-nums",style:{color:s},children:e.delta}),e.sublabel&&a.jsx("div",{className:"caption text-disabled",children:e.sublabel})]})}const c=o({...l,component:m});export{c as heroNumberFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./react-qoZPGuNy.js";import{E as d,a as u,n as h}from"./market-data-CvmpLFSo.js";import{M as f}from"./metric-row-BVVhjsjK.js";import{f as x,
|
|
1
|
+
import{j as n}from"./react-qoZPGuNy.js";import{E as d,a as u,n as h}from"./market-data-CvmpLFSo.js";import{M as f}from"./metric-row-BVVhjsjK.js";import{f as x,bV as m}from"./index-BHlJHScr.js";import{F as i,s as p}from"./ui-Bq3RQsdJ.js";m.schema;function y(e,o){const[t,a,s]=e.split("-").map(Number),[l,r,c]=o.split("-").map(Number);return Math.round((Date.UTC(l,r-1,c)-Date.UTC(t,a-1,s))/864e5)}function b(e){const[o,t,a]=e.split("-").map(Number);return new Date(Date.UTC(o,t-1,a)).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"})}function C(e){return e<=0?"today":e===1?"tomorrow":`in ${e}d`}function j({config:e}){var l;if(!d[e.exchange])return n.jsx(i,{children:"unknown exchange"});const t=(l=u(e.exchange))==null?void 0:l.ymd,a=h(e.exchange,e.count),s=e.label.trim();return!t||a.length===0?n.jsx(i,{children:"no upcoming holidays on file"}):n.jsxs("div",{className:"flex h-full w-full flex-col",children:[s&&n.jsx("div",{className:"caption text-soft mb-1 shrink-0 uppercase tracking-[0.12em]",children:s}),n.jsx("div",{className:`min-h-0 flex-1 ${p}`,children:a.map(r=>n.jsx(f,{label:b(r),value:C(y(t,r))},r))})]})}const k=x({...m,component:j});export{k as holidayCalendarFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as e}from"./react-qoZPGuNy.js";import{f as d,a1 as n}from"./index-BHlJHScr.js";import{F as i}from"./ui-Bq3RQsdJ.js";n.schema;function m({config:a}){const[o,t]=l.useState("loading"),s=l.useRef(null);return l.useEffect(()=>{t("loading");const r=s.current;r!=null&&r.complete&&t(r.naturalWidth>0?"loaded":"error")},[a.url]),o==="error"?e.jsx(i,{children:"image unavailable"}):e.jsxs("div",{className:"relative flex h-full w-full items-center justify-center overflow-hidden rounded-md",children:[o==="loading"&&e.jsx("div",{className:"absolute inset-0 z-10",children:e.jsx(i,{loading:!0,children:"loading image…"})}),e.jsx("img",{ref:s,src:a.url,alt:a.alt,className:`h-full w-full transition-opacity duration-300 ${o==="loaded"?"opacity-100":"opacity-0"}`,style:{objectFit:a.fit},onLoad:()=>t("loaded"),onError:()=>t("error")})]})}const p=d({...n,component:m});export{p as imageFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as s}from"./react-qoZPGuNy.js";import{f as y,a2 as h}from"./index-BHlJHScr.js";import{F as f}from"./ui-Bq3RQsdJ.js";h.schema;function S({config:p}){const{images:a,intervalSec:l,fit:g}=p,[x,c]=n.useState(0),[o,d]=n.useState(()=>a.map(()=>"loading")),u=n.useRef([]),j=a.map(t=>t.url).join("|");n.useEffect(()=>{c(0),d(a.map((t,e)=>{const r=u.current[e];return r!=null&&r.complete?r.naturalWidth>0?"loaded":"error":"loading"}))},[j]),n.useEffect(()=>{if(l<=0||a.length<=1)return;const t=window.setInterval(()=>c(e=>(e+1)%a.length),l*1e3);return()=>window.clearInterval(t)},[l,a.length]);const i=Math.min(x,a.length-1),m=(t,e)=>d(r=>r.map((v,w)=>w===t?e:v));return s.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-md",children:[o[i]==="loading"&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(f,{loading:!0,children:"loading image…"})}),o[i]==="error"&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(f,{children:"image unavailable"})}),a.map((t,e)=>s.jsx("img",{ref:r=>{u.current[e]=r},src:t.url,alt:t.alt,className:"absolute inset-0 h-full w-full transition-opacity duration-700",style:{objectFit:g,opacity:e===i&&o[e]==="loaded"?1:0},onLoad:()=>m(e,"loaded"),onError:()=>m(e,"error")},`${e}:${t.url}`))]})}const I=y({...h,component:S});export{I as imageGalleryFrame};
|