mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 10:16:15 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad7679b7fd | |||
| 0215b2787e | |||
| 75dfeced01 |
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
dist/
|
dist/
|
||||||
*.log
|
*.log
|
||||||
|
bin/
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
APP := epusdt
|
||||||
|
TARGET_DIR := bin
|
||||||
|
BUILD_TAG ?= 0.0.0-dev
|
||||||
|
VERSION_PKG := github.com/GMWalletApp/epusdt/config
|
||||||
|
LDFLAGS := -s -w -X $(VERSION_PKG).BuildVersion=$(BUILD_TAG)
|
||||||
|
|
||||||
|
.PHONY: build release build-all swagger \
|
||||||
|
linux-amd64 linux-arm64 linux-armv7 \
|
||||||
|
darwin-amd64 darwin-arm64 \
|
||||||
|
windows-amd64 windows-arm64
|
||||||
|
|
||||||
|
build:
|
||||||
|
go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP) .
|
||||||
|
|
||||||
|
release: build
|
||||||
|
|
||||||
|
linux-amd64:
|
||||||
|
GOOS=linux GOARCH=amd64 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-linux-amd64 .
|
||||||
|
|
||||||
|
linux-arm64:
|
||||||
|
GOOS=linux GOARCH=arm64 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-linux-arm64 .
|
||||||
|
|
||||||
|
linux-armv7:
|
||||||
|
GOOS=linux GOARCH=arm GOARM=7 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-linux-armv7 .
|
||||||
|
|
||||||
|
darwin-amd64:
|
||||||
|
GOOS=darwin GOARCH=amd64 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-darwin-amd64 .
|
||||||
|
|
||||||
|
darwin-arm64:
|
||||||
|
GOOS=darwin GOARCH=arm64 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-darwin-arm64 .
|
||||||
|
|
||||||
|
windows-amd64:
|
||||||
|
GOOS=windows GOARCH=amd64 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-windows-amd64.exe .
|
||||||
|
|
||||||
|
windows-arm64:
|
||||||
|
GOOS=windows GOARCH=arm64 go build --trimpath -ldflags="$(LDFLAGS)" -o $(TARGET_DIR)/$(APP)-windows-arm64.exe .
|
||||||
|
|
||||||
|
build-all: linux-amd64 linux-arm64 linux-armv7 darwin-amd64 darwin-arm64 windows-amd64 windows-arm64
|
||||||
|
|
||||||
|
swagger:
|
||||||
|
swag init --outputTypes json,yaml --parseInternal --parseDependency -o docs
|
||||||
@@ -65,6 +65,7 @@ func (c *BaseCommController) CreateTransaction(ctx echo.Context) (err error) {
|
|||||||
// @Description Switch to a different payment target. A status=4 placeholder is completed in place and returns the same parent trade_id with is_selected=false; an already concrete status=1 parent creates or returns the only sub-order when switching to a different target.
|
// @Description Switch to a different payment target. A status=4 placeholder is completed in place and returns the same parent trade_id with is_selected=false; an already concrete status=1 parent creates or returns the only sub-order when switching to a different target.
|
||||||
// @Description Normal values such as ton/tron/solana/ethereum select on-chain payment; the special value okpay selects OkPay hosted payment.
|
// @Description Normal values such as ton/tron/solana/ethereum select on-chain payment; the special value okpay selects OkPay hosted payment.
|
||||||
// @Description For status=4 placeholders from GMPay or EPay submit.php, both on-chain targets and okpay complete the parent in place without creating a child order. Sub-orders cannot be switched again.
|
// @Description For status=4 placeholders from GMPay or EPay submit.php, both on-chain targets and okpay complete the parent in place without creating a child order. Sub-orders cannot be switched again.
|
||||||
|
// @Description For EPay orders with a merchant return_url, the returned redirect_url is the internal /pay/return/{trade_id} hop rather than the raw merchant return_url.
|
||||||
// @Tags Payment
|
// @Tags Payment
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package comm
|
package comm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/GMWalletApp/epusdt/model/request"
|
"github.com/GMWalletApp/epusdt/model/request"
|
||||||
@@ -14,6 +15,7 @@ import (
|
|||||||
// @Summary Checkout counter page
|
// @Summary Checkout counter page
|
||||||
// @Description Return checkout initialization data when the order exists. This endpoint only confirms order existence and returns base order data; call /pay/check-status/{trade_id} for the current order status (1=waiting payment, 2=paid, 3=expired, 4=waiting token/network selection).
|
// @Description Return checkout initialization data when the order exists. This endpoint only confirms order existence and returns base order data; call /pay/check-status/{trade_id} for the current order status (1=waiting payment, 2=paid, 3=expired, 4=waiting token/network selection).
|
||||||
// @Description When status=4, actual_amount is 0 and token/network/receive_address are empty; this state is produced by GMPay placeholders or EPay submit.php when no token/network request values or database defaults exist. The cashier should guide the payer to choose an on-chain token/network or OkPay and then call /pay/switch-network.
|
// @Description When status=4, actual_amount is 0 and token/network/receive_address are empty; this state is produced by GMPay placeholders or EPay submit.php when no token/network request values or database defaults exist. The cashier should guide the payer to choose an on-chain token/network or OkPay and then call /pay/switch-network.
|
||||||
|
// @Description For EPay orders with a merchant return_url, the response redirect_url is rewritten to the internal /pay/return/{trade_id} hop; the database still stores the merchant's raw return_url.
|
||||||
// @Tags Payment
|
// @Tags Payment
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param trade_id path string true "Trade ID"
|
// @Param trade_id path string true "Trade ID"
|
||||||
@@ -30,6 +32,29 @@ func (c *BaseCommController) CheckoutCounter(ctx echo.Context) (err error) {
|
|||||||
return c.SucJson(ctx, resp)
|
return c.SucJson(ctx, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReturnToMerchant performs the browser-facing EPay success return hop.
|
||||||
|
// Non-EPay or not-yet-paid orders are sent back to the checkout counter.
|
||||||
|
// @Summary Return to merchant (EPAY compat)
|
||||||
|
// @Description Browser-facing success return hop for EPay orders. Paid EPay orders are redirected to the merchant return_url with signed legacy EPay query params. Orders that are not EPay or not yet paid are redirected back to the checkout counter.
|
||||||
|
// @Description This route also returns explicit business errors when the merchant return_url is missing, the order API key is unavailable, or EPay signature construction fails.
|
||||||
|
// @Tags Payment
|
||||||
|
// @Produce html
|
||||||
|
// @Param trade_id path string true "Trade ID"
|
||||||
|
// @Success 302 "Redirect to merchant return_url or checkout counter"
|
||||||
|
// @Failure 400 {object} response.ApiResponse "Stable errno in status_code: 10008 order not found, 10044 invalid order redirect url, 10045 order api key unavailable, 10046 failed to build epay return signature"
|
||||||
|
// @Router /pay/return/{trade_id} [get]
|
||||||
|
func (c *BaseCommController) ReturnToMerchant(ctx echo.Context) error {
|
||||||
|
tradeID := ctx.Param("trade_id")
|
||||||
|
redirect, err := service.ResolveEPayReturnRedirect(tradeID)
|
||||||
|
if err != nil {
|
||||||
|
return c.FailJson(ctx, err)
|
||||||
|
}
|
||||||
|
if redirect.IsMerchantRedirect {
|
||||||
|
ctx.Response().Header().Set("Cache-Control", "no-store")
|
||||||
|
}
|
||||||
|
return ctx.Redirect(http.StatusFound, redirect.TargetURL)
|
||||||
|
}
|
||||||
|
|
||||||
// CheckStatus 支付状态检测
|
// CheckStatus 支付状态检测
|
||||||
// @Summary Check payment status
|
// @Summary Check payment status
|
||||||
// @Description Return the current order status by trade ID. Status: 1=waiting payment, 2=paid, 3=expired, 4=waiting token/network selection.
|
// @Description Return the current order status by trade ID. Status: 1=waiting payment, 2=paid, 3=expired, 4=waiting token/network selection.
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
type CheckoutCounterResponse struct {
|
type CheckoutCounterResponse struct {
|
||||||
TradeId string `json:"trade_id" example:"3nQ9pL2xV7sK1mR8cT4yB_aZ"` // epusdt订单号
|
TradeId string `json:"trade_id" example:"3nQ9pL2xV7sK1mR8cT4yB_aZ"` // epusdt订单号
|
||||||
Amount float64 `json:"amount" example:"100.0000"` // 订单金额,按 system.amount_precision 保留小数 法币金额
|
Amount float64 `json:"amount" example:"100.0000"` // 订单金额,按 system.amount_precision 保留小数 法币金额
|
||||||
ActualAmount float64 `json:"actual_amount" example:"14.2857"` // 订单实际需要支付的金额;status=4 占位订单返回 0
|
ActualAmount float64 `json:"actual_amount" example:"14.2857"` // 订单实际需要支付的金额;status=4 占位订单返回 0
|
||||||
Token string `json:"token" example:"USDT"` // 所属币种;status=4 占位订单为空
|
Token string `json:"token" example:"USDT"` // 所属币种;status=4 占位订单为空
|
||||||
Currency string `json:"currency" example:"CNY"` // 法币币种 CNY USD ...
|
Currency string `json:"currency" example:"CNY"` // 法币币种 CNY USD ...
|
||||||
ReceiveAddress string `json:"receive_address" example:"TTestTronAddress001"` // 收款钱包地址;status=4 占位订单为空
|
ReceiveAddress string `json:"receive_address" example:"TTestTronAddress001"` // 收款钱包地址;status=4 占位订单为空
|
||||||
Network string `json:"network" example:"tron"` // 网络 TRON ETH;status=4 占位订单为空
|
Network string `json:"network" example:"tron"` // 网络 TRON ETH;status=4 占位订单为空
|
||||||
Status int `json:"status" enums:"1,2,3,4" example:"1"` // 订单状态 1=等待支付 2=支付成功 3=已过期 4=等待选择支付网络/币种;status=4 时前端应引导选择链上 token/network 或 OkPay
|
Status int `json:"status" enums:"1,2,3,4" example:"1"` // 订单状态 1=等待支付 2=支付成功 3=已过期 4=等待选择支付网络/币种;status=4 时前端应引导选择链上 token/network 或 OkPay
|
||||||
PaymentType string `json:"payment_type" enums:"gmpay,epay" example:"gmpay"` // 支付接入类型;底层 Epay/Gmpay 转为小写 epay/gmpay 返回
|
PaymentType string `json:"payment_type" enums:"gmpay,epay" example:"gmpay"` // 支付接入类型;底层 Epay/Gmpay 转为小写 epay/gmpay 返回
|
||||||
ExpirationTime int64 `json:"expiration_time" example:"1713264600"` // 过期时间 时间戳
|
ExpirationTime int64 `json:"expiration_time" example:"1713264600"` // 过期时间 时间戳
|
||||||
RedirectUrl string `json:"redirect_url" example:"https://example.com/success"`
|
RedirectUrl string `json:"redirect_url" example:"https://example.com/success"` // 非 EPay 时为商户原始回跳地址;EPay 时为内部中转地址 /pay/return/{trade_id}
|
||||||
PaymentUrl string `json:"payment_url" example:"https://pay.example.com/checkout/3nQ9pL2xV7sK1mR8cT4yB_aZ"` // 支付链接;链上订单为空,OkPay 订单为第三方 payLink
|
PaymentUrl string `json:"payment_url" example:"https://pay.example.com/checkout/3nQ9pL2xV7sK1mR8cT4yB_aZ"` // 支付链接;链上订单为空,OkPay 订单为第三方 payLink
|
||||||
CreatedAt int64 `json:"created_at" example:"1713264000"` // 订单创建时间 时间戳
|
CreatedAt int64 `json:"created_at" example:"1713264000"` // 订单创建时间 时间戳
|
||||||
IsSelected bool `json:"is_selected" example:"false"` // 是否已选择当前支付方式;status=4 占位订单和刚补全的占位父单为 false
|
IsSelected bool `json:"is_selected" example:"false"` // 是否已选择当前支付方式;status=4 占位订单和刚补全的占位父单为 false
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/url"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/GMWalletApp/epusdt/config"
|
||||||
|
"github.com/GMWalletApp/epusdt/model/data"
|
||||||
|
"github.com/GMWalletApp/epusdt/model/mdb"
|
||||||
|
"github.com/GMWalletApp/epusdt/model/response"
|
||||||
|
"github.com/GMWalletApp/epusdt/util/constant"
|
||||||
|
"github.com/GMWalletApp/epusdt/util/sign"
|
||||||
|
)
|
||||||
|
|
||||||
|
type EPayReturnRedirect struct {
|
||||||
|
TargetURL string
|
||||||
|
IsMerchantRedirect bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func isEPayOrder(order *mdb.Orders) bool {
|
||||||
|
return order != nil && strings.EqualFold(order.PaymentType, mdb.PaymentTypeEpay)
|
||||||
|
}
|
||||||
|
|
||||||
|
func buildCheckoutCounterPath(tradeID string) string {
|
||||||
|
return "/pay/checkout-counter/" + tradeID
|
||||||
|
}
|
||||||
|
|
||||||
|
func buildAbsoluteAppURL(path string) string {
|
||||||
|
path = strings.TrimSpace(path)
|
||||||
|
if path == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if !strings.HasPrefix(path, "/") {
|
||||||
|
path = "/" + path
|
||||||
|
}
|
||||||
|
base := strings.TrimRight(strings.TrimSpace(config.GetAppUri()), "/")
|
||||||
|
if base == "" {
|
||||||
|
return path
|
||||||
|
}
|
||||||
|
return base + path
|
||||||
|
}
|
||||||
|
|
||||||
|
func buildEPayReturnPath(tradeID string) string {
|
||||||
|
return "/pay/return/" + tradeID
|
||||||
|
}
|
||||||
|
|
||||||
|
func buildPublicRedirectURL(order *mdb.Orders) string {
|
||||||
|
if order == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
raw := strings.TrimSpace(order.RedirectUrl)
|
||||||
|
if raw == "" || !isEPayOrder(order) {
|
||||||
|
return raw
|
||||||
|
}
|
||||||
|
return buildAbsoluteAppURL(buildEPayReturnPath(order.TradeId))
|
||||||
|
}
|
||||||
|
|
||||||
|
func ResolveOrderApiKey(order *mdb.Orders) (*mdb.ApiKey, error) {
|
||||||
|
if order == nil || order.ApiKeyID == 0 {
|
||||||
|
return nil, constant.OrderApiKeyUnavailableErr
|
||||||
|
}
|
||||||
|
row, err := data.GetApiKeyByID(order.ApiKeyID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if row == nil || row.ID == 0 || row.Status != mdb.ApiKeyStatusEnable {
|
||||||
|
return nil, constant.OrderApiKeyUnavailableErr
|
||||||
|
}
|
||||||
|
return row, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func BuildEPayResultParams(order *mdb.Orders, apiKeyRow *mdb.ApiKey) (map[string]string, error) {
|
||||||
|
if order == nil || apiKeyRow == nil {
|
||||||
|
return nil, constant.EPayReturnSignatureErr
|
||||||
|
}
|
||||||
|
|
||||||
|
pidInt, err := strconv.Atoi(strings.TrimSpace(apiKeyRow.Pid))
|
||||||
|
if err != nil {
|
||||||
|
return nil, constant.EPayReturnSignatureErr
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyData := response.OrderNotifyResponseEpay{
|
||||||
|
PID: pidInt,
|
||||||
|
TradeNo: order.TradeId,
|
||||||
|
OutTradeNo: order.OrderId,
|
||||||
|
Type: "alipay",
|
||||||
|
Name: order.Name,
|
||||||
|
Money: fmt.Sprintf("%.4f", order.Amount),
|
||||||
|
TradeStatus: "TRADE_SUCCESS",
|
||||||
|
}
|
||||||
|
|
||||||
|
signstr, err := sign.Get(notifyData, apiKeyRow.SecretKey)
|
||||||
|
if err != nil {
|
||||||
|
return nil, constant.EPayReturnSignatureErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return map[string]string{
|
||||||
|
"pid": strconv.Itoa(pidInt),
|
||||||
|
"trade_no": notifyData.TradeNo,
|
||||||
|
"out_trade_no": notifyData.OutTradeNo,
|
||||||
|
"type": notifyData.Type,
|
||||||
|
"name": notifyData.Name,
|
||||||
|
"money": notifyData.Money,
|
||||||
|
"trade_status": notifyData.TradeStatus,
|
||||||
|
"sign": signstr,
|
||||||
|
"sign_type": "MD5",
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func appendQueryParams(rawURL string, params map[string]string) (string, error) {
|
||||||
|
rawURL = strings.TrimSpace(rawURL)
|
||||||
|
if rawURL == "" {
|
||||||
|
return "", constant.OrderRedirectURLErr
|
||||||
|
}
|
||||||
|
|
||||||
|
targetURL, err := url.Parse(rawURL)
|
||||||
|
if err != nil {
|
||||||
|
return "", constant.OrderRedirectURLErr
|
||||||
|
}
|
||||||
|
|
||||||
|
query := targetURL.Query()
|
||||||
|
for key, value := range params {
|
||||||
|
query.Set(key, value)
|
||||||
|
}
|
||||||
|
targetURL.RawQuery = query.Encode()
|
||||||
|
return targetURL.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func ResolveEPayReturnRedirect(tradeID string) (*EPayReturnRedirect, error) {
|
||||||
|
order, err := GetOrderInfoByTradeId(tradeID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !isEPayOrder(order) || order.Status != mdb.StatusPaySuccess {
|
||||||
|
return &EPayReturnRedirect{
|
||||||
|
TargetURL: buildCheckoutCounterPath(order.TradeId),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
rawMerchantURL := strings.TrimSpace(order.RedirectUrl)
|
||||||
|
if rawMerchantURL == "" {
|
||||||
|
return nil, constant.OrderRedirectURLErr
|
||||||
|
}
|
||||||
|
|
||||||
|
apiKeyRow, err := ResolveOrderApiKey(order)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
params, err := BuildEPayResultParams(order, apiKeyRow)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
targetURL, err := appendQueryParams(rawMerchantURL, params)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &EPayReturnRedirect{
|
||||||
|
TargetURL: targetURL,
|
||||||
|
IsMerchantRedirect: true,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/url"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/GMWalletApp/epusdt/config"
|
||||||
|
"github.com/GMWalletApp/epusdt/internal/testutil"
|
||||||
|
"github.com/GMWalletApp/epusdt/model/dao"
|
||||||
|
"github.com/GMWalletApp/epusdt/model/mdb"
|
||||||
|
"github.com/GMWalletApp/epusdt/util/constant"
|
||||||
|
"github.com/GMWalletApp/epusdt/util/sign"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestBuildPublicRedirectURLRewritesOnlyEpayOrders(t *testing.T) {
|
||||||
|
cleanup := testutil.SetupTestDatabases(t)
|
||||||
|
defer cleanup()
|
||||||
|
|
||||||
|
epayOrder := &mdb.Orders{
|
||||||
|
TradeId: "trade_epay_redirect",
|
||||||
|
PaymentType: mdb.PaymentTypeEpay,
|
||||||
|
RedirectUrl: "https://merchant.example/return",
|
||||||
|
}
|
||||||
|
wantRedirect := config.GetAppUri() + "/pay/return/trade_epay_redirect"
|
||||||
|
if got := buildPublicRedirectURL(epayOrder); got != wantRedirect {
|
||||||
|
t.Fatalf("epay redirect_url = %q, want internal return route", got)
|
||||||
|
}
|
||||||
|
|
||||||
|
gmpayOrder := &mdb.Orders{
|
||||||
|
TradeId: "trade_gmpay_redirect",
|
||||||
|
PaymentType: mdb.PaymentTypeGmpay,
|
||||||
|
RedirectUrl: "https://merchant.example/return",
|
||||||
|
}
|
||||||
|
if got := buildPublicRedirectURL(gmpayOrder); got != "https://merchant.example/return" {
|
||||||
|
t.Fatalf("gmpay redirect_url = %q, want merchant raw redirect_url", got)
|
||||||
|
}
|
||||||
|
|
||||||
|
if got := buildPublicRedirectURL(&mdb.Orders{TradeId: "trade_empty", PaymentType: mdb.PaymentTypeEpay}); got != "" {
|
||||||
|
t.Fatalf("empty redirect_url = %q, want empty", got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBuildEPayResultParamsMatchesLegacyFields(t *testing.T) {
|
||||||
|
params, err := BuildEPayResultParams(&mdb.Orders{
|
||||||
|
TradeId: "trade_epay_params",
|
||||||
|
OrderId: "order_epay_params",
|
||||||
|
Name: "VIP",
|
||||||
|
Amount: 1,
|
||||||
|
}, &mdb.ApiKey{
|
||||||
|
Pid: "1001",
|
||||||
|
SecretKey: "epay-secret",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("BuildEPayResultParams(): %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
expected := map[string]string{
|
||||||
|
"pid": "1001",
|
||||||
|
"trade_no": "trade_epay_params",
|
||||||
|
"out_trade_no": "order_epay_params",
|
||||||
|
"type": "alipay",
|
||||||
|
"name": "VIP",
|
||||||
|
"money": "1.0000",
|
||||||
|
"trade_status": "TRADE_SUCCESS",
|
||||||
|
"sign_type": "MD5",
|
||||||
|
}
|
||||||
|
for key, want := range expected {
|
||||||
|
if got := params[key]; got != want {
|
||||||
|
t.Fatalf("%s = %q, want %q", key, got, want)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
signParams := map[string]interface{}{
|
||||||
|
"pid": params["pid"],
|
||||||
|
"trade_no": params["trade_no"],
|
||||||
|
"out_trade_no": params["out_trade_no"],
|
||||||
|
"type": params["type"],
|
||||||
|
"name": params["name"],
|
||||||
|
"money": params["money"],
|
||||||
|
"trade_status": params["trade_status"],
|
||||||
|
}
|
||||||
|
wantSign, err := sign.Get(signParams, "epay-secret")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("sign.Get(): %v", err)
|
||||||
|
}
|
||||||
|
if got := params["sign"]; got != wantSign {
|
||||||
|
t.Fatalf("sign = %q, want %q", got, wantSign)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBuildEPayResultParamsRejectsNonNumericPid(t *testing.T) {
|
||||||
|
_, err := BuildEPayResultParams(&mdb.Orders{
|
||||||
|
TradeId: "trade_bad_pid",
|
||||||
|
OrderId: "order_bad_pid",
|
||||||
|
Name: "VIP",
|
||||||
|
Amount: 1,
|
||||||
|
}, &mdb.ApiKey{
|
||||||
|
Pid: "not-a-number",
|
||||||
|
SecretKey: "epay-secret",
|
||||||
|
})
|
||||||
|
if err != constant.EPayReturnSignatureErr {
|
||||||
|
t.Fatalf("error = %v, want %v", err, constant.EPayReturnSignatureErr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestResolveOrderApiKeyRejectsUnavailableRows(t *testing.T) {
|
||||||
|
cleanup := testutil.SetupTestDatabases(t)
|
||||||
|
defer cleanup()
|
||||||
|
|
||||||
|
if _, err := ResolveOrderApiKey(&mdb.Orders{TradeId: "missing_api_key_id"}); err != constant.OrderApiKeyUnavailableErr {
|
||||||
|
t.Fatalf("missing api_key_id error = %v, want %v", err, constant.OrderApiKeyUnavailableErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
row := &mdb.ApiKey{
|
||||||
|
Name: "disabled",
|
||||||
|
Pid: "1201",
|
||||||
|
SecretKey: "disabled-secret",
|
||||||
|
Status: mdb.ApiKeyStatusDisable,
|
||||||
|
}
|
||||||
|
if err := dao.Mdb.Create(row).Error; err != nil {
|
||||||
|
t.Fatalf("create disabled api key: %v", err)
|
||||||
|
}
|
||||||
|
if _, err := ResolveOrderApiKey(&mdb.Orders{TradeId: "disabled_api_key", ApiKeyID: row.ID}); err != constant.OrderApiKeyUnavailableErr {
|
||||||
|
t.Fatalf("disabled api key error = %v, want %v", err, constant.OrderApiKeyUnavailableErr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppendQueryParamsPreservesMerchantQuery(t *testing.T) {
|
||||||
|
target, err := appendQueryParams("https://merchant.example/return?from=merchant", map[string]string{
|
||||||
|
"pid": "1001",
|
||||||
|
"trade_no": "trade_epay_redirect",
|
||||||
|
"trade_status": "TRADE_SUCCESS",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("appendQueryParams(): %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
parsed, err := url.Parse(target)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("url.Parse(): %v", err)
|
||||||
|
}
|
||||||
|
query := parsed.Query()
|
||||||
|
if got := query.Get("from"); got != "merchant" {
|
||||||
|
t.Fatalf("from = %q, want merchant", got)
|
||||||
|
}
|
||||||
|
if got := query.Get("pid"); got != "1001" {
|
||||||
|
t.Fatalf("pid = %q, want 1001", got)
|
||||||
|
}
|
||||||
|
if got := query.Get("trade_no"); got != "trade_epay_redirect" {
|
||||||
|
t.Fatalf("trade_no = %q, want trade_epay_redirect", got)
|
||||||
|
}
|
||||||
|
if got := query.Get("trade_status"); got != "TRADE_SUCCESS" {
|
||||||
|
t.Fatalf("trade_status = %q, want TRADE_SUCCESS", got)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -706,7 +706,7 @@ func completeWaitSelectOrder(parent *mdb.Orders, token string, network string) (
|
|||||||
|
|
||||||
func buildCheckoutResponse(order *mdb.Orders) *response.CheckoutCounterResponse {
|
func buildCheckoutResponse(order *mdb.Orders) *response.CheckoutCounterResponse {
|
||||||
paymentType := mdb.PaymentTypeGmpay
|
paymentType := mdb.PaymentTypeGmpay
|
||||||
if strings.EqualFold(order.PaymentType, mdb.PaymentTypeEpay) {
|
if isEPayOrder(order) {
|
||||||
paymentType = mdb.PaymentTypeEpay
|
paymentType = mdb.PaymentTypeEpay
|
||||||
}
|
}
|
||||||
return &response.CheckoutCounterResponse{
|
return &response.CheckoutCounterResponse{
|
||||||
@@ -720,7 +720,7 @@ func buildCheckoutResponse(order *mdb.Orders) *response.CheckoutCounterResponse
|
|||||||
Status: order.Status,
|
Status: order.Status,
|
||||||
PaymentType: strings.ToLower(paymentType),
|
PaymentType: strings.ToLower(paymentType),
|
||||||
ExpirationTime: order.CreatedAt.AddMinutes(config.GetOrderExpirationTime()).TimestampMilli(),
|
ExpirationTime: order.CreatedAt.AddMinutes(config.GetOrderExpirationTime()).TimestampMilli(),
|
||||||
RedirectUrl: order.RedirectUrl,
|
RedirectUrl: buildPublicRedirectURL(order),
|
||||||
CreatedAt: order.CreatedAt.TimestampMilli(),
|
CreatedAt: order.CreatedAt.TimestampMilli(),
|
||||||
IsSelected: order.IsSelected,
|
IsSelected: order.IsSelected,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/GMWalletApp/epusdt/config"
|
|
||||||
"github.com/GMWalletApp/epusdt/model/data"
|
"github.com/GMWalletApp/epusdt/model/data"
|
||||||
"github.com/GMWalletApp/epusdt/model/mdb"
|
"github.com/GMWalletApp/epusdt/model/mdb"
|
||||||
"github.com/GMWalletApp/epusdt/model/response"
|
"github.com/GMWalletApp/epusdt/model/response"
|
||||||
@@ -23,26 +20,7 @@ func GetCheckoutCounterByTradeId(tradeId string) (*response.CheckoutCounterRespo
|
|||||||
if orderInfo.ID <= 0 {
|
if orderInfo.ID <= 0 {
|
||||||
return nil, ErrOrder
|
return nil, ErrOrder
|
||||||
}
|
}
|
||||||
paymentType := mdb.PaymentTypeGmpay
|
resp := buildCheckoutResponse(orderInfo)
|
||||||
if strings.EqualFold(orderInfo.PaymentType, mdb.PaymentTypeEpay) {
|
|
||||||
paymentType = mdb.PaymentTypeEpay
|
|
||||||
}
|
|
||||||
|
|
||||||
resp := &response.CheckoutCounterResponse{
|
|
||||||
TradeId: orderInfo.TradeId,
|
|
||||||
Amount: orderInfo.Amount,
|
|
||||||
ActualAmount: orderInfo.ActualAmount,
|
|
||||||
Token: orderInfo.Token,
|
|
||||||
Currency: orderInfo.Currency,
|
|
||||||
ReceiveAddress: orderInfo.ReceiveAddress,
|
|
||||||
Network: orderInfo.Network,
|
|
||||||
Status: orderInfo.Status,
|
|
||||||
PaymentType: strings.ToLower(paymentType),
|
|
||||||
ExpirationTime: orderInfo.CreatedAt.AddMinutes(config.GetOrderExpirationTime()).TimestampMilli(),
|
|
||||||
RedirectUrl: orderInfo.RedirectUrl,
|
|
||||||
CreatedAt: orderInfo.CreatedAt.TimestampMilli(),
|
|
||||||
IsSelected: orderInfo.IsSelected,
|
|
||||||
}
|
|
||||||
if orderInfo.PayProvider == mdb.PaymentProviderOkPay {
|
if orderInfo.PayProvider == mdb.PaymentProviderOkPay {
|
||||||
providerRow, rowErr := data.GetProviderOrderByTradeIDAndProvider(orderInfo.TradeId, mdb.PaymentProviderOkPay)
|
providerRow, rowErr := data.GetProviderOrderByTradeIDAndProvider(orderInfo.TradeId, mdb.PaymentProviderOkPay)
|
||||||
if rowErr != nil {
|
if rowErr != nil {
|
||||||
|
|||||||
+8
-42
@@ -2,9 +2,7 @@ package mq
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -13,6 +11,7 @@ import (
|
|||||||
"github.com/GMWalletApp/epusdt/model/data"
|
"github.com/GMWalletApp/epusdt/model/data"
|
||||||
"github.com/GMWalletApp/epusdt/model/mdb"
|
"github.com/GMWalletApp/epusdt/model/mdb"
|
||||||
"github.com/GMWalletApp/epusdt/model/response"
|
"github.com/GMWalletApp/epusdt/model/response"
|
||||||
|
"github.com/GMWalletApp/epusdt/model/service"
|
||||||
"github.com/GMWalletApp/epusdt/util/http_client"
|
"github.com/GMWalletApp/epusdt/util/http_client"
|
||||||
"github.com/GMWalletApp/epusdt/util/log"
|
"github.com/GMWalletApp/epusdt/util/log"
|
||||||
"github.com/GMWalletApp/epusdt/util/sign"
|
"github.com/GMWalletApp/epusdt/util/sign"
|
||||||
@@ -25,18 +24,12 @@ import (
|
|||||||
// other secret would produce a signature the merchant can't verify.
|
// other secret would produce a signature the merchant can't verify.
|
||||||
// The admin can resend the callback after fixing the key.
|
// The admin can resend the callback after fixing the key.
|
||||||
func resolveOrderApiKey(order *mdb.Orders) (*mdb.ApiKey, error) {
|
func resolveOrderApiKey(order *mdb.Orders) (*mdb.ApiKey, error) {
|
||||||
if order.ApiKeyID == 0 {
|
row, err := service.ResolveOrderApiKey(order)
|
||||||
return nil, fmt.Errorf("order trade_id=%s has no api_key_id", order.TradeId)
|
if err != nil || row == nil || row.ID == 0 {
|
||||||
}
|
if err != nil {
|
||||||
row, err := data.GetApiKeyByID(order.ApiKeyID)
|
return nil, err
|
||||||
if err != nil {
|
}
|
||||||
return nil, fmt.Errorf("lookup api_key_id=%d: %w", order.ApiKeyID, err)
|
return nil, errors.New("api key unavailable")
|
||||||
}
|
|
||||||
if row.ID == 0 {
|
|
||||||
return nil, fmt.Errorf("api_key_id=%d not found (deleted?)", order.ApiKeyID)
|
|
||||||
}
|
|
||||||
if row.Status != mdb.ApiKeyStatusEnable {
|
|
||||||
return nil, fmt.Errorf("api_key_id=%d is disabled", order.ApiKeyID)
|
|
||||||
}
|
}
|
||||||
return row, nil
|
return row, nil
|
||||||
}
|
}
|
||||||
@@ -207,38 +200,11 @@ func sendOrderCallback(order *mdb.Orders) error {
|
|||||||
|
|
||||||
switch {
|
switch {
|
||||||
case strings.EqualFold(order.PaymentType, mdb.PaymentTypeEpay):
|
case strings.EqualFold(order.PaymentType, mdb.PaymentTypeEpay):
|
||||||
// EPAY uses pid (integer) and secret_key as "key".
|
formData, err := service.BuildEPayResultParams(order, apiKeyRow)
|
||||||
pidInt, convErr := strconv.Atoi(apiKeyRow.Pid)
|
|
||||||
if convErr != nil {
|
|
||||||
return fmt.Errorf("epay pid not numeric: %s", apiKeyRow.Pid)
|
|
||||||
}
|
|
||||||
notifyData := response.OrderNotifyResponseEpay{
|
|
||||||
PID: pidInt,
|
|
||||||
TradeNo: order.TradeId,
|
|
||||||
OutTradeNo: order.OrderId,
|
|
||||||
Type: "alipay",
|
|
||||||
Name: order.Name,
|
|
||||||
Money: fmt.Sprintf("%.4f", order.Amount),
|
|
||||||
TradeStatus: "TRADE_SUCCESS",
|
|
||||||
}
|
|
||||||
|
|
||||||
signstr2, err := sign.Get(notifyData, apiKeyRow.SecretKey)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
formData := map[string]string{
|
|
||||||
"pid": fmt.Sprintf("%d", notifyData.PID),
|
|
||||||
"trade_no": notifyData.TradeNo,
|
|
||||||
"out_trade_no": notifyData.OutTradeNo,
|
|
||||||
"type": notifyData.Type,
|
|
||||||
"name": notifyData.Name,
|
|
||||||
"money": notifyData.Money,
|
|
||||||
"trade_status": notifyData.TradeStatus,
|
|
||||||
"sign": signstr2,
|
|
||||||
"sign_type": "MD5",
|
|
||||||
}
|
|
||||||
|
|
||||||
epayResp, err := http_client.GetHttpClient().R().SetQueryParams(formData).Get(order.NotifyUrl)
|
epayResp, err := http_client.GetHttpClient().R().SetQueryParams(formData).Get(order.NotifyUrl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ func RegisterRoute(e *echo.Echo) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
payRoute.GET("/checkout-counter-resp/:trade_id", comm.Ctrl.CheckoutCounter)
|
payRoute.GET("/checkout-counter-resp/:trade_id", comm.Ctrl.CheckoutCounter)
|
||||||
|
payRoute.GET("/return/:trade_id", comm.Ctrl.ReturnToMerchant)
|
||||||
payRoute.GET("/check-status/:trade_id", comm.Ctrl.CheckStatus)
|
payRoute.GET("/check-status/:trade_id", comm.Ctrl.CheckStatus)
|
||||||
payRoute.POST("/submit-tx-hash/:trade_id", comm.Ctrl.SubmitTxHash)
|
payRoute.POST("/submit-tx-hash/:trade_id", comm.Ctrl.SubmitTxHash)
|
||||||
payRoute.POST("/switch-network", comm.Ctrl.SwitchNetwork)
|
payRoute.POST("/switch-network", comm.Ctrl.SwitchNetwork)
|
||||||
|
|||||||
@@ -224,6 +224,37 @@ func doFormPost(e *echo.Echo, path string, values url.Values) *httptest.Response
|
|||||||
return rec
|
return rec
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func mustCreateEPayOrder(t *testing.T, e *echo.Echo, orderID string, returnURL string, extra url.Values) string {
|
||||||
|
t.Helper()
|
||||||
|
|
||||||
|
values := url.Values{
|
||||||
|
"pid": {"1"},
|
||||||
|
"name": {orderID},
|
||||||
|
"type": {"alipay"},
|
||||||
|
"money": {"1.00"},
|
||||||
|
"out_trade_no": {orderID},
|
||||||
|
"notify_url": {"https://93.184.216.34/notify"},
|
||||||
|
"return_url": {returnURL},
|
||||||
|
}
|
||||||
|
for key, items := range extra {
|
||||||
|
clone := append([]string(nil), items...)
|
||||||
|
values[key] = clone
|
||||||
|
}
|
||||||
|
values = signEpayValues(values)
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/payments/epay/v1/order/create-transaction/submit.php?"+values.Encode(), nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusFound {
|
||||||
|
t.Fatalf("create epay order failed: %d %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
location := rec.Header().Get("Location")
|
||||||
|
if !strings.HasPrefix(location, "/pay/checkout-counter/") {
|
||||||
|
t.Fatalf("expected checkout redirect, got %q", location)
|
||||||
|
}
|
||||||
|
return strings.TrimPrefix(location, "/pay/checkout-counter/")
|
||||||
|
}
|
||||||
|
|
||||||
func TestRootPostRoute(t *testing.T) {
|
func TestRootPostRoute(t *testing.T) {
|
||||||
e := setupTestEnv(t)
|
e := setupTestEnv(t)
|
||||||
|
|
||||||
@@ -1245,6 +1276,12 @@ func TestEpaySubmitPhpGetCompatible(t *testing.T) {
|
|||||||
if checkoutData["payment_type"] != "epay" {
|
if checkoutData["payment_type"] != "epay" {
|
||||||
t.Fatalf("epay checkout payment_type = %v, want epay", checkoutData["payment_type"])
|
t.Fatalf("epay checkout payment_type = %v, want epay", checkoutData["payment_type"])
|
||||||
}
|
}
|
||||||
|
if got, _ := checkoutData["redirect_url"].(string); got != "http://localhost:8080/pay/return/"+tradeID {
|
||||||
|
t.Fatalf("epay checkout redirect_url = %q, want internal return route", got)
|
||||||
|
}
|
||||||
|
if order.RedirectUrl != "http://localhost/return" {
|
||||||
|
t.Fatalf("stored redirect_url = %q, want merchant raw return_url", order.RedirectUrl)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEpaySubmitPhpRequestTokenNetworkOverrideDefaults(t *testing.T) {
|
func TestEpaySubmitPhpRequestTokenNetworkOverrideDefaults(t *testing.T) {
|
||||||
@@ -1526,6 +1563,234 @@ func TestSubmitTxHash_SuccessUpdatesCheckStatus(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_NotFound(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/nonexistent-trade-id", nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusBadRequest {
|
||||||
|
t.Fatalf("expected 400, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
resp := parseResp(t, rec)
|
||||||
|
if got := int(resp["status_code"].(float64)); got != 10008 {
|
||||||
|
t.Fatalf("status_code = %d, want 10008; response=%v", got, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_PaidEpayRedirectsToMerchantWithSignedParams(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
tradeID := mustCreateEPayOrder(t, e, "epay-return-paid-001", "https://merchant.example/return?from=merchant", url.Values{
|
||||||
|
"token": {"usdt"},
|
||||||
|
"network": {"tron"},
|
||||||
|
"currency": {"cny"},
|
||||||
|
})
|
||||||
|
if err := dao.Mdb.Model(&mdb.Orders{}).
|
||||||
|
Where("trade_id = ?", tradeID).
|
||||||
|
Update("status", mdb.StatusPaySuccess).Error; err != nil {
|
||||||
|
t.Fatalf("mark order paid: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/"+tradeID, nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusFound {
|
||||||
|
t.Fatalf("expected 302, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
if got := rec.Header().Get("Cache-Control"); got != "no-store" {
|
||||||
|
t.Fatalf("cache-control = %q, want no-store", got)
|
||||||
|
}
|
||||||
|
|
||||||
|
location := rec.Header().Get("Location")
|
||||||
|
targetURL, err := url.Parse(location)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("parse redirect location: %v", err)
|
||||||
|
}
|
||||||
|
if targetURL.Scheme != "https" || targetURL.Host != "merchant.example" || targetURL.Path != "/return" {
|
||||||
|
t.Fatalf("unexpected redirect target: %q", location)
|
||||||
|
}
|
||||||
|
|
||||||
|
query := targetURL.Query()
|
||||||
|
if query.Get("from") != "merchant" {
|
||||||
|
t.Fatalf("preserved query = %q, want merchant", query.Get("from"))
|
||||||
|
}
|
||||||
|
if query.Get("pid") != "1" {
|
||||||
|
t.Fatalf("pid = %q, want 1", query.Get("pid"))
|
||||||
|
}
|
||||||
|
if query.Get("trade_no") != tradeID {
|
||||||
|
t.Fatalf("trade_no = %q, want %q", query.Get("trade_no"), tradeID)
|
||||||
|
}
|
||||||
|
if query.Get("out_trade_no") != "epay-return-paid-001" {
|
||||||
|
t.Fatalf("out_trade_no = %q", query.Get("out_trade_no"))
|
||||||
|
}
|
||||||
|
if query.Get("type") != "alipay" {
|
||||||
|
t.Fatalf("type = %q, want alipay", query.Get("type"))
|
||||||
|
}
|
||||||
|
if query.Get("name") != "epay-return-paid-001" {
|
||||||
|
t.Fatalf("name = %q", query.Get("name"))
|
||||||
|
}
|
||||||
|
if query.Get("money") != "1.0000" {
|
||||||
|
t.Fatalf("money = %q, want 1.0000", query.Get("money"))
|
||||||
|
}
|
||||||
|
if query.Get("trade_status") != "TRADE_SUCCESS" {
|
||||||
|
t.Fatalf("trade_status = %q, want TRADE_SUCCESS", query.Get("trade_status"))
|
||||||
|
}
|
||||||
|
if query.Get("sign_type") != "MD5" {
|
||||||
|
t.Fatalf("sign_type = %q, want MD5", query.Get("sign_type"))
|
||||||
|
}
|
||||||
|
|
||||||
|
signParams := map[string]interface{}{
|
||||||
|
"pid": query.Get("pid"),
|
||||||
|
"trade_no": query.Get("trade_no"),
|
||||||
|
"out_trade_no": query.Get("out_trade_no"),
|
||||||
|
"type": query.Get("type"),
|
||||||
|
"name": query.Get("name"),
|
||||||
|
"money": query.Get("money"),
|
||||||
|
"trade_status": query.Get("trade_status"),
|
||||||
|
}
|
||||||
|
calcSig, err := sign.Get(signParams, testAPIToken)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("calc epay return signature: %v", err)
|
||||||
|
}
|
||||||
|
if got := query.Get("sign"); got != calcSig {
|
||||||
|
t.Fatalf("sign = %q, want %q", got, calcSig)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_UnpaidEpayRedirectsBackToCheckout(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
tradeID := mustCreateEPayOrder(t, e, "epay-return-unpaid-001", "https://merchant.example/return", url.Values{
|
||||||
|
"token": {"usdt"},
|
||||||
|
"network": {"tron"},
|
||||||
|
"currency": {"cny"},
|
||||||
|
})
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/"+tradeID, nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusFound {
|
||||||
|
t.Fatalf("expected 302, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
if got := rec.Header().Get("Location"); got != "/pay/checkout-counter/"+tradeID {
|
||||||
|
t.Fatalf("location = %q, want checkout counter", got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_PaidNonEpayRedirectsBackToCheckout(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
tradeID := createCheckoutCounterRespTestOrder(t, e, "pay-return-gmpay-001")
|
||||||
|
if err := dao.Mdb.Model(&mdb.Orders{}).
|
||||||
|
Where("trade_id = ?", tradeID).
|
||||||
|
Update("status", mdb.StatusPaySuccess).Error; err != nil {
|
||||||
|
t.Fatalf("mark order paid: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/"+tradeID, nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusFound {
|
||||||
|
t.Fatalf("expected 302, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
if got := rec.Header().Get("Location"); got != "/pay/checkout-counter/"+tradeID {
|
||||||
|
t.Fatalf("location = %q, want checkout counter", got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_PaidEpayWithEmptyRedirectReturnsError(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
tradeID := mustCreateEPayOrder(t, e, "epay-return-empty-001", "https://merchant.example/return", url.Values{
|
||||||
|
"token": {"usdt"},
|
||||||
|
"network": {"tron"},
|
||||||
|
"currency": {"cny"},
|
||||||
|
})
|
||||||
|
if err := dao.Mdb.Model(&mdb.Orders{}).
|
||||||
|
Where("trade_id = ?", tradeID).
|
||||||
|
Updates(map[string]interface{}{
|
||||||
|
"status": mdb.StatusPaySuccess,
|
||||||
|
"redirect_url": "",
|
||||||
|
}).Error; err != nil {
|
||||||
|
t.Fatalf("update order: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/"+tradeID, nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusBadRequest {
|
||||||
|
t.Fatalf("expected 400, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
resp := parseResp(t, rec)
|
||||||
|
if got := int(resp["status_code"].(float64)); got != 10044 {
|
||||||
|
t.Fatalf("status_code = %d, want 10044; response=%v", got, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_PaidEpayWithDisabledApiKeyReturnsError(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
tradeID := mustCreateEPayOrder(t, e, "epay-return-disabled-key-001", "https://merchant.example/return", url.Values{
|
||||||
|
"token": {"usdt"},
|
||||||
|
"network": {"tron"},
|
||||||
|
"currency": {"cny"},
|
||||||
|
})
|
||||||
|
order, err := data.GetOrderInfoByTradeId(tradeID)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("load order: %v", err)
|
||||||
|
}
|
||||||
|
if err := dao.Mdb.Model(&mdb.Orders{}).
|
||||||
|
Where("trade_id = ?", tradeID).
|
||||||
|
Update("status", mdb.StatusPaySuccess).Error; err != nil {
|
||||||
|
t.Fatalf("mark order paid: %v", err)
|
||||||
|
}
|
||||||
|
if err := dao.Mdb.Model(&mdb.ApiKey{}).
|
||||||
|
Where("id = ?", order.ApiKeyID).
|
||||||
|
Update("status", mdb.ApiKeyStatusDisable).Error; err != nil {
|
||||||
|
t.Fatalf("disable api key: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/"+tradeID, nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusBadRequest {
|
||||||
|
t.Fatalf("expected 400, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
resp := parseResp(t, rec)
|
||||||
|
if got := int(resp["status_code"].(float64)); got != 10045 {
|
||||||
|
t.Fatalf("status_code = %d, want 10045; response=%v", got, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPayReturn_PaidEpayWithNonNumericPidReturnsSignatureError(t *testing.T) {
|
||||||
|
e := setupTestEnv(t)
|
||||||
|
tradeID := mustCreateEPayOrder(t, e, "epay-return-bad-pid-001", "https://merchant.example/return", url.Values{
|
||||||
|
"token": {"usdt"},
|
||||||
|
"network": {"tron"},
|
||||||
|
"currency": {"cny"},
|
||||||
|
})
|
||||||
|
order, err := data.GetOrderInfoByTradeId(tradeID)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("load order: %v", err)
|
||||||
|
}
|
||||||
|
if err := dao.Mdb.Model(&mdb.Orders{}).
|
||||||
|
Where("trade_id = ?", tradeID).
|
||||||
|
Update("status", mdb.StatusPaySuccess).Error; err != nil {
|
||||||
|
t.Fatalf("mark order paid: %v", err)
|
||||||
|
}
|
||||||
|
if err := dao.Mdb.Model(&mdb.ApiKey{}).
|
||||||
|
Where("id = ?", order.ApiKeyID).
|
||||||
|
Update("pid", "not-a-number").Error; err != nil {
|
||||||
|
t.Fatalf("break pid: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
req := httptest.NewRequest(http.MethodGet, "/pay/return/"+tradeID, nil)
|
||||||
|
rec := httptest.NewRecorder()
|
||||||
|
e.ServeHTTP(rec, req)
|
||||||
|
if rec.Code != http.StatusBadRequest {
|
||||||
|
t.Fatalf("expected 400, got %d: %s", rec.Code, rec.Body.String())
|
||||||
|
}
|
||||||
|
resp := parseResp(t, rec)
|
||||||
|
if got := int(resp["status_code"].(float64)); got != 10046 {
|
||||||
|
t.Fatalf("status_code = %d, want 10046; response=%v", got, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestSubmitTxHash_VerificationFailureAllowsRetrySameHash(t *testing.T) {
|
func TestSubmitTxHash_VerificationFailureAllowsRetrySameHash(t *testing.T) {
|
||||||
e := setupTestEnv(t)
|
e := setupTestEnv(t)
|
||||||
tradeID := createCheckoutCounterRespTestOrder(t, e, "submit-tx-hash-retry-001")
|
tradeID := createCheckoutCounterRespTestOrder(t, e, "submit-tx-hash-retry-001")
|
||||||
@@ -2225,6 +2490,9 @@ func TestSwitchNetwork_EpayPlaceholderCompletesChainInPlace(t *testing.T) {
|
|||||||
if got, _ := respData["trade_id"].(string); got != tradeID {
|
if got, _ := respData["trade_id"].(string); got != tradeID {
|
||||||
t.Fatalf("switch trade_id = %q, want parent %q", got, tradeID)
|
t.Fatalf("switch trade_id = %q, want parent %q", got, tradeID)
|
||||||
}
|
}
|
||||||
|
if got, _ := respData["redirect_url"].(string); got != "http://localhost:8080/pay/return/"+tradeID {
|
||||||
|
t.Fatalf("switch redirect_url = %q, want internal return route", got)
|
||||||
|
}
|
||||||
|
|
||||||
parent, err := data.GetOrderInfoByTradeId(tradeID)
|
parent, err := data.GetOrderInfoByTradeId(tradeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -2233,6 +2501,9 @@ func TestSwitchNetwork_EpayPlaceholderCompletesChainInPlace(t *testing.T) {
|
|||||||
if parent.Status != mdb.StatusWaitPay || parent.PaymentType != mdb.PaymentTypeEpay || parent.Network != mdb.NetworkTron || parent.Token != "USDT" || parent.ReceiveAddress == "" {
|
if parent.Status != mdb.StatusWaitPay || parent.PaymentType != mdb.PaymentTypeEpay || parent.Network != mdb.NetworkTron || parent.Token != "USDT" || parent.ReceiveAddress == "" {
|
||||||
t.Fatalf("parent fields = status %d payment_type %q network %q token %q address %q", parent.Status, parent.PaymentType, parent.Network, parent.Token, parent.ReceiveAddress)
|
t.Fatalf("parent fields = status %d payment_type %q network %q token %q address %q", parent.Status, parent.PaymentType, parent.Network, parent.Token, parent.ReceiveAddress)
|
||||||
}
|
}
|
||||||
|
if parent.RedirectUrl != "http://localhost/return" {
|
||||||
|
t.Fatalf("stored redirect_url = %q, want merchant raw return_url", parent.RedirectUrl)
|
||||||
|
}
|
||||||
count, err := data.CountActiveSubOrders(tradeID)
|
count, err := data.CountActiveSubOrders(tradeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("count active sub-orders: %v", err)
|
t.Fatalf("count active sub-orders: %v", err)
|
||||||
@@ -2315,6 +2586,9 @@ func TestSwitchNetwork_OkPayFromEpayWaitSelectPlaceholder(t *testing.T) {
|
|||||||
if respData["payment_url"] != "https://pay.okaypay.test/epay-placeholder" {
|
if respData["payment_url"] != "https://pay.okaypay.test/epay-placeholder" {
|
||||||
t.Fatalf("payment_url = %v, want okpay url", respData["payment_url"])
|
t.Fatalf("payment_url = %v, want okpay url", respData["payment_url"])
|
||||||
}
|
}
|
||||||
|
if got, _ := respData["redirect_url"].(string); got != "http://localhost:8080/pay/return/"+tradeID {
|
||||||
|
t.Fatalf("switch redirect_url = %q, want internal return route", got)
|
||||||
|
}
|
||||||
|
|
||||||
parent, err := data.GetOrderInfoByTradeId(tradeID)
|
parent, err := data.GetOrderInfoByTradeId(tradeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -2323,6 +2597,9 @@ func TestSwitchNetwork_OkPayFromEpayWaitSelectPlaceholder(t *testing.T) {
|
|||||||
if parent.PaymentType != mdb.PaymentTypeEpay || parent.PayProvider != mdb.PaymentProviderOkPay || parent.Network != mdb.PaymentProviderOkPay || parent.ReceiveAddress != "OKPAY" {
|
if parent.PaymentType != mdb.PaymentTypeEpay || parent.PayProvider != mdb.PaymentProviderOkPay || parent.Network != mdb.PaymentProviderOkPay || parent.ReceiveAddress != "OKPAY" {
|
||||||
t.Fatalf("parent fields = payment_type %q provider %q network %q address %q", parent.PaymentType, parent.PayProvider, parent.Network, parent.ReceiveAddress)
|
t.Fatalf("parent fields = payment_type %q provider %q network %q address %q", parent.PaymentType, parent.PayProvider, parent.Network, parent.ReceiveAddress)
|
||||||
}
|
}
|
||||||
|
if parent.RedirectUrl != "http://localhost/return" {
|
||||||
|
t.Fatalf("stored redirect_url = %q, want merchant raw return_url", parent.RedirectUrl)
|
||||||
|
}
|
||||||
count, err := data.CountActiveSubOrders(tradeID)
|
count, err := data.CountActiveSubOrders(tradeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("count active sub-orders: %v", err)
|
t.Fatalf("count active sub-orders: %v", err)
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ var Errno = map[int]string{
|
|||||||
10041: "invalid notify url",
|
10041: "invalid notify url",
|
||||||
10042: "payment provider order creation failed",
|
10042: "payment provider order creation failed",
|
||||||
10043: "invalid setting item",
|
10043: "invalid setting item",
|
||||||
|
10044: "invalid order redirect url",
|
||||||
|
10045: "order api key unavailable",
|
||||||
|
10046: "failed to build epay return signature",
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -94,6 +97,9 @@ var (
|
|||||||
NotifyURLErr = Err(10041)
|
NotifyURLErr = Err(10041)
|
||||||
PaymentProviderCreateErr = Err(10042)
|
PaymentProviderCreateErr = Err(10042)
|
||||||
SettingItemErr = Err(10043)
|
SettingItemErr = Err(10043)
|
||||||
|
OrderRedirectURLErr = Err(10044)
|
||||||
|
OrderApiKeyUnavailableErr = Err(10045)
|
||||||
|
EPayReturnSignatureErr = Err(10046)
|
||||||
)
|
)
|
||||||
|
|
||||||
type RspError struct {
|
type RspError struct {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
import{t as e}from"./unauthorized-error-CASnS-6J.js";var t=e;export{t as component};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./unauthorized-error-B6bKLdq-.js";var t=e;export{t as component};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{t as e}from"./forbidden-peSSCojP.js";var t=e;export{t as component};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./forbidden-DZPSchCU.js";var t=e;export{t as component};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{t as e}from"./not-found-error-CTygh2Q3.js";var t=e;export{t as component};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./not-found-error-CHHM1I1c.js";var t=e;export{t as component};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{t as e}from"./general-error-CDe5w_m4.js";var t=e;export{t as component};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./general-error-BoIfl_4Z.js";var t=e;export{t as component};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{t as e}from"./maintenance-error-C9XjssOV.js";var t=e;export{t as component};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{t as e}from"./maintenance-error-CuCw7L8t.js";var t=e;export{t as component};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{o as r,s as i,t as a}from"./useRouter-DtTm7XkK.js";import{t as o}from"./useStore-CupyIEEP.js";import{f as s}from"./ClientOnly-CWlB586P.js";import"./redirect-DMNGvjzO.js";import{a as c,i as l,r as u,s as d,t as f}from"./Match-CeXMJwDZ.js";import{n as p}from"./matchContext-BFCdcHzo.js";import{t as m}from"./atom-DQpaPCwp.js";function h(e){if(typeof document<`u`&&document.querySelector){let t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==``){let e=document.getElementById(t.hash);e&&e.scrollIntoView(n)}}}var g=e(t(),1);function _(){let e=a(),t=g.useRef({router:e,mounted:!1}),[n,c]=g.useState(!1),l=o(e.stores.isLoading,e=>e),u=o(e.stores.hasPending,e=>e),f=i(l),p=l||n||u,_=i(p),v=l||u,y=i(v);return e.startTransition=e=>{c(!0),g.startTransition(()=>{e(),c(!1)})},g.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return s(e.latestLocation.publicHref)!==s(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),r(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),r(()=>{f&&!l&&e.emit({type:`onLoad`,...d(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,e,l]),r(()=>{y&&!v&&e.emit({type:`onBeforeRouteMount`,...d(e.stores.location.get(),e.stores.resolvedLocation.get())})},[v,y,e]),r(()=>{if(_&&!p){let t=d(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),m(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())}),t.hrefChanged&&h(e)}},[p,_,e]),null}var v=n();function y(){let e=a(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,v.jsx)(t,{}):null,r=(0,v.jsxs)(typeof document<`u`&&e.ssr?u:g.Suspense,{fallback:n,children:[(0,v.jsx)(_,{}),(0,v.jsx)(b,{})]});return e.options.InnerWrap?(0,v.jsx)(e.options.InnerWrap,{children:r}):r}function b(){let e=a(),t=o(e.stores.firstId,e=>e),n=o(e.stores.loadedAt,e=>e),r=t?(0,v.jsx)(f,{matchId:t}):null;return(0,v.jsx)(p.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,v.jsx)(l,{getResetKey:()=>n,errorComponent:c,onCatch:void 0,children:r})})}function x(){let e=a();return o(e.stores.matchRouteDeps,e=>e),g.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e])}export{x as n,y as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{o as r,s as i,t as a}from"./useRouter-DtTm7XkK.js";import{t as o}from"./useStore-CupyIEEP.js";import{f as s}from"./ClientOnly-fFIveJVd.js";import"./redirect-DMNGvjzO.js";import{a as c,i as l,r as u,s as d,t as f}from"./Match-Cm64cgS9.js";import{n as p}from"./matchContext-BFCdcHzo.js";import{t as m}from"./atom-DQpaPCwp.js";function h(e){if(typeof document<`u`&&document.querySelector){let t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==``){let e=document.getElementById(t.hash);e&&e.scrollIntoView(n)}}}var g=e(t(),1);function _(){let e=a(),t=g.useRef({router:e,mounted:!1}),[n,c]=g.useState(!1),l=o(e.stores.isLoading,e=>e),u=o(e.stores.hasPending,e=>e),f=i(l),p=l||n||u,_=i(p),v=l||u,y=i(v);return e.startTransition=e=>{c(!0),g.startTransition(()=>{e(),c(!1)})},g.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return s(e.latestLocation.publicHref)!==s(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),r(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),r(()=>{f&&!l&&e.emit({type:`onLoad`,...d(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,e,l]),r(()=>{y&&!v&&e.emit({type:`onBeforeRouteMount`,...d(e.stores.location.get(),e.stores.resolvedLocation.get())})},[v,y,e]),r(()=>{if(_&&!p){let t=d(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),m(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())}),t.hrefChanged&&h(e)}},[p,_,e]),null}var v=n();function y(){let e=a(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,v.jsx)(t,{}):null,r=(0,v.jsxs)(typeof document<`u`&&e.ssr?u:g.Suspense,{fallback:n,children:[(0,v.jsx)(_,{}),(0,v.jsx)(b,{})]});return e.options.InnerWrap?(0,v.jsx)(e.options.InnerWrap,{children:r}):r}function b(){let e=a(),t=o(e.stores.firstId,e=>e),n=o(e.stores.loadedAt,e=>e),r=t?(0,v.jsx)(f,{matchId:t}):null;return(0,v.jsx)(p.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,v.jsx)(l,{getResetKey:()=>n,errorComponent:c,onCatch:void 0,children:r})})}function x(){let e=a();return o(e.stores.matchRouteDeps,e=>e),g.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e])}export{x as n,y as t};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{em as e}from"./messages-Bp0bCjzp.js";import{m as t}from"./search-provider-Bl2HDfcG.js";import{n,t as r}from"./theme-switch-B3Qb32n8.js";import{t as i}from"./general-error-BoIfl_4Z.js";import{t as a}from"./not-found-error-CHHM1I1c.js";import{t as o}from"./_error-CeoUllM-.js";import{t as s}from"./unauthorized-error-B6bKLdq-.js";import{t as c}from"./forbidden-DZPSchCU.js";import{t as l}from"./maintenance-error-CuCw7L8t.js";import{n as u,r as d,t as f}from"./header-D45l3Ai7.js";var p=e();function m(){let{error:e}=o.useParams(),m={unauthorized:s,forbidden:c,"not-found":a,"internal-server-error":i,"maintenance-error":l}[e]||a;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(f,{className:`border-b`,fixed:!0,children:[(0,p.jsx)(u,{}),(0,p.jsxs)(`div`,{className:`ms-auto flex items-center space-x-4`,children:[(0,p.jsx)(n,{}),(0,p.jsx)(r,{}),(0,p.jsx)(t,{}),(0,p.jsx)(d,{})]})]}),(0,p.jsx)(`div`,{className:`flex-1 [&>div]:h-full`,children:(0,p.jsx)(m,{})})]})}export{m as component};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_error-BSLzv73v.js","assets/search-provider-Bl2HDfcG.js","assets/chunk-DECur_0Z.js","assets/dist-CRowTfGU.js","assets/dist-CKFLmh1A.js","assets/messages-Bp0bCjzp.js","assets/react-CO2uhaBc.js","assets/confirm-dialog-YmxNnOr3.js","assets/button-BgMnOYKD.js","assets/clsx-D9aGYY3V.js","assets/dist-CPQ-sRtL.js","assets/dist-_ND6L-P3.js","assets/dist-B0ikDpJU.js","assets/dist-BFnxq45V.js","assets/es2015-D8VLlhse.js","assets/dist-Clua1vrx.js","assets/dist-C97YBjnT.js","assets/dist-036CEgdV.js","assets/dist-D7AUoOWu.js","assets/dist-C6i4A_Js.js","assets/dist-BixeH3nX.js","assets/dist-DGDEBCW9.js","assets/separator-DbmFQXe4.js","assets/tooltip-Gx9CUpPD.js","assets/dist-BSXD7MjW.js","assets/dist-Bmn8KNt7.js","assets/auth-store-Csn6HPxJ.js","assets/dist-BGqHIBUe.js","assets/with-selector-DBfssCrY.js","assets/cookies-BzZOQYPw.js","assets/useRouter-DtTm7XkK.js","assets/useNavigate-7u4DX0Ho.js","assets/useStore-CupyIEEP.js","assets/command-CIv3ggHf.js","assets/createLucideIcon-Br0Bd5k2.js","assets/dialog-BJ5VA2v_.js","assets/skeleton-BQsmx80h.js","assets/wallet-Bgblr4kl.js","assets/sun-JU8p4FoE.js","assets/shield-check-MAPDL1u8.js","assets/logo-Ce__4GTc.js","assets/input-BleRUV2A.js","assets/font-provider-CtpKPVa7.js","assets/theme-provider-CyJJNAox.js","assets/theme-switch-B3Qb32n8.js","assets/dropdown-menu-8-hEBtzr.js","assets/check-CHp0nSkR.js","assets/header-D45l3Ai7.js","assets/link-BYG8nKNO.js","assets/ClientOnly-fFIveJVd.js","assets/forbidden-DZPSchCU.js","assets/general-error-BoIfl_4Z.js","assets/maintenance-error-CuCw7L8t.js","assets/not-found-error-CHHM1I1c.js","assets/unauthorized-error-B6bKLdq-.js"])))=>i.map(i=>d[i]);
|
||||||
|
import{n as e,t}from"./lazyRouteComponent-iygd3-DM.js";import{t as n}from"./preload-helper-DoS0eHac.js";var r=e(`/_authenticated/errors/$error`)({component:t(()=>n(()=>import(`./_error-BSLzv73v.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54])),`component`)});export{r as t};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{m as t}from"./search-provider-B67mlhed.js";import{n,t as r}from"./theme-switch-B3KcLEky.js";import{t as i}from"./general-error-CDe5w_m4.js";import{t as a}from"./not-found-error-CTygh2Q3.js";import{t as o}from"./_error-wx-ubgoM.js";import{t as s}from"./unauthorized-error-CASnS-6J.js";import{t as c}from"./forbidden-peSSCojP.js";import{t as l}from"./maintenance-error-C9XjssOV.js";import{n as u,r as d,t as f}from"./header-NBnXYgM_.js";var p=e();function m(){let{error:e}=o.useParams(),m={unauthorized:s,forbidden:c,"not-found":a,"internal-server-error":i,"maintenance-error":l}[e]||a;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(f,{className:`border-b`,fixed:!0,children:[(0,p.jsx)(u,{}),(0,p.jsxs)(`div`,{className:`ms-auto flex items-center space-x-4`,children:[(0,p.jsx)(n,{}),(0,p.jsx)(r,{}),(0,p.jsx)(t,{}),(0,p.jsx)(d,{})]})]}),(0,p.jsx)(`div`,{className:`flex-1 [&>div]:h-full`,children:(0,p.jsx)(m,{})})]})}export{m as component};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_error-CvIS-wQi.js","assets/search-provider-B67mlhed.js","assets/chunk-DECur_0Z.js","assets/dist-CRowTfGU.js","assets/dist-D343v8gR.js","assets/messages-BLwDcEAr.js","assets/react-CO2uhaBc.js","assets/confirm-dialog-GGoKuiu9.js","assets/button-C0SPdqvs.js","assets/clsx-D9aGYY3V.js","assets/dist-BEGLjtzw.js","assets/dist-Cd7-TPaR.js","assets/dist-BphrRiSn.js","assets/dist-XiAcd8rT.js","assets/es2015-hwcIKy2q.js","assets/dist-C9d8iJDv.js","assets/dist-CYQVWHzW.js","assets/dist-CVKHDB42.js","assets/dist-DNb3IZ7I.js","assets/dist-THZWKIyP.js","assets/dist-BixeH3nX.js","assets/dist-DJTK1B2D.js","assets/separator-Di9zEmE_.js","assets/tooltip-8Hby-rrx.js","assets/dist-B1bXEkK2.js","assets/dist-Cm0GVWLR.js","assets/auth-store-paR9oIR_.js","assets/dist-CffCYhqm.js","assets/with-selector-DBfssCrY.js","assets/cookies-BzZOQYPw.js","assets/useRouter-DtTm7XkK.js","assets/useNavigate-7u4DX0Ho.js","assets/useStore-CupyIEEP.js","assets/command-vg2xchuv.js","assets/createLucideIcon-Br0Bd5k2.js","assets/dialog-iqE0q8bN.js","assets/skeleton-rs-vmKNc.js","assets/wallet-Bn5Vi2Ko.js","assets/sun-JU8p4FoE.js","assets/shield-check-MAPDL1u8.js","assets/logo-GNJA7dBE.js","assets/input-D-qaLZKc.js","assets/font-provider-BogPqUvU.js","assets/theme-provider-Cs4UKh_6.js","assets/theme-switch-B3KcLEky.js","assets/dropdown-menu-CDbt-i_J.js","assets/check-CHp0nSkR.js","assets/header-NBnXYgM_.js","assets/link-uW89koiO.js","assets/ClientOnly-CWlB586P.js","assets/forbidden-peSSCojP.js","assets/general-error-CDe5w_m4.js","assets/maintenance-error-C9XjssOV.js","assets/not-found-error-CTygh2Q3.js","assets/unauthorized-error-CASnS-6J.js"])))=>i.map(i=>d[i]);
|
|
||||||
import{n as e,t}from"./lazyRouteComponent-BeVeaHRY.js";import{t as n}from"./preload-helper-DoS0eHac.js";var r=e(`/_authenticated/errors/$error`)({component:t(()=>n(()=>import(`./_error-CvIS-wQi.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54])),`component`)});export{r as t};
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_trade_id-Busmu9hU.js","assets/chunk-DECur_0Z.js","assets/button-BgMnOYKD.js","assets/clsx-D9aGYY3V.js","assets/messages-Bp0bCjzp.js","assets/react-CO2uhaBc.js","assets/select-C9s05In_.js","assets/dist-BSXD7MjW.js","assets/dist-CKFLmh1A.js","assets/dist-B0ikDpJU.js","assets/dist-BFnxq45V.js","assets/dist-DGDEBCW9.js","assets/dist-CRowTfGU.js","assets/dist-C6i4A_Js.js","assets/dist-C97YBjnT.js","assets/dist-_ND6L-P3.js","assets/es2015-D8VLlhse.js","assets/dist-BixeH3nX.js","assets/dist-Bmn8KNt7.js","assets/createLucideIcon-Br0Bd5k2.js","assets/check-CHp0nSkR.js","assets/chevron-down-BB5h1CsX.js","assets/auth-store-Csn6HPxJ.js","assets/dist-BGqHIBUe.js","assets/with-selector-DBfssCrY.js","assets/cookies-BzZOQYPw.js","assets/useNavigate-7u4DX0Ho.js","assets/useRouter-DtTm7XkK.js","assets/copy-to-clipboard-C1tj4a8X.js","assets/arrow-left-right-CcCrkQiR.js","assets/arrow-left-BpZwGREZ.js","assets/radio-group-DrQ9k883.js","assets/dist-036CEgdV.js","assets/dist-Clua1vrx.js","assets/dist-D7AUoOWu.js","assets/loader-circle-DpEz1fQv.js","assets/send-BNvceEpO.js","assets/triangle-alert-DB5v_9sS.js","assets/dialog-BJ5VA2v_.js","assets/dist-CPQ-sRtL.js","assets/crypto-icon-DsKMU9xz.js","assets/labels-D0HnAPk9.js","assets/input-BleRUV2A.js","assets/checkout-model-CQ3aqlob.js"])))=>i.map(i=>d[i]);
|
||||||
|
import{n as e,t}from"./lazyRouteComponent-iygd3-DM.js";import{t as n}from"./preload-helper-DoS0eHac.js";var r=e(`/cashier/$trade_id/`)({component:t(()=>n(()=>import(`./_trade_id-Busmu9hU.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])),`component`)});export{r as t};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
|||||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_trade_id-Cd6oGTRE.js","assets/chunk-DECur_0Z.js","assets/button-C0SPdqvs.js","assets/clsx-D9aGYY3V.js","assets/messages-BLwDcEAr.js","assets/react-CO2uhaBc.js","assets/select-CNrSwHJR.js","assets/dist-B1bXEkK2.js","assets/dist-D343v8gR.js","assets/dist-BphrRiSn.js","assets/dist-XiAcd8rT.js","assets/dist-DJTK1B2D.js","assets/dist-CRowTfGU.js","assets/dist-THZWKIyP.js","assets/dist-CYQVWHzW.js","assets/dist-Cd7-TPaR.js","assets/es2015-hwcIKy2q.js","assets/dist-BixeH3nX.js","assets/dist-Cm0GVWLR.js","assets/createLucideIcon-Br0Bd5k2.js","assets/check-CHp0nSkR.js","assets/chevron-down-BB5h1CsX.js","assets/auth-store-paR9oIR_.js","assets/dist-CffCYhqm.js","assets/with-selector-DBfssCrY.js","assets/cookies-BzZOQYPw.js","assets/useNavigate-7u4DX0Ho.js","assets/useRouter-DtTm7XkK.js","assets/copy-to-clipboard-C1tj4a8X.js","assets/arrow-left-right-CcCrkQiR.js","assets/arrow-left-BpZwGREZ.js","assets/radio-group-D__IFVa8.js","assets/dist-CVKHDB42.js","assets/dist-C9d8iJDv.js","assets/dist-DNb3IZ7I.js","assets/loader-circle-DpEz1fQv.js","assets/send-BNvceEpO.js","assets/triangle-alert-DB5v_9sS.js","assets/dialog-iqE0q8bN.js","assets/dist-BEGLjtzw.js","assets/crypto-icon-CJd7sdrZ.js","assets/labels-BiExVADV.js","assets/input-D-qaLZKc.js","assets/checkout-model-CQ3aqlob.js"])))=>i.map(i=>d[i]);
|
|
||||||
import{n as e,t}from"./lazyRouteComponent-BeVeaHRY.js";import{t as n}from"./preload-helper-DoS0eHac.js";var r=e(`/cashier/$trade_id/`)({component:t(()=>n(()=>import(`./_trade_id-Cd6oGTRE.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])),`component`)});export{r as t};
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Bp as e,Cn as t,Sn as n,Zp as r,_n as i,bn as a,vn as o,xn as s,yn as c,zp as l}from"./messages-BLwDcEAr.js";import{i as u,n as d,t as f}from"./button-C0SPdqvs.js";import{n as p,r as m}from"./font-provider-BogPqUvU.js";import{n as h}from"./theme-provider-Cs4UKh_6.js";import{t as g}from"./chevron-down-BB5h1CsX.js";import{n as _,t as v}from"./radio-group-D__IFVa8.js";import{r as y,s as b}from"./zod-rwFXxHlg.js";import{a as x,c as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./form-fulEvgfz.js";import{t as A}from"./page-header-5Y8t-L2D.js";import{t as j}from"./show-submitted-data-COdV4uz4.js";var M=r(),N=b({theme:y([`light`,`dark`]),font:y(m)});function P(){let{font:t,setFont:n}=p(),{theme:r,setTheme:y}=h(),b={theme:r,font:t},A=w({resolver:S(N),defaultValues:b});function P(e){e.font!==t&&n(e.font),e.theme!==r&&y(e.theme),j(e)}return(0,M.jsx)(k,{...A,children:(0,M.jsxs)(`form`,{className:`space-y-8`,onSubmit:A.handleSubmit(P),children:[(0,M.jsx)(C,{control:A.control,name:`font`,render:({field:e})=>(0,M.jsxs)(x,{children:[(0,M.jsx)(E,{children:s()}),(0,M.jsxs)(`div`,{className:`relative w-max`,children:[(0,M.jsx)(T,{children:(0,M.jsx)(`select`,{className:u(d({variant:`outline`}),`w-50 appearance-none font-normal capitalize`,`dark:bg-background dark:hover:bg-background`),...e,children:m.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))})}),(0,M.jsx)(g,{className:`absolute inset-e-3 top-2.5 h-4 w-4 opacity-50`})]}),(0,M.jsx)(D,{className:`font-manrope`,children:a()}),(0,M.jsx)(O,{})]})}),(0,M.jsx)(C,{control:A.control,name:`theme`,render:({field:t})=>(0,M.jsxs)(x,{children:[(0,M.jsx)(E,{children:c()}),(0,M.jsx)(D,{children:o()}),(0,M.jsx)(O,{}),(0,M.jsxs)(v,{className:`grid max-w-md grid-cols-2 gap-8 pt-2`,defaultValue:t.value,onValueChange:t.onChange,children:[(0,M.jsx)(x,{children:(0,M.jsxs)(E,{className:`[&:has([data-state=checked])>div]:border-primary`,children:[(0,M.jsx)(T,{children:(0,M.jsx)(_,{className:`sr-only`,value:`light`})}),(0,M.jsx)(`div`,{className:`items-center rounded-md border-2 border-muted p-1 hover:border-accent`,children:(0,M.jsxs)(`div`,{className:`space-y-2 rounded-sm bg-[#ecedef] p-2`,children:[(0,M.jsxs)(`div`,{className:`space-y-2 rounded-md bg-white p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-2 w-20 rounded-lg bg-[#ecedef]`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-[#ecedef]`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-white p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-[#ecedef]`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-[#ecedef]`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-white p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-[#ecedef]`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-[#ecedef]`})]})]})}),(0,M.jsx)(`span`,{className:`block w-full p-2 text-center font-normal`,children:e()})]})}),(0,M.jsx)(x,{children:(0,M.jsxs)(E,{className:`[&:has([data-state=checked])>div]:border-primary`,children:[(0,M.jsx)(T,{children:(0,M.jsx)(_,{className:`sr-only`,value:`dark`})}),(0,M.jsx)(`div`,{className:`items-center rounded-md border-2 border-muted bg-popover p-1 hover:bg-accent hover:text-accent-foreground`,children:(0,M.jsxs)(`div`,{className:`space-y-2 rounded-sm bg-slate-950 p-2`,children:[(0,M.jsxs)(`div`,{className:`space-y-2 rounded-md bg-slate-800 p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-2 w-20 rounded-lg bg-slate-400`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-slate-400`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-slate-400`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-slate-400`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-slate-400`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-slate-400`})]})]})}),(0,M.jsx)(`span`,{className:`block w-full p-2 text-center font-normal`,children:l()})]})})]})]})}),(0,M.jsx)(f,{type:`submit`,children:i()})]})})}function F(){return(0,M.jsx)(A,{description:n(),title:t(),variant:`section`,children:(0,M.jsx)(P,{})})}var I=F;export{I as component};
|
import{Cn as e,Hp as t,Sn as n,Up as r,_n as i,bn as a,em as o,vn as s,xn as c,yn as l}from"./messages-Bp0bCjzp.js";import{i as u,n as d,t as f}from"./button-BgMnOYKD.js";import{n as p,r as m}from"./font-provider-CtpKPVa7.js";import{n as h}from"./theme-provider-CyJJNAox.js";import{t as g}from"./chevron-down-BB5h1CsX.js";import{n as _,t as v}from"./radio-group-DrQ9k883.js";import{r as y,s as b}from"./zod-rwFXxHlg.js";import{a as x,c as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./form-BhKmyN6D.js";import{t as A}from"./page-header-CDwG3nxs.js";import{t as j}from"./show-submitted-data-C8ocsjDF.js";var M=o(),N=b({theme:y([`light`,`dark`]),font:y(m)});function P(){let{font:e,setFont:n}=p(),{theme:o,setTheme:y}=h(),b={theme:o,font:e},A=w({resolver:S(N),defaultValues:b});function P(t){t.font!==e&&n(t.font),t.theme!==o&&y(t.theme),j(t)}return(0,M.jsx)(k,{...A,children:(0,M.jsxs)(`form`,{className:`space-y-8`,onSubmit:A.handleSubmit(P),children:[(0,M.jsx)(C,{control:A.control,name:`font`,render:({field:e})=>(0,M.jsxs)(x,{children:[(0,M.jsx)(E,{children:c()}),(0,M.jsxs)(`div`,{className:`relative w-max`,children:[(0,M.jsx)(T,{children:(0,M.jsx)(`select`,{className:u(d({variant:`outline`}),`w-50 appearance-none font-normal capitalize`,`dark:bg-background dark:hover:bg-background`),...e,children:m.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))})}),(0,M.jsx)(g,{className:`absolute inset-e-3 top-2.5 h-4 w-4 opacity-50`})]}),(0,M.jsx)(D,{className:`font-manrope`,children:a()}),(0,M.jsx)(O,{})]})}),(0,M.jsx)(C,{control:A.control,name:`theme`,render:({field:e})=>(0,M.jsxs)(x,{children:[(0,M.jsx)(E,{children:l()}),(0,M.jsx)(D,{children:s()}),(0,M.jsx)(O,{}),(0,M.jsxs)(v,{className:`grid max-w-md grid-cols-2 gap-8 pt-2`,defaultValue:e.value,onValueChange:e.onChange,children:[(0,M.jsx)(x,{children:(0,M.jsxs)(E,{className:`[&:has([data-state=checked])>div]:border-primary`,children:[(0,M.jsx)(T,{children:(0,M.jsx)(_,{className:`sr-only`,value:`light`})}),(0,M.jsx)(`div`,{className:`items-center rounded-md border-2 border-muted p-1 hover:border-accent`,children:(0,M.jsxs)(`div`,{className:`space-y-2 rounded-sm bg-[#ecedef] p-2`,children:[(0,M.jsxs)(`div`,{className:`space-y-2 rounded-md bg-white p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-2 w-20 rounded-lg bg-[#ecedef]`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-[#ecedef]`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-white p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-[#ecedef]`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-[#ecedef]`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-white p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-[#ecedef]`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-[#ecedef]`})]})]})}),(0,M.jsx)(`span`,{className:`block w-full p-2 text-center font-normal`,children:r()})]})}),(0,M.jsx)(x,{children:(0,M.jsxs)(E,{className:`[&:has([data-state=checked])>div]:border-primary`,children:[(0,M.jsx)(T,{children:(0,M.jsx)(_,{className:`sr-only`,value:`dark`})}),(0,M.jsx)(`div`,{className:`items-center rounded-md border-2 border-muted bg-popover p-1 hover:bg-accent hover:text-accent-foreground`,children:(0,M.jsxs)(`div`,{className:`space-y-2 rounded-sm bg-slate-950 p-2`,children:[(0,M.jsxs)(`div`,{className:`space-y-2 rounded-md bg-slate-800 p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-2 w-20 rounded-lg bg-slate-400`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-slate-400`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-slate-400`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-slate-400`})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-xs`,children:[(0,M.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-slate-400`}),(0,M.jsx)(`div`,{className:`h-2 w-25 rounded-lg bg-slate-400`})]})]})}),(0,M.jsx)(`span`,{className:`block w-full p-2 text-center font-normal`,children:t()})]})})]})]})}),(0,M.jsx)(f,{type:`submit`,children:i()})]})})}function F(){return(0,M.jsx)(A,{description:n(),title:e(),variant:`section`,children:(0,M.jsx)(P,{})})}var I=F;export{I as component};
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";var r=e(t(),1),i=n(),a=(0,r.createContext)({isTyping:!1,passwordLength:0,setIsTyping:()=>void 0,setPasswordLength:()=>void 0,setShowPassword:()=>void 0,showPassword:!1});function o({children:e}){let[t,n]=(0,r.useState)(!1),[o,s]=(0,r.useState)(!1),[c,l]=(0,r.useState)(0);return(0,i.jsx)(a.Provider,{value:{isTyping:t,passwordLength:c,setIsTyping:n,setPasswordLength:l,setShowPassword:s,showPassword:o},children:e})}function s(){return(0,r.useContext)(a)}export{s as n,o as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";var r=e(t(),1),i=n(),a=(0,r.createContext)({isTyping:!1,passwordLength:0,setIsTyping:()=>void 0,setPasswordLength:()=>void 0,setShowPassword:()=>void 0,showPassword:!1});function o({children:e}){let[t,n]=(0,r.useState)(!1),[o,s]=(0,r.useState)(!1),[c,l]=(0,r.useState)(0);return(0,i.jsx)(a.Provider,{value:{isTyping:t,passwordLength:c,setIsTyping:n,setPasswordLength:l,setShowPassword:s,showPassword:o},children:e})}function s(){return(0,r.useContext)(a)}export{s as n,o as t};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{i as t,o as n,r}from"./button-C0SPdqvs.js";var i=e(),a=r(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function o({className:e,variant:r=`default`,asChild:o=!1,...s}){return(0,i.jsx)(o?n:`span`,{className:t(a({variant:r}),e),"data-slot":`badge`,"data-variant":r,...s})}export{o as t};
|
import{em as e}from"./messages-Bp0bCjzp.js";import{i as t,o as n,r}from"./button-BgMnOYKD.js";var i=e(),a=r(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function o({className:e,variant:r=`default`,asChild:o=!1,...s}){return(0,i.jsx)(o?n:`span`,{className:t(a({variant:r}),e),"data-slot":`badge`,"data-variant":r,...s})}export{o as t};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{i as t}from"./button-C0SPdqvs.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),"data-slot":`card`,...r})}function i({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),"data-slot":`card-header`,...r})}function a({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`font-semibold leading-none`,e),"data-slot":`card-title`,...r})}function o({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`text-muted-foreground text-sm`,e),"data-slot":`card-description`,...r})}function s({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`px-6`,e),"data-slot":`card-content`,...r})}export{a,i,s as n,o as r,r as t};
|
import{em as e}from"./messages-Bp0bCjzp.js";import{i as t}from"./button-BgMnOYKD.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),"data-slot":`card`,...r})}function i({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),"data-slot":`card-header`,...r})}function a({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`font-semibold leading-none`,e),"data-slot":`card-title`,...r})}function o({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`text-muted-foreground text-sm`,e),"data-slot":`card-description`,...r})}function s({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`px-6`,e),"data-slot":`card-content`,...r})}export{a,i,s as n,o as r,r as t};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{a as t,d as n,f as r}from"./auth-store-paR9oIR_.js";import{t as i}from"./react-CO2uhaBc.js";import{t as a}from"./createLucideIcon-Br0Bd5k2.js";var o=a(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),s=e(i(),1),c=new n({chains:[],loading:!1});function l(e){c.setState(t=>({...t,chains:e}))}function u(e){c.setState(t=>({...t,loading:e}))}function d(){let e=r(c,e=>e.chains),n=r(c,e=>e.loading),i=t.useQuery(`get`,`/admin/api/v1/chains`);return(0,s.useEffect)(()=>{u(i.isLoading)},[i.isLoading]),(0,s.useEffect)(()=>{i.data?.data&&l(i.data.data)},[i.data?.data]),{chains:e,loading:n,refetch:i.refetch}}export{o as n,d as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{a as t,d as n,f as r}from"./auth-store-Csn6HPxJ.js";import{t as i}from"./react-CO2uhaBc.js";import{t as a}from"./createLucideIcon-Br0Bd5k2.js";var o=a(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),s=e(i(),1),c=new n({chains:[],loading:!1});function l(e){c.setState(t=>({...t,chains:e}))}function u(e){c.setState(t=>({...t,loading:e}))}function d(){let e=r(c,e=>e.chains),n=r(c,e=>e.loading),i=t.useQuery(`get`,`/admin/api/v1/chains`);return(0,s.useEffect)(()=>{u(i.isLoading)},[i.isLoading]),(0,s.useEffect)(()=>{i.data?.data&&l(i.data.data)},[i.data?.data]),{chains:e,loading:n,refetch:i.refetch}}export{o as n,d as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{t as r}from"./dist-XiAcd8rT.js";import{i,u as a}from"./button-C0SPdqvs.js";import{a as o,r as s,t as c}from"./dist-D343v8gR.js";import{t as l}from"./dist-C9d8iJDv.js";import{t as u}from"./dist-BixeH3nX.js";import{t as d}from"./dist-DJTK1B2D.js";import{t as f}from"./check-CHp0nSkR.js";var p=e(t(),1),m=n(),h=`Checkbox`,[g,_]=o(h),[v,y]=g(h);function b(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[g,_]=c({prop:n,defaultProp:i??!1,onChange:l,caller:h}),[y,b]=p.useState(null),[x,S]=p.useState(null),C=p.useRef(!1),w=y?!!o||!!y.closest(`form`):!0,T={checked:g,disabled:a,setChecked:_,control:y,setControl:b,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:k(i)?!1:i,isFormControl:w,bubbleInput:x,setBubbleInput:S};return(0,m.jsx)(v,{scope:t,...T,children:O(f)?f(T):r})}var x=`CheckboxTrigger`,S=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...i},o)=>{let{control:c,value:l,disabled:u,checked:d,required:f,setControl:h,setChecked:g,hasConsumerStoppedPropagationRef:_,isFormControl:v,bubbleInput:b}=y(x,e),S=a(o,h),C=p.useRef(d);return p.useEffect(()=>{let e=c?.form;if(e){let t=()=>g(C.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[c,g]),(0,m.jsx)(r.button,{type:`button`,role:`checkbox`,"aria-checked":k(d)?`mixed`:d,"aria-required":f,"data-state":A(d),"data-disabled":u?``:void 0,disabled:u,value:l,...i,ref:S,onKeyDown:s(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:s(n,e=>{g(e=>k(e)?!0:!e),b&&v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})})});S.displayName=x;var C=p.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,m.jsx)(b,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S,{...d,ref:t,__scopeCheckbox:n}),e&&(0,m.jsx)(D,{__scopeCheckbox:n})]})})});C.displayName=h;var w=`CheckboxIndicator`,T=p.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:i,...a}=e,o=y(w,n);return(0,m.jsx)(l,{present:i||k(o.checked)||o.checked===!0,children:(0,m.jsx)(r.span,{"data-state":A(o.checked),"data-disabled":o.disabled?``:void 0,...a,ref:t,style:{pointerEvents:`none`,...e.style}})})});T.displayName=w;var E=`CheckboxBubbleInput`,D=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:i,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:l,disabled:f,name:h,value:g,form:_,bubbleInput:v,setBubbleInput:b}=y(E,e),x=a(n,b),S=u(s),C=d(i);p.useEffect(()=>{let e=v;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!o.current;if(S!==s&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=k(s),n.call(e,k(s)?!1:s),e.dispatchEvent(t)}},[v,S,s,o]);let w=p.useRef(k(s)?!1:s);return(0,m.jsx)(r.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??w.current,required:l,disabled:f,name:h,value:g,form:_,...t,tabIndex:-1,ref:x,style:{...t.style,...C,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});D.displayName=E;function O(e){return typeof e==`function`}function k(e){return e===`indeterminate`}function A(e){return k(e)?`indeterminate`:e?`checked`:`unchecked`}function j({className:e,...t}){return(0,m.jsx)(C,{className:i(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40`,e),"data-slot":`checkbox`,...t,children:(0,m.jsx)(T,{className:`grid place-content-center text-current transition-none`,"data-slot":`checkbox-indicator`,children:(0,m.jsx)(f,{className:`size-3.5`})})})}export{j as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{t as r}from"./dist-BFnxq45V.js";import{i,u as a}from"./button-BgMnOYKD.js";import{a as o,r as s,t as c}from"./dist-CKFLmh1A.js";import{t as l}from"./dist-Clua1vrx.js";import{t as u}from"./dist-BixeH3nX.js";import{t as d}from"./dist-DGDEBCW9.js";import{t as f}from"./check-CHp0nSkR.js";var p=e(t(),1),m=n(),h=`Checkbox`,[g,_]=o(h),[v,y]=g(h);function b(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[g,_]=c({prop:n,defaultProp:i??!1,onChange:l,caller:h}),[y,b]=p.useState(null),[x,S]=p.useState(null),C=p.useRef(!1),w=y?!!o||!!y.closest(`form`):!0,T={checked:g,disabled:a,setChecked:_,control:y,setControl:b,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:k(i)?!1:i,isFormControl:w,bubbleInput:x,setBubbleInput:S};return(0,m.jsx)(v,{scope:t,...T,children:O(f)?f(T):r})}var x=`CheckboxTrigger`,S=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...i},o)=>{let{control:c,value:l,disabled:u,checked:d,required:f,setControl:h,setChecked:g,hasConsumerStoppedPropagationRef:_,isFormControl:v,bubbleInput:b}=y(x,e),S=a(o,h),C=p.useRef(d);return p.useEffect(()=>{let e=c?.form;if(e){let t=()=>g(C.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[c,g]),(0,m.jsx)(r.button,{type:`button`,role:`checkbox`,"aria-checked":k(d)?`mixed`:d,"aria-required":f,"data-state":A(d),"data-disabled":u?``:void 0,disabled:u,value:l,...i,ref:S,onKeyDown:s(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:s(n,e=>{g(e=>k(e)?!0:!e),b&&v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})})});S.displayName=x;var C=p.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,m.jsx)(b,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S,{...d,ref:t,__scopeCheckbox:n}),e&&(0,m.jsx)(D,{__scopeCheckbox:n})]})})});C.displayName=h;var w=`CheckboxIndicator`,T=p.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:i,...a}=e,o=y(w,n);return(0,m.jsx)(l,{present:i||k(o.checked)||o.checked===!0,children:(0,m.jsx)(r.span,{"data-state":A(o.checked),"data-disabled":o.disabled?``:void 0,...a,ref:t,style:{pointerEvents:`none`,...e.style}})})});T.displayName=w;var E=`CheckboxBubbleInput`,D=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:i,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:l,disabled:f,name:h,value:g,form:_,bubbleInput:v,setBubbleInput:b}=y(E,e),x=a(n,b),S=u(s),C=d(i);p.useEffect(()=>{let e=v;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!o.current;if(S!==s&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=k(s),n.call(e,k(s)?!1:s),e.dispatchEvent(t)}},[v,S,s,o]);let w=p.useRef(k(s)?!1:s);return(0,m.jsx)(r.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??w.current,required:l,disabled:f,name:h,value:g,form:_,...t,tabIndex:-1,ref:x,style:{...t.style,...C,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});D.displayName=E;function O(e){return typeof e==`function`}function k(e){return e===`indeterminate`}function A(e){return k(e)?`indeterminate`:e?`checked`:`unchecked`}function j({className:e,...t}){return(0,m.jsx)(C,{className:i(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40`,e),"data-slot":`checkbox`,...t,children:(0,m.jsx)(T,{className:`grid place-content-center text-current transition-none`,"data-slot":`checkbox-indicator`,children:(0,m.jsx)(f,{className:`size-3.5`})})})}export{j as t};
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
import{Mp as e,Np as t,Pp as n,Zp as r}from"./messages-BLwDcEAr.js";import{t as i}from"./telescope-DU0wiTDw.js";import{i as a,o,r as s,s as c,t as l}from"./dialog-iqE0q8bN.js";var u=r();function d({open:r,onOpenChange:d}){return(0,u.jsx)(l,{onOpenChange:d,open:r,children:(0,u.jsx)(s,{className:`sm:max-w-sm`,children:(0,u.jsxs)(o,{className:`items-center text-center`,children:[(0,u.jsx)(i,{className:`mb-2 size-12 text-muted-foreground`}),(0,u.jsx)(c,{children:n()}),(0,u.jsxs)(a,{children:[t(),(0,u.jsx)(`br`,{}),(0,u.jsx)(`p`,{className:`mt-2 text-center`,children:e()})]})]})})})}export{d as t};
|
import{Fp as e,Ip as t,Lp as n,em as r}from"./messages-Bp0bCjzp.js";import{t as i}from"./telescope-DU0wiTDw.js";import{i as a,o,r as s,s as c,t as l}from"./dialog-BJ5VA2v_.js";var u=r();function d({open:r,onOpenChange:d}){return(0,u.jsx)(l,{onOpenChange:d,open:r,children:(0,u.jsx)(s,{className:`sm:max-w-sm`,children:(0,u.jsxs)(o,{className:`items-center text-center`,children:[(0,u.jsx)(i,{className:`mb-2 size-12 text-muted-foreground`}),(0,u.jsx)(c,{children:n()}),(0,u.jsxs)(a,{children:[t(),(0,u.jsx)(`br`,{}),(0,u.jsx)(`p`,{className:`mt-2 text-center`,children:e()})]})]})})})}export{d as t};
|
||||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Gp as n,Kp as r,Zp as i}from"./messages-BLwDcEAr.js";import{c as a,i as o,t as s,u as c}from"./button-C0SPdqvs.js";import{a as l,r as u}from"./dist-D343v8gR.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as ee,t as v,u as y}from"./dist-BEGLjtzw.js";var b=e(t(),1),x=i(),S=`AlertDialog`,[C,te]=l(S,[y]),w=y(),T=e=>{let{__scopeAlertDialog:t,...n}=e,r=w(t);return(0,x.jsx)(g,{...r,...n,modal:!0})};T.displayName=S;var E=`AlertDialogTrigger`,D=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(f,{...i,...r,ref:t})});D.displayName=E;var O=`AlertDialogPortal`,k=e=>{let{__scopeAlertDialog:t,...n}=e,r=w(t);return(0,x.jsx)(d,{...r,...n})};k.displayName=O;var A=`AlertDialogOverlay`,j=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(p,{...i,...r,ref:t})});j.displayName=A;var M=`AlertDialogContent`,[N,P]=C(M),F=a(`AlertDialogContent`),I=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=w(n),o=b.useRef(null),s=c(t,o),l=b.useRef(null);return(0,x.jsx)(m,{contentName:M,titleName:L,docsSlug:`alert-dialog`,children:(0,x.jsx)(N,{scope:n,cancelRef:l,children:(0,x.jsxs)(h,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:u(i.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,x.jsx)(F,{children:r}),(0,x.jsx)(G,{contentRef:o})]})})})});I.displayName=M;var L=`AlertDialogTitle`,R=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(ee,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogDescription`,B=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(_,{...i,...r,ref:t})});B.displayName=z;var V=`AlertDialogAction`,H=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(v,{...i,...r,ref:t})});H.displayName=V;var U=`AlertDialogCancel`,W=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=P(U,n),a=w(n),o=c(t,i);return(0,x.jsx)(v,{...a,...r,ref:o})});W.displayName=U;var G=({contentRef:e})=>{let t=`\`${M}\` requires a description for the component to be accessible for screen reader users.
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Jp as n,Yp as r,em as i}from"./messages-Bp0bCjzp.js";import{c as a,i as o,t as s,u as c}from"./button-BgMnOYKD.js";import{a as l,r as u}from"./dist-CKFLmh1A.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as ee,t as v,u as y}from"./dist-CPQ-sRtL.js";var b=e(t(),1),x=i(),S=`AlertDialog`,[C,te]=l(S,[y]),w=y(),T=e=>{let{__scopeAlertDialog:t,...n}=e,r=w(t);return(0,x.jsx)(g,{...r,...n,modal:!0})};T.displayName=S;var E=`AlertDialogTrigger`,D=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(f,{...i,...r,ref:t})});D.displayName=E;var O=`AlertDialogPortal`,k=e=>{let{__scopeAlertDialog:t,...n}=e,r=w(t);return(0,x.jsx)(d,{...r,...n})};k.displayName=O;var A=`AlertDialogOverlay`,j=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(p,{...i,...r,ref:t})});j.displayName=A;var M=`AlertDialogContent`,[N,P]=C(M),F=a(`AlertDialogContent`),I=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=w(n),o=b.useRef(null),s=c(t,o),l=b.useRef(null);return(0,x.jsx)(m,{contentName:M,titleName:L,docsSlug:`alert-dialog`,children:(0,x.jsx)(N,{scope:n,cancelRef:l,children:(0,x.jsxs)(h,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:u(i.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,x.jsx)(F,{children:r}),(0,x.jsx)(G,{contentRef:o})]})})})});I.displayName=M;var L=`AlertDialogTitle`,R=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(ee,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogDescription`,B=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(_,{...i,...r,ref:t})});B.displayName=z;var V=`AlertDialogAction`,H=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=w(n);return(0,x.jsx)(v,{...i,...r,ref:t})});H.displayName=V;var U=`AlertDialogCancel`,W=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=P(U,n),a=w(n),o=c(t,i);return(0,x.jsx)(v,{...a,...r,ref:o})});W.displayName=U;var G=({contentRef:e})=>{let t=`\`${M}\` requires a description for the component to be accessible for screen reader users.
|
||||||
|
|
||||||
You can add a description to the \`${M}\` by passing a \`${z}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
You can add a description to the \`${M}\` by passing a \`${z}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||||
|
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";var r=e(t(),1);function i(e){let t=new Map,n=new Map;return{get(e){return t.get(e)},load(r){let i=t.get(r);if(i)return Promise.resolve(i);let a=n.get(r);if(a)return a;let o=e(r).then(e=>(t.set(r,e),e)).finally(()=>{n.delete(r)});return n.set(r,o),o}}}async function a(e,t,n){for(let n of e){let e=`${n.base}/${t}`;try{let t=await fetch(e,{signal:AbortSignal.timeout(3e3)});if(t.ok)return await t.json()}catch{}}return n}function o({cdnList:e,fallback:t,path:n}){return i(r=>a(e,n(r),t))}var s=`GMWalletApp/crypto-icons`,c=`latest`,l=[{base:`https://cdn.jsdmirror.com/gh/${s}@${c}`,name:`jsdmirror`},{base:`https://cdn.jsdelivr.net/gh/${s}@${c}`,name:`jsdelivr`},{base:`https://fastly.jsdelivr.net/gh/${s}@${c}`,name:`fastly.jsdelivr`},{base:`https://gcore.jsdelivr.net/gh/${s}@${c}`,name:`gcore.jsdelivr`}],u={exchange:`exchanges`,network:`networks`,token:`tokens`,wallet:`wallets`},d=o({cdnList:l,fallback:{},path:e=>`aliases/${u[e]}.json`}),f=o({cdnList:l,fallback:[],path:e=>`maps/${u[e]}.json`});function p(e){return String(e??``).trim().toLowerCase()}function m(e){return p(e).replace(/\s+/g,`-`)}function h(e){let t=e?.split(`:`).pop();return t?t.trim():``}function g(e){return[e.id,e.symbol,e.name,e.shortName,h(e.filePath)].map(e=>m(e??``)).filter(Boolean)}function _(e,t){let n=e.find(e=>g(e).includes(t));return n&&(h(n.filePath)||n.id||n.symbol)||null}async function v(e,t){let n=m(t);if(!n)return``;let[r,i]=await Promise.all([f.load(e),d.load(e)]),a=m(i[n]??``);return _(r,n)||(a?_(r,a):null)||i[n]||n}function y(e,t,n={}){let{variant:r=`branded`}=n,i=m(t);return i?`${l[0].base}/assets/${u[e]}/${r}/${i}.svg`:null}async function b(e,t,n={}){let{variant:r=`branded`}=n,i=await v(e,t),a=`assets/${u[e]}/${r}/${i}.svg`;for(let e of l){let t=`${e.base}/${a}`;try{if((await fetch(t,{method:`HEAD`,signal:AbortSignal.timeout(2500)})).ok)return{url:t}}catch{}}return{url:`${l[0].base}/${a}`}}function x(e,t){return t?.trim()||e||`--`}var S=n();function C({type:e,name:t,variant:n=`branded`,size:i=16,width:a,height:o,className:s,alt:c,style:l,onError:u,...d}){let f=y(e,t,{variant:n}),[p,m]=(0,r.useState)(null),[h,g]=(0,r.useState)(f),_=h??f,v=a??i,x=o??i;return(0,r.useEffect)(()=>{let r=!1;return m(null),g(y(e,t,{variant:n})),b(e,t,{variant:n}).then(e=>{r||g(e.url)}),()=>{r=!0}},[t,e,n]),!(_&&t)||p===_?null:(0,S.jsx)(`img`,{alt:c??``,className:s,height:x,onError:e=>{m(_),u?.(e)},src:_,style:{display:`inline-block`,...l},width:v,...d})}export{p as a,l as i,x as n,v as o,u as r,o as s,C as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";var r=e(t(),1);function i(e){let t=new Map,n=new Map;return{get(e){return t.get(e)},load(r){let i=t.get(r);if(i)return Promise.resolve(i);let a=n.get(r);if(a)return a;let o=e(r).then(e=>(t.set(r,e),e)).finally(()=>{n.delete(r)});return n.set(r,o),o}}}async function a(e,t,n){for(let n of e){let e=`${n.base}/${t}`;try{let t=await fetch(e,{signal:AbortSignal.timeout(3e3)});if(t.ok)return await t.json()}catch{}}return n}function o({cdnList:e,fallback:t,path:n}){return i(r=>a(e,n(r),t))}var s=`GMWalletApp/crypto-icons`,c=`latest`,l=[{base:`https://cdn.jsdmirror.com/gh/${s}@${c}`,name:`jsdmirror`},{base:`https://cdn.jsdelivr.net/gh/${s}@${c}`,name:`jsdelivr`},{base:`https://fastly.jsdelivr.net/gh/${s}@${c}`,name:`fastly.jsdelivr`},{base:`https://gcore.jsdelivr.net/gh/${s}@${c}`,name:`gcore.jsdelivr`}],u={exchange:`exchanges`,network:`networks`,token:`tokens`,wallet:`wallets`},d=o({cdnList:l,fallback:{},path:e=>`aliases/${u[e]}.json`}),f=o({cdnList:l,fallback:[],path:e=>`maps/${u[e]}.json`});function p(e){return String(e??``).trim().toLowerCase()}function m(e){return p(e).replace(/\s+/g,`-`)}function h(e){let t=e?.split(`:`).pop();return t?t.trim():``}function g(e){return[e.id,e.symbol,e.name,e.shortName,h(e.filePath)].map(e=>m(e??``)).filter(Boolean)}function _(e,t){let n=e.find(e=>g(e).includes(t));return n&&(h(n.filePath)||n.id||n.symbol)||null}async function v(e,t){let n=m(t);if(!n)return``;let[r,i]=await Promise.all([f.load(e),d.load(e)]),a=m(i[n]??``);return _(r,n)||(a?_(r,a):null)||i[n]||n}function y(e,t,n={}){let{variant:r=`branded`}=n,i=m(t);return i?`${l[0].base}/assets/${u[e]}/${r}/${i}.svg`:null}async function b(e,t,n={}){let{variant:r=`branded`}=n,i=await v(e,t),a=`assets/${u[e]}/${r}/${i}.svg`;for(let e of l){let t=`${e.base}/${a}`;try{if((await fetch(t,{method:`HEAD`,signal:AbortSignal.timeout(2500)})).ok)return{url:t}}catch{}}return{url:`${l[0].base}/${a}`}}function x(e,t){return t?.trim()||e||`--`}var S=n();function C({type:e,name:t,variant:n=`branded`,size:i=16,width:a,height:o,className:s,alt:c,style:l,onError:u,...d}){let f=y(e,t,{variant:n}),[p,m]=(0,r.useState)(null),[h,g]=(0,r.useState)(f),_=h??f,v=a??i,x=o??i;return(0,r.useEffect)(()=>{let r=!1;return m(null),g(y(e,t,{variant:n})),b(e,t,{variant:n}).then(e=>{r||g(e.url)}),()=>{r=!0}},[t,e,n]),!(_&&t)||p===_?null:(0,S.jsx)(`img`,{alt:c??``,className:s,height:x,onError:e=>{m(_),u?.(e)},src:_,style:{display:`inline-block`,...l},width:v,...d})}export{p as a,l as i,x as n,v as o,u as r,o as s,C as t};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{i as t,t as n}from"./button-C0SPdqvs.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./dist-BEGLjtzw.js";import{t as d}from"./createLucideIcon-Br0Bd5k2.js";var f=d(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),p=e();function m({...e}){return(0,p.jsx)(s,{"data-slot":`dialog`,...e})}function h({...e}){return(0,p.jsx)(i,{"data-slot":`dialog-trigger`,...e})}function g({...e}){return(0,p.jsx)(r,{"data-slot":`dialog-portal`,...e})}function _({...e}){return(0,p.jsx)(u,{"data-slot":`dialog-close`,...e})}function v({className:e,...n}){return(0,p.jsx)(a,{className:t(`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`,e),"data-slot":`dialog-overlay`,...n})}function y({className:e,children:n,showCloseButton:r=!0,...i}){return(0,p.jsxs)(g,{"data-slot":`dialog-portal`,children:[(0,p.jsx)(v,{}),(0,p.jsxs)(o,{className:t(`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg`,e),"data-slot":`dialog-content`,...i,children:[n,r&&(0,p.jsxs)(u,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`dialog-close`,children:[(0,p.jsx)(f,{}),(0,p.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function b({className:e,...n}){return(0,p.jsx)(`div`,{className:t(`flex flex-col gap-2 text-center sm:text-left`,e),"data-slot":`dialog-header`,...n})}function x({className:e,showCloseButton:r=!1,children:i,...a}){return(0,p.jsxs)(`div`,{className:t(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),"data-slot":`dialog-footer`,...a,children:[i,r&&(0,p.jsx)(u,{asChild:!0,children:(0,p.jsx)(n,{variant:`outline`,children:`Close`})})]})}function S({className:e,...n}){return(0,p.jsx)(l,{className:t(`font-semibold text-lg leading-none`,e),"data-slot":`dialog-title`,...n})}function C({className:e,...n}){return(0,p.jsx)(c,{className:t(`text-muted-foreground text-sm`,e),"data-slot":`dialog-description`,...n})}export{x as a,h as c,C as i,f as l,_ as n,b as o,y as r,S as s,m as t};
|
import{em as e}from"./messages-Bp0bCjzp.js";import{i as t,t as n}from"./button-BgMnOYKD.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./dist-CPQ-sRtL.js";import{t as d}from"./createLucideIcon-Br0Bd5k2.js";var f=d(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),p=e();function m({...e}){return(0,p.jsx)(s,{"data-slot":`dialog`,...e})}function h({...e}){return(0,p.jsx)(i,{"data-slot":`dialog-trigger`,...e})}function g({...e}){return(0,p.jsx)(r,{"data-slot":`dialog-portal`,...e})}function _({...e}){return(0,p.jsx)(u,{"data-slot":`dialog-close`,...e})}function v({className:e,...n}){return(0,p.jsx)(a,{className:t(`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`,e),"data-slot":`dialog-overlay`,...n})}function y({className:e,children:n,showCloseButton:r=!0,...i}){return(0,p.jsxs)(g,{"data-slot":`dialog-portal`,children:[(0,p.jsx)(v,{}),(0,p.jsxs)(o,{className:t(`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg`,e),"data-slot":`dialog-content`,...i,children:[n,r&&(0,p.jsxs)(u,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`dialog-close`,children:[(0,p.jsx)(f,{}),(0,p.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function b({className:e,...n}){return(0,p.jsx)(`div`,{className:t(`flex flex-col gap-2 text-center sm:text-left`,e),"data-slot":`dialog-header`,...n})}function x({className:e,showCloseButton:r=!1,children:i,...a}){return(0,p.jsxs)(`div`,{className:t(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),"data-slot":`dialog-footer`,...a,children:[i,r&&(0,p.jsx)(u,{asChild:!0,children:(0,p.jsx)(n,{variant:`outline`,children:`Close`})})]})}function S({className:e,...n}){return(0,p.jsx)(l,{className:t(`font-semibold text-lg leading-none`,e),"data-slot":`dialog-title`,...n})}function C({className:e,...n}){return(0,p.jsx)(c,{className:t(`text-muted-foreground text-sm`,e),"data-slot":`dialog-description`,...n})}export{x as a,h as c,C as i,f as l,_ as n,b as o,y as r,S as s,m as t};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{an as e,cn as t,dn as n,em as r,fn as i,gn as a,hn as o,ln as s,mn as c,on as l,pn as u,sn as d,un as f}from"./messages-Bp0bCjzp.js";import{t as p}from"./button-BgMnOYKD.js";import{t as m}from"./checkbox-CKrZFk1G.js";import{c as h,i as g,s as _}from"./zod-rwFXxHlg.js";import{a as v,c as y,i as b,l as x,n as S,o as C,r as w,s as T,t as E}from"./form-BhKmyN6D.js";import{t as D}from"./page-header-CDwG3nxs.js";import{t as O}from"./show-submitted-data-C8ocsjDF.js";var k=r(),A=[{id:`recents`,label:c()},{id:`home`,label:u()},{id:`applications`,label:i()},{id:`desktop`,label:n()},{id:`downloads`,label:f()},{id:`documents`,label:s()}],j=_({items:g(h()).refine(e=>e.some(e=>e),{message:t()})}),M={items:[`recents`,`home`]};function N(){let t=x({resolver:y(j),defaultValues:M});return(0,k.jsx)(E,{...t,children:(0,k.jsxs)(`form`,{className:`space-y-8`,onSubmit:t.handleSubmit(e=>O(e)),children:[(0,k.jsx)(b,{control:t.control,name:`items`,render:()=>(0,k.jsxs)(v,{children:[(0,k.jsxs)(`div`,{className:`mb-4`,children:[(0,k.jsx)(C,{className:`text-base`,children:d()}),(0,k.jsx)(w,{children:l()})]}),A.map(e=>(0,k.jsx)(b,{control:t.control,name:`items`,render:({field:t})=>(0,k.jsxs)(v,{className:`flex flex-row items-start`,children:[(0,k.jsx)(S,{children:(0,k.jsx)(m,{checked:t.value?.includes(e.id),onCheckedChange:n=>n?t.onChange([...t.value,e.id]):t.onChange(t.value?.filter(t=>t!==e.id))})}),(0,k.jsx)(C,{className:`font-normal`,children:e.label})]},e.id)},e.id)),(0,k.jsx)(T,{})]})}),(0,k.jsx)(p,{type:`submit`,children:e()})]})})}function P(){return(0,k.jsx)(D,{description:o(),title:a(),variant:`section`,children:(0,k.jsx)(N,{})})}var F=P;export{F as component};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{Zp as e,an as t,cn as n,dn as r,fn as i,gn as a,hn as o,ln as s,mn as c,on as l,pn as u,sn as d,un as f}from"./messages-BLwDcEAr.js";import{t as p}from"./button-C0SPdqvs.js";import{t as m}from"./checkbox-BWQ1sC3Y.js";import{c as h,i as g,s as _}from"./zod-rwFXxHlg.js";import{a as v,c as y,i as b,l as x,n as S,o as C,r as w,s as T,t as E}from"./form-fulEvgfz.js";import{t as D}from"./page-header-5Y8t-L2D.js";import{t as O}from"./show-submitted-data-COdV4uz4.js";var k=e(),A=[{id:`recents`,label:c()},{id:`home`,label:u()},{id:`applications`,label:i()},{id:`desktop`,label:r()},{id:`downloads`,label:f()},{id:`documents`,label:s()}],j=_({items:g(h()).refine(e=>e.some(e=>e),{message:n()})}),M={items:[`recents`,`home`]};function N(){let e=x({resolver:y(j),defaultValues:M});return(0,k.jsx)(E,{...e,children:(0,k.jsxs)(`form`,{className:`space-y-8`,onSubmit:e.handleSubmit(e=>O(e)),children:[(0,k.jsx)(b,{control:e.control,name:`items`,render:()=>(0,k.jsxs)(v,{children:[(0,k.jsxs)(`div`,{className:`mb-4`,children:[(0,k.jsx)(C,{className:`text-base`,children:d()}),(0,k.jsx)(w,{children:l()})]}),A.map(t=>(0,k.jsx)(b,{control:e.control,name:`items`,render:({field:e})=>(0,k.jsxs)(v,{className:`flex flex-row items-start`,children:[(0,k.jsx)(S,{children:(0,k.jsx)(m,{checked:e.value?.includes(t.id),onCheckedChange:n=>n?e.onChange([...e.value,t.id]):e.onChange(e.value?.filter(e=>e!==t.id))})}),(0,k.jsx)(C,{className:`font-normal`,children:t.label})]},t.id)},t.id)),(0,k.jsx)(T,{})]})}),(0,k.jsx)(p,{type:`submit`,children:t()})]})})}function P(){return(0,k.jsx)(D,{description:o(),title:a(),variant:`section`,children:(0,k.jsx)(N,{})})}var F=P;export{F as component};
|
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{t as r}from"./dist-XiAcd8rT.js";import{u as i}from"./button-C0SPdqvs.js";import{a,r as o,t as s}from"./dist-D343v8gR.js";import{t as c}from"./dist-C9d8iJDv.js";import{n as l}from"./dist-CYQVWHzW.js";import{t as u}from"./dist-BixeH3nX.js";import{t as d}from"./dist-DJTK1B2D.js";import{n as f,r as p,t as m}from"./dist-DNb3IZ7I.js";var h=e(t(),1),g=n(),_=`Radio`,[v,y]=a(_),[b,x]=v(_),S=h.forwardRef((e,t)=>{let{__scopeRadio:n,name:a,checked:s=!1,required:c,disabled:l,value:u=`on`,onCheck:d,form:f,...p}=e,[m,_]=h.useState(null),v=i(t,e=>_(e)),y=h.useRef(!1),x=m?f||!!m.closest(`form`):!0;return(0,g.jsxs)(b,{scope:n,checked:s,disabled:l,children:[(0,g.jsx)(r.button,{type:`button`,role:`radio`,"aria-checked":s,"data-state":D(s),"data-disabled":l?``:void 0,disabled:l,value:u,...p,ref:v,onClick:o(e.onClick,e=>{s||d?.(),x&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),x&&(0,g.jsx)(E,{control:m,bubbles:!y.current,name:a,value:u,checked:s,required:c,disabled:l,form:f,style:{transform:`translateX(-100%)`}})]})});S.displayName=_;var C=`RadioIndicator`,w=h.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:i,...a}=e,o=x(C,n);return(0,g.jsx)(c,{present:i||o.checked,children:(0,g.jsx)(r.span,{"data-state":D(o.checked),"data-disabled":o.disabled?``:void 0,...a,ref:t})})});w.displayName=C;var T=`RadioBubbleInput`,E=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:a=!0,...o},s)=>{let c=h.useRef(null),l=i(c,s),f=u(n),p=d(t);return h.useEffect(()=>{let e=c.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`checked`).set;if(f!==n&&r){let t=new Event(`click`,{bubbles:a});r.call(e,n),e.dispatchEvent(t)}},[f,n,a]),(0,g.jsx)(r.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...p,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});E.displayName=T;function D(e){return e?`checked`:`unchecked`}var O=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],k=`RadioGroup`,[A,j]=a(k,[p,y]),M=p(),N=y(),[P,F]=A(k),I=h.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:i,defaultValue:a,value:o,required:c=!1,disabled:u=!1,orientation:d,dir:p,loop:m=!0,onValueChange:h,..._}=e,v=M(n),y=l(p),[b,x]=s({prop:o,defaultProp:a??null,onChange:h,caller:k});return(0,g.jsx)(P,{scope:n,name:i,required:c,disabled:u,value:b,onValueChange:x,children:(0,g.jsx)(f,{asChild:!0,...v,orientation:d,dir:y,loop:m,children:(0,g.jsx)(r.div,{role:`radiogroup`,"aria-required":c,"aria-orientation":d,"data-disabled":u?``:void 0,dir:y,..._,ref:t})})})});I.displayName=k;var L=`RadioGroupItem`,R=h.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...a}=e,s=F(L,n),c=s.disabled||r,l=M(n),u=N(n),d=h.useRef(null),f=i(t,d),p=s.value===a.value,_=h.useRef(!1);return h.useEffect(()=>{let e=e=>{O.includes(e.key)&&(_.current=!0)},t=()=>_.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,g.jsx)(m,{asChild:!0,...l,focusable:!c,active:p,children:(0,g.jsx)(S,{disabled:c,required:s.required,checked:p,...u,...a,name:s.name,ref:f,onCheck:()=>s.onValueChange(a.value),onKeyDown:o(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:o(a.onFocus,()=>{_.current&&d.current?.click()})})})});R.displayName=L;var z=`RadioGroupIndicator`,B=h.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,g.jsx)(w,{...N(n),...r,ref:t})});B.displayName=z;var V=I,H=R,U=B;export{H as n,V as r,U as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{t as r}from"./dist-BFnxq45V.js";import{u as i}from"./button-BgMnOYKD.js";import{a,r as o,t as s}from"./dist-CKFLmh1A.js";import{t as c}from"./dist-Clua1vrx.js";import{n as l}from"./dist-C97YBjnT.js";import{t as u}from"./dist-BixeH3nX.js";import{t as d}from"./dist-DGDEBCW9.js";import{n as f,r as p,t as m}from"./dist-D7AUoOWu.js";var h=e(t(),1),g=n(),_=`Radio`,[v,y]=a(_),[b,x]=v(_),S=h.forwardRef((e,t)=>{let{__scopeRadio:n,name:a,checked:s=!1,required:c,disabled:l,value:u=`on`,onCheck:d,form:f,...p}=e,[m,_]=h.useState(null),v=i(t,e=>_(e)),y=h.useRef(!1),x=m?f||!!m.closest(`form`):!0;return(0,g.jsxs)(b,{scope:n,checked:s,disabled:l,children:[(0,g.jsx)(r.button,{type:`button`,role:`radio`,"aria-checked":s,"data-state":D(s),"data-disabled":l?``:void 0,disabled:l,value:u,...p,ref:v,onClick:o(e.onClick,e=>{s||d?.(),x&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),x&&(0,g.jsx)(E,{control:m,bubbles:!y.current,name:a,value:u,checked:s,required:c,disabled:l,form:f,style:{transform:`translateX(-100%)`}})]})});S.displayName=_;var C=`RadioIndicator`,w=h.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:i,...a}=e,o=x(C,n);return(0,g.jsx)(c,{present:i||o.checked,children:(0,g.jsx)(r.span,{"data-state":D(o.checked),"data-disabled":o.disabled?``:void 0,...a,ref:t})})});w.displayName=C;var T=`RadioBubbleInput`,E=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:a=!0,...o},s)=>{let c=h.useRef(null),l=i(c,s),f=u(n),p=d(t);return h.useEffect(()=>{let e=c.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`checked`).set;if(f!==n&&r){let t=new Event(`click`,{bubbles:a});r.call(e,n),e.dispatchEvent(t)}},[f,n,a]),(0,g.jsx)(r.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...p,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});E.displayName=T;function D(e){return e?`checked`:`unchecked`}var O=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],k=`RadioGroup`,[A,j]=a(k,[p,y]),M=p(),N=y(),[P,F]=A(k),I=h.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:i,defaultValue:a,value:o,required:c=!1,disabled:u=!1,orientation:d,dir:p,loop:m=!0,onValueChange:h,..._}=e,v=M(n),y=l(p),[b,x]=s({prop:o,defaultProp:a??null,onChange:h,caller:k});return(0,g.jsx)(P,{scope:n,name:i,required:c,disabled:u,value:b,onValueChange:x,children:(0,g.jsx)(f,{asChild:!0,...v,orientation:d,dir:y,loop:m,children:(0,g.jsx)(r.div,{role:`radiogroup`,"aria-required":c,"aria-orientation":d,"data-disabled":u?``:void 0,dir:y,..._,ref:t})})})});I.displayName=k;var L=`RadioGroupItem`,R=h.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...a}=e,s=F(L,n),c=s.disabled||r,l=M(n),u=N(n),d=h.useRef(null),f=i(t,d),p=s.value===a.value,_=h.useRef(!1);return h.useEffect(()=>{let e=e=>{O.includes(e.key)&&(_.current=!0)},t=()=>_.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,g.jsx)(m,{asChild:!0,...l,focusable:!c,active:p,children:(0,g.jsx)(S,{disabled:c,required:s.required,checked:p,...u,...a,name:s.name,ref:f,onCheck:()=>s.onValueChange(a.value),onKeyDown:o(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:o(a.onFocus,()=>{_.current&&d.current?.click()})})})});R.displayName=L;var z=`RadioGroupIndicator`,B=h.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,g.jsx)(w,{...N(n),...r,ref:t})});B.displayName=z;var V=I,H=R,U=B;export{H as n,V as r,U as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{n}from"./dist-D343v8gR.js";var r=e(t(),1),i=r.useId||(()=>void 0),a=0;function o(e){let[t,o]=r.useState(i());return n(()=>{e||o(e=>e??String(a++))},[e]),e||(t?`radix-${t}`:``)}function s(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}export{o as n,s as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{n}from"./dist-CKFLmh1A.js";var r=e(t(),1),i=r.useId||(()=>void 0),a=0;function o(e){let[t,o]=r.useState(i());return n(()=>{e||o(e=>e??String(a++))},[e]),e||(t?`radix-${t}`:``)}function s(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}export{o as n,s as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e,t}from"./chunk-DECur_0Z.js";import{t as n}from"./react-CO2uhaBc.js";import{Zp as r}from"./messages-BLwDcEAr.js";import{s as i}from"./button-C0SPdqvs.js";var a=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),o=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e(n(),1),c=e(o(),1),l=r(),u=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,l.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function d(e,t){e&&c.flushSync(()=>e.dispatchEvent(t))}export{d as n,o as r,u as t};
|
import{r as e,t}from"./chunk-DECur_0Z.js";import{t as n}from"./react-CO2uhaBc.js";import{em as r}from"./messages-Bp0bCjzp.js";import{s as i}from"./button-BgMnOYKD.js";var a=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),o=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e(n(),1),c=e(o(),1),l=r(),u=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,l.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function d(e,t){e&&c.flushSync(()=>e.dispatchEvent(t))}export{d as n,o as r,u as t};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{t as r}from"./dist-XiAcd8rT.js";var i=e(t(),1),a=n(),o=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),s=`VisuallyHidden`,c=i.forwardRef((e,t)=>(0,a.jsx)(r.span,{...e,ref:t,style:{...o,...e.style}}));c.displayName=s;var l=c;export{o as n,l as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{t as r}from"./dist-BFnxq45V.js";var i=e(t(),1),a=n(),o=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),s=`VisuallyHidden`,c=i.forwardRef((e,t)=>(0,a.jsx)(r.span,{...e,ref:t,style:{...o,...e.style}}));c.displayName=s;var l=c;export{o as n,l as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{s as r,u as i}from"./button-C0SPdqvs.js";import{a}from"./dist-D343v8gR.js";var o=e(t(),1),s=n();function c(e){let t=e+`CollectionProvider`,[n,c]=a(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=r(f),m=o.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,s.jsx)(p,{ref:i(t,u(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=r(h),v=o.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,c=o.useRef(null),l=i(t,c),d=u(h,n);return o.useEffect(()=>(d.itemMap.set(c,{ref:c,...a}),()=>void d.itemMap.delete(c))),(0,s.jsx)(_,{[g]:``,ref:l,children:r})});v.displayName=h;function y(t){let n=u(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,c]}export{c as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{s as r,u as i}from"./button-BgMnOYKD.js";import{a}from"./dist-CKFLmh1A.js";var o=e(t(),1),s=n();function c(e){let t=e+`CollectionProvider`,[n,c]=a(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=r(f),m=o.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,s.jsx)(p,{ref:i(t,u(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=r(h),v=o.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,c=o.useRef(null),l=i(t,c),d=u(h,n);return o.useEffect(()=>(d.itemMap.set(c,{ref:c,...a}),()=>void d.itemMap.delete(c))),(0,s.jsx)(_,{[g]:``,ref:l,children:r})});v.displayName=h;function y(t){let n=u(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,c]}export{c as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let{dir:t,children:n}=e;return(0,i.jsx)(a.Provider,{value:t,children:n})};function s(e){let t=r.useContext(a);return e||t||`ltr`}export{s as n,o as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let{dir:t,children:n}=e;return(0,i.jsx)(a.Provider,{value:t,children:n})};function s(e){let t=r.useContext(a);return e||t||`ltr`}export{s as n,o as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";var r=e(t(),1),i=n();function a(e,t){let n=r.createContext(t),a=e=>{let{children:t,...a}=e,o=r.useMemo(()=>a,Object.values(a));return(0,i.jsx)(n.Provider,{value:o,children:t})};a.displayName=e+`Provider`;function o(i){let a=r.useContext(n);if(a)return a;if(t!==void 0)return t;throw Error(`\`${i}\` must be used within \`${e}\``)}return[a,o]}function o(e,t=[]){let n=[];function a(t,a){let o=r.createContext(a),s=n.length;n=[...n,a];let c=t=>{let{scope:n,children:a,...c}=t,l=n?.[e]?.[s]||o,u=r.useMemo(()=>c,Object.values(c));return(0,i.jsx)(l.Provider,{value:u,children:a})};c.displayName=t+`Provider`;function l(n,i){let c=i?.[e]?.[s]||o,l=r.useContext(c);if(l)return l;if(a!==void 0)return a;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[a,s(o,...t)]}function s(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var l=globalThis?.document?r.useLayoutEffect:()=>{},u=r.useInsertionEffect||l;function d({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){let[a,o,s]=f({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:a;{let t=r.useRef(e!==void 0);r.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${i} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,i])}return[l,r.useCallback(t=>{if(c){let n=p(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function f({defaultProp:e,onChange:t}){let[n,i]=r.useState(e),a=r.useRef(n),o=r.useRef(t);return u(()=>{o.current=t},[t]),r.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}function p(e){return typeof e==`function`}export{o as a,a as i,l as n,c as r,d as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";var r=e(t(),1),i=n();function a(e,t){let n=r.createContext(t),a=e=>{let{children:t,...a}=e,o=r.useMemo(()=>a,Object.values(a));return(0,i.jsx)(n.Provider,{value:o,children:t})};a.displayName=e+`Provider`;function o(i){let a=r.useContext(n);if(a)return a;if(t!==void 0)return t;throw Error(`\`${i}\` must be used within \`${e}\``)}return[a,o]}function o(e,t=[]){let n=[];function a(t,a){let o=r.createContext(a),s=n.length;n=[...n,a];let c=t=>{let{scope:n,children:a,...c}=t,l=n?.[e]?.[s]||o,u=r.useMemo(()=>c,Object.values(c));return(0,i.jsx)(l.Provider,{value:u,children:a})};c.displayName=t+`Provider`;function l(n,i){let c=i?.[e]?.[s]||o,l=r.useContext(c);if(l)return l;if(a!==void 0)return a;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[a,s(o,...t)]}function s(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var l=globalThis?.document?r.useLayoutEffect:()=>{},u=r.useInsertionEffect||l;function d({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){let[a,o,s]=f({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:a;{let t=r.useRef(e!==void 0);r.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${i} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,i])}return[l,r.useCallback(t=>{if(c){let n=p(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function f({defaultProp:e,onChange:t}){let[n,i]=r.useState(e),a=r.useRef(n),o=r.useRef(t);return u(()=>{o.current=t},[t]),r.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}function p(e){return typeof e==`function`}export{o as a,a as i,l as n,c as r,d as t};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{t as r}from"./dist-XiAcd8rT.js";import{s as i,u as a}from"./button-C0SPdqvs.js";import{a as o,i as s,r as c,t as l}from"./dist-D343v8gR.js";import{t as u}from"./dist-C9d8iJDv.js";import{n as d}from"./dist-BphrRiSn.js";import{n as f,t as p}from"./dist-Cd7-TPaR.js";import{i as m,n as h,r as g,t as _}from"./es2015-hwcIKy2q.js";var v=e(t(),1),y=n(),b=`Dialog`,[x,S]=o(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[u,f]=l({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:d(),titleId:d(),descriptionId:d(),open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,o=w(E,n),s=a(t,o.triggerRef);return(0,y.jsx)(r.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.contentId,"data-state":q(o.open),...i,ref:s,onClick:c(e.onClick,o.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(u,{present:n||a.open,children:(0,y.jsx)(p,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(u,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=i(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(M,n);return(0,y.jsx)(h,{as:P,allowPinchZoom:!0,shards:[a.contentRef],children:(0,y.jsx)(r.div,{"data-state":q(a.open),...i,ref:t,style:{pointerEvents:`auto`,...i.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(u,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),i=a(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return _(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:c(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,c=w(I,n),l=v.useRef(null),u=a(t,l);return g(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,y.jsx)(f,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:c.titleId}),(0,y.jsx)($,{contentRef:l,descriptionId:c.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(V,n);return(0,y.jsx)(r.h2,{id:a.titleId,...i,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(U,n);return(0,y.jsx)(r.p,{id:a.descriptionId,...i,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(G,n);return(0,y.jsx)(r.button,{type:`button`,...i,ref:t,onClick:c(e.onClick,()=>a.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=s(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{t as r}from"./dist-BFnxq45V.js";import{s as i,u as a}from"./button-BgMnOYKD.js";import{a as o,i as s,r as c,t as l}from"./dist-CKFLmh1A.js";import{t as u}from"./dist-Clua1vrx.js";import{n as d}from"./dist-B0ikDpJU.js";import{n as f,t as p}from"./dist-_ND6L-P3.js";import{i as m,n as h,r as g,t as _}from"./es2015-D8VLlhse.js";var v=e(t(),1),y=n(),b=`Dialog`,[x,S]=o(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[u,f]=l({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:d(),titleId:d(),descriptionId:d(),open:u,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,o=w(E,n),s=a(t,o.triggerRef);return(0,y.jsx)(r.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.contentId,"data-state":q(o.open),...i,ref:s,onClick:c(e.onClick,o.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(u,{present:n||a.open,children:(0,y.jsx)(p,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(u,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=i(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(M,n);return(0,y.jsx)(h,{as:P,allowPinchZoom:!0,shards:[a.contentRef],children:(0,y.jsx)(r.div,{"data-state":q(a.open),...i,ref:t,style:{pointerEvents:`auto`,...i.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(u,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),i=a(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return _(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:c(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,c=w(I,n),l=v.useRef(null),u=a(t,l);return g(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,y.jsx)(f,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:c.titleId}),(0,y.jsx)($,{contentRef:l,descriptionId:c.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(V,n);return(0,y.jsx)(r.h2,{id:a.titleId,...i,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(U,n);return(0,y.jsx)(r.p,{id:a.descriptionId,...i,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=w(G,n);return(0,y.jsx)(r.button,{type:`button`,...i,ref:t,onClick:c(e.onClick,()=>a.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=s(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
||||||
|
|
||||||
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||||
|
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{u as n}from"./button-C0SPdqvs.js";import{n as r}from"./dist-D343v8gR.js";var i=e(t(),1);function a(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}var o=e=>{let{present:t,children:r}=e,a=s(t),o=typeof r==`function`?r({present:a.isPresent}):i.Children.only(r),c=n(a.ref,l(o));return typeof r==`function`||a.isPresent?i.cloneElement(o,{ref:c}):null};o.displayName=`Presence`;function s(e){let[t,n]=i.useState(),o=i.useRef(null),s=i.useRef(e),l=i.useRef(`none`),[u,d]=a(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{let e=c(o.current);l.current=u===`mounted`?e:`none`},[u]),r(()=>{let t=o.current,n=s.current;if(n!==e){let r=l.current,i=c(t);e?d(`MOUNT`):i===`none`||t?.display===`none`?d(`UNMOUNT`):d(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),s.current=e}},[e,d]),r(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let i=c(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(d(`ANIMATION_END`),!s.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(l.current=c(o.current))};return t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else d(`ANIMATION_END`)},[t,d]),{isPresent:[`mounted`,`unmountSuspended`].includes(u),ref:i.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}function c(e){return e?.animationName||`none`}function l(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{o as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{u as n}from"./button-BgMnOYKD.js";import{n as r}from"./dist-CKFLmh1A.js";var i=e(t(),1);function a(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}var o=e=>{let{present:t,children:r}=e,a=s(t),o=typeof r==`function`?r({present:a.isPresent}):i.Children.only(r),c=n(a.ref,l(o));return typeof r==`function`||a.isPresent?i.cloneElement(o,{ref:c}):null};o.displayName=`Presence`;function s(e){let[t,n]=i.useState(),o=i.useRef(null),s=i.useRef(e),l=i.useRef(`none`),[u,d]=a(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{let e=c(o.current);l.current=u===`mounted`?e:`none`},[u]),r(()=>{let t=o.current,n=s.current;if(n!==e){let r=l.current,i=c(t);e?d(`MOUNT`):i===`none`||t?.display===`none`?d(`UNMOUNT`):d(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),s.current=e}},[e,d]),r(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let i=c(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(d(`ANIMATION_END`),!s.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(l.current=c(o.current))};return t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else d(`ANIMATION_END`)},[t,d]),{isPresent:[`mounted`,`unmountSuspended`].includes(u),ref:i.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}function c(e){return e?.animationName||`none`}function l(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{o as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{t as r}from"./dist-XiAcd8rT.js";import{u as i}from"./button-C0SPdqvs.js";import{a,r as o,t as s}from"./dist-D343v8gR.js";import{t as c}from"./dist-THZWKIyP.js";import{n as l,t as u}from"./dist-BphrRiSn.js";import{n as d}from"./dist-CYQVWHzW.js";var f=e(t(),1),p=n(),m=`rovingFocusGroup.onEntryFocus`,h={bubbles:!1,cancelable:!0},g=`RovingFocusGroup`,[_,v,y]=c(g),[b,x]=a(g,[y]),[S,C]=b(g),w=f.forwardRef((e,t)=>(0,p.jsx)(_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(T,{...e,ref:t})})}));w.displayName=g;var T=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:a,loop:c=!1,dir:l,currentTabStopId:_,defaultCurrentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:x,preventScrollOnEntryFocus:C=!1,...w}=e,T=f.useRef(null),E=i(t,T),D=d(l),[O,k]=s({prop:_,defaultProp:y??null,onChange:b,caller:g}),[A,M]=f.useState(!1),N=u(x),P=v(n),F=f.useRef(!1),[I,L]=f.useState(0);return f.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(m,N),()=>e.removeEventListener(m,N)},[N]),(0,p.jsx)(S,{scope:n,orientation:a,dir:D,loop:c,currentTabStopId:O,onItemFocus:f.useCallback(e=>k(e),[k]),onItemShiftTab:f.useCallback(()=>M(!0),[]),onFocusableItemAdd:f.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:f.useCallback(()=>L(e=>e-1),[]),children:(0,p.jsx)(r.div,{tabIndex:A||I===0?-1:0,"data-orientation":a,...w,ref:E,style:{outline:`none`,...e.style},onMouseDown:o(e.onMouseDown,()=>{F.current=!0}),onFocus:o(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(m,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),C)}}F.current=!1}),onBlur:o(e.onBlur,()=>M(!1))})})}),E=`RovingFocusGroupItem`,D=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:s,children:c,...u}=e,d=l(),m=s||d,h=C(E,n),g=h.currentTabStopId===m,y=v(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:S}=h;return f.useEffect(()=>{if(i)return b(),()=>x()},[i,b,x]),(0,p.jsx)(_.ItemSlot,{scope:n,id:m,focusable:i,active:a,children:(0,p.jsx)(r.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...u,ref:t,onMouseDown:o(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:o(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:o(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=A(e,h.orientation,h.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=h.loop?M(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}}),children:typeof c==`function`?c({isCurrentTabStop:g,hasTabStop:S!=null}):c})})});D.displayName=E;var O={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function k(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function A(e,t,n){let r=k(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return O[r]}function j(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function M(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var N=w,P=D;export{N as n,x as r,P as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{t as r}from"./dist-BFnxq45V.js";import{u as i}from"./button-BgMnOYKD.js";import{a,r as o,t as s}from"./dist-CKFLmh1A.js";import{t as c}from"./dist-C6i4A_Js.js";import{n as l,t as u}from"./dist-B0ikDpJU.js";import{n as d}from"./dist-C97YBjnT.js";var f=e(t(),1),p=n(),m=`rovingFocusGroup.onEntryFocus`,h={bubbles:!1,cancelable:!0},g=`RovingFocusGroup`,[_,v,y]=c(g),[b,x]=a(g,[y]),[S,C]=b(g),w=f.forwardRef((e,t)=>(0,p.jsx)(_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(T,{...e,ref:t})})}));w.displayName=g;var T=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:a,loop:c=!1,dir:l,currentTabStopId:_,defaultCurrentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:x,preventScrollOnEntryFocus:C=!1,...w}=e,T=f.useRef(null),E=i(t,T),D=d(l),[O,k]=s({prop:_,defaultProp:y??null,onChange:b,caller:g}),[A,M]=f.useState(!1),N=u(x),P=v(n),F=f.useRef(!1),[I,L]=f.useState(0);return f.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(m,N),()=>e.removeEventListener(m,N)},[N]),(0,p.jsx)(S,{scope:n,orientation:a,dir:D,loop:c,currentTabStopId:O,onItemFocus:f.useCallback(e=>k(e),[k]),onItemShiftTab:f.useCallback(()=>M(!0),[]),onFocusableItemAdd:f.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:f.useCallback(()=>L(e=>e-1),[]),children:(0,p.jsx)(r.div,{tabIndex:A||I===0?-1:0,"data-orientation":a,...w,ref:E,style:{outline:`none`,...e.style},onMouseDown:o(e.onMouseDown,()=>{F.current=!0}),onFocus:o(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(m,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),C)}}F.current=!1}),onBlur:o(e.onBlur,()=>M(!1))})})}),E=`RovingFocusGroupItem`,D=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:s,children:c,...u}=e,d=l(),m=s||d,h=C(E,n),g=h.currentTabStopId===m,y=v(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:S}=h;return f.useEffect(()=>{if(i)return b(),()=>x()},[i,b,x]),(0,p.jsx)(_.ItemSlot,{scope:n,id:m,focusable:i,active:a,children:(0,p.jsx)(r.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...u,ref:t,onMouseDown:o(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:o(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:o(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=A(e,h.orientation,h.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=h.loop?M(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}}),children:typeof c==`function`?c({isCurrentTabStop:g,hasTabStop:S!=null}):c})})});D.displayName=E;var O={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function k(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function A(e,t,n){let r=k(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return O[r]}function j(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function M(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var N=w,P=D;export{N as n,x as r,P as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{n}from"./dist-D343v8gR.js";var r=e(t(),1);function i(e){let[t,i]=r.useState(void 0);return n(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],r,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;i({width:r,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else i(void 0)},[e]),t}export{i as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{n}from"./dist-CKFLmh1A.js";var r=e(t(),1);function i(e){let[t,i]=r.useState(void 0);return n(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],r,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;i({width:r,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else i(void 0)},[e]),t}export{i as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{n as r,r as i,t as a}from"./dist-XiAcd8rT.js";import{u as o}from"./button-C0SPdqvs.js";import{n as s,r as c}from"./dist-D343v8gR.js";import{t as l}from"./dist-BphrRiSn.js";var u=e(t(),1);function d(e,t=globalThis?.document){let n=l(e);u.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var f=n(),p=`DismissableLayer`,m=`dismissableLayer.update`,h=`dismissableLayer.pointerDownOutside`,g=`dismissableLayer.focusOutside`,_,v=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:p,...h}=e,g=u.useContext(v),[y,b]=u.useState(null),x=y?.ownerDocument??globalThis?.document,[,T]=u.useState({}),E=o(t,e=>b(e)),D=Array.from(g.layers),[O]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),k=D.indexOf(O),A=y?D.indexOf(y):-1,j=g.layersWithOutsidePointerEventsDisabled.size>0,M=A>=k,N=S(e=>{let t=e.target,n=[...g.branches].some(e=>e.contains(t));!M||n||(i?.(e),l?.(e),e.defaultPrevented||p?.())},x),P=C(e=>{let t=e.target;[...g.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||p?.())},x);return d(e=>{A===g.layers.size-1&&(r?.(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))},x),u.useEffect(()=>{if(y)return n&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(_=x.body.style.pointerEvents,x.body.style.pointerEvents=`none`),g.layersWithOutsidePointerEventsDisabled.add(y)),g.layers.add(y),w(),()=>{n&&g.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=_)}},[y,x,n,g]),u.useEffect(()=>()=>{y&&(g.layers.delete(y),g.layersWithOutsidePointerEventsDisabled.delete(y),w())},[y,g]),u.useEffect(()=>{let e=()=>T({});return document.addEventListener(m,e),()=>document.removeEventListener(m,e)},[]),(0,f.jsx)(a.div,{...h,ref:E,style:{pointerEvents:j?M?`auto`:`none`:void 0,...e.style},onFocusCapture:c(e.onFocusCapture,P.onFocusCapture),onBlurCapture:c(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,N.onPointerDownCapture)})});y.displayName=p;var b=`DismissableLayerBranch`,x=u.forwardRef((e,t)=>{let n=u.useContext(v),r=u.useRef(null),i=o(t,r);return u.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,f.jsx)(a.div,{...e,ref:i})});x.displayName=b;function S(e,t=globalThis?.document){let n=l(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){T(h,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function C(e,t=globalThis?.document){let n=l(e),r=u.useRef(!1);return u.useEffect(()=>{let e=e=>{e.target&&!r.current&&T(g,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function w(){let e=new CustomEvent(m);document.dispatchEvent(e)}function T(e,t,n,{discrete:i}){let a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),i?r(a,o):a.dispatchEvent(o)}var E=e(i(),1),D=`Portal`,O=u.forwardRef((e,t)=>{let{container:n,...r}=e,[i,o]=u.useState(!1);s(()=>o(!0),[]);let c=n||i&&globalThis?.document?.body;return c?E.createPortal((0,f.jsx)(a.div,{...r,ref:t}),c):null});O.displayName=D;export{y as n,O as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{n as r,r as i,t as a}from"./dist-BFnxq45V.js";import{u as o}from"./button-BgMnOYKD.js";import{n as s,r as c}from"./dist-CKFLmh1A.js";import{t as l}from"./dist-B0ikDpJU.js";var u=e(t(),1);function d(e,t=globalThis?.document){let n=l(e);u.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var f=n(),p=`DismissableLayer`,m=`dismissableLayer.update`,h=`dismissableLayer.pointerDownOutside`,g=`dismissableLayer.focusOutside`,_,v=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:p,...h}=e,g=u.useContext(v),[y,b]=u.useState(null),x=y?.ownerDocument??globalThis?.document,[,T]=u.useState({}),E=o(t,e=>b(e)),D=Array.from(g.layers),[O]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),k=D.indexOf(O),A=y?D.indexOf(y):-1,j=g.layersWithOutsidePointerEventsDisabled.size>0,M=A>=k,N=S(e=>{let t=e.target,n=[...g.branches].some(e=>e.contains(t));!M||n||(i?.(e),l?.(e),e.defaultPrevented||p?.())},x),P=C(e=>{let t=e.target;[...g.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||p?.())},x);return d(e=>{A===g.layers.size-1&&(r?.(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))},x),u.useEffect(()=>{if(y)return n&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(_=x.body.style.pointerEvents,x.body.style.pointerEvents=`none`),g.layersWithOutsidePointerEventsDisabled.add(y)),g.layers.add(y),w(),()=>{n&&g.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=_)}},[y,x,n,g]),u.useEffect(()=>()=>{y&&(g.layers.delete(y),g.layersWithOutsidePointerEventsDisabled.delete(y),w())},[y,g]),u.useEffect(()=>{let e=()=>T({});return document.addEventListener(m,e),()=>document.removeEventListener(m,e)},[]),(0,f.jsx)(a.div,{...h,ref:E,style:{pointerEvents:j?M?`auto`:`none`:void 0,...e.style},onFocusCapture:c(e.onFocusCapture,P.onFocusCapture),onBlurCapture:c(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,N.onPointerDownCapture)})});y.displayName=p;var b=`DismissableLayerBranch`,x=u.forwardRef((e,t)=>{let n=u.useContext(v),r=u.useRef(null),i=o(t,r);return u.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,f.jsx)(a.div,{...e,ref:i})});x.displayName=b;function S(e,t=globalThis?.document){let n=l(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){T(h,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function C(e,t=globalThis?.document){let n=l(e),r=u.useRef(!1);return u.useEffect(()=>{let e=e=>{e.target&&!r.current&&T(g,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function w(){let e=new CustomEvent(m);document.dispatchEvent(e)}function T(e,t,n,{discrete:i}){let a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),i?r(a,o):a.dispatchEvent(o)}var E=e(i(),1),D=`Portal`,O=u.forwardRef((e,t)=>{let{container:n,...r}=e,[i,o]=u.useState(!1);s(()=>o(!0),[]);let c=n||i&&globalThis?.document?.body;return c?E.createPortal((0,f.jsx)(a.div,{...r,ref:t}),c):null});O.displayName=D;export{y as n,O as t};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Zp as e,ft as t}from"./messages-BLwDcEAr.js";import{i as n}from"./button-C0SPdqvs.js";import{t as r}from"./createLucideIcon-Br0Bd5k2.js";var i=r(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),a=r(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),o=r(`sliders-horizontal`,[[`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`}]]),s=e();function c({className:e,description:r=t(),icon:a,title:o}){return(0,s.jsxs)(`div`,{className:n(`flex flex-col items-center justify-center gap-3 py-16 text-center`,e),children:[(0,s.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground`,children:a??(0,s.jsx)(i,{className:`size-6`})}),o&&(0,s.jsx)(`p`,{className:`font-medium text-sm`,children:o}),(0,s.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r})]})}export{o as n,a as r,c as t};
|
import{em as e,ft as t}from"./messages-Bp0bCjzp.js";import{i as n}from"./button-BgMnOYKD.js";import{t as r}from"./createLucideIcon-Br0Bd5k2.js";var i=r(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),a=r(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),o=r(`sliders-horizontal`,[[`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`}]]),s=e();function c({className:e,description:r=t(),icon:a,title:o}){return(0,s.jsxs)(`div`,{className:n(`flex flex-col items-center justify-center gap-3 py-16 text-center`,e),children:[(0,s.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground`,children:a??(0,s.jsx)(i,{className:`size-6`})}),o&&(0,s.jsx)(`p`,{className:`font-medium text-sm`,children:o}),(0,s.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r})]})}export{o as n,a as r,c as t};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{_t as e,bt as t,gt as n,ht as r,mt as i,pt as a,vt as o,xt as s,yt as c}from"./messages-BLwDcEAr.js";import{n as l,t as u}from"./wallet-Bn5Vi2Ko.js";import{t as d}from"./createLucideIcon-Br0Bd5k2.js";var f=d(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),p=d(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),m=d(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),h=[{label:s(),value:`1`,icon:p},{label:t(),value:`2`,icon:l},{label:c(),value:`3`,icon:m},{label:o(),value:`4`,icon:u}],g={1:`bg-amber-500/10 text-amber-600`,2:`bg-emerald-500/10 text-emerald-600`,3:`bg-rose-500/10 text-rose-600`,4:`bg-cyan-500/10 text-cyan-600`};function _(e){return h.find(t=>t.value===String(e??1))?.label??String(e??`-`)}var v=[{label:e(),value:`enabled`,icon:u},{label:n(),value:`disabled`,icon:f},{label:r(),value:`monitoring`,icon:l}];i(),a();var y=[{label:i(),value:`true`},{label:a(),value:`false`}];export{h as a,g as i,y as n,p as o,_ as r,v as t};
|
import{_t as e,bt as t,gt as n,ht as r,mt as i,pt as a,vt as o,xt as s,yt as c}from"./messages-Bp0bCjzp.js";import{n as l,t as u}from"./wallet-Bgblr4kl.js";import{t as d}from"./createLucideIcon-Br0Bd5k2.js";var f=d(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),p=d(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),m=d(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),h=[{label:s(),value:`1`,icon:p},{label:t(),value:`2`,icon:l},{label:c(),value:`3`,icon:m},{label:o(),value:`4`,icon:u}],g={1:`bg-amber-500/10 text-amber-600`,2:`bg-emerald-500/10 text-emerald-600`,3:`bg-rose-500/10 text-rose-600`,4:`bg-cyan-500/10 text-cyan-600`};function _(e){return h.find(t=>t.value===String(e??1))?.label??String(e??`-`)}var v=[{label:e(),value:`enabled`,icon:u},{label:n(),value:`disabled`,icon:f},{label:r(),value:`monitoring`,icon:l}];i(),a();var y=[{label:i(),value:`true`},{label:a(),value:`false`}];export{h as a,g as i,y as n,p as o,_ as r,v as t};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{n as r,r as i,t as a}from"./cookies-BzZOQYPw.js";var o=e(t(),1),s=[`inter`,`manrope`,`noto`,`system`],c=n(),l=`font`,u=3600*24*365,d=(0,o.createContext)(null);function f({children:e}){let[t,n]=(0,o.useState)(()=>{let e=a(l);return s.includes(e)?e:s[0]});return(0,o.useEffect)(()=>{(e=>{let t=document.documentElement;t.classList.remove(...[...t.classList].filter(e=>e.startsWith(`font-`))),t.classList.add(`font-${e}`)})(t)},[t]),(0,c.jsx)(d,{value:{font:t,setFont:e=>{i(l,e,u),n(e)},resetFont:()=>{r(l),n(s[0])}},children:e})}var p=()=>{let e=(0,o.useContext)(d);if(!e)throw Error(`useFont must be used within a FontProvider`);return e};export{p as n,s as r,f as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{n as r,r as i,t as a}from"./cookies-BzZOQYPw.js";var o=e(t(),1),s=[`inter`,`manrope`,`noto`,`system`],c=n(),l=`font`,u=3600*24*365,d=(0,o.createContext)(null);function f({children:e}){let[t,n]=(0,o.useState)(()=>{let e=a(l);return s.includes(e)?e:s[0]});return(0,o.useEffect)(()=>{(e=>{let t=document.documentElement;t.classList.remove(...[...t.classList].filter(e=>e.startsWith(`font-`))),t.classList.add(`font-${e}`)})(t)},[t]),(0,c.jsx)(d,{value:{font:t,setFont:e=>{i(l,e,u),n(e)},resetFont:()=>{r(l),n(s[0])}},children:e})}var p=()=>{let e=(0,o.useContext)(d);if(!e)throw Error(`useFont must be used within a FontProvider`);return e};export{p as n,s as r,f as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{Dd as e,Mt as t,Nt as n,Od as r,Pt as i,Zp as a}from"./messages-BLwDcEAr.js";import{t as o}from"./useRouter-DtTm7XkK.js";import{t as s}from"./useNavigate-7u4DX0Ho.js";import{t as c}from"./button-C0SPdqvs.js";var l=a();function u(){let a=s(),{history:u}=o();return(0,l.jsx)(`div`,{className:`h-svh`,children:(0,l.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,l.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`403`}),(0,l.jsx)(`span`,{className:`font-medium`,children:i()}),(0,l.jsxs)(`p`,{className:`text-center text-muted-foreground`,children:[n(),` `,(0,l.jsx)(`br`,{}),t()]}),(0,l.jsxs)(`div`,{className:`mt-6 flex gap-4`,children:[(0,l.jsx)(c,{onClick:()=>u.go(-1),variant:`outline`,children:r()}),(0,l.jsx)(c,{onClick:()=>a({to:`/dashboard`}),children:e()})]})]})})}export{u as t};
|
import{Dd as e,Mt as t,Nt as n,Od as r,Pt as i,em as a}from"./messages-Bp0bCjzp.js";import{t as o}from"./useRouter-DtTm7XkK.js";import{t as s}from"./useNavigate-7u4DX0Ho.js";import{t as c}from"./button-BgMnOYKD.js";var l=a();function u(){let a=s(),{history:u}=o();return(0,l.jsx)(`div`,{className:`h-svh`,children:(0,l.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,l.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`403`}),(0,l.jsx)(`span`,{className:`font-medium`,children:i()}),(0,l.jsxs)(`p`,{className:`text-center text-muted-foreground`,children:[n(),` `,(0,l.jsx)(`br`,{}),t()]}),(0,l.jsxs)(`div`,{className:`mt-6 flex gap-4`,children:[(0,l.jsx)(c,{onClick:()=>u.go(-1),variant:`outline`,children:r()}),(0,l.jsx)(c,{onClick:()=>a({to:`/dashboard`}),children:e()})]})]})})}export{u as t};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Ad as e,Dd as t,Od as n,Zp as r,kd as i}from"./messages-BLwDcEAr.js";import{t as a}from"./useRouter-DtTm7XkK.js";import{t as o}from"./useNavigate-7u4DX0Ho.js";import{i as s,t as c}from"./button-C0SPdqvs.js";var l=r();function u({className:r,minimal:u=!1}){let d=o(),{history:f}=a();return(0,l.jsx)(`div`,{className:s(`h-svh w-full`,r),children:(0,l.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[!u&&(0,l.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`500`}),(0,l.jsx)(`span`,{className:`font-medium`,children:e()}),(0,l.jsx)(`p`,{className:`text-center text-muted-foreground`,children:i()}),!u&&(0,l.jsxs)(`div`,{className:`mt-6 flex gap-4`,children:[(0,l.jsx)(c,{onClick:()=>f.go(-1),variant:`outline`,children:n()}),(0,l.jsx)(c,{onClick:()=>d({to:`/dashboard`}),children:t()})]})]})})}export{u as t};
|
import{Ad as e,Dd as t,Od as n,em as r,kd as i}from"./messages-Bp0bCjzp.js";import{t as a}from"./useRouter-DtTm7XkK.js";import{t as o}from"./useNavigate-7u4DX0Ho.js";import{i as s,t as c}from"./button-BgMnOYKD.js";var l=r();function u({className:r,minimal:u=!1}){let d=o(),{history:f}=a();return(0,l.jsx)(`div`,{className:s(`h-svh w-full`,r),children:(0,l.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[!u&&(0,l.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`500`}),(0,l.jsx)(`span`,{className:`font-medium`,children:e()}),(0,l.jsx)(`p`,{className:`text-center text-muted-foreground`,children:i()}),!u&&(0,l.jsxs)(`div`,{className:`mt-6 flex gap-4`,children:[(0,l.jsx)(c,{onClick:()=>f.go(-1),variant:`outline`,children:n()}),(0,l.jsx)(c,{onClick:()=>d({to:`/dashboard`}),children:t()})]})]})})}export{u as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{i as t}from"./auth-store-paR9oIR_.js";import{t as n}from"./react-CO2uhaBc.js";import{Au as r,Su as i,Tt as a,Up as o,Wp as s,Zp as c,qp as l,xu as u}from"./messages-BLwDcEAr.js";import{t as d}from"./link-uW89koiO.js";import{F as f,L as p,R as m,d as h,f as g,h as _,j as v,l as y,n as b,o as x,p as S,u as C,z as w}from"./search-provider-B67mlhed.js";import{i as T,t as E}from"./button-C0SPdqvs.js";import{a as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./dropdown-menu-CDbt-i_J.js";import{t as P}from"./separator-Di9zEmE_.js";import{l as F}from"./command-vg2xchuv.js";var I=e(n(),1),L=c();function R(){let[e,n]=y(),[c,l]=(0,I.useState)(!1),{user:v}=t(),b=v?.username?.trim()||a(),T=b.charAt(0).toUpperCase()||`U`,P=v?.last_login_at?i({time:x(v.last_login_at)}):u();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(f,{onOpenChange:l,open:c,children:(0,L.jsx)(_,{})}),(0,L.jsxs)(N,{modal:!1,children:[(0,L.jsx)(k,{asChild:!0,children:(0,L.jsx)(E,{className:`relative h-8 w-8 rounded-full`,variant:`ghost`,children:(0,L.jsxs)(C,{className:`h-8 w-8`,children:[(0,L.jsx)(g,{alt:b,src:`/avatars/01.png`}),(0,L.jsx)(h,{children:T})]})})}),(0,L.jsxs)(j,{align:`end`,className:`w-56`,forceMount:!0,children:[(0,L.jsx)(A,{className:`p-0 font-normal`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-start text-sm`,children:[(0,L.jsxs)(C,{className:`h-8 w-8 rounded-lg`,children:[(0,L.jsx)(g,{alt:b,src:`/avatars/01.png`}),(0,L.jsx)(h,{className:`rounded-lg`,children:T})]}),(0,L.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,L.jsx)(`span`,{className:`truncate font-semibold`,children:b}),(0,L.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:P})]})]})}),(0,L.jsx)(M,{}),(0,L.jsxs)(O,{children:[(0,L.jsx)(D,{asChild:!0,children:(0,L.jsxs)(d,{to:`/account/password`,children:[(0,L.jsx)(w,{className:`mr-2 size-4`}),s()]})}),(0,L.jsxs)(D,{onClick:()=>l(!0),onSelect:e=>e.preventDefault(),children:[(0,L.jsx)(p,{className:`mr-2 size-4`}),r()]})]}),(0,L.jsx)(M,{}),(0,L.jsxs)(D,{onClick:()=>n(!0),variant:`destructive`,children:[(0,L.jsx)(m,{className:`mr-2 size-4`}),o()]})]})]}),(0,L.jsx)(S,{onOpenChange:n,open:!!e})]})}function z({className:e=``,placeholder:t}){let{setOpen:n}=b();return(0,L.jsxs)(E,{className:T(`group relative h-8 w-full flex-1 justify-start rounded-md bg-muted/25 font-normal text-muted-foreground text-sm shadow-none hover:bg-accent sm:w-40 sm:pe-12 md:flex-none lg:w-52 xl:w-64`,e),onClick:()=>n(!0),variant:`outline`,children:[(0,L.jsx)(F,{"aria-hidden":`true`,className:`absolute inset-s-1.5 top-1/2 -translate-y-1/2`,size:16}),(0,L.jsx)(`span`,{className:`ms-4`,children:t??l()}),(0,L.jsxs)(`kbd`,{className:`pointer-events-none absolute inset-e-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-medium font-mono text-[10px] opacity-100 group-hover:bg-accent sm:flex`,children:[(0,L.jsx)(`span`,{className:`text-xs`,children:`⌘`}),`K`]})]})}function B({className:e,fixed:t,children:n,...r}){let[i,a]=(0,I.useState)(0);return(0,I.useEffect)(()=>{let e=()=>{a(document.body.scrollTop||document.documentElement.scrollTop)};return document.addEventListener(`scroll`,e,{passive:!0}),()=>document.removeEventListener(`scroll`,e)},[]),(0,L.jsx)(`header`,{className:T(`z-50 h-16`,t&&`header-fixed peer/header sticky top-0 w-[inherit]`,i>10&&t?`shadow`:`shadow-none`,e),...r,children:(0,L.jsxs)(`div`,{className:T(`relative flex h-full items-center gap-3 p-4 sm:gap-4`,i>10&&t&&`after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg`),children:[(0,L.jsx)(v,{className:`max-md:scale-125`,variant:`outline`}),(0,L.jsx)(P,{className:`h-6`,orientation:`vertical`}),n]})})}export{z as n,R as r,B as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{i as t}from"./auth-store-Csn6HPxJ.js";import{t as n}from"./react-CO2uhaBc.js";import{Au as r,Kp as i,Su as a,Tt as o,Xp as s,em as c,qp as l,xu as u}from"./messages-Bp0bCjzp.js";import{t as d}from"./link-BYG8nKNO.js";import{F as f,L as p,R as m,d as h,f as g,h as _,j as v,l as y,n as b,o as x,p as S,u as C,z as w}from"./search-provider-Bl2HDfcG.js";import{i as T,t as E}from"./button-BgMnOYKD.js";import{a as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./dropdown-menu-8-hEBtzr.js";import{t as P}from"./separator-DbmFQXe4.js";import{l as F}from"./command-CIv3ggHf.js";var I=e(n(),1),L=c();function R(){let[e,n]=y(),[s,c]=(0,I.useState)(!1),{user:v}=t(),b=v?.username?.trim()||o(),T=b.charAt(0).toUpperCase()||`U`,P=v?.last_login_at?a({time:x(v.last_login_at)}):u();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(f,{onOpenChange:c,open:s,children:(0,L.jsx)(_,{})}),(0,L.jsxs)(N,{modal:!1,children:[(0,L.jsx)(k,{asChild:!0,children:(0,L.jsx)(E,{className:`relative h-8 w-8 rounded-full`,variant:`ghost`,children:(0,L.jsxs)(C,{className:`h-8 w-8`,children:[(0,L.jsx)(g,{alt:b,src:`/avatars/01.png`}),(0,L.jsx)(h,{children:T})]})})}),(0,L.jsxs)(j,{align:`end`,className:`w-56`,forceMount:!0,children:[(0,L.jsx)(A,{className:`p-0 font-normal`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-start text-sm`,children:[(0,L.jsxs)(C,{className:`h-8 w-8 rounded-lg`,children:[(0,L.jsx)(g,{alt:b,src:`/avatars/01.png`}),(0,L.jsx)(h,{className:`rounded-lg`,children:T})]}),(0,L.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,L.jsx)(`span`,{className:`truncate font-semibold`,children:b}),(0,L.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:P})]})]})}),(0,L.jsx)(M,{}),(0,L.jsxs)(O,{children:[(0,L.jsx)(D,{asChild:!0,children:(0,L.jsxs)(d,{to:`/account/password`,children:[(0,L.jsx)(w,{className:`mr-2 size-4`}),l()]})}),(0,L.jsxs)(D,{onClick:()=>c(!0),onSelect:e=>e.preventDefault(),children:[(0,L.jsx)(p,{className:`mr-2 size-4`}),r()]})]}),(0,L.jsx)(M,{}),(0,L.jsxs)(D,{onClick:()=>n(!0),variant:`destructive`,children:[(0,L.jsx)(m,{className:`mr-2 size-4`}),i()]})]})]}),(0,L.jsx)(S,{onOpenChange:n,open:!!e})]})}function z({className:e=``,placeholder:t}){let{setOpen:n}=b();return(0,L.jsxs)(E,{className:T(`group relative h-8 w-full flex-1 justify-start rounded-md bg-muted/25 font-normal text-muted-foreground text-sm shadow-none hover:bg-accent sm:w-40 sm:pe-12 md:flex-none lg:w-52 xl:w-64`,e),onClick:()=>n(!0),variant:`outline`,children:[(0,L.jsx)(F,{"aria-hidden":`true`,className:`absolute inset-s-1.5 top-1/2 -translate-y-1/2`,size:16}),(0,L.jsx)(`span`,{className:`ms-4`,children:t??s()}),(0,L.jsxs)(`kbd`,{className:`pointer-events-none absolute inset-e-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-medium font-mono text-[10px] opacity-100 group-hover:bg-accent sm:flex`,children:[(0,L.jsx)(`span`,{className:`text-xs`,children:`⌘`}),`K`]})]})}function B({className:e,fixed:t,children:n,...r}){let[i,a]=(0,I.useState)(0);return(0,I.useEffect)(()=>{let e=()=>{a(document.body.scrollTop||document.documentElement.scrollTop)};return document.addEventListener(`scroll`,e,{passive:!0}),()=>document.removeEventListener(`scroll`,e)},[]),(0,L.jsx)(`header`,{className:T(`z-50 h-16`,t&&`header-fixed peer/header sticky top-0 w-[inherit]`,i>10&&t?`shadow`:`shadow-none`,e),...r,children:(0,L.jsxs)(`div`,{className:T(`relative flex h-full items-center gap-3 p-4 sm:gap-4`,i>10&&t&&`after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg`),children:[(0,L.jsx)(v,{className:`max-md:scale-125`,variant:`outline`}),(0,L.jsx)(P,{className:`h-6`,orientation:`vertical`}),n]})})}export{z as n,R as r,B as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{Mp as e,Np as t,Pp as n,Zp as r}from"./messages-BLwDcEAr.js";import{t as i}from"./telescope-DU0wiTDw.js";var a=r();function o(){return(0,a.jsx)(`div`,{className:`h-svh`,children:(0,a.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,a.jsx)(i,{size:72}),(0,a.jsx)(`h1`,{className:`font-bold text-4xl leading-tight`,children:n()}),(0,a.jsxs)(`p`,{className:`text-center text-muted-foreground`,children:[t(),` `,(0,a.jsx)(`br`,{}),e()]})]})})}var s=o;export{s as component};
|
import{Fp as e,Ip as t,Lp as n,em as r}from"./messages-Bp0bCjzp.js";import{t as i}from"./telescope-DU0wiTDw.js";var a=r();function o(){return(0,a.jsx)(`div`,{className:`h-svh`,children:(0,a.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,a.jsx)(i,{size:72}),(0,a.jsx)(`h1`,{className:`font-bold text-4xl leading-tight`,children:n()}),(0,a.jsxs)(`p`,{className:`text-center text-muted-foreground`,children:[t(),` `,(0,a.jsx)(`br`,{}),e()]})]})})}var s=o;export{s as component};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{i as t}from"./button-C0SPdqvs.js";var n=e();function r({className:e,type:r,...i}){return(0,n.jsx)(`input`,{className:t(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),"data-slot":`input`,type:r,...i})}export{r as t};
|
import{em as e}from"./messages-Bp0bCjzp.js";import{i as t}from"./button-BgMnOYKD.js";var n=e();function r({className:e,type:r,...i}){return(0,n.jsx)(`input`,{className:t(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),"data-slot":`input`,type:r,...i})}export{r as t};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{As as n,Ds as r,Fs as i,Ms as a,Ns as o,Os as s,Ps as c,Zp as l,js as u,ks as d}from"./messages-BLwDcEAr.js";import{r as f}from"./route-Flu3rFiH.js";import{d as p,n as m,o as h,r as g,s as _}from"./data-table-BICuB91r.js";import{t as v}from"./badge-CDIosEVp.js";import{t as y}from"./use-table-url-state-DP0Y4QjR.js";var b=e(t(),1),x=l(),S=[{name:`GMPay`,entries:[{method:`POST`,path:`/payments/gmpay/v1/order/create-transaction`}],requestFields:[`order_id`,`currency`,`token`,`network`,`amount`,`notify_url`,`signature`,`redirect_url?`,`name?`,`payment_type?`],callbackNote:d()},{name:`EPay Compatible`,entries:[{method:`POST`,path:`/payments/epay/v1/order/create-transaction/submit.php`},{method:`GET`,path:`/payments/epay/v1/order/create-transaction/submit.php`}],requestFields:[`pid`,`money`,`out_trade_no`,`notify_url`,`return_url?`,`name?`,`type?`,`sign`,`sign_type?`],callbackNote:s()},{name:`OKPay`,entries:[{method:`POST`,path:`/payments/okpay/v1/notify`}],requestFields:[`OkPay notify payload`],callbackNote:r()}];function C({method:e}){return(0,x.jsx)(v,{className:e===`GET`?`rounded border border-blue-500/30 bg-blue-500/10 font-mono text-blue-600 dark:text-blue-400`:`rounded border border-emerald-500/30 bg-emerald-500/10 font-mono text-emerald-600 dark:text-emerald-400`,variant:`outline`,children:e})}function w({field:e}){return(0,x.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-foreground text-xs`,children:e})}function T({item:e}){let t=e.entries.reduce((e,t)=>(e[t.path]||(e[t.path]=[]),e[t.path].push(t.method),e),{});return(0,x.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:Object.entries(t).map(([e,t])=>(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`div`,{className:`flex gap-1.5`,children:t.map(e=>(0,x.jsx)(C,{method:e},e))}),(0,x.jsx)(`code`,{className:`whitespace-normal break-words font-mono text-sm`,children:e})]},e))})}function E({fields:e}){return(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.map(e=>(0,x.jsx)(w,{field:e},e))})}var D=f(`/_authenticated/payment-setup/integrations`);function O(){let{pagination:e,onPaginationChange:t,ensurePageInRange:r}=y({search:D.useSearch(),navigate:D.useNavigate(),pagination:{defaultPage:1,defaultPageSize:10}}),s=h({data:S,columns:(0,b.useMemo)(()=>[{accessorKey:`name`,header:o(),cell:({row:e})=>(0,x.jsx)(`span`,{className:`font-medium`,children:e.original.name})},{accessorKey:`entries`,header:a(),cell:({row:e})=>(0,x.jsx)(T,{item:e.original})},{accessorKey:`requestFields`,header:u(),cell:({row:e})=>(0,x.jsx)(E,{fields:e.original.requestFields})},{accessorKey:`callbackNote`,header:n(),cell:({row:e})=>(0,x.jsx)(`span`,{className:`whitespace-normal break-words text-muted-foreground text-sm`,children:e.original.callbackNote})}],[]),state:{pagination:e},onPaginationChange:t,getCoreRowModel:_(),getPaginationRowModel:p()});return(0,b.useEffect)(()=>{r(s.getPageCount())},[s,r]),(0,x.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4`,children:[(0,x.jsxs)(`div`,{className:`space-y-1`,children:[(0,x.jsx)(`h3`,{className:`font-semibold text-lg`,children:i()}),(0,x.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:c()})]}),(0,x.jsx)(g,{table:s}),(0,x.jsx)(m,{className:`mt-auto`,table:s})]})}function k(){return(0,x.jsx)(O,{})}var A=k;export{A as component};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{As as n,Ds as r,Fs as i,Ms as a,Ns as o,Os as s,Ps as c,em as l,js as u,ks as d}from"./messages-Bp0bCjzp.js";import{r as f}from"./route-Bin9ihv_.js";import{d as p,n as m,o as h,r as g,s as _}from"./data-table-C3Nm2K6Z.js";import{t as v}from"./badge-BP05f1dq.js";import{t as y}from"./use-table-url-state-DP0Y4QjR.js";var b=e(t(),1),x=l(),S=[{name:`GMPay`,entries:[{method:`POST`,path:`/payments/gmpay/v1/order/create-transaction`}],requestFields:[`order_id`,`currency`,`token`,`network`,`amount`,`notify_url`,`signature`,`redirect_url?`,`name?`,`payment_type?`],callbackNote:d()},{name:`EPay Compatible`,entries:[{method:`POST`,path:`/payments/epay/v1/order/create-transaction/submit.php`},{method:`GET`,path:`/payments/epay/v1/order/create-transaction/submit.php`}],requestFields:[`pid`,`money`,`out_trade_no`,`notify_url`,`return_url?`,`name?`,`type?`,`sign`,`sign_type?`],callbackNote:s()},{name:`OKPay`,entries:[{method:`POST`,path:`/payments/okpay/v1/notify`}],requestFields:[`OkPay notify payload`],callbackNote:r()}];function C({method:e}){return(0,x.jsx)(v,{className:e===`GET`?`rounded border border-blue-500/30 bg-blue-500/10 font-mono text-blue-600 dark:text-blue-400`:`rounded border border-emerald-500/30 bg-emerald-500/10 font-mono text-emerald-600 dark:text-emerald-400`,variant:`outline`,children:e})}function w({field:e}){return(0,x.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-foreground text-xs`,children:e})}function T({item:e}){let t=e.entries.reduce((e,t)=>(e[t.path]||(e[t.path]=[]),e[t.path].push(t.method),e),{});return(0,x.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:Object.entries(t).map(([e,t])=>(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`div`,{className:`flex gap-1.5`,children:t.map(e=>(0,x.jsx)(C,{method:e},e))}),(0,x.jsx)(`code`,{className:`whitespace-normal break-words font-mono text-sm`,children:e})]},e))})}function E({fields:e}){return(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.map(e=>(0,x.jsx)(w,{field:e},e))})}var D=f(`/_authenticated/payment-setup/integrations`);function O(){let{pagination:e,onPaginationChange:t,ensurePageInRange:r}=y({search:D.useSearch(),navigate:D.useNavigate(),pagination:{defaultPage:1,defaultPageSize:10}}),s=h({data:S,columns:(0,b.useMemo)(()=>[{accessorKey:`name`,header:o(),cell:({row:e})=>(0,x.jsx)(`span`,{className:`font-medium`,children:e.original.name})},{accessorKey:`entries`,header:a(),cell:({row:e})=>(0,x.jsx)(T,{item:e.original})},{accessorKey:`requestFields`,header:u(),cell:({row:e})=>(0,x.jsx)(E,{fields:e.original.requestFields})},{accessorKey:`callbackNote`,header:n(),cell:({row:e})=>(0,x.jsx)(`span`,{className:`whitespace-normal break-words text-muted-foreground text-sm`,children:e.original.callbackNote})}],[]),state:{pagination:e},onPaginationChange:t,getCoreRowModel:_(),getPaginationRowModel:p()});return(0,b.useEffect)(()=>{r(s.getPageCount())},[s,r]),(0,x.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4`,children:[(0,x.jsxs)(`div`,{className:`space-y-1`,children:[(0,x.jsx)(`h3`,{className:`font-semibold text-lg`,children:i()}),(0,x.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:c()})]}),(0,x.jsx)(g,{table:s}),(0,x.jsx)(m,{className:`mt-auto`,table:s})]})}function k(){return(0,x.jsx)(O,{})}var A=k;export{A as component};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{t as r}from"./dist-XiAcd8rT.js";import{i}from"./button-C0SPdqvs.js";var a=e(t(),1),o=n(),s=`Label`,c=a.forwardRef((e,t)=>(0,o.jsx)(r.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));c.displayName=s;var l=c;function u({className:e,...t}){return(0,o.jsx)(l,{className:i(`flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,e),"data-slot":`label`,...t})}export{u as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{t as r}from"./dist-BFnxq45V.js";import{i}from"./button-BgMnOYKD.js";var a=e(t(),1),o=n(),s=`Label`,c=a.forwardRef((e,t)=>(0,o.jsx)(r.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));c.displayName=s;var l=c;function u({className:e,...t}){return(0,o.jsx)(l,{className:i(`flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,e),"data-slot":`label`,...t})}export{u as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{i as t}from"./button-C0SPdqvs.js";import{n,t as r}from"./crypto-icon-CJd7sdrZ.js";var i=e();function a({displayName:e,network:t}){return(0,i.jsx)(s,{label:n(t,e),name:t,type:`network`})}function o({token:e}){return(0,i.jsx)(s,{label:e,name:e,type:`token`})}function s({label:e,name:n,type:a}){return(0,i.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,i.jsx)(r,{alt:``,className:t(`size-4 rounded-full`),height:16,name:n,type:a,width:16}),(0,i.jsx)(`span`,{className:`truncate`,children:e})]})}export{o as n,a as t};
|
import{em as e}from"./messages-Bp0bCjzp.js";import{i as t}from"./button-BgMnOYKD.js";import{n,t as r}from"./crypto-icon-DsKMU9xz.js";var i=e();function a({displayName:e,network:t}){return(0,i.jsx)(s,{label:n(t,e),name:t,type:`network`})}function o({token:e}){return(0,i.jsx)(s,{label:e,name:e,type:`token`})}function s({label:e,name:n,type:a}){return(0,i.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,i.jsx)(r,{alt:``,className:t(`size-4 rounded-full`),height:16,name:n,type:a,width:16}),(0,i.jsx)(`span`,{className:`truncate`,children:e})]})}export{o as n,a as t};
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{r as n}from"./useRouter-DtTm7XkK.js";import{d as r}from"./useStore-CupyIEEP.js";import{n as i}from"./route-Flu3rFiH.js";function a(e){return new o(e,{silent:!0}).createRoute}var o=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=i(e);return t.isRoot=!1,t},this.silent=t?.silent}},s=e(t(),1);function c(e,t){let i,a,o,c,l=()=>(i||=e().then(e=>{i=void 0,a=e[t??`default`]}).catch(e=>{if(o=e,r(o)&&o instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),c=!0)}}),i),u=function(e){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(n)n(l());else throw l();return s.createElement(a,e)};return u.preload=l,u}export{a as n,c as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{r as n}from"./useRouter-DtTm7XkK.js";import{d as r}from"./useStore-CupyIEEP.js";import{n as i}from"./route-Bin9ihv_.js";function a(e){return new o(e,{silent:!0}).createRoute}var o=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=i(e);return t.isRoot=!1,t},this.silent=t?.silent}},s=e(t(),1);function c(e,t){let i,a,o,c,l=()=>(i||=e().then(e=>{i=void 0,a=e[t??`default`]}).catch(e=>{if(o=e,r(o)&&o instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),c=!0)}}),i),u=function(e){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(n)n(l());else throw l();return s.createElement(a,e)};return u.preload=l,u}export{a as n,c as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{a as e,o as t}from"./auth-store-paR9oIR_.js";import{Ft as n,It as r}from"./messages-BLwDcEAr.js";import{n as i}from"./dist-CffCYhqm.js";function a(t){return e.useQuery(`get`,`/admin/api/v1/settings`,t?{params:{query:{group:t}}}:void 0)}function o(){return e.useMutation(`put`,`/admin/api/v1/settings`)}function s(e,t,n=``){return e?.find(e=>e.key===t)?.value??n}async function c(e,a,o=r()){let s=(await e({body:{items:a}})).data?.find(e=>!e.ok);if(s){i.error(n({error:s.error_code?t(s.error_code):s.error??``,key:s.key??``}));return}i.success(o)}async function l(e,t,n){await c(e,t,n)}export{o as a,a as i,l as n,c as r,s as t};
|
import{a as e,o as t}from"./auth-store-Csn6HPxJ.js";import{Ft as n,It as r}from"./messages-Bp0bCjzp.js";import{n as i}from"./dist-BGqHIBUe.js";function a(t){return e.useQuery(`get`,`/admin/api/v1/settings`,t?{params:{query:{group:t}}}:void 0)}function o(){return e.useMutation(`put`,`/admin/api/v1/settings`)}function s(e,t,n=``){return e?.find(e=>e.key===t)?.value??n}async function c(e,a,o=r()){let s=(await e({body:{items:a}})).data?.find(e=>!e.ok);if(s){i.error(n({error:s.error_code?t(s.error_code):s.error??``,key:s.key??``}));return}i.success(o)}async function l(e,t,n){await c(e,t,n)}export{o as a,a as i,l as n,c as r,s as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{a as r,i,t as a}from"./useRouter-DtTm7XkK.js";import{l as o,s as ee,t as te,u as s}from"./useStore-CupyIEEP.js";import{a as ne,c,n as re}from"./ClientOnly-CWlB586P.js";import{r as l}from"./dist-XiAcd8rT.js";var ie=`Error preloading route! ☝️`,u=e(t(),1);n();var ae=e(l(),1);function d(e,t){let n=a(),l=i(t),{activeProps:d,inactiveProps:g,activeOptions:_,to:v,preload:pe,preloadDelay:me,preloadIntentProximity:he,hashScrollIntoView:ge,replace:y,startTransition:_e,resetScroll:b,viewTransition:ve,children:x,target:S,disabled:C,style:w,className:T,onClick:E,onBlur:D,onFocus:O,onMouseEnter:k,onMouseLeave:A,onTouchStart:j,ignoreBlocker:M,params:ye,search:be,hash:xe,state:Se,mask:Ce,reloadDocument:we,unsafeRelative:Te,from:Ee,_fromLocation:De,...N}=e,P=re(),F=u.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),I=te(n.stores.location,e=>e,(e,t)=>e.href===t.href),L=u.useMemo(()=>{let e={_fromLocation:I,...F};return n.buildLocation(e)},[n,I,F]),R=L.maskedLocation?L.maskedLocation.publicHref:L.publicHref,z=L.maskedLocation?L.maskedLocation.external:L.external,B=u.useMemo(()=>ue(R,z,n.history,C),[C,z,R,n.history]),V=u.useMemo(()=>{if(B?.external)return s(B.href,n.protocolAllowlist)?void 0:B.href;if(!de(v)&&!(typeof v!=`string`||v.indexOf(`:`)===-1))try{return new URL(v),s(v,n.protocolAllowlist)?void 0:v}catch{}},[v,B,n.protocolAllowlist]),H=u.useMemo(()=>{if(V)return!1;if(_?.exact){if(!ne(I.pathname,L.pathname,n.basepath))return!1}else{let e=c(I.pathname,n.basepath),t=c(L.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(_?.includeSearch??!0)&&!ee(I.search,L.search,{partial:!_?.exact,ignoreUndefined:!_?.explicitUndefined})?!1:_?.includeHash?P&&I.hash===L.hash:!0},[_?.exact,_?.explicitUndefined,_?.includeHash,_?.includeSearch,I,V,P,L.hash,L.pathname,L.search,n.basepath]),U=H?o(d,{})??oe:f,W=H?f:o(g,{})??f,G=[T,U.className,W.className].filter(Boolean).join(` `),K=(w||U.style||W.style)&&{...w,...U.style,...W.style},[Oe,q]=u.useState(!1),J=u.useRef(!1),Y=e.reloadDocument||V?!1:pe??n.options.defaultPreload,X=me??n.options.defaultPreloadDelay??0,Z=u.useCallback(()=>{n.preloadRoute({...F,_builtLocation:L}).catch(e=>{console.warn(e),console.warn(ie)})},[n,F,L]);r(l,u.useCallback(e=>{e?.isIntersecting&&Z()},[Z]),m,{disabled:!!C||Y!==`viewport`}),u.useEffect(()=>{J.current||!C&&Y===`render`&&(Z(),J.current=!0)},[C,Z,Y]);let ke=e=>{let t=e.currentTarget.getAttribute(`target`),r=S===void 0?t:S;if(!C&&!fe(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,ae.flushSync)(()=>{q(!0)});let t=n.subscribe(`onResolved`,()=>{t(),q(!1)});n.navigate({...F,replace:y,resetScroll:b,hashScrollIntoView:ge,startTransition:_e,viewTransition:ve,ignoreBlocker:M})}};if(V)return{...N,ref:l,href:V,...x&&{children:x},...S&&{target:S},...C&&{disabled:C},...w&&{style:w},...T&&{className:T},...E&&{onClick:E},...D&&{onBlur:D},...O&&{onFocus:O},...k&&{onMouseEnter:k},...A&&{onMouseLeave:A},...j&&{onTouchStart:j}};let Q=e=>{if(C||Y!==`intent`)return;if(!X){Z();return}let t=e.currentTarget;if(p.has(t))return;let n=setTimeout(()=>{p.delete(t),Z()},X);p.set(t,n)},Ae=e=>{C||Y!==`intent`||Z()},$=e=>{if(C||!Y||!X)return;let t=e.currentTarget,n=p.get(t);n&&(clearTimeout(n),p.delete(t))};return{...N,...U,...W,href:B?.href,ref:l,onClick:h([E,ke]),onBlur:h([D,$]),onFocus:h([O,Q]),onMouseEnter:h([k,Q]),onMouseLeave:h([A,$]),onTouchStart:h([j,Ae]),disabled:!!C,target:S,...K&&{style:K},...G&&{className:G},...C&&se,...H&&ce,...P&&Oe&&le}}var f={},oe={className:`active`},se={role:`link`,"aria-disabled":!0},ce={"data-status":`active`,"aria-current":`page`},le={"data-transitioning":`transitioning`},p=new WeakMap,m={rootMargin:`100px`},h=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ue(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function de(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var g=u.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=d(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return u.createElement(`a`,t,o)}return u.createElement(n,a,o)});function fe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{g as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{a as r,i,t as a}from"./useRouter-DtTm7XkK.js";import{l as o,s as ee,t as te,u as s}from"./useStore-CupyIEEP.js";import{a as ne,c,n as re}from"./ClientOnly-fFIveJVd.js";import{r as l}from"./dist-BFnxq45V.js";var ie=`Error preloading route! ☝️`,u=e(t(),1);n();var ae=e(l(),1);function d(e,t){let n=a(),l=i(t),{activeProps:d,inactiveProps:g,activeOptions:_,to:v,preload:pe,preloadDelay:me,preloadIntentProximity:he,hashScrollIntoView:ge,replace:y,startTransition:_e,resetScroll:b,viewTransition:ve,children:x,target:S,disabled:C,style:w,className:T,onClick:E,onBlur:D,onFocus:O,onMouseEnter:k,onMouseLeave:A,onTouchStart:j,ignoreBlocker:M,params:ye,search:be,hash:xe,state:Se,mask:Ce,reloadDocument:we,unsafeRelative:Te,from:Ee,_fromLocation:De,...N}=e,P=re(),F=u.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),I=te(n.stores.location,e=>e,(e,t)=>e.href===t.href),L=u.useMemo(()=>{let e={_fromLocation:I,...F};return n.buildLocation(e)},[n,I,F]),R=L.maskedLocation?L.maskedLocation.publicHref:L.publicHref,z=L.maskedLocation?L.maskedLocation.external:L.external,B=u.useMemo(()=>ue(R,z,n.history,C),[C,z,R,n.history]),V=u.useMemo(()=>{if(B?.external)return s(B.href,n.protocolAllowlist)?void 0:B.href;if(!de(v)&&!(typeof v!=`string`||v.indexOf(`:`)===-1))try{return new URL(v),s(v,n.protocolAllowlist)?void 0:v}catch{}},[v,B,n.protocolAllowlist]),H=u.useMemo(()=>{if(V)return!1;if(_?.exact){if(!ne(I.pathname,L.pathname,n.basepath))return!1}else{let e=c(I.pathname,n.basepath),t=c(L.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(_?.includeSearch??!0)&&!ee(I.search,L.search,{partial:!_?.exact,ignoreUndefined:!_?.explicitUndefined})?!1:_?.includeHash?P&&I.hash===L.hash:!0},[_?.exact,_?.explicitUndefined,_?.includeHash,_?.includeSearch,I,V,P,L.hash,L.pathname,L.search,n.basepath]),U=H?o(d,{})??oe:f,W=H?f:o(g,{})??f,G=[T,U.className,W.className].filter(Boolean).join(` `),K=(w||U.style||W.style)&&{...w,...U.style,...W.style},[Oe,q]=u.useState(!1),J=u.useRef(!1),Y=e.reloadDocument||V?!1:pe??n.options.defaultPreload,X=me??n.options.defaultPreloadDelay??0,Z=u.useCallback(()=>{n.preloadRoute({...F,_builtLocation:L}).catch(e=>{console.warn(e),console.warn(ie)})},[n,F,L]);r(l,u.useCallback(e=>{e?.isIntersecting&&Z()},[Z]),m,{disabled:!!C||Y!==`viewport`}),u.useEffect(()=>{J.current||!C&&Y===`render`&&(Z(),J.current=!0)},[C,Z,Y]);let ke=e=>{let t=e.currentTarget.getAttribute(`target`),r=S===void 0?t:S;if(!C&&!fe(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,ae.flushSync)(()=>{q(!0)});let t=n.subscribe(`onResolved`,()=>{t(),q(!1)});n.navigate({...F,replace:y,resetScroll:b,hashScrollIntoView:ge,startTransition:_e,viewTransition:ve,ignoreBlocker:M})}};if(V)return{...N,ref:l,href:V,...x&&{children:x},...S&&{target:S},...C&&{disabled:C},...w&&{style:w},...T&&{className:T},...E&&{onClick:E},...D&&{onBlur:D},...O&&{onFocus:O},...k&&{onMouseEnter:k},...A&&{onMouseLeave:A},...j&&{onTouchStart:j}};let Q=e=>{if(C||Y!==`intent`)return;if(!X){Z();return}let t=e.currentTarget;if(p.has(t))return;let n=setTimeout(()=>{p.delete(t),Z()},X);p.set(t,n)},Ae=e=>{C||Y!==`intent`||Z()},$=e=>{if(C||!Y||!X)return;let t=e.currentTarget,n=p.get(t);n&&(clearTimeout(n),p.delete(t))};return{...N,...U,...W,href:B?.href,ref:l,onClick:h([E,ke]),onBlur:h([D,$]),onFocus:h([O,Q]),onMouseEnter:h([k,Q]),onMouseLeave:h([A,$]),onTouchStart:h([j,Ae]),disabled:!!C,target:S,...K&&{style:K},...G&&{className:G},...C&&se,...H&&ce,...P&&Oe&&le}}var f={},oe={className:`active`},se={role:`link`,"aria-disabled":!0},ce={"data-status":`active`,"aria-current":`page`},le={"data-transitioning":`transitioning`},p=new WeakMap,m={rootMargin:`100px`},h=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ue(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function de(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var g=u.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=d(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return u.createElement(`a`,t,o)}return u.createElement(n,a,o)});function fe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{g as t};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{em as e}from"./messages-Bp0bCjzp.js";import{i as t}from"./button-BgMnOYKD.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`img`,{alt:`GMPay`,className:t(`size-6`,e),height:24,src:`/images/logo.png`,width:24,...r})}export{r as t};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{i as t}from"./button-C0SPdqvs.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`img`,{alt:`GMPay`,className:t(`size-6`,e),height:24,src:`/images/logo.png`,width:24,...r})}export{r as t};
|
|
||||||
@@ -1 +1 @@
|
|||||||
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{Zp as n}from"./messages-BLwDcEAr.js";import{i as r}from"./button-C0SPdqvs.js";import{n as i,r as a,t as o}from"./popover-i2MohyOU.js";import{i as s,n as c,r as l,t as u}from"./tooltip-8Hby-rrx.js";var d=e(t(),1),f=n();function p({children:e,className:t=``,contentClassName:n=``}){let p=(0,d.useRef)(null),[h,g]=(0,d.useState)(!1),_=e=>{p.current=e,e&&m(e)&&queueMicrotask(()=>g(!0))};return h?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`hidden sm:block`,children:(0,f.jsx)(l,{delayDuration:0,children:(0,f.jsxs)(u,{children:[(0,f.jsx)(s,{asChild:!0,children:(0,f.jsx)(`div`,{className:r(`truncate`,t),ref:_,children:e})}),(0,f.jsx)(c,{children:(0,f.jsx)(`p`,{className:n,children:e})})]})})}),(0,f.jsx)(`div`,{className:`sm:hidden`,children:(0,f.jsxs)(o,{children:[(0,f.jsx)(a,{asChild:!0,children:(0,f.jsx)(`div`,{className:r(`truncate`,t),ref:_,children:e})}),(0,f.jsx)(i,{className:r(`w-fit`,n),children:(0,f.jsx)(`p`,{children:e})})]})})]}):(0,f.jsx)(`div`,{className:r(`truncate`,t),ref:_,children:e})}var m=e=>e?e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth:!1;export{p as t};
|
import{r as e}from"./chunk-DECur_0Z.js";import{t}from"./react-CO2uhaBc.js";import{em as n}from"./messages-Bp0bCjzp.js";import{i as r}from"./button-BgMnOYKD.js";import{n as i,r as a,t as o}from"./popover-YeKifm3K.js";import{i as s,n as c,r as l,t as u}from"./tooltip-Gx9CUpPD.js";var d=e(t(),1),f=n();function p({children:e,className:t=``,contentClassName:n=``}){let p=(0,d.useRef)(null),[h,g]=(0,d.useState)(!1),_=e=>{p.current=e,e&&m(e)&&queueMicrotask(()=>g(!0))};return h?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`hidden sm:block`,children:(0,f.jsx)(l,{delayDuration:0,children:(0,f.jsxs)(u,{children:[(0,f.jsx)(s,{asChild:!0,children:(0,f.jsx)(`div`,{className:r(`truncate`,t),ref:_,children:e})}),(0,f.jsx)(c,{children:(0,f.jsx)(`p`,{className:n,children:e})})]})})}),(0,f.jsx)(`div`,{className:`sm:hidden`,children:(0,f.jsxs)(o,{children:[(0,f.jsx)(a,{asChild:!0,children:(0,f.jsx)(`div`,{className:r(`truncate`,t),ref:_,children:e})}),(0,f.jsx)(i,{className:r(`w-fit`,n),children:(0,f.jsx)(`p`,{children:e})})]})})]}):(0,f.jsx)(`div`,{className:r(`truncate`,t),ref:_,children:e})}var m=e=>e?e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth:!1;export{p as t};
|
||||||
@@ -1 +1 @@
|
|||||||
import{Zp as e}from"./messages-BLwDcEAr.js";import{t}from"./link-uW89koiO.js";import{i as n,t as r}from"./button-C0SPdqvs.js";import{a as i,l as a,r as o,t as s}from"./dropdown-menu-CDbt-i_J.js";import{t as c}from"./createLucideIcon-Br0Bd5k2.js";import{n as l,t as u}from"./theme-switch-B3KcLEky.js";import{n as d,r as f,t as p}from"./header-NBnXYgM_.js";var m=c(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),h=e();function g({className:e,links:c,...l}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`lg:hidden`,children:(0,h.jsxs)(s,{modal:!1,children:[(0,h.jsx)(a,{asChild:!0,children:(0,h.jsx)(r,{className:`md:size-7`,size:`icon`,variant:`outline`,children:(0,h.jsx)(m,{})})}),(0,h.jsx)(o,{align:`start`,side:`bottom`,children:c.map(({title:e,href:n,isActive:r,disabled:a})=>(0,h.jsx)(i,{asChild:!0,children:(0,h.jsx)(t,{className:r?``:`text-muted-foreground`,disabled:a,to:n,children:e})},`${e}-${n}`))})]})}),(0,h.jsx)(`nav`,{className:n(`hidden items-center space-x-4 lg:flex lg:space-x-4 xl:space-x-6`,e),...l,children:c.map(({title:e,href:n,isActive:r,disabled:i})=>(0,h.jsx)(t,{className:`font-medium text-sm transition-colors hover:text-primary ${r?``:`text-muted-foreground`}`,disabled:i,to:n,children:e},`${e}-${n}`))})]})}function _({fixed:e,topNav:t}){return(0,h.jsxs)(p,{fixed:e,children:[t?(0,h.jsx)(g,{links:t}):(0,h.jsx)(d,{}),(0,h.jsxs)(`div`,{className:`ms-auto flex items-center space-x-4`,children:[t&&(0,h.jsx)(d,{}),(0,h.jsx)(l,{}),(0,h.jsx)(u,{}),(0,h.jsx)(f,{})]})]})}function v({fixed:e,className:t,fluid:r,...i}){return(0,h.jsx)(`main`,{className:n(`px-4 py-6`,e&&`flex grow flex-col overflow-hidden`,!r&&`@7xl/content:mx-auto @7xl/content:w-full @7xl/content:max-w-7xl`,t),"data-layout":e?`fixed`:`auto`,...i})}export{_ as n,v as t};
|
import{em as e}from"./messages-Bp0bCjzp.js";import{t}from"./link-BYG8nKNO.js";import{i as n,t as r}from"./button-BgMnOYKD.js";import{a as i,l as a,r as o,t as s}from"./dropdown-menu-8-hEBtzr.js";import{t as c}from"./createLucideIcon-Br0Bd5k2.js";import{n as l,t as u}from"./theme-switch-B3Qb32n8.js";import{n as d,r as f,t as p}from"./header-D45l3Ai7.js";var m=c(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),h=e();function g({className:e,links:c,...l}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`lg:hidden`,children:(0,h.jsxs)(s,{modal:!1,children:[(0,h.jsx)(a,{asChild:!0,children:(0,h.jsx)(r,{className:`md:size-7`,size:`icon`,variant:`outline`,children:(0,h.jsx)(m,{})})}),(0,h.jsx)(o,{align:`start`,side:`bottom`,children:c.map(({title:e,href:n,isActive:r,disabled:a})=>(0,h.jsx)(i,{asChild:!0,children:(0,h.jsx)(t,{className:r?``:`text-muted-foreground`,disabled:a,to:n,children:e})},`${e}-${n}`))})]})}),(0,h.jsx)(`nav`,{className:n(`hidden items-center space-x-4 lg:flex lg:space-x-4 xl:space-x-6`,e),...l,children:c.map(({title:e,href:n,isActive:r,disabled:i})=>(0,h.jsx)(t,{className:`font-medium text-sm transition-colors hover:text-primary ${r?``:`text-muted-foreground`}`,disabled:i,to:n,children:e},`${e}-${n}`))})]})}function _({fixed:e,topNav:t}){return(0,h.jsxs)(p,{fixed:e,children:[t?(0,h.jsx)(g,{links:t}):(0,h.jsx)(d,{}),(0,h.jsxs)(`div`,{className:`ms-auto flex items-center space-x-4`,children:[t&&(0,h.jsx)(d,{}),(0,h.jsx)(l,{}),(0,h.jsx)(u,{}),(0,h.jsx)(f,{})]})]})}function v({fixed:e,className:t,fluid:r,...i}){return(0,h.jsx)(`main`,{className:n(`px-4 py-6`,e&&`flex grow flex-col overflow-hidden`,!r&&`@7xl/content:mx-auto @7xl/content:w-full @7xl/content:max-w-7xl`,t),"data-layout":e?`fixed`:`auto`,...i})}export{_ as n,v as t};
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
import{At as e,Fp as t,Zp as n,jt as r,kt as i}from"./messages-BLwDcEAr.js";import{t as a}from"./button-C0SPdqvs.js";var o=n();function s(){return(0,o.jsx)(`div`,{className:`h-svh`,children:(0,o.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,o.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`503`}),(0,o.jsx)(`span`,{className:`font-medium`,children:r()}),(0,o.jsxs)(`p`,{className:`text-center text-muted-foreground`,children:[e(),` `,(0,o.jsx)(`br`,{}),i()]}),(0,o.jsx)(`div`,{className:`mt-6 flex gap-4`,children:(0,o.jsx)(a,{variant:`outline`,children:t()})})]})})}export{s as t};
|
import{At as e,Rp as t,em as n,jt as r,kt as i}from"./messages-Bp0bCjzp.js";import{t as a}from"./button-BgMnOYKD.js";var o=n();function s(){return(0,o.jsx)(`div`,{className:`h-svh`,children:(0,o.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,o.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`503`}),(0,o.jsx)(`span`,{className:`font-medium`,children:r()}),(0,o.jsxs)(`p`,{className:`text-center text-muted-foreground`,children:[e(),` `,(0,o.jsx)(`br`,{}),i()]}),(0,o.jsx)(`div`,{className:`mt-6 flex gap-4`,children:(0,o.jsx)(a,{variant:`outline`,children:t()})})]})})}export{s as t};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
import{Dd as e,Ed as t,Od as n,Td as r,Zp as i}from"./messages-BLwDcEAr.js";import{t as a}from"./useRouter-DtTm7XkK.js";import{t as o}from"./useNavigate-7u4DX0Ho.js";import{t as s}from"./button-C0SPdqvs.js";var c=i();function l(){let i=o(),{history:l}=a();return(0,c.jsx)(`div`,{className:`h-svh`,children:(0,c.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,c.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`404`}),(0,c.jsx)(`span`,{className:`font-medium`,children:t()}),(0,c.jsx)(`p`,{className:`text-center text-muted-foreground`,children:r()}),(0,c.jsxs)(`div`,{className:`mt-6 flex gap-4`,children:[(0,c.jsx)(s,{onClick:()=>l.go(-1),variant:`outline`,children:n()}),(0,c.jsx)(s,{onClick:()=>i({to:`/dashboard`}),children:e()})]})]})})}export{l as t};
|
import{Dd as e,Ed as t,Od as n,Td as r,em as i}from"./messages-Bp0bCjzp.js";import{t as a}from"./useRouter-DtTm7XkK.js";import{t as o}from"./useNavigate-7u4DX0Ho.js";import{t as s}from"./button-BgMnOYKD.js";var c=i();function l(){let i=o(),{history:l}=a();return(0,c.jsx)(`div`,{className:`h-svh`,children:(0,c.jsxs)(`div`,{className:`m-auto flex h-full w-full flex-col items-center justify-center gap-2`,children:[(0,c.jsx)(`h1`,{className:`font-bold text-[7rem] leading-tight`,children:`404`}),(0,c.jsx)(`span`,{className:`font-medium`,children:t()}),(0,c.jsx)(`p`,{className:`text-center text-muted-foreground`,children:r()}),(0,c.jsxs)(`div`,{className:`mt-6 flex gap-4`,children:[(0,c.jsx)(s,{onClick:()=>l.go(-1),variant:`outline`,children:n()}),(0,c.jsx)(s,{onClick:()=>i({to:`/dashboard`}),children:e()})]})]})})}export{l as t};
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user