chainlesschain 0.162.148 → 0.162.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-DwpCCp64.js → AIOps-CBLvrjeG.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-C9pBYocA.js → ActionButton-DYv2GtE0.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-BWAkeXxK.js → Analytics-CL6PZ-Ww.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-CivFGH6B.js → AppLayout-xuyHt4uA.js} +3 -3
- package/src/assets/web-panel/assets/{Audit-Cm8hRpZm.js → Audit-DOvSVycq.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-DXdFMsE8.js → Backup-DMhfTswr.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-uAwSTeql.js → BaseInput-CQxDdm63.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-KU8eeJJE.js → Chat-BEeNhK2a.js} +5 -5
- package/src/assets/web-panel/assets/ChatBubbleRenderer-8nul8eTq.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-C6AMDkjd.js → Checkbox-CL04O-ER.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-t2moDxcO.js → Codegen-C50o-n7x.js} +1 -1
- package/src/assets/web-panel/assets/{Col-DCcsRRhN.js → Col-CH-bDkzs.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DtB-8SAC.js → Community-DqAIMvSe.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-CZm8THYA.js → Compact-C43fo_my.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-LiQgC7g1.js → Compliance-BERnMrdP.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CA8SAxht.js → Cowork-Baw3w1gp.js} +4 -4
- package/src/assets/web-panel/assets/{Cron-CtRaF1wD.js → Cron-BEqAHF1-.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-6-br6Hub.js → Crosschain-CvnmKwK4.js} +1 -1
- package/src/assets/web-panel/assets/{DID-Do2EccrL.js → DID-iMPxgVdt.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-wrXcbzGe.js → Dashboard--4SJX3YR.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-p3FsT245.js → Dropdown-BgLV6xgz.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-D95A2L8q.js → EmailListRenderer-Bvb8oUD8.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-cLuJW2zo.js → FamilyGuardDashboard-DpXPjJB5.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-Brgq_cbN.js → Federation-BbFfJ1Xi.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-DWLCkNgh.js → FormItemContext-DeGq1B-q.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BBqUfQd6.js → GenericCardRenderer-CNW7s9zM.js} +1 -1
- package/src/assets/web-panel/assets/{Git-8F090w4I.js → Git-L1PjW-lT.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CCogEbxb.js → Governance-PK-X58to.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-CfLD7v7C.js → Inference-BePWEH-d.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DDuHJewd.js → KnowledgeGraph-LF_sBvdL.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-CE8KSEVC.js → Logs-BKkfk9hy.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-DmwpZmhT.js → Marketplace-BNMqUDla.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Bf7AazU8.js → McpTools-w4WPiyz2.js} +5 -5
- package/src/assets/web-panel/assets/{Memory-D0QU_00S.js → Memory-DUKMVGNi.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-yXS9xdhx.js → MobileBridge-BWhiEyTJ.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-BuDUoGUP.js → MobileProjects-Ocf5JEkX.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-BYyHy28p.js → Mtc-D2B6MMhU.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-CK0aqpiZ.js → MtcAudit-DdYjCq1O.js} +4 -4
- package/src/assets/web-panel/assets/{Multisig-mNimKYeb.js → Multisig-Cb1hfuUZ.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-AioAJ0YA.js → NLProgramming-CTeImGp7.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-CVVNCLHE.js → Notes-BjYNc7eQ.js} +4 -4
- package/src/assets/web-panel/assets/{NotificationSettings-C4ABj-TK.js → NotificationSettings-Dn_NtRXQ.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-DIp8Xcbd.js → OrderTableRenderer-DVYYIizh.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-uozl_gWK.js → Organization-Be2Kmr5j.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-BCZOM2hK.js → Overflow-Cu_-qRlR.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CArcaiaj.js → P2P-DD2HoGzE.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-Sgq2Srr8.js → PdhVaultBrowser-BRI7DVth.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-BYrQrXnH.js → Permissions-C9Srcs2M.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-BzHStAbz.js → PersonalDataHub-CUqcMgo1.js} +3 -3
- package/src/assets/web-panel/assets/{Pipeline-k7KqxX1M.js → Pipeline-HBrQGLXt.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-IumTUWqx.js → Privacy-D-B0vjwh.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BRyImYTf.js → ProjectInit-eTeLIu9e.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-BFIqTBFk.js → ProjectSettings-DrRqCsC6.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-Dpid9CDg.js → Projects-1G9DNOhI.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-CyyFnUPs.js → Providers-RkTZzpxP.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-C82cRx-X.js → QrScannerModal-BSCUgsgC.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-DGxDF521.js → QuickAsk-CHgyM3Bz.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-Cns-Am1y.js → Recommend-0lry4OZq.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-R7OqAIlg.js → RemoteSession-Cn45UroZ.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-D7mgPIYV.js → Reputation-Q-Zjb707.js} +1 -1
- package/src/assets/web-panel/assets/{Row-B3lEURyd.js → Row-BdM70oda.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-9_UVrpBt.js → RssFeed-DmOAKKap.js} +2 -2
- package/src/assets/web-panel/assets/{Search-ClZeO80q.js → Search-Dwavbm07.js} +1 -1
- package/src/assets/web-panel/assets/{Security-BNNJczEp.js → Security-DukXFCnk.js} +3 -3
- package/src/assets/web-panel/assets/{Services-C5SjrWUj.js → Services-BIlRnITu.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-Ci_obQ-g.js → Skeleton-YYVQdhhQ.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-DdebN15P.js → Skills-B8_iYHz2.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-OinZP2vi.js → Sla-BdVrhT31.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CxzbNF51.js → SpeechSettings-CD3ggRx7.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-D06N_66b.js → SyncSettings-Bp02VZFH.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-BdEdW0AZ.js → Tasks-DEVmCEsr.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-F1ctKmPa.js → Templates-B6czWc4N.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-CVz1Urot.js → Tenant-BCJLv17r.js} +1 -1
- package/src/assets/web-panel/assets/Terminal-CD132d2Y.js +3 -0
- package/src/assets/web-panel/assets/{TimelineRenderer-Doitzjmf.js → TimelineRenderer-ZB-CvkZl.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-BpyVRpVA.js → Tokens-BnSY0S-s.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-nWhWYTbU.js → Trigger-VZw9Oy2w.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-DK_G-wLx.js → Trust-pZq7Hjd2.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-B5yBUojO.js → UkeySign-DnQaqk4q.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-C5D51qAe.js → VideoEditing-BEUfmvJV.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-CLbL9K7v.js → Wallet-CoZKMXJ2.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-DZUelI3V.js → WebAuthn-CBOGVx1I.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-8RPxt4KW.js → WorkflowEditor-huSKn7TT.js} +1 -1
- package/src/assets/web-panel/assets/{chat-4N4tOA3d.js → chat-A_3w6FBO.js} +1 -1
- package/src/assets/web-panel/assets/{colors-zbbGVrua.js → colors-D1Bem9Oy.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-D7iMkbnE.js → compact-item-CJYJj0oO.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CBzPJv-w.js → createContext-BkbFiKT4.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-WDr3_M_N.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-bHdrQSqZ.js → hasIn-CKvUafVY.js} +1 -1
- package/src/assets/web-panel/assets/{index-DbE5D0WL.js → index-AjrSPnvv.js} +1 -1
- package/src/assets/web-panel/assets/{index-BCr0geV9.js → index-B8i0lViZ.js} +1 -1
- package/src/assets/web-panel/assets/{index-CiG1IZao.js → index-B9Svn0zc.js} +1 -1
- package/src/assets/web-panel/assets/{index-B1s0Bz9O.js → index-BHdHSX06.js} +1 -1
- package/src/assets/web-panel/assets/{index-QFObYeo1.js → index-BHdailyo.js} +1 -1
- package/src/assets/web-panel/assets/{index-BnBOpqv3.js → index-BJwlEnYo.js} +1 -1
- package/src/assets/web-panel/assets/{index-CdmMoYN1.js → index-BOoAQjJz.js} +1 -1
- package/src/assets/web-panel/assets/{index-DUyjUkY7.js → index-BSgWxAOG.js} +1 -1
- package/src/assets/web-panel/assets/{index-CqdPyWm5.js → index-BdutMsne.js} +1 -1
- package/src/assets/web-panel/assets/{index-DmqlJed-.js → index-BiDWxzbn.js} +1 -1
- package/src/assets/web-panel/assets/{index-S74FpAIn.js → index-By5a0T_W.js} +1 -1
- package/src/assets/web-panel/assets/{index-kmh1TxRa.js → index-C-WIY-FQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-BTIjjXry.js → index-C37f6iey.js} +1 -1
- package/src/assets/web-panel/assets/{index-BS4_Mwk6.js → index-C9bWmTcO.js} +1 -1
- package/src/assets/web-panel/assets/{index-BBNr77E1.js → index-CBaosWRO.js} +1 -1
- package/src/assets/web-panel/assets/{index-QNAG4JtR.js → index-CBlBVJ_m.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bqmx24kh.js → index-CD62EEGo.js} +1 -1
- package/src/assets/web-panel/assets/{index-CQfu1U78.js → index-CUj-l7GM.js} +1 -1
- package/src/assets/web-panel/assets/{index-BJ4ZGyW0.js → index-CVS8Ymuq.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ci009ijp.js → index-ChkXUj3f.js} +1 -1
- package/src/assets/web-panel/assets/{index-oDKNgCsP.js → index-Cj0OZ-37.js} +1 -1
- package/src/assets/web-panel/assets/{index-BZb8F8YG.js → index-Co3OFL0t.js} +1 -1
- package/src/assets/web-panel/assets/{index-308gCGh7.js → index-Crp8CbRg.js} +1 -1
- package/src/assets/web-panel/assets/{index-CPxkoKgA.js → index-D22zNXiS.js} +1 -1
- package/src/assets/web-panel/assets/{index-xYCm6W2h.js → index-DTs_D1OL.js} +1 -1
- package/src/assets/web-panel/assets/{index-BtbbdLnf.js → index-DfgCdFrN.js} +3 -3
- package/src/assets/web-panel/assets/{index-BsKehmmS.js → index-DjYrecNb.js} +1 -1
- package/src/assets/web-panel/assets/{index-CkxK86vf.js → index-DpW9cf3e.js} +1 -1
- package/src/assets/web-panel/assets/index-Dwix3p4g.js +1 -0
- package/src/assets/web-panel/assets/{index-CvRMA9uT.js → index-F--HuPG1.js} +1 -1
- package/src/assets/web-panel/assets/{index-DE9j5YgT.js → index-Fuk6t_3K.js} +1 -1
- package/src/assets/web-panel/assets/{index-B7b1hGry.js → index-JEAGMii9.js} +1 -1
- package/src/assets/web-panel/assets/{index-D1YDh7Wr.js → index-PF-mpv8K.js} +1 -1
- package/src/assets/web-panel/assets/index-SHaoZ0CA.js +1 -0
- package/src/assets/web-panel/assets/{index-CQ6NcfWz.js → index-b-sbVdjQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-DyoNgbXl.js → index-pyvMVX8r.js} +1 -1
- package/src/assets/web-panel/assets/{index-DISWAYce.js → index-qNTtOVi_.js} +1 -1
- package/src/assets/web-panel/assets/{index-D4XKpj6c.js → index-tgO8iza6.js} +1 -1
- package/src/assets/web-panel/assets/{index-CahryTX0.js → index-ttDQVhZy.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BD55yNBt.js → initDefaultProps-DtrnfsZH.js} +1 -1
- package/src/assets/web-panel/assets/{motion-B5Bbe77U.js → motion-D4zqSaX3.js} +1 -1
- package/src/assets/web-panel/assets/{move-CTvIqHEH.js → move-CGFGOUQj.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-BkNyPQKB.js → mtc-parser-DH2HvkJl.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BaXJXgHA.js → omit-jJ2at5HX.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-Bw6-YTxH.js → pickAttrs-CRyMT1Fv.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-BLdbkLqJ.js → placementArrow-DZ_CX0Pt.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-IVYkzntU.js → responsiveObserve-wruHk-h5.js} +1 -1
- package/src/assets/web-panel/assets/{slide-DFMFwwtY.js → slide-BGgx8q67.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CURYRtZ1.js → statusUtils-Do5M7gKm.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-Cfz63s1r.js → styleChecker-CRa-GZpX.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-COJL0KE3.js → useFlexGapSupport-BxPcq6pj.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-YLLojQQf.js → useFs-v5O2ZcJm.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-BF_21qUC.js → usePersonalDataHub--z2FU0Px.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-9ZpkA7bb.js → vnode-1emidVKd.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-DhtAfhl8.js → zoom-CcJaRyHs.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/assets/web-panel/remote-session-sw.js +43 -0
- package/src/command-manifest.json +22 -1
- package/src/commands/a2a.js +19 -4
- package/src/commands/activitypub.js +20 -3
- package/src/commands/agent.js +71 -10
- package/src/commands/audit.js +40 -24
- package/src/commands/codeintel.js +320 -0
- package/src/commands/collab.js +15 -2
- package/src/commands/compliance.js +5 -0
- package/src/commands/config.js +4 -1
- package/src/commands/dao.js +86 -14
- package/src/commands/dev.js +2 -0
- package/src/commands/did.js +7 -1
- package/src/commands/dlp.js +23 -1
- package/src/commands/economy.js +29 -3
- package/src/commands/eval.js +255 -0
- package/src/commands/evomap.js +26 -0
- package/src/commands/governance.js +17 -3
- package/src/commands/hardening.js +18 -0
- package/src/commands/incentive.js +5 -0
- package/src/commands/init.js +46 -2
- package/src/commands/kg.js +4 -0
- package/src/commands/loop.js +6 -1
- package/src/commands/lowcode.js +15 -2
- package/src/commands/marketplace.js +40 -6
- package/src/commands/matrix.js +20 -1
- package/src/commands/memory.js +4 -1
- package/src/commands/mtc.js +7 -1
- package/src/commands/nostr.js +31 -4
- package/src/commands/note.js +7 -4
- package/src/commands/plugin.js +474 -0
- package/src/commands/pqc.js +5 -0
- package/src/commands/reputation.js +10 -1
- package/src/commands/scim.js +6 -0
- package/src/commands/session.js +32 -10
- package/src/commands/siem.js +11 -0
- package/src/commands/sla.js +18 -3
- package/src/commands/social.js +38 -5
- package/src/commands/sso.js +10 -2
- package/src/commands/stress.js +23 -4
- package/src/commands/team.js +463 -0
- package/src/commands/tech.js +2 -0
- package/src/commands/tenant.js +10 -1
- package/src/commands/terraform.js +6 -0
- package/src/commands/update.js +1 -1
- package/src/commands/zkp.js +20 -0
- package/src/gateways/ws/message-dispatcher.js +48 -2
- package/src/gateways/ws/remote-session-protocol.js +140 -42
- package/src/gateways/ws/ws-server.js +1 -1
- package/src/harness/jsonl-session-store.js +12 -5
- package/src/harness/plugin-manager.js +16 -4
- package/src/harness/prompt-compressor.js +27 -1
- package/src/harness/remote-command-ledger.js +189 -0
- package/src/harness/remote-session-push-apns.js +246 -0
- package/src/harness/remote-session-push-errors.js +15 -0
- package/src/harness/remote-session-push-fcm.js +9 -25
- package/src/harness/remote-session-push-huawei.js +174 -0
- package/src/harness/remote-session-push-oppo.js +171 -0
- package/src/harness/remote-session-push-senders.js +42 -0
- package/src/harness/remote-session-push-vivo.js +179 -0
- package/src/harness/remote-session-push-web.js +299 -0
- package/src/harness/remote-session-push-xiaomi.js +99 -0
- package/src/harness/worktree-isolator.js +16 -6
- package/src/index.js +6 -0
- package/src/lib/__tests__/logger.test.js +5 -2
- package/src/lib/a2a-protocol.js +25 -1
- package/src/lib/activitypub-bridge.js +61 -0
- package/src/lib/agent-core.js +4 -0
- package/src/lib/agent-economy.js +262 -29
- package/src/lib/agent-network.js +7 -1
- package/src/lib/agent-sandbox.js +161 -5
- package/src/lib/agent-team/task-lease.js +434 -0
- package/src/lib/agent-team/team-budget.js +165 -0
- package/src/lib/agent-team/team-mailbox.js +106 -0
- package/src/lib/agent-team/team-runner.js +282 -0
- package/src/lib/agent-team/team-worktree.js +236 -0
- package/src/lib/agents.js +18 -0
- package/src/lib/async-hook-supervisor.cjs +391 -0
- package/src/lib/audit-logger.js +7 -6
- package/src/lib/autonomous-developer.js +60 -0
- package/src/lib/chat-core.js +17 -4
- package/src/lib/collaboration-governance.js +56 -0
- package/src/lib/community-governance.js +68 -0
- package/src/lib/compliance-manager.js +63 -0
- package/src/lib/cross-chain.js +5 -0
- package/src/lib/dao-governance.js +151 -2
- package/src/lib/did-manager.js +23 -10
- package/src/lib/dlp-engine.js +70 -0
- package/src/lib/eval/runner.js +251 -0
- package/src/lib/eval/tasks.js +626 -0
- package/src/lib/eval/trend.js +200 -0
- package/src/lib/evolution-system.js +92 -0
- package/src/lib/evomap-federation.js +55 -0
- package/src/lib/evomap-governance.js +94 -0
- package/src/lib/fatal-handler.js +17 -1
- package/src/lib/hardening-manager.js +73 -0
- package/src/lib/hierarchical-memory.js +14 -8
- package/src/lib/knowledge-exporter.js +8 -2
- package/src/lib/knowledge-graph.js +79 -0
- package/src/lib/llm-providers.js +23 -14
- package/src/lib/logger.js +4 -1
- package/src/lib/lsp/__tests__/benchmark.test.js +88 -0
- package/src/lib/lsp/__tests__/code-intelligence.integration.test.js +129 -0
- package/src/lib/lsp/__tests__/code-intelligence.test.js +228 -0
- package/src/lib/lsp/__tests__/jsonrpc-stream.test.js +104 -0
- package/src/lib/lsp/__tests__/lsp-client.test.js +269 -0
- package/src/lib/lsp/__tests__/lsp-manager.test.js +333 -0
- package/src/lib/lsp/__tests__/lsp-server-registry.test.js +128 -0
- package/src/lib/lsp/benchmark.js +257 -0
- package/src/lib/lsp/code-intelligence.js +356 -0
- package/src/lib/lsp/jsonrpc-stream.js +139 -0
- package/src/lib/lsp/lsp-client.js +339 -0
- package/src/lib/lsp/lsp-manager.js +375 -0
- package/src/lib/lsp/lsp-server-registry.js +196 -0
- package/src/lib/matrix-bridge.js +84 -0
- package/src/lib/memory-manager.js +5 -3
- package/src/lib/nostr-bridge.js +53 -0
- package/src/lib/permission-engine.js +22 -4
- package/src/lib/plugin-monitor-supervisor.js +238 -0
- package/src/lib/plugin-runtime/__tests__/remote-source.test.js +256 -0
- package/src/lib/plugin-runtime/agents.js +51 -0
- package/src/lib/plugin-runtime/bin.js +100 -0
- package/src/lib/plugin-runtime/hooks.js +100 -0
- package/src/lib/plugin-runtime/install.js +396 -0
- package/src/lib/plugin-runtime/lsp.js +75 -0
- package/src/lib/plugin-runtime/manifest.js +458 -0
- package/src/lib/plugin-runtime/mcp.js +89 -0
- package/src/lib/plugin-runtime/monitors.js +100 -0
- package/src/lib/plugin-runtime/policy.js +152 -0
- package/src/lib/plugin-runtime/reload.js +79 -0
- package/src/lib/plugin-runtime/remote-source.js +240 -0
- package/src/lib/plugin-runtime/scopes.js +197 -0
- package/src/lib/plugin-runtime/settings.js +119 -0
- package/src/lib/plugin-runtime/signature.js +107 -0
- package/src/lib/plugin-runtime/skills.js +43 -0
- package/src/lib/plugin-runtime/trust.js +140 -0
- package/src/lib/pqc-manager.js +64 -0
- package/src/lib/reputation-optimizer.js +101 -0
- package/src/lib/sandbox-egress-proxy.js +262 -0
- package/src/lib/sandbox-fs-policy.js +112 -0
- package/src/lib/sandbox-network-policy.js +151 -0
- package/src/lib/sandbox-v2.js +24 -18
- package/src/lib/scim-manager.js +36 -0
- package/src/lib/session-manager.js +5 -2
- package/src/lib/settings-hook-events.cjs +78 -6
- package/src/lib/settings-hooks.cjs +30 -3
- package/src/lib/settings-loader.cjs +35 -1
- package/src/lib/siem-exporter.js +45 -0
- package/src/lib/skill-loader.js +38 -2
- package/src/lib/skill-marketplace.js +83 -0
- package/src/lib/sla-manager.js +88 -0
- package/src/lib/social-manager.js +74 -0
- package/src/lib/stress-tester.js +65 -0
- package/src/lib/tech-learning-engine.js +75 -0
- package/src/lib/telemetry/span-recorder.js +237 -0
- package/src/lib/tenant-saas.js +107 -0
- package/src/lib/terraform-manager.js +67 -0
- package/src/lib/token-incentive.js +180 -29
- package/src/lib/wallet-manager.js +81 -35
- package/src/lib/zkp-engine.js +87 -0
- package/src/repl/agent-repl.js +417 -6
- package/src/runtime/__tests__/auto-pin.test.js +104 -0
- package/src/runtime/agent-core.js +771 -104
- package/src/runtime/auto-pin.js +117 -0
- package/src/runtime/coding-agent-contract-shared.cjs +82 -8
- package/src/runtime/coding-agent-policy.cjs +32 -7
- package/src/runtime/fallback-model.js +134 -7
- package/src/runtime/headless-runner.js +388 -108
- package/src/runtime/mcp-config.js +46 -0
- package/src/assets/web-panel/assets/ChatBubbleRenderer-DCNfbdlx.js +0 -1
- package/src/assets/web-panel/assets/Terminal-BvAK_Zel.js +0 -3
- package/src/assets/web-panel/assets/devWarning-C2Z5LRgq.js +0 -1
- package/src/assets/web-panel/assets/index-BGp6Yr-Y.js +0 -1
- package/src/assets/web-panel/assets/index-BXiw9dQf.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as Oe,h as A,P as J,af as Ke,i as D,f as V,I as Ae,q as ie,M as Re,ag as Q,R as Ye,w as Ze,ae as Xe}from"./index-BtbbdLnf.js";import{d as q,c as C,r as Z,s as L,w as ue,b as Y,o as Ee,F as Te,n as pe,aa as qe,f as ye,e as we,g as Fe}from"./vendor-BMxUs6UX.js";import{u as Ne,F as se,N as ze}from"./FormItemContext-DWLCkNgh.js";import{g as le,a as Se}from"./statusUtils-CURYRtZ1.js";import{o as X}from"./omit-BaXJXgHA.js";import{c as ee}from"./vnode-9ZpkA7bb.js";import{B as je}from"./BaseInput-uAwSTeql.js";import{C as Me,k as Je,at as Qe,aW as et}from"./icons-BsDmGpcT.js";import{u as tt,N as _e}from"./Compact-CZm8THYA.js";import{u as Ie}from"./index-BTIjjXry.js";import{B as nt}from"./index-kmh1TxRa.js";import{i as at}from"./isPlainObject-BWRMT62c.js";import{R as lt}from"./index-BJ4ZGyW0.js";import{w as fe}from"./raf-Deuc0E8-.js";import"./devWarning-C2Z5LRgq.js";import"./createContext-CBzPJv-w.js";import"./_getTag-DnrRH4E6.js";import"./compact-item-D7iMkbnE.js";import"./index-DmqlJed-.js";import"./isVisible-C7tPsqfj.js";import"./useState-LwExUYDO.js";import"./initDefaultProps-BD55yNBt.js";import"./ResizeObserver.es-D6qJbdzf.js";const oe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function $e(e){return oe(e.prefix)||oe(e.suffix)||oe(e.allowClear)}function ve(e){return oe(e.addonBefore)||oe(e.addonAfter)}function Ce(e){return typeof e>"u"||e===null?"":String(e)}function re(e,f,t,n){if(!t)return;const a=f;if(f.type==="click"){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0});const m=e.cloneNode(!0);a.target=m,a.currentTarget=m,m.value="",t(a);return}if(n!==void 0){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0}),a.target=e,a.currentTarget=e,e.value=n,t(a);return}t(a)}function Ve(e,f){if(!e)return;e.focus(f);const{cursor:t}=f||{};if(t){const n=e.value.length;switch(t){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}const ot=()=>({addonBefore:J.any,addonAfter:J.any,prefix:J.any,suffix:J.any,clearIcon:J.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),ke=()=>A(A({},ot()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:J.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),De=()=>A(A({},ke()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ke("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),rt=q({name:"BaseInput",inheritAttrs:!1,props:ke(),setup(e,f){let{slots:t,attrs:n}=f;const a=Z(),m=l=>{var d;if(!((d=a.value)===null||d===void 0)&&d.contains(l.target)){const{triggerFocus:s}=e;s?.()}},i=()=>{var l;const{allowClear:d,value:s,disabled:h,readonly:p,handleReset:u,suffix:z=t.suffix,prefixCls:_}=e;if(!d)return null;const P=!h&&!p&&s,c=`${_}-clear-icon`,O=((l=t.clearIcon)===null||l===void 0?void 0:l.call(t))||"*";return C("span",{onClick:u,onMousedown:S=>S.preventDefault(),class:D({[`${c}-hidden`]:!P,[`${c}-has-suffix`]:!!z},c),role:"button",tabindex:-1},[O])};return()=>{var l,d;const{focused:s,value:h,disabled:p,allowClear:u,readonly:z,hidden:_,prefixCls:P,prefix:c=(l=t.prefix)===null||l===void 0?void 0:l.call(t),suffix:O=(d=t.suffix)===null||d===void 0?void 0:d.call(t),addonAfter:S=t.addonAfter,addonBefore:$=t.addonBefore,inputElement:E,affixWrapperClassName:v,wrapperClassName:g,groupClassName:o}=e;let w=ee(E,{value:h,hidden:_});if($e({prefix:c,suffix:O,allowClear:u})){const y=`${P}-affix-wrapper`,R=D(y,{[`${y}-disabled`]:p,[`${y}-focused`]:s,[`${y}-readonly`]:z,[`${y}-input-with-clear-btn`]:O&&u&&h},!ve({addonAfter:S,addonBefore:$})&&n.class,v),N=(O||u)&&C("span",{class:`${P}-suffix`},[i(),O]);w=C("span",{class:R,style:n.style,hidden:!ve({addonAfter:S,addonBefore:$})&&_,onMousedown:m,ref:a},[c&&C("span",{class:`${P}-prefix`},[c]),ee(E,{style:null,value:h,hidden:null}),N])}if(ve({addonAfter:S,addonBefore:$})){const y=`${P}-group`,R=`${y}-addon`,N=D(`${P}-wrapper`,y,g),F=D(`${P}-group-wrapper`,n.class,o);return C("span",{class:F,style:n.style,hidden:_},[C("span",{class:N},[$&&C("span",{class:R},[$]),ee(w,{style:null,hidden:null}),S&&C("span",{class:R},[S])])])}return w}}});var ut=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const st=q({name:"VCInput",inheritAttrs:!1,props:De(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=L(e.value===void 0?e.defaultValue:e.value),l=L(!1),d=L(),s=L();ue(()=>e.value,()=>{i.value=e.value}),ue(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const h=o=>{d.value&&Ve(d.value.input,o)},p=()=>{var o;(o=d.value.input)===null||o===void 0||o.blur()},u=(o,w,y)=>{var R;(R=d.value.input)===null||R===void 0||R.setSelectionRange(o,w,y)},z=()=>{var o;(o=d.value.input)===null||o===void 0||o.select()};a({focus:h,blur:p,input:Y(()=>{var o;return(o=d.value.input)===null||o===void 0?void 0:o.input}),stateValue:i,setSelectionRange:u,select:z});const _=o=>{m("change",o)},P=(o,w)=>{i.value!==o&&(e.value===void 0?i.value=o:pe(()=>{var y;d.value.input.value!==i.value&&((y=s.value)===null||y===void 0||y.$forceUpdate())}),pe(()=>{w&&w()}))},c=o=>{const{value:w}=o.target;if(i.value===w)return;const y=o.target.value;re(d.value.input,o,_),P(y)},O=o=>{o.keyCode===13&&m("pressEnter",o),m("keydown",o)},S=o=>{l.value=!0,m("focus",o)},$=o=>{l.value=!1,m("blur",o)},E=o=>{re(d.value.input,o,_),P("",()=>{h()})},v=()=>{var o,w;const{addonBefore:y=t.addonBefore,addonAfter:R=t.addonAfter,disabled:N,valueModifiers:F={},htmlSize:x,autocomplete:I,prefixCls:T,inputClassName:j,prefix:H=(o=t.prefix)===null||o===void 0?void 0:o.call(t),suffix:U=(w=t.suffix)===null||w===void 0?void 0:w.call(t),allowClear:r,type:b="text"}=e,B=X(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),M=A(A(A({},B),n),{autocomplete:I,onChange:c,onInput:c,onFocus:S,onBlur:$,onKeydown:O,class:D(T,{[`${T}-disabled`]:N},j,!ve({addonAfter:R,addonBefore:y})&&!$e({prefix:H,suffix:U,allowClear:r})&&n.class),ref:d,key:"ant-input",size:x,type:b,lazy:e.lazy});return F.lazy&&delete M.onInput,M.autofocus||delete M.autofocus,C(je,X(M,["size"]),null)},g=()=>{var o;const{maxlength:w,suffix:y=(o=t.suffix)===null||o===void 0?void 0:o.call(t),showCount:R,prefixCls:N}=e,F=Number(w)>0;if(y||R){const x=[...Ce(i.value)].length,I=typeof R=="object"?R.formatter({count:x,maxlength:w}):`${x}${F?` / ${w}`:""}`;return C(Te,null,[!!R&&C("span",{class:D(`${N}-show-count-suffix`,{[`${N}-show-count-has-suffix`]:!!y})},[I]),y])}return null};return Ee(()=>{}),()=>{const{prefixCls:o,disabled:w}=e,y=ut(e,["prefixCls","disabled"]);return C(rt,V(V(V({},y),n),{},{ref:s,prefixCls:o,inputElement:v(),handleReset:E,value:Ce(i.value),focused:l.value,triggerFocus:h,suffix:g(),disabled:w}),t)}}}),me=()=>X(De(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),We=()=>A(A({},X(me(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ae(),onCompositionend:Ae(),valueModifiers:Object});var it=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const k=q({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:me(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=Z(),l=Ne(),d=se.useInject(),s=Y(()=>Se(d.status,e.status)),{direction:h,prefixCls:p,size:u,autocomplete:z}=ie("input",e),{compactSize:_,compactItemClassnames:P}=tt(p,h),c=Y(()=>_.value||u.value),[O,S]=Ie(p),$=Re();a({focus:x=>{var I;(I=i.value)===null||I===void 0||I.focus(x)},blur:()=>{var x;(x=i.value)===null||x===void 0||x.blur()},input:i,setSelectionRange:(x,I,T)=>{var j;(j=i.value)===null||j===void 0||j.setSelectionRange(x,I,T)},select:()=>{var x;(x=i.value)===null||x===void 0||x.select()}});const w=Z([]),y=()=>{w.value.push(setTimeout(()=>{var x,I,T,j;!((x=i.value)===null||x===void 0)&&x.input&&((I=i.value)===null||I===void 0?void 0:I.input.getAttribute("type"))==="password"&&(!((T=i.value)===null||T===void 0)&&T.input.hasAttribute("value"))&&((j=i.value)===null||j===void 0||j.input.removeAttribute("value"))}))};Ee(()=>{y()}),qe(()=>{w.value.forEach(x=>clearTimeout(x))}),ye(()=>{w.value.forEach(x=>clearTimeout(x))});const R=x=>{y(),m("blur",x),l.onFieldBlur()},N=x=>{y(),m("focus",x)},F=x=>{m("update:value",x.target.value),m("change",x),m("input",x),l.onFieldChange()};return()=>{var x,I,T,j,H,U;const{hasFeedback:r,feedbackIcon:b}=d,{allowClear:B,bordered:M=!0,prefix:W=(x=t.prefix)===null||x===void 0?void 0:x.call(t),suffix:ae=(I=t.suffix)===null||I===void 0?void 0:I.call(t),addonAfter:de=(T=t.addonAfter)===null||T===void 0?void 0:T.call(t),addonBefore:te=(j=t.addonBefore)===null||j===void 0?void 0:j.call(t),id:ce=(H=l.id)===null||H===void 0?void 0:H.value}=e,ne=it(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),He=(r||ae)&&C(Te,null,[ae,r&&b]),G=p.value,Le=$e({prefix:W,suffix:ae})||!!r,Ue=t.clearIcon||(()=>C(Me,null,null));return O(C(st,V(V(V({},n),X(ne,["onUpdate:value","onChange","onInput"])),{},{onChange:F,id:ce,disabled:(U=e.disabled)!==null&&U!==void 0?U:$.value,ref:i,prefixCls:G,autocomplete:z.value,onBlur:R,onFocus:N,prefix:W,suffix:He,allowClear:B,addonAfter:de&&C(_e,null,{default:()=>[C(ze,null,{default:()=>[de]})]}),addonBefore:te&&C(_e,null,{default:()=>[C(ze,null,{default:()=>[te]})]}),class:[n.class,P.value],inputClassName:D({[`${G}-sm`]:c.value==="small",[`${G}-lg`]:c.value==="large",[`${G}-rtl`]:h.value==="rtl",[`${G}-borderless`]:!M},!Le&&le(G,s.value),S.value),affixWrapperClassName:D({[`${G}-affix-wrapper-sm`]:c.value==="small",[`${G}-affix-wrapper-lg`]:c.value==="large",[`${G}-affix-wrapper-rtl`]:h.value==="rtl",[`${G}-affix-wrapper-borderless`]:!M},le(`${G}-affix-wrapper`,s.value,r),S.value),wrapperClassName:D({[`${G}-group-rtl`]:h.value==="rtl"},S.value),groupClassName:D({[`${G}-group-wrapper-sm`]:c.value==="small",[`${G}-group-wrapper-lg`]:c.value==="large",[`${G}-group-wrapper-rtl`]:h.value==="rtl"},le(`${G}-group-wrapper`,s.value,r),S.value)}),A(A({},t),{clearIcon:Ue})))}}}),dt=q({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,f){let{slots:t,attrs:n}=f;const{prefixCls:a,direction:m,getPrefixCls:i}=ie("input-group",e),l=se.useInject();se.useProvide(l,{isFormItemInput:!1});const d=Y(()=>i("input")),[s,h]=Ie(d),p=Y(()=>{const u=a.value;return{[`${u}`]:!0,[h.value]:!0,[`${u}-lg`]:e.size==="large",[`${u}-sm`]:e.size==="small",[`${u}-compact`]:e.compact,[`${u}-rtl`]:m.value==="rtl"}});return()=>{var u;return s(C("span",V(V({},n),{},{class:D(p.value,n.class)}),[(u=t.default)===null||u===void 0?void 0:u.call(t)]))}}});var ct=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const ft=q({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:A(A({},me()),{inputPrefixCls:String,enterButton:J.any,onSearch:{type:Function}}),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=L(),l=L(!1);a({focus:()=>{var v;(v=i.value)===null||v===void 0||v.focus()},blur:()=>{var v;(v=i.value)===null||v===void 0||v.blur()}});const h=v=>{m("update:value",v.target.value),v&&v.target&&v.type==="click"&&m("search",v.target.value,v),m("change",v)},p=v=>{var g;document.activeElement===((g=i.value)===null||g===void 0?void 0:g.input)&&v.preventDefault()},u=v=>{var g,o;m("search",(o=(g=i.value)===null||g===void 0?void 0:g.input)===null||o===void 0?void 0:o.stateValue,v)},z=v=>{l.value||e.loading||u(v)},_=v=>{l.value=!0,m("compositionstart",v)},P=v=>{l.value=!1,m("compositionend",v)},{prefixCls:c,getPrefixCls:O,direction:S,size:$}=ie("input-search",e),E=Y(()=>O("input",e.inputPrefixCls));return()=>{var v,g,o,w;const{disabled:y,loading:R,addonAfter:N=(v=t.addonAfter)===null||v===void 0?void 0:v.call(t),suffix:F=(g=t.suffix)===null||g===void 0?void 0:g.call(t)}=e,x=ct(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:I=(w=(o=t.enterButton)===null||o===void 0?void 0:o.call(t))!==null&&w!==void 0?w:!1}=e;I=I||I==="";const T=typeof I=="boolean"?C(Je,null,null):null,j=`${c.value}-button`,H=Array.isArray(I)?I[0]:I;let U;const r=H.type&&at(H.type)&&H.type.__ANT_BUTTON;if(r||H.tagName==="button")U=ee(H,A({onMousedown:p,onClick:u,key:"enterButton"},r?{class:j,size:$.value}:{}),!1);else{const B=T&&!I;U=C(nt,{class:j,type:I?"primary":void 0,size:$.value,disabled:y,key:"enterButton",onMousedown:p,onClick:u,loading:R,icon:B?T:null},{default:()=>[B?null:T||I]})}N&&(U=[U,N]);const b=D(c.value,{[`${c.value}-rtl`]:S.value==="rtl",[`${c.value}-${$.value}`]:!!$.value,[`${c.value}-with-button`]:!!I},n.class);return C(k,V(V(V({ref:i},X(x,["onUpdate:value","onSearch","enterButton"])),n),{},{onPressEnter:z,onCompositionstart:_,onCompositionend:P,size:$.value,prefixCls:E.value,addonAfter:U,suffix:F,onChange:h,class:b,disabled:y}),t)}}}),Pe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function vt(e){return Pe(e.addonBefore)||Pe(e.addonAfter)}const pt=["text","input"],mt=q({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:J.oneOf(Ye("text","input")),value:Q(),defaultValue:Q(),allowClear:{type:Boolean,default:void 0},element:Q(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Q(),prefix:Q(),addonBefore:Q(),addonAfter:Q(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,f){let{slots:t,attrs:n}=f;const a=se.useInject(),m=l=>{const{value:d,disabled:s,readonly:h,handleReset:p,suffix:u=t.suffix}=e,z=!s&&!h&&d,_=`${l}-clear-icon`;return C(Me,{onClick:p,onMousedown:P=>P.preventDefault(),class:D({[`${_}-hidden`]:!z,[`${_}-has-suffix`]:!!u},_),role:"button"},null)},i=(l,d)=>{const{value:s,allowClear:h,direction:p,bordered:u,hidden:z,status:_,addonAfter:P=t.addonAfter,addonBefore:c=t.addonBefore,hashId:O}=e,{status:S,hasFeedback:$}=a;if(!h)return ee(d,{value:s,disabled:e.disabled});const E=D(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,le(`${l}-affix-wrapper`,Se(S,_),$),{[`${l}-affix-wrapper-rtl`]:p==="rtl",[`${l}-affix-wrapper-borderless`]:!u,[`${n.class}`]:!vt({addonAfter:P,addonBefore:c})&&n.class},O);return C("span",{class:E,style:n.style,hidden:z},[ee(d,{style:null,value:s,disabled:e.disabled}),m(l)])};return()=>{var l;const{prefixCls:d,inputType:s,element:h=(l=t.element)===null||l===void 0?void 0:l.call(t)}=e;return s===pt[0]?i(d,h):null}}}),gt=`
|
|
1
|
+
import{N as Oe,h as A,P as J,af as Ke,i as D,f as V,I as Ae,q as ie,M as Re,ag as Q,R as Ye,w as Ze,ae as Xe}from"./index-DfgCdFrN.js";import{d as q,c as C,r as Z,s as L,w as ue,b as Y,o as Ee,F as Te,n as pe,aa as qe,f as ye,e as we,g as Fe}from"./vendor-BMxUs6UX.js";import{u as Ne,F as se,N as ze}from"./FormItemContext-DeGq1B-q.js";import{g as le,a as Se}from"./statusUtils-Do5M7gKm.js";import{o as X}from"./omit-jJ2at5HX.js";import{c as ee}from"./vnode-1emidVKd.js";import{B as je}from"./BaseInput-CQxDdm63.js";import{C as Me,k as Je,at as Qe,aW as et}from"./icons-BsDmGpcT.js";import{u as tt,N as _e}from"./Compact-C43fo_my.js";import{u as Ie}from"./index-C37f6iey.js";import{B as nt}from"./index-C-WIY-FQ.js";import{i as at}from"./isPlainObject-BWRMT62c.js";import{R as lt}from"./index-CVS8Ymuq.js";import{w as fe}from"./raf-Deuc0E8-.js";import"./devWarning-WDr3_M_N.js";import"./createContext-BkbFiKT4.js";import"./_getTag-DnrRH4E6.js";import"./compact-item-CJYJj0oO.js";import"./index-BiDWxzbn.js";import"./isVisible-C7tPsqfj.js";import"./useState-LwExUYDO.js";import"./initDefaultProps-DtrnfsZH.js";import"./ResizeObserver.es-D6qJbdzf.js";const oe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function $e(e){return oe(e.prefix)||oe(e.suffix)||oe(e.allowClear)}function ve(e){return oe(e.addonBefore)||oe(e.addonAfter)}function Ce(e){return typeof e>"u"||e===null?"":String(e)}function re(e,f,t,n){if(!t)return;const a=f;if(f.type==="click"){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0});const m=e.cloneNode(!0);a.target=m,a.currentTarget=m,m.value="",t(a);return}if(n!==void 0){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0}),a.target=e,a.currentTarget=e,e.value=n,t(a);return}t(a)}function Ve(e,f){if(!e)return;e.focus(f);const{cursor:t}=f||{};if(t){const n=e.value.length;switch(t){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}const ot=()=>({addonBefore:J.any,addonAfter:J.any,prefix:J.any,suffix:J.any,clearIcon:J.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),ke=()=>A(A({},ot()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:J.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),De=()=>A(A({},ke()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ke("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),rt=q({name:"BaseInput",inheritAttrs:!1,props:ke(),setup(e,f){let{slots:t,attrs:n}=f;const a=Z(),m=l=>{var d;if(!((d=a.value)===null||d===void 0)&&d.contains(l.target)){const{triggerFocus:s}=e;s?.()}},i=()=>{var l;const{allowClear:d,value:s,disabled:h,readonly:p,handleReset:u,suffix:z=t.suffix,prefixCls:_}=e;if(!d)return null;const P=!h&&!p&&s,c=`${_}-clear-icon`,O=((l=t.clearIcon)===null||l===void 0?void 0:l.call(t))||"*";return C("span",{onClick:u,onMousedown:S=>S.preventDefault(),class:D({[`${c}-hidden`]:!P,[`${c}-has-suffix`]:!!z},c),role:"button",tabindex:-1},[O])};return()=>{var l,d;const{focused:s,value:h,disabled:p,allowClear:u,readonly:z,hidden:_,prefixCls:P,prefix:c=(l=t.prefix)===null||l===void 0?void 0:l.call(t),suffix:O=(d=t.suffix)===null||d===void 0?void 0:d.call(t),addonAfter:S=t.addonAfter,addonBefore:$=t.addonBefore,inputElement:E,affixWrapperClassName:v,wrapperClassName:g,groupClassName:o}=e;let w=ee(E,{value:h,hidden:_});if($e({prefix:c,suffix:O,allowClear:u})){const y=`${P}-affix-wrapper`,R=D(y,{[`${y}-disabled`]:p,[`${y}-focused`]:s,[`${y}-readonly`]:z,[`${y}-input-with-clear-btn`]:O&&u&&h},!ve({addonAfter:S,addonBefore:$})&&n.class,v),N=(O||u)&&C("span",{class:`${P}-suffix`},[i(),O]);w=C("span",{class:R,style:n.style,hidden:!ve({addonAfter:S,addonBefore:$})&&_,onMousedown:m,ref:a},[c&&C("span",{class:`${P}-prefix`},[c]),ee(E,{style:null,value:h,hidden:null}),N])}if(ve({addonAfter:S,addonBefore:$})){const y=`${P}-group`,R=`${y}-addon`,N=D(`${P}-wrapper`,y,g),F=D(`${P}-group-wrapper`,n.class,o);return C("span",{class:F,style:n.style,hidden:_},[C("span",{class:N},[$&&C("span",{class:R},[$]),ee(w,{style:null,hidden:null}),S&&C("span",{class:R},[S])])])}return w}}});var ut=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const st=q({name:"VCInput",inheritAttrs:!1,props:De(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=L(e.value===void 0?e.defaultValue:e.value),l=L(!1),d=L(),s=L();ue(()=>e.value,()=>{i.value=e.value}),ue(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const h=o=>{d.value&&Ve(d.value.input,o)},p=()=>{var o;(o=d.value.input)===null||o===void 0||o.blur()},u=(o,w,y)=>{var R;(R=d.value.input)===null||R===void 0||R.setSelectionRange(o,w,y)},z=()=>{var o;(o=d.value.input)===null||o===void 0||o.select()};a({focus:h,blur:p,input:Y(()=>{var o;return(o=d.value.input)===null||o===void 0?void 0:o.input}),stateValue:i,setSelectionRange:u,select:z});const _=o=>{m("change",o)},P=(o,w)=>{i.value!==o&&(e.value===void 0?i.value=o:pe(()=>{var y;d.value.input.value!==i.value&&((y=s.value)===null||y===void 0||y.$forceUpdate())}),pe(()=>{w&&w()}))},c=o=>{const{value:w}=o.target;if(i.value===w)return;const y=o.target.value;re(d.value.input,o,_),P(y)},O=o=>{o.keyCode===13&&m("pressEnter",o),m("keydown",o)},S=o=>{l.value=!0,m("focus",o)},$=o=>{l.value=!1,m("blur",o)},E=o=>{re(d.value.input,o,_),P("",()=>{h()})},v=()=>{var o,w;const{addonBefore:y=t.addonBefore,addonAfter:R=t.addonAfter,disabled:N,valueModifiers:F={},htmlSize:x,autocomplete:I,prefixCls:T,inputClassName:j,prefix:H=(o=t.prefix)===null||o===void 0?void 0:o.call(t),suffix:U=(w=t.suffix)===null||w===void 0?void 0:w.call(t),allowClear:r,type:b="text"}=e,B=X(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),M=A(A(A({},B),n),{autocomplete:I,onChange:c,onInput:c,onFocus:S,onBlur:$,onKeydown:O,class:D(T,{[`${T}-disabled`]:N},j,!ve({addonAfter:R,addonBefore:y})&&!$e({prefix:H,suffix:U,allowClear:r})&&n.class),ref:d,key:"ant-input",size:x,type:b,lazy:e.lazy});return F.lazy&&delete M.onInput,M.autofocus||delete M.autofocus,C(je,X(M,["size"]),null)},g=()=>{var o;const{maxlength:w,suffix:y=(o=t.suffix)===null||o===void 0?void 0:o.call(t),showCount:R,prefixCls:N}=e,F=Number(w)>0;if(y||R){const x=[...Ce(i.value)].length,I=typeof R=="object"?R.formatter({count:x,maxlength:w}):`${x}${F?` / ${w}`:""}`;return C(Te,null,[!!R&&C("span",{class:D(`${N}-show-count-suffix`,{[`${N}-show-count-has-suffix`]:!!y})},[I]),y])}return null};return Ee(()=>{}),()=>{const{prefixCls:o,disabled:w}=e,y=ut(e,["prefixCls","disabled"]);return C(rt,V(V(V({},y),n),{},{ref:s,prefixCls:o,inputElement:v(),handleReset:E,value:Ce(i.value),focused:l.value,triggerFocus:h,suffix:g(),disabled:w}),t)}}}),me=()=>X(De(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),We=()=>A(A({},X(me(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ae(),onCompositionend:Ae(),valueModifiers:Object});var it=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const k=q({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:me(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=Z(),l=Ne(),d=se.useInject(),s=Y(()=>Se(d.status,e.status)),{direction:h,prefixCls:p,size:u,autocomplete:z}=ie("input",e),{compactSize:_,compactItemClassnames:P}=tt(p,h),c=Y(()=>_.value||u.value),[O,S]=Ie(p),$=Re();a({focus:x=>{var I;(I=i.value)===null||I===void 0||I.focus(x)},blur:()=>{var x;(x=i.value)===null||x===void 0||x.blur()},input:i,setSelectionRange:(x,I,T)=>{var j;(j=i.value)===null||j===void 0||j.setSelectionRange(x,I,T)},select:()=>{var x;(x=i.value)===null||x===void 0||x.select()}});const w=Z([]),y=()=>{w.value.push(setTimeout(()=>{var x,I,T,j;!((x=i.value)===null||x===void 0)&&x.input&&((I=i.value)===null||I===void 0?void 0:I.input.getAttribute("type"))==="password"&&(!((T=i.value)===null||T===void 0)&&T.input.hasAttribute("value"))&&((j=i.value)===null||j===void 0||j.input.removeAttribute("value"))}))};Ee(()=>{y()}),qe(()=>{w.value.forEach(x=>clearTimeout(x))}),ye(()=>{w.value.forEach(x=>clearTimeout(x))});const R=x=>{y(),m("blur",x),l.onFieldBlur()},N=x=>{y(),m("focus",x)},F=x=>{m("update:value",x.target.value),m("change",x),m("input",x),l.onFieldChange()};return()=>{var x,I,T,j,H,U;const{hasFeedback:r,feedbackIcon:b}=d,{allowClear:B,bordered:M=!0,prefix:W=(x=t.prefix)===null||x===void 0?void 0:x.call(t),suffix:ae=(I=t.suffix)===null||I===void 0?void 0:I.call(t),addonAfter:de=(T=t.addonAfter)===null||T===void 0?void 0:T.call(t),addonBefore:te=(j=t.addonBefore)===null||j===void 0?void 0:j.call(t),id:ce=(H=l.id)===null||H===void 0?void 0:H.value}=e,ne=it(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),He=(r||ae)&&C(Te,null,[ae,r&&b]),G=p.value,Le=$e({prefix:W,suffix:ae})||!!r,Ue=t.clearIcon||(()=>C(Me,null,null));return O(C(st,V(V(V({},n),X(ne,["onUpdate:value","onChange","onInput"])),{},{onChange:F,id:ce,disabled:(U=e.disabled)!==null&&U!==void 0?U:$.value,ref:i,prefixCls:G,autocomplete:z.value,onBlur:R,onFocus:N,prefix:W,suffix:He,allowClear:B,addonAfter:de&&C(_e,null,{default:()=>[C(ze,null,{default:()=>[de]})]}),addonBefore:te&&C(_e,null,{default:()=>[C(ze,null,{default:()=>[te]})]}),class:[n.class,P.value],inputClassName:D({[`${G}-sm`]:c.value==="small",[`${G}-lg`]:c.value==="large",[`${G}-rtl`]:h.value==="rtl",[`${G}-borderless`]:!M},!Le&&le(G,s.value),S.value),affixWrapperClassName:D({[`${G}-affix-wrapper-sm`]:c.value==="small",[`${G}-affix-wrapper-lg`]:c.value==="large",[`${G}-affix-wrapper-rtl`]:h.value==="rtl",[`${G}-affix-wrapper-borderless`]:!M},le(`${G}-affix-wrapper`,s.value,r),S.value),wrapperClassName:D({[`${G}-group-rtl`]:h.value==="rtl"},S.value),groupClassName:D({[`${G}-group-wrapper-sm`]:c.value==="small",[`${G}-group-wrapper-lg`]:c.value==="large",[`${G}-group-wrapper-rtl`]:h.value==="rtl"},le(`${G}-group-wrapper`,s.value,r),S.value)}),A(A({},t),{clearIcon:Ue})))}}}),dt=q({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,f){let{slots:t,attrs:n}=f;const{prefixCls:a,direction:m,getPrefixCls:i}=ie("input-group",e),l=se.useInject();se.useProvide(l,{isFormItemInput:!1});const d=Y(()=>i("input")),[s,h]=Ie(d),p=Y(()=>{const u=a.value;return{[`${u}`]:!0,[h.value]:!0,[`${u}-lg`]:e.size==="large",[`${u}-sm`]:e.size==="small",[`${u}-compact`]:e.compact,[`${u}-rtl`]:m.value==="rtl"}});return()=>{var u;return s(C("span",V(V({},n),{},{class:D(p.value,n.class)}),[(u=t.default)===null||u===void 0?void 0:u.call(t)]))}}});var ct=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const ft=q({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:A(A({},me()),{inputPrefixCls:String,enterButton:J.any,onSearch:{type:Function}}),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=L(),l=L(!1);a({focus:()=>{var v;(v=i.value)===null||v===void 0||v.focus()},blur:()=>{var v;(v=i.value)===null||v===void 0||v.blur()}});const h=v=>{m("update:value",v.target.value),v&&v.target&&v.type==="click"&&m("search",v.target.value,v),m("change",v)},p=v=>{var g;document.activeElement===((g=i.value)===null||g===void 0?void 0:g.input)&&v.preventDefault()},u=v=>{var g,o;m("search",(o=(g=i.value)===null||g===void 0?void 0:g.input)===null||o===void 0?void 0:o.stateValue,v)},z=v=>{l.value||e.loading||u(v)},_=v=>{l.value=!0,m("compositionstart",v)},P=v=>{l.value=!1,m("compositionend",v)},{prefixCls:c,getPrefixCls:O,direction:S,size:$}=ie("input-search",e),E=Y(()=>O("input",e.inputPrefixCls));return()=>{var v,g,o,w;const{disabled:y,loading:R,addonAfter:N=(v=t.addonAfter)===null||v===void 0?void 0:v.call(t),suffix:F=(g=t.suffix)===null||g===void 0?void 0:g.call(t)}=e,x=ct(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:I=(w=(o=t.enterButton)===null||o===void 0?void 0:o.call(t))!==null&&w!==void 0?w:!1}=e;I=I||I==="";const T=typeof I=="boolean"?C(Je,null,null):null,j=`${c.value}-button`,H=Array.isArray(I)?I[0]:I;let U;const r=H.type&&at(H.type)&&H.type.__ANT_BUTTON;if(r||H.tagName==="button")U=ee(H,A({onMousedown:p,onClick:u,key:"enterButton"},r?{class:j,size:$.value}:{}),!1);else{const B=T&&!I;U=C(nt,{class:j,type:I?"primary":void 0,size:$.value,disabled:y,key:"enterButton",onMousedown:p,onClick:u,loading:R,icon:B?T:null},{default:()=>[B?null:T||I]})}N&&(U=[U,N]);const b=D(c.value,{[`${c.value}-rtl`]:S.value==="rtl",[`${c.value}-${$.value}`]:!!$.value,[`${c.value}-with-button`]:!!I},n.class);return C(k,V(V(V({ref:i},X(x,["onUpdate:value","onSearch","enterButton"])),n),{},{onPressEnter:z,onCompositionstart:_,onCompositionend:P,size:$.value,prefixCls:E.value,addonAfter:U,suffix:F,onChange:h,class:b,disabled:y}),t)}}}),Pe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function vt(e){return Pe(e.addonBefore)||Pe(e.addonAfter)}const pt=["text","input"],mt=q({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:J.oneOf(Ye("text","input")),value:Q(),defaultValue:Q(),allowClear:{type:Boolean,default:void 0},element:Q(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Q(),prefix:Q(),addonBefore:Q(),addonAfter:Q(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,f){let{slots:t,attrs:n}=f;const a=se.useInject(),m=l=>{const{value:d,disabled:s,readonly:h,handleReset:p,suffix:u=t.suffix}=e,z=!s&&!h&&d,_=`${l}-clear-icon`;return C(Me,{onClick:p,onMousedown:P=>P.preventDefault(),class:D({[`${_}-hidden`]:!z,[`${_}-has-suffix`]:!!u},_),role:"button"},null)},i=(l,d)=>{const{value:s,allowClear:h,direction:p,bordered:u,hidden:z,status:_,addonAfter:P=t.addonAfter,addonBefore:c=t.addonBefore,hashId:O}=e,{status:S,hasFeedback:$}=a;if(!h)return ee(d,{value:s,disabled:e.disabled});const E=D(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,le(`${l}-affix-wrapper`,Se(S,_),$),{[`${l}-affix-wrapper-rtl`]:p==="rtl",[`${l}-affix-wrapper-borderless`]:!u,[`${n.class}`]:!vt({addonAfter:P,addonBefore:c})&&n.class},O);return C("span",{class:E,style:n.style,hidden:z},[ee(d,{style:null,value:s,disabled:e.disabled}),m(l)])};return()=>{var l;const{prefixCls:d,inputType:s,element:h=(l=t.element)===null||l===void 0?void 0:l.call(t)}=e;return s===pt[0]?i(d,h):null}}}),gt=`
|
|
2
2
|
min-height:0 !important;
|
|
3
3
|
max-height:none !important;
|
|
4
4
|
height:0 !important;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Le,k as Re,l as Ee,m as De,r as We,n as je,o as Ve,p as le,q as _e,w as xe,s as Y,v as K,x as Ge,C as Ke,y as Xe,z as Ue,A as Qe}from"./index-
|
|
1
|
+
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Le,k as Re,l as Ee,m as De,r as We,n as je,o as Ve,p as le,q as _e,w as xe,s as Y,v as K,x as Ge,C as Ke,y as Xe,z as Ue,A as Qe}from"./index-DfgCdFrN.js";import{d as A,b as q,c as a,a7 as $e,a3 as Se,r as X,n as ke,a4 as he,s as T,w as Z,f as Ye,e as qe,F as Ze,A as se,u as Je,j as eo}from"./vendor-BMxUs6UX.js";import{K as ce}from"./KeyCode-D63Tfrq7.js";import{o as we}from"./omit-jJ2at5HX.js";import{p as oo}from"./pickAttrs-CRyMT1Fv.js";import{i as J}from"./initDefaultProps-DtrnfsZH.js";import{i as no,P as to,a as lo}from"./motion-D4zqSaX3.js";import{b as ao,E as io,C as ro,a as so,I as co}from"./icons-BsDmGpcT.js";import{B as de,c as uo}from"./index-C-WIY-FQ.js";import{c as fo}from"./styleChecker-CRa-GZpX.js";import{i as mo}from"./zoom-CcJaRyHs.js";import{A as ue}from"./ActionButton-DYv2GtE0.js";import{t as po}from"./vnode-1emidVKd.js";import"./raf-Deuc0E8-.js";import"./index-BiDWxzbn.js";import"./isVisible-C7tPsqfj.js";import"./useState-LwExUYDO.js";import"./devWarning-WDr3_M_N.js";import"./compact-item-CJYJj0oO.js";import"./createContext-BkbFiKT4.js";import"./Compact-C43fo_my.js";import"./_getTag-DnrRH4E6.js";const go=new ye("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),vo=new ye("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Co=function(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,t=`${n}-fade`,l=o?"&":"";return[no(t,go,vo,e.motionDurationMid,o),{[`
|
|
2
2
|
${l}${t}-enter,
|
|
3
3
|
${l}${t}-appear
|
|
4
4
|
`]:{opacity:0,animationTimingFunction:"linear"},[`${l}${t}-leave`]:{animationTimingFunction:"linear"}}]};function ae(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:h.shape({x:Number,y:Number}).loose,title:h.any,footer:h.any,transitionName:String,maskTransitionName:String,animation:h.any,maskAnimation:h.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:h.any,maskProps:h.any,wrapProps:h.any,getContainer:h.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:h.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function fe(e,o,n){let t=o;return!t&&n&&(t=`${e}-${n}`),t}let me=-1;function yo(){return me+=1,me}function pe(e,o){let n=e[`page${o?"Y":"X"}Offset`];const t=`scroll${o?"Top":"Left"}`;if(typeof n!="number"){const l=e.document;n=l.documentElement[t],typeof n!="number"&&(n=l.body[t])}return n}function bo(e){const o=e.getBoundingClientRect(),n={left:o.left,top:o.top},t=e.ownerDocument,l=t.defaultView||t.parentWindow;return n.left+=pe(l),n.top+=pe(l,!0),n}const xo={width:0,height:0,overflow:"hidden",outline:"none"},$o={outline:"none"},So=A({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:i(i({},ae()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,o){let{expose:n,slots:t,attrs:l}=o;const s=X(),p=X(),g=X();n({focus:()=>{var c;(c=s.value)===null||c===void 0||c.focus({preventScroll:!0})},changeActive:c=>{const{activeElement:r}=document;c&&r===p.value?s.value.focus({preventScroll:!0}):!c&&r===s.value&&p.value.focus({preventScroll:!0})}});const S=X(),m=q(()=>{const{width:c,height:r}=e,C={};return c!==void 0&&(C.width=typeof c=="number"?`${c}px`:c),r!==void 0&&(C.height=typeof r=="number"?`${r}px`:r),S.value&&(C.transformOrigin=S.value),C}),u=()=>{ke(()=>{if(g.value){const c=bo(g.value);S.value=e.mousePosition?`${e.mousePosition.x-c.left}px ${e.mousePosition.y-c.top}px`:""}})},d=c=>{e.onVisibleChanged(c)};return()=>{var c,r,C,y;const{prefixCls:x,footer:f=(c=t.footer)===null||c===void 0?void 0:c.call(t),title:b=(r=t.title)===null||r===void 0?void 0:r.call(t),ariaId:v,closable:w,closeIcon:B=(C=t.closeIcon)===null||C===void 0?void 0:C.call(t),onClose:F,bodyStyle:I,bodyProps:M,onMousedown:H,onMouseup:O,visible:E,modalRender:D=t.modalRender,destroyOnClose:_,motionName:N}=e;let W;f&&(W=a("div",{class:`${x}-footer`},[f]));let j;b&&(j=a("div",{class:`${x}-header`},[a("div",{class:`${x}-title`,id:v},[b])]));let L;w&&(L=a("button",{type:"button",onClick:F,"aria-label":"Close",class:`${x}-close`},[B||a("span",{class:`${x}-close-x`},null)]));const z=a("div",{class:`${x}-content`},[L,j,a("div",$({class:`${x}-body`,style:I},M),[(y=t.default)===null||y===void 0?void 0:y.call(t)]),W]),ee=be(N);return a($e,$($({},ee),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[E||!_?Se(a("div",$($({},l),{},{ref:g,key:"dialog-element",role:"document",style:[m.value,l.style],class:[x,l.class],onMousedown:H,onMouseup:O}),[a("div",{tabindex:0,ref:s,style:$o},[D?D({originVNode:z}):z]),a("div",{tabindex:0,ref:p,style:xo},null)]),[[he,E]]):null]})}}}),ho=A({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,o){return()=>{const{prefixCls:n,visible:t,maskProps:l,motionName:s}=e,p=be(s);return a($e,p,{default:()=>[Se(a("div",$({class:`${n}-mask`},l),null),[[he,t]])]})}}}),ge=A({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:J(i(i({},ae()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,o){let{attrs:n,slots:t}=o;const l=T(),s=T(),p=T(),g=T(e.visible),S=T(`vcDialogTitle${yo()}`),m=f=>{var b,v;if(f)Le(s.value,document.activeElement)||(l.value=document.activeElement,(b=p.value)===null||b===void 0||b.focus());else{const w=g.value;if(g.value=!1,e.mask&&l.value&&e.focusTriggerAfterClose){try{l.value.focus({preventScroll:!0})}catch{}l.value=null}w&&((v=e.afterClose)===null||v===void 0||v.call(e))}},u=f=>{var b;(b=e.onClose)===null||b===void 0||b.call(e,f)},d=T(!1),c=T(),r=()=>{clearTimeout(c.value),d.value=!0},C=()=>{c.value=setTimeout(()=>{d.value=!1})},y=f=>{if(!e.maskClosable)return null;d.value?d.value=!1:s.value===f.target&&u(f)},x=f=>{if(e.keyboard&&f.keyCode===ce.ESC){f.stopPropagation(),u(f);return}e.visible&&f.keyCode===ce.TAB&&p.value.changeActive(!f.shiftKey)};return Z(()=>e.visible,()=>{e.visible&&(g.value=!0)},{flush:"post"}),Ye(()=>{var f;clearTimeout(c.value),(f=e.scrollLocker)===null||f===void 0||f.unLock()}),qe(()=>{var f,b;(f=e.scrollLocker)===null||f===void 0||f.unLock(),g.value&&((b=e.scrollLocker)===null||b===void 0||b.lock())}),()=>{const{prefixCls:f,mask:b,visible:v,maskTransitionName:w,maskAnimation:B,zIndex:F,wrapClassName:I,rootClassName:M,wrapStyle:H,closable:O,maskProps:E,maskStyle:D,transitionName:_,animation:N,wrapProps:W,title:j=t.title}=e,{style:L,class:z}=n;return a("div",$({class:[`${f}-root`,M]},oo(e,{data:!0})),[a(ho,{prefixCls:f,visible:b&&v,motionName:fe(f,w,B),style:i({zIndex:F},D),maskProps:E},null),a("div",$({tabIndex:-1,onKeydown:x,class:U(`${f}-wrap`,I),ref:s,onClick:y,role:"dialog","aria-labelledby":j?S.value:null,style:i(i({zIndex:F},H),{display:g.value?null:"none"})},W),[a(So,$($({},we(e,["scrollLocker"])),{},{style:L,class:z,onMousedown:r,onMouseup:C,ref:p,closable:O,ariaId:S.value,prefixCls:f,visible:v,onClose:u,onVisibleChanged:m,motionName:fe(f,_,N)}),t)])])}}}),wo=ae(),To=A({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:J(wo,{visible:!1}),setup(e,o){let{attrs:n,slots:t}=o;const l=X(e.visible);return Re({},{inTriggerContext:!1}),Z(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),()=>{const{visible:s,getContainer:p,forceRender:g,destroyOnClose:S=!1,afterClose:m}=e;let u=i(i(i({},e),n),{ref:"_component",key:"dialog"});return p===!1?a(ge,$($({},u),{},{getOpenCount:()=>2}),t):!g&&S&&!l.value?null:a(to,{autoLock:!0,visible:s,forceRender:g,getContainer:p},{default:d=>(u=i(i(i({},u),d),{afterClose:()=>{m?.(),l.value=!1}}),a(ge,u,t))})}}});function ve(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const Bo=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}${e.antCls}-zoom-enter, ${o}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${o}${e.antCls}-zoom-leave ${o}-content`]:{pointerEvents:"none"},[`${o}-mask`]:i(i({},ve("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${o}-hidden`]:{display:"none"}}),[`${o}-wrap`]:i(i({},ve("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${o}-root`]:Co(e)}]},Po=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${o}-wrap-rtl`]:{direction:"rtl"},[`${o}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[o]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[o]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${o}-centered`]:{[o]:{flex:1}}}}},{[o]:i(i({},We(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${o}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${o}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${o}-close`]:i({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},je(e)),[`${o}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${o}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${o}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${o}-open`]:{overflow:"hidden"}})},{[`${o}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${o}-content,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as o}from"./Row-BdM70oda.js";import{a0 as t}from"./index-DfgCdFrN.js";import"./vendor-BMxUs6UX.js";import"./responsiveObserve-wruHk-h5.js";import"./useFlexGapSupport-BxPcq6pj.js";import"./styleChecker-CRa-GZpX.js";import"./index-Cj0OZ-37.js";import"./icons-BsDmGpcT.js";const l=t(o);export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as be,x as Ce,s as pe,e as $e,d as R,c as a,b as Q,r as ve,Q as de,a9 as Se}from"./vendor-BMxUs6UX.js";import{h as l,P as s,i as v,ap as xe,f as N,ae as ne,aq as K,ar as ye,as as Ie,l as Pe,m as Oe,r as Te,n as ze,at as re,q as Be,p as we,a5 as M,H as F,af as Ne,a6 as Me,a7 as Ee,au as je,a0 as De}from"./index-BtbbdLnf.js";import{ag as ae,bb as oe,bc as le,bd as se}from"./icons-BsDmGpcT.js";import{S as G,s as ge}from"./index-QNAG4JtR.js";import{u as Re}from"./responsiveObserve-IVYkzntU.js";import{i as Ae,g as _e,h as He}from"./index-BTIjjXry.js";import{B as Ke}from"./Trigger-nWhWYTbU.js";import{B as me}from"./BaseInput-uAwSTeql.js";import{c as ue}from"./vnode-9ZpkA7bb.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Fe(){const e=pe({});let t=null;const i=Re();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function ft(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Ve=R({name:"MiniSelect",compatConfig:{MODE:3},inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"small"}),i);return a(G,r,n)}}}),We=R({name:"MiddleSelect",inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"middle"}),i);return a(G,r,n)}}}),E=R({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:s.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:i,attrs:n}=t;const r=()=>{i("click",e.page)},O=g=>{i("keypress",g,r,e.page)};return()=>{const{showTitle:g,page:p,itemRender:c}=e,{class:h,style:u}=n,b=`${e.rootPrefixCls}-item`,$=v(b,`${b}-${e.page}`,{[`${b}-active`]:e.active,[`${b}-disabled`]:!e.page},h);return a("li",{onClick:r,onKeypress:O,title:g?String(p):null,tabindex:"0",class:$,style:u},[c({page:p,type:"page",originalElement:a("a",{rel:"nofollow"},[p])})])}}}),j={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Je=R({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:s.any,current:Number,pageSizeOptions:s.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:s.object,rootPrefixCls:String,selectPrefixCls:String,goButton:s.any},setup(e){const t=ve(""),i=Q(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),n=c=>`${c.value} ${e.locale.items_per_page}`,r=c=>{const{value:h}=c.target;t.value!==h&&(t.value=h)},O=c=>{const{goButton:h,quickGo:u,rootPrefixCls:b}=e;if(!(h||t.value===""))if(c.relatedTarget&&(c.relatedTarget.className.indexOf(`${b}-item-link`)>=0||c.relatedTarget.className.indexOf(`${b}-item`)>=0)){t.value="";return}else u(i.value),t.value=""},g=c=>{t.value!==""&&(c.keyCode===j.ENTER||c.type==="click")&&(e.quickGo(i.value),t.value="")},p=Q(()=>{const{pageSize:c,pageSizeOptions:h}=e;return h.some(u=>u.toString()===c.toString())?h:h.concat([c.toString()]).sort((u,b)=>{const $=isNaN(Number(u))?0:Number(u),S=isNaN(Number(b))?0:Number(b);return $-S})});return()=>{const{rootPrefixCls:c,locale:h,changeSize:u,quickGo:b,goButton:$,selectComponentClass:S,selectPrefixCls:m,pageSize:T,disabled:x}=e,o=`${c}-options`;let C=null,y=null,z=null;if(!u&&!b)return null;if(u&&S){const D=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[D({value:f})]}));C=a(S,{disabled:x,prefixCls:m,showSearch:!1,class:`${o}-size-changer`,optionLabelProp:"children",value:(T||p.value[0]).toString(),onChange:f=>u(Number(f)),getPopupContainer:f=>f.parentNode},{default:()=>[d]})}return b&&($&&(z=typeof $=="boolean"?a("button",{type:"button",onClick:g,onKeyup:g,disabled:x,class:`${o}-quick-jumper-button`},[h.jump_to_confirm]):a("span",{onClick:g,onKeyup:g},[$])),y=a("div",{class:`${o}-quick-jumper`},[h.jump_to,a(me,{disabled:x,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:g,onBlur:O},null),h.page,z])),a("li",{class:`${o}`},[C,y])}}});var Le=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function Xe(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ge(e){let{originalElement:t}=e;return t}function P(e,t,i){const n=typeof e>"u"?t.statePageSize:e;return Math.floor((i.total-1)/n)+1}const qe=R({compatConfig:{MODE:3},name:"Pagination",mixins:[Ke],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:s.string.def("rc-pagination"),selectPrefixCls:s.string.def("rc-select"),current:Number,defaultCurrent:s.number.def(1),total:s.number.def(0),pageSize:Number,defaultPageSize:s.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:s.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:s.oneOfType([s.looseBool,s.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:s.arrayOf(s.oneOfType([s.number,s.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:s.object.def(Ie),itemRender:s.func.def(Ge),prevIcon:s.any,nextIcon:s.any,jumpPrevIcon:s.any,jumpNextIcon:s.any,totalBoundaryShowSizeChanger:s.number.def(50)},data(){const e=this.$props;let t=ce([this.current,this.defaultCurrent]);const i=ce([this.pageSize,this.defaultPageSize]);return t=Math.min(t,P(i,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:i}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let i=this.stateCurrent;const n=P(e,this.$data,this.$props);i=i>n?n:i,K(this,"current")||(t.stateCurrent=i,t.stateCurrentInputValue=i),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const i=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);i&&document.activeElement===i&&i.blur()}})},total(){const e={},t=P(this.pageSize,this.$data,this.$props);if(K(this,"current")){const i=Math.min(this.current,t);e.stateCurrent=i,e.stateCurrentInputValue=i}else{let i=this.stateCurrent;i===0&&t>0?i=1:i=Math.min(this.stateCurrent,t),e.stateCurrent=i}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(P(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:i}=this.$props;return ye(this,e,this.$props)||a("button",{type:"button","aria-label":t,class:`${i}-item-link`},null)},getValidValue(e){const t=e.target.value,i=P(void 0,this.$data,this.$props),{stateCurrentInputValue:n}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=n:t>=i?r=i:r=Number(t),r},isValid(e){return Xe(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:i}=this.$props;return i<=t?!1:e},handleKeyDown(e){(e.keyCode===j.ARROW_UP||e.keyCode===j.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),i=this.stateCurrentInputValue;t!==i&&this.setState({stateCurrentInputValue:t}),e.keyCode===j.ENTER?this.handleChange(t):e.keyCode===j.ARROW_UP?this.handleChange(t-1):e.keyCode===j.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const i=t,n=P(e,this.$data,this.$props);t=t>n?n:t,n===0&&(t=this.stateCurrent),typeof e=="number"&&(K(this,"pageSize")||this.setState({statePageSize:e}),K(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==i&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let i=e;if(this.isValid(i)&&!t){const n=P(void 0,this.$data,this.$props);return i>n?i=n:i<1&&(i=1),K(this,"current")||this.setState({stateCurrent:i,stateCurrentInputValue:i}),this.__emit("update:current",i),this.__emit("change",i,this.statePageSize),i}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrent<P(void 0,this.$data,this.$props)},getShowSizeChanger(){const{showSizeChanger:e,total:t,totalBoundaryShowSizeChanger:i}=this.$props;return typeof e<"u"?e:t>i},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];t(...n)}},runIfEnterPrev(e){this.runIfEnter(e,this.prev)},runIfEnterNext(e){this.runIfEnter(e,this.next)},runIfEnterJumpPrev(e){this.runIfEnter(e,this.jumpPrev)},runIfEnterJumpNext(e){this.runIfEnter(e,this.jumpNext)},handleGoTO(e){(e.keyCode===j.ENTER||e.type==="click")&&this.handleChange(this.stateCurrentInputValue)},renderPrev(e){const{itemRender:t}=this.$props,i=t({page:e,type:"prev",originalElement:this.getItemIcon("prevIcon","prev page")}),n=!this.hasPrev();return ne(i)?ue(i,n?{disabled:n}:{}):i},renderNext(e){const{itemRender:t}=this.$props,i=t({page:e,type:"next",originalElement:this.getItemIcon("nextIcon","next page")}),n=!this.hasNext();return ne(i)?ue(i,n?{disabled:n}:{}):i}},render(){const{prefixCls:e,disabled:t,hideOnSinglePage:i,total:n,locale:r,showQuickJumper:O,showLessItems:g,showTitle:p,showTotal:c,simple:h,itemRender:u,showPrevNextJumpers:b,jumpPrevIcon:$,jumpNextIcon:S,selectComponentClass:m,selectPrefixCls:T,pageSizeOptions:x}=this.$props,{stateCurrent:o,statePageSize:C}=this,y=xe(this.$attrs).extraAttrs,{class:z}=y,D=Le(y,["class"]);if(i===!0&&this.total<=C)return null;const d=P(void 0,this.$data,this.$props),f=[];let V=null,Y=null,Z=null,k=null,A=null;const W=O&&O.goButton,I=g?1:2,ee=o-1>0?o-1:0,te=o+1<d?o+1:d,J=this.hasPrev(),L=this.hasNext();if(h)return W&&(typeof W=="boolean"?A=a("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[r.jump_to_confirm]):A=a("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[W]),A=a("li",{title:p?`${r.jump_to}${o}/${d}`:null,class:`${e}-simple-pager`},[A])),a("ul",N({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},D),[a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:J?0:null,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:!J}),"aria-disabled":!J},[this.renderPrev(ee)]),a("li",{title:p?`${o}/${d}`:null,class:`${e}-simple-pager`},[a(me,{type:"text",value:this.stateCurrentInputValue,disabled:t,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),a("span",{class:`${e}-slash`},[de("/")]),d]),a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:L?0:null,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:!L}),"aria-disabled":!L},[this.renderNext(te)]),A]);if(d<=3+I*2){const X={locale:r,rootPrefixCls:e,showTitle:p,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};d||f.push(a(E,N(N({},X),{},{key:"noPager",page:1,class:`${e}-item-disabled`}),null));for(let B=1;B<=d;B+=1){const w=o===B;f.push(a(E,N(N({},X),{},{key:B,page:B,active:w}),null))}}else{const X=g?r.prev_3:r.prev_5,B=g?r.next_3:r.next_5;b&&(V=a("li",{title:this.showTitle?X:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:v(`${e}-jump-prev`,{[`${e}-jump-prev-custom-icon`]:!!$})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),Y=a("li",{title:this.showTitle?B:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:v(`${e}-jump-next`,{[`${e}-jump-next-custom-icon`]:!!S})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),k=a(E,{locale:r,last:!0,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:d,page:d,active:!1,showTitle:p,itemRender:u},null),Z=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:p,itemRender:u},null);let w=Math.max(1,o-I),_=Math.min(o+I,d);o-1<=I&&(_=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=_;H+=1){const fe=o===H;f.push(a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:H,page:H,active:fe,showTitle:p,itemRender:u},null))}o-1>=I*2&&o!==3&&(f[0]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:w,page:w,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.unshift(V)),d-o>=I*2&&o!==d-2&&(f[f.length-1]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:_,page:_,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),_!==d&&f.push(k)}let ie=null;c&&(ie=a("li",{class:`${e}-total-text`},[c(n,[n===0?0:(o-1)*C+1,o*C>n?n:o*C])]));const q=!J||!d,U=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",N(N({unselectable:"on",ref:"paginationNode"},D),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:q?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:U?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderNext(te)]),a(Je,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:o,pageSize:C,pageSizeOptions:x,buildOptionText:he||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:W},null)])}}),Ue=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[`
|
|
1
|
+
import{o as be,x as Ce,s as pe,e as $e,d as R,c as a,b as Q,r as ve,Q as de,a9 as Se}from"./vendor-BMxUs6UX.js";import{h as l,P as s,i as v,ap as xe,f as N,ae as ne,aq as K,ar as ye,as as Ie,l as Pe,m as Oe,r as Te,n as ze,at as re,q as Be,p as we,a5 as M,H as F,af as Ne,a6 as Me,a7 as Ee,au as je,a0 as De}from"./index-DfgCdFrN.js";import{ag as ae,bb as oe,bc as le,bd as se}from"./icons-BsDmGpcT.js";import{S as G,s as ge}from"./index-CBlBVJ_m.js";import{u as Re}from"./responsiveObserve-wruHk-h5.js";import{i as Ae,g as _e,h as He}from"./index-C37f6iey.js";import{B as Ke}from"./Trigger-VZw9Oy2w.js";import{B as me}from"./BaseInput-CQxDdm63.js";import{c as ue}from"./vnode-1emidVKd.js";import{f as ce}from"./firstNotUndefined-CLFzEa0p.js";function Fe(){const e=pe({});let t=null;const i=Re();return be(()=>{t=i.value.subscribe(n=>{e.value=n})}),Ce(()=>{i.value.unsubscribe(t)}),e}function ft(e){const t=pe();return $e(()=>{t.value=e()},{flush:"sync"}),t}const Ve=R({name:"MiniSelect",compatConfig:{MODE:3},inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"small"}),i);return a(G,r,n)}}}),We=R({name:"MiddleSelect",inheritAttrs:!1,props:ge(),Option:G.Option,setup(e,t){let{attrs:i,slots:n}=t;return()=>{const r=l(l(l({},e),{size:"middle"}),i);return a(G,r,n)}}}),E=R({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:s.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:i,attrs:n}=t;const r=()=>{i("click",e.page)},O=g=>{i("keypress",g,r,e.page)};return()=>{const{showTitle:g,page:p,itemRender:c}=e,{class:h,style:u}=n,b=`${e.rootPrefixCls}-item`,$=v(b,`${b}-${e.page}`,{[`${b}-active`]:e.active,[`${b}-disabled`]:!e.page},h);return a("li",{onClick:r,onKeypress:O,title:g?String(p):null,tabindex:"0",class:$,style:u},[c({page:p,type:"page",originalElement:a("a",{rel:"nofollow"},[p])})])}}}),j={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Je=R({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:s.any,current:Number,pageSizeOptions:s.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:s.object,rootPrefixCls:String,selectPrefixCls:String,goButton:s.any},setup(e){const t=ve(""),i=Q(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),n=c=>`${c.value} ${e.locale.items_per_page}`,r=c=>{const{value:h}=c.target;t.value!==h&&(t.value=h)},O=c=>{const{goButton:h,quickGo:u,rootPrefixCls:b}=e;if(!(h||t.value===""))if(c.relatedTarget&&(c.relatedTarget.className.indexOf(`${b}-item-link`)>=0||c.relatedTarget.className.indexOf(`${b}-item`)>=0)){t.value="";return}else u(i.value),t.value=""},g=c=>{t.value!==""&&(c.keyCode===j.ENTER||c.type==="click")&&(e.quickGo(i.value),t.value="")},p=Q(()=>{const{pageSize:c,pageSizeOptions:h}=e;return h.some(u=>u.toString()===c.toString())?h:h.concat([c.toString()]).sort((u,b)=>{const $=isNaN(Number(u))?0:Number(u),S=isNaN(Number(b))?0:Number(b);return $-S})});return()=>{const{rootPrefixCls:c,locale:h,changeSize:u,quickGo:b,goButton:$,selectComponentClass:S,selectPrefixCls:m,pageSize:T,disabled:x}=e,o=`${c}-options`;let C=null,y=null,z=null;if(!u&&!b)return null;if(u&&S){const D=e.buildOptionText||n,d=p.value.map((f,V)=>a(S.Option,{key:V,value:f},{default:()=>[D({value:f})]}));C=a(S,{disabled:x,prefixCls:m,showSearch:!1,class:`${o}-size-changer`,optionLabelProp:"children",value:(T||p.value[0]).toString(),onChange:f=>u(Number(f)),getPopupContainer:f=>f.parentNode},{default:()=>[d]})}return b&&($&&(z=typeof $=="boolean"?a("button",{type:"button",onClick:g,onKeyup:g,disabled:x,class:`${o}-quick-jumper-button`},[h.jump_to_confirm]):a("span",{onClick:g,onKeyup:g},[$])),y=a("div",{class:`${o}-quick-jumper`},[h.jump_to,a(me,{disabled:x,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:g,onBlur:O},null),h.page,z])),a("li",{class:`${o}`},[C,y])}}});var Le=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function Xe(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ge(e){let{originalElement:t}=e;return t}function P(e,t,i){const n=typeof e>"u"?t.statePageSize:e;return Math.floor((i.total-1)/n)+1}const qe=R({compatConfig:{MODE:3},name:"Pagination",mixins:[Ke],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:s.string.def("rc-pagination"),selectPrefixCls:s.string.def("rc-select"),current:Number,defaultCurrent:s.number.def(1),total:s.number.def(0),pageSize:Number,defaultPageSize:s.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:s.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:s.oneOfType([s.looseBool,s.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:s.arrayOf(s.oneOfType([s.number,s.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:s.object.def(Ie),itemRender:s.func.def(Ge),prevIcon:s.any,nextIcon:s.any,jumpPrevIcon:s.any,jumpNextIcon:s.any,totalBoundaryShowSizeChanger:s.number.def(50)},data(){const e=this.$props;let t=ce([this.current,this.defaultCurrent]);const i=ce([this.pageSize,this.defaultPageSize]);return t=Math.min(t,P(i,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:i}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let i=this.stateCurrent;const n=P(e,this.$data,this.$props);i=i>n?n:i,K(this,"current")||(t.stateCurrent=i,t.stateCurrentInputValue=i),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const i=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);i&&document.activeElement===i&&i.blur()}})},total(){const e={},t=P(this.pageSize,this.$data,this.$props);if(K(this,"current")){const i=Math.min(this.current,t);e.stateCurrent=i,e.stateCurrentInputValue=i}else{let i=this.stateCurrent;i===0&&t>0?i=1:i=Math.min(this.stateCurrent,t),e.stateCurrent=i}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(P(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:i}=this.$props;return ye(this,e,this.$props)||a("button",{type:"button","aria-label":t,class:`${i}-item-link`},null)},getValidValue(e){const t=e.target.value,i=P(void 0,this.$data,this.$props),{stateCurrentInputValue:n}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=n:t>=i?r=i:r=Number(t),r},isValid(e){return Xe(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:i}=this.$props;return i<=t?!1:e},handleKeyDown(e){(e.keyCode===j.ARROW_UP||e.keyCode===j.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),i=this.stateCurrentInputValue;t!==i&&this.setState({stateCurrentInputValue:t}),e.keyCode===j.ENTER?this.handleChange(t):e.keyCode===j.ARROW_UP?this.handleChange(t-1):e.keyCode===j.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const i=t,n=P(e,this.$data,this.$props);t=t>n?n:t,n===0&&(t=this.stateCurrent),typeof e=="number"&&(K(this,"pageSize")||this.setState({statePageSize:e}),K(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==i&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let i=e;if(this.isValid(i)&&!t){const n=P(void 0,this.$data,this.$props);return i>n?i=n:i<1&&(i=1),K(this,"current")||this.setState({stateCurrent:i,stateCurrentInputValue:i}),this.__emit("update:current",i),this.__emit("change",i,this.statePageSize),i}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrent<P(void 0,this.$data,this.$props)},getShowSizeChanger(){const{showSizeChanger:e,total:t,totalBoundaryShowSizeChanger:i}=this.$props;return typeof e<"u"?e:t>i},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];t(...n)}},runIfEnterPrev(e){this.runIfEnter(e,this.prev)},runIfEnterNext(e){this.runIfEnter(e,this.next)},runIfEnterJumpPrev(e){this.runIfEnter(e,this.jumpPrev)},runIfEnterJumpNext(e){this.runIfEnter(e,this.jumpNext)},handleGoTO(e){(e.keyCode===j.ENTER||e.type==="click")&&this.handleChange(this.stateCurrentInputValue)},renderPrev(e){const{itemRender:t}=this.$props,i=t({page:e,type:"prev",originalElement:this.getItemIcon("prevIcon","prev page")}),n=!this.hasPrev();return ne(i)?ue(i,n?{disabled:n}:{}):i},renderNext(e){const{itemRender:t}=this.$props,i=t({page:e,type:"next",originalElement:this.getItemIcon("nextIcon","next page")}),n=!this.hasNext();return ne(i)?ue(i,n?{disabled:n}:{}):i}},render(){const{prefixCls:e,disabled:t,hideOnSinglePage:i,total:n,locale:r,showQuickJumper:O,showLessItems:g,showTitle:p,showTotal:c,simple:h,itemRender:u,showPrevNextJumpers:b,jumpPrevIcon:$,jumpNextIcon:S,selectComponentClass:m,selectPrefixCls:T,pageSizeOptions:x}=this.$props,{stateCurrent:o,statePageSize:C}=this,y=xe(this.$attrs).extraAttrs,{class:z}=y,D=Le(y,["class"]);if(i===!0&&this.total<=C)return null;const d=P(void 0,this.$data,this.$props),f=[];let V=null,Y=null,Z=null,k=null,A=null;const W=O&&O.goButton,I=g?1:2,ee=o-1>0?o-1:0,te=o+1<d?o+1:d,J=this.hasPrev(),L=this.hasNext();if(h)return W&&(typeof W=="boolean"?A=a("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[r.jump_to_confirm]):A=a("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[W]),A=a("li",{title:p?`${r.jump_to}${o}/${d}`:null,class:`${e}-simple-pager`},[A])),a("ul",N({class:v(`${e} ${e}-simple`,{[`${e}-disabled`]:t},z)},D),[a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:J?0:null,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:!J}),"aria-disabled":!J},[this.renderPrev(ee)]),a("li",{title:p?`${o}/${d}`:null,class:`${e}-simple-pager`},[a(me,{type:"text",value:this.stateCurrentInputValue,disabled:t,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),a("span",{class:`${e}-slash`},[de("/")]),d]),a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:L?0:null,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:!L}),"aria-disabled":!L},[this.renderNext(te)]),A]);if(d<=3+I*2){const X={locale:r,rootPrefixCls:e,showTitle:p,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};d||f.push(a(E,N(N({},X),{},{key:"noPager",page:1,class:`${e}-item-disabled`}),null));for(let B=1;B<=d;B+=1){const w=o===B;f.push(a(E,N(N({},X),{},{key:B,page:B,active:w}),null))}}else{const X=g?r.prev_3:r.prev_5,B=g?r.next_3:r.next_5;b&&(V=a("li",{title:this.showTitle?X:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:v(`${e}-jump-prev`,{[`${e}-jump-prev-custom-icon`]:!!$})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),Y=a("li",{title:this.showTitle?B:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:v(`${e}-jump-next`,{[`${e}-jump-next-custom-icon`]:!!S})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),k=a(E,{locale:r,last:!0,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:d,page:d,active:!1,showTitle:p,itemRender:u},null),Z=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:p,itemRender:u},null);let w=Math.max(1,o-I),_=Math.min(o+I,d);o-1<=I&&(_=1+I*2),d-o<=I&&(w=d-I*2);for(let H=w;H<=_;H+=1){const fe=o===H;f.push(a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:H,page:H,active:fe,showTitle:p,itemRender:u},null))}o-1>=I*2&&o!==3&&(f[0]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:w,page:w,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.unshift(V)),d-o>=I*2&&o!==d-2&&(f[f.length-1]=a(E,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:_,page:_,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),f.push(Y)),w!==1&&f.unshift(Z),_!==d&&f.push(k)}let ie=null;c&&(ie=a("li",{class:`${e}-total-text`},[c(n,[n===0?0:(o-1)*C+1,o*C>n?n:o*C])]));const q=!J||!d,U=!L||!d,he=this.buildOptionText||this.$slots.buildOptionText;return a("ul",N(N({unselectable:"on",ref:"paginationNode"},D),{},{class:v({[`${e}`]:!0,[`${e}-disabled`]:t},z)}),[ie,a("li",{title:p?r.prev_page:null,onClick:this.prev,tabindex:q?null:0,onKeypress:this.runIfEnterPrev,class:v(`${e}-prev`,{[`${e}-disabled`]:q}),"aria-disabled":q},[this.renderPrev(ee)]),f,a("li",{title:p?r.next_page:null,onClick:this.next,tabindex:U?null:0,onKeypress:this.runIfEnterNext,class:v(`${e}-next`,{[`${e}-disabled`]:U}),"aria-disabled":U},[this.renderNext(te)]),a(Je,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:o,pageSize:C,pageSizeOptions:x,buildOptionText:he||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:W},null)])}}),Ue=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[`
|
|
2
2
|
&:hover ${t}-item:not(${t}-item-active),
|
|
3
3
|
&:active ${t}-item:not(${t}-item-active),
|
|
4
4
|
&:hover ${t}-item-link,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as q,m as J,h as N,r as Q,af as P,v as tt,f as y,a0 as et,w as nt,p as ot,q as st,J as it}from"./index-BtbbdLnf.js";import{d as L,b as F,e as D,w as rt,c as C,F as O,s as I,r as lt}from"./vendor-BMxUs6UX.js";import at from"./index-D4XKpj6c.js";import{B as ut}from"./index-kmh1TxRa.js";import{R as ct}from"./icons-BsDmGpcT.js";import"./initDefaultProps-BD55yNBt.js";import"./index-DmqlJed-.js";import"./isVisible-C7tPsqfj.js";import"./useState-LwExUYDO.js";import"./raf-Deuc0E8-.js";import"./devWarning-C2Z5LRgq.js";import"./compact-item-D7iMkbnE.js";import"./createContext-CBzPJv-w.js";import"./Compact-CZm8THYA.js";import"./_getTag-DnrRH4E6.js";const ht=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},dt=q("QRCode",r=>ht(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var R;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,w=l.getTotalBits(t,a);if(w<=m){g=w;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const d=[];for(const m of t){u(m.mode.modeBits,4,d),u(m.numChars,m.mode.numCharCountBits(a),d);for(const w of m.getData())d.push(w)}h(d.length==g);const p=s.getNumDataCodewords(a,n)*8;h(d.length<=p),u(0,Math.min(4,p-d.length),d),u(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<p;m^=253)u(m,8,d);const M=[];for(;M.length*8<d.length;)M.push(0);return d.forEach((m,w)=>M[w>>>3]|=m<<7-(w&7)),new s(a,n,M,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<a&&(o=g,a=d),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,f(o,i));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,f(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,f(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,f(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=f(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),d=[],p=s.reedSolomonComputeDivisor(i);for(let m=0,w=0;m<o;m++){const v=t.slice(w,w+g-i+(m<a?0:1));w+=v.length;const A=s.reedSolomonComputeRemainder(v,p);m<a&&v.push(0),d.push(v.concat(A))}const M=[];for(let m=0;m<d[0].length;m++)d.forEach((w,v)=>{(m!=g-i||v>=a)&&M.push(w[m])});return h(M.length==c),M}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=f(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][d],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[d][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function f(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(R||(R={}));const U={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,gt=4,mt=0,Et=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(f,h){let l=null;f.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===f.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,f)=>f<s.y||f>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,f){if(f==null)return null;const h=r.length+u*2,l=Math.floor(s*Et),E=h/s,t=(f.width||l)*E,n=(f.height||l)*E,e=f.x==null?r.length/2-t/2:f.x*E,o=f.y==null?r.length/2-n/2:f.y*E;let i=null;if(f.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),d=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:d}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?gt:mt}const wt=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:f}=s;const h=F(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=I(null),E=I(null),t=I(!1);return f({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),D(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:d}=r;if(l.value!=null){const p=l.value,M=p.getContext("2d");if(!M)return;let m=R.QrCode.encodeText(n,U[o]).getModules();const w=_(a,g),v=m.length+w*2,A=X(m,e,w,d),b=E.value,x=t.value&&A!=null&&b!==null&&b.complete&&b.naturalHeight!==0&&b.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;p.height=p.width=e*B;const T=e/v*B;M.scale(T,T),M.fillStyle=i,M.fillRect(0,0,v,v),M.fillStyle=c,wt?M.fill(new Path2D(Y(m,w))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&M.fillRect(Z+w,j+w,1,1)})}),x&&M.drawImage(b,A.x+w,A.y+w,A.w,A.h)}},{flush:"post"}),rt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(O,null,[C("canvas",y(y({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),Ct=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,f=null,h=null,l=null,E=null;return D(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=R.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),f=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${f} ${f}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${f}v${f}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Rt=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:f,expose:h}=s;nt(!(r.icon&&r.errorLevel==="L"),"QRCode","ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.");const[l]=ot("QRCode"),{prefixCls:E}=st("qrcode",r),[t,n]=dt(E),[,e]=it(),o=lt();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=F(()=>{const{value:c,icon:a="",size:g=160,iconSize:d=40,color:p=e.value.colorText,bgColor:M="transparent",errorLevel:m="M"}=r,w={src:a,x:void 0,y:void 0,height:d,width:d,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:M,fgColor:p,imageSettings:a?w:void 0}});return()=>{const c=E.value;return t(C("div",y(y({},f),{},{style:[f.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(at,null,null),r.status==="expired"&&C(O,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(ut,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ct,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,y({ref:o},i.value),null):C(Ct,i.value,null)]))}}}),Dt=et(Rt);export{Dt as default};
|
|
1
|
+
import{l as q,m as J,h as N,r as Q,af as P,v as tt,f as y,a0 as et,w as nt,p as ot,q as st,J as it}from"./index-DfgCdFrN.js";import{d as L,b as F,e as D,w as rt,c as C,F as O,s as I,r as lt}from"./vendor-BMxUs6UX.js";import at from"./index-tgO8iza6.js";import{B as ut}from"./index-C-WIY-FQ.js";import{R as ct}from"./icons-BsDmGpcT.js";import"./initDefaultProps-DtrnfsZH.js";import"./index-BiDWxzbn.js";import"./isVisible-C7tPsqfj.js";import"./useState-LwExUYDO.js";import"./raf-Deuc0E8-.js";import"./devWarning-WDr3_M_N.js";import"./compact-item-CJYJj0oO.js";import"./createContext-BkbFiKT4.js";import"./Compact-C43fo_my.js";import"./_getTag-DnrRH4E6.js";const ht=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},dt=q("QRCode",r=>ht(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var R;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,w=l.getTotalBits(t,a);if(w<=m){g=w;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const d=[];for(const m of t){u(m.mode.modeBits,4,d),u(m.numChars,m.mode.numCharCountBits(a),d);for(const w of m.getData())d.push(w)}h(d.length==g);const p=s.getNumDataCodewords(a,n)*8;h(d.length<=p),u(0,Math.min(4,p-d.length),d),u(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<p;m^=253)u(m,8,d);const M=[];for(;M.length*8<d.length;)M.push(0);return d.forEach((m,w)=>M[w>>>3]|=m<<7-(w&7)),new s(a,n,M,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<a&&(o=g,a=d),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,f(o,i));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,f(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,f(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,f(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=f(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),d=[],p=s.reedSolomonComputeDivisor(i);for(let m=0,w=0;m<o;m++){const v=t.slice(w,w+g-i+(m<a?0:1));w+=v.length;const A=s.reedSolomonComputeRemainder(v,p);m<a&&v.push(0),d.push(v.concat(A))}const M=[];for(let m=0;m<d[0].length;m++)d.forEach((w,v)=>{(m!=g-i||v>=a)&&M.push(w[m])});return h(M.length==c),M}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=f(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][d],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[d][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function f(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(R||(R={}));const U={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,gt=4,mt=0,Et=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(f,h){let l=null;f.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===f.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,f)=>f<s.y||f>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,f){if(f==null)return null;const h=r.length+u*2,l=Math.floor(s*Et),E=h/s,t=(f.width||l)*E,n=(f.height||l)*E,e=f.x==null?r.length/2-t/2:f.x*E,o=f.y==null?r.length/2-n/2:f.y*E;let i=null;if(f.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),d=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:d}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?gt:mt}const wt=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:f}=s;const h=F(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=I(null),E=I(null),t=I(!1);return f({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),D(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:d}=r;if(l.value!=null){const p=l.value,M=p.getContext("2d");if(!M)return;let m=R.QrCode.encodeText(n,U[o]).getModules();const w=_(a,g),v=m.length+w*2,A=X(m,e,w,d),b=E.value,x=t.value&&A!=null&&b!==null&&b.complete&&b.naturalHeight!==0&&b.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;p.height=p.width=e*B;const T=e/v*B;M.scale(T,T),M.fillStyle=i,M.fillRect(0,0,v,v),M.fillStyle=c,wt?M.fill(new Path2D(Y(m,w))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&M.fillRect(Z+w,j+w,1,1)})}),x&&M.drawImage(b,A.x+w,A.y+w,A.w,A.h)}},{flush:"post"}),rt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(O,null,[C("canvas",y(y({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),Ct=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,f=null,h=null,l=null,E=null;return D(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=R.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),f=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${f} ${f}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${f}v${f}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Rt=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:f,expose:h}=s;nt(!(r.icon&&r.errorLevel==="L"),"QRCode","ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.");const[l]=ot("QRCode"),{prefixCls:E}=st("qrcode",r),[t,n]=dt(E),[,e]=it(),o=lt();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=F(()=>{const{value:c,icon:a="",size:g=160,iconSize:d=40,color:p=e.value.colorText,bgColor:M="transparent",errorLevel:m="M"}=r,w={src:a,x:void 0,y:void 0,height:d,width:d,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:M,fgColor:p,imageSettings:a?w:void 0}});return()=>{const c=E.value;return t(C("div",y(y({},f),{},{style:[f.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(at,null,null),r.status==="expired"&&C(O,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(ut,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ct,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,y({ref:o},i.value),null):C(Ct,i.value,null)]))}}}),Dt=et(Rt);export{Dt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as te,m as le,K as ie,h as s,r as E,at as se,H as m,a5 as I,a7 as A,P as ce,af as de,q as K,M as ue,w as be,L as ve,i as N,f as D}from"./index-
|
|
1
|
+
import{l as te,m as le,K as ie,h as s,r as E,at as se,H as m,a5 as I,a7 as A,P as ce,af as de,q as K,M as ue,w as be,L as ve,i as N,f as D}from"./index-DfgCdFrN.js";import{d as X,i as fe,b as S,e as he,f as me,o as pe,c as k,r as w,w as U,p as ge}from"./vendor-BMxUs6UX.js";import{V as xe}from"./Checkbox-CL04O-ER.js";import{u as L,F as Ce}from"./FormItemContext-DeGq1B-q.js";const $e=new ie("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ye=e=>{const{checkboxCls:a}=e,n=`${a}-wrapper`;return[{[`${a}-group`]:s(s({},E(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:s(s({},E(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[a]:s(s({},E(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${a}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${a}-inner`]:s({},se(e))},[`${a}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[a]:{"&-indeterminate":{[`${a}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${a}:after`]:{visibility:"visible"},[`
|
|
2
2
|
${n}:not(${n}-disabled),
|
|
3
3
|
${a}:not(${a}-disabled)
|
|
4
4
|
`]:{[`&:hover ${a}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${a}-checked:not(${a}-disabled) ${a}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${a}-checked:not(${a}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${a}-checked`]:{[`${a}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:$e,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as b,m as w,h as s,r as z,a0 as y,q as C,L as M,f}from"./index-
|
|
1
|
+
import{l as b,m as w,h as s,r as z,a0 as y,q as C,L as M,f}from"./index-DfgCdFrN.js";import{d as B,b as d,c as u}from"./vendor-BMxUs6UX.js";import"./icons-BsDmGpcT.js";const I=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:o,colorSplit:n,lineWidth:i}=t;return{[e]:s(s({},z(t)),{borderBlockStart:`${i}px solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${t.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${t.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${t.dividerHorizontalWithTextGutterMargin}px 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${e}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${e}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:o}},[`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:o}}})}},G=b("Divider",t=>{const e=w(t,{dividerVerticalGutterMargin:t.marginXS,dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG});return[I(e)]},{sizePaddingEdgeHorizontal:0}),H=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),W=B({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:H(),setup(t,e){let{slots:o,attrs:n}=e;const{prefixCls:i,direction:m}=C("divider",t),[v,h]=G(i),g=d(()=>t.orientation==="left"&&t.orientationMargin!=null),c=d(()=>t.orientation==="right"&&t.orientationMargin!=null),x=d(()=>{const{type:r,dashed:l,plain:S}=t,a=i.value;return{[a]:!0,[h.value]:!!h.value,[`${a}-${r}`]:!0,[`${a}-dashed`]:!!l,[`${a}-plain`]:!!S,[`${a}-rtl`]:m.value==="rtl",[`${a}-no-default-orientation-margin-left`]:g.value,[`${a}-no-default-orientation-margin-right`]:c.value}}),$=d(()=>{const r=typeof t.orientationMargin=="number"?`${t.orientationMargin}px`:t.orientationMargin;return s(s({},g.value&&{marginLeft:r}),c.value&&{marginRight:r})}),p=d(()=>t.orientation.length>0?"-"+t.orientation:t.orientation);return()=>{var r;const l=M((r=o.default)===null||r===void 0?void 0:r.call(o));return v(u("div",f(f({},n),{},{class:[x.value,l.length?`${i.value}-with-text ${i.value}-with-text${p.value}`:"",n.class],role:"separator"}),[l.length?u("span",{class:`${i.value}-inner-text`,style:$.value},[l]):null]))}}}),L=y(W);export{L as default,H as dividerProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as o}from"./Col-CH-bDkzs.js";import{a0 as t}from"./index-DfgCdFrN.js";import"./vendor-BMxUs6UX.js";import"./index-Cj0OZ-37.js";import"./icons-BsDmGpcT.js";const s=t(o);export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a8 as K,a9 as Q,aa as Y,h as d,l as Z,m as k,r as ee,ab as te,q as ne,f as F,P as B,L as le,w as oe}from"./index-
|
|
1
|
+
import{a8 as K,a9 as Q,aa as Y,h as d,l as Z,m as k,r as ee,ab as te,q as ne,f as F,P as B,L as le,w as oe}from"./index-DfgCdFrN.js";import{c as i,i as ie,F as se,r as O,d as q,m as ae,f as re,p as ce,b as de,a9 as G}from"./vendor-BMxUs6UX.js";import{u as pe,r as X}from"./responsiveObserve-wruHk-h5.js";import{c as ue}from"./vnode-1emidVKd.js";import"./icons-BsDmGpcT.js";function I(e){return e!=null}const E=e=>{const{itemPrefixCls:t,component:n,span:o,labelStyle:l,contentStyle:s,bordered:c,label:r,content:a,colon:u}=e,p=n;return c?i(p,{class:[{[`${t}-item-label`]:I(r),[`${t}-item-content`]:I(a)}],colSpan:o},{default:()=>[I(r)&&i("span",{style:l},[r]),I(a)&&i("span",{style:s},[a])]}):i(p,{class:[`${t}-item`],colSpan:o},{default:()=>[i("div",{class:`${t}-item-container`},[(r||r===0)&&i("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!u}],style:l},[r]),(a||a===0)&&i("span",{class:`${t}-item-content`,style:s},[a])])]})},me=e=>{const t=(u,p,L)=>{let{colon:m,prefixCls:x,bordered:b}=p,{component:y,type:w,showLabel:P,showContent:M,labelStyle:g,contentStyle:S}=L;return u.map((f,h)=>{var $,v;const D=f.props||{},{prefixCls:z=x,span:R=1,labelStyle:A=D["label-style"],contentStyle:H=D["content-style"],label:N=(v=($=f.children)===null||$===void 0?void 0:$.label)===null||v===void 0?void 0:v.call($)}=D,W=K(f),T=Q(f),_=Y(f),{key:j}=f;return typeof y=="string"?i(E,{key:`${w}-${String(j)||h}`,class:T,style:_,labelStyle:d(d({},g),A),contentStyle:d(d({},S),H),span:R,colon:m,component:y,itemPrefixCls:z,bordered:b,label:P?N:null,content:M?W:null},null):[i(E,{key:`label-${String(j)||h}`,class:T,style:d(d(d({},g),_),A),span:1,colon:m,component:y[0],itemPrefixCls:z,bordered:b,label:N},null),i(E,{key:`content-${String(j)||h}`,class:T,style:d(d(d({},S),_),H),span:R*2-1,component:y[1],itemPrefixCls:z,bordered:b,content:W},null)]})},{prefixCls:n,vertical:o,row:l,index:s,bordered:c}=e,{labelStyle:r,contentStyle:a}=ie(J,{labelStyle:O({}),contentStyle:O({})});return o?i(se,null,[i("tr",{key:`label-${s}`,class:`${n}-row`},[t(l,e,{component:"th",type:"label",showLabel:!0,labelStyle:r.value,contentStyle:a.value})]),i("tr",{key:`content-${s}`,class:`${n}-row`},[t(l,e,{component:"td",type:"content",showContent:!0,labelStyle:r.value,contentStyle:a.value})])]):i("tr",{key:s,class:`${n}-row`},[t(l,e,{component:c?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:r.value,contentStyle:a.value})])},fe=e=>{const{componentCls:t,descriptionsSmallPadding:n,descriptionsDefaultPadding:o,descriptionsMiddlePadding:l,descriptionsBg:s}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:s,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:l}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}}}}},be=e=>{const{componentCls:t,descriptionsExtraColor:n,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:l,descriptionsItemLabelColonMarginLeft:s,descriptionsTitleMarginBottom:c}=e;return{[t]:d(d(d({},ee(e)),fe(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:c},[`${t}-title`]:d(d({},te),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${s}px ${l}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},ye=Z("Descriptions",e=>{const t=e.colorFillAlter,n=e.fontSizeSM*e.lineHeightSM,o=e.colorText,l=`${e.paddingXS}px ${e.padding}px`,s=`${e.padding}px ${e.paddingLG}px`,c=`${e.paddingSM}px ${e.paddingLG}px`,r=e.padding,a=e.marginXS,u=e.marginXXS/2,p=k(e,{descriptionsBg:t,descriptionsTitleMarginBottom:n,descriptionsExtraColor:o,descriptionItemPaddingBottom:r,descriptionsSmallPadding:l,descriptionsDefaultPadding:s,descriptionsMiddlePadding:c,descriptionsItemLabelColonMarginRight:a,descriptionsItemLabelColonMarginLeft:u});return[be(p)]}),Le={prefixCls:String,label:B.any,span:Number},ge=()=>({prefixCls:String,label:B.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),Se=q({compatConfig:{MODE:3},name:"ADescriptionsItem",props:ge(),setup(e,t){let{slots:n}=t;return()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),V={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function $e(e,t){if(typeof e=="number")return e;if(typeof e=="object")for(let n=0;n<X.length;n++){const o=X[n];if(t[o]&&e[o]!==void 0)return e[o]||V[o]}return 3}function U(e,t,n){let o=e;return(n===void 0||n>t)&&(o=ue(e,{span:t}),oe(n===void 0,"Descriptions","Sum of column `span` in a line not match `column` of Descriptions.")),o}function ve(e,t){const n=le(e),o=[];let l=[],s=t;return n.forEach((c,r)=>{var a;const u=(a=c.props)===null||a===void 0?void 0:a.span,p=u||1;if(r===n.length-1){l.push(U(c,s,u)),o.push(l);return}p<s?(s-=p,l.push(c)):(l.push(U(c,s,p)),o.push(l),s=t,l=[])}),o}const xe=()=>({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:B.any,extra:B.any,column:{type:[Number,Object],default:()=>V},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),J=Symbol("descriptionsContext"),C=q({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:xe(),slots:Object,Item:Se,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:l,direction:s}=ne("descriptions",e);let c;const r=O({}),[a,u]=ye(l),p=pe();ae(()=>{c=p.value.subscribe(m=>{typeof e.column=="object"&&(r.value=m)})}),re(()=>{p.value.unsubscribe(c)}),ce(J,{labelStyle:G(e,"labelStyle"),contentStyle:G(e,"contentStyle")});const L=de(()=>$e(e.column,r.value));return()=>{var m,x,b;const{size:y,bordered:w=!1,layout:P="horizontal",colon:M=!0,title:g=(m=n.title)===null||m===void 0?void 0:m.call(n),extra:S=(x=n.extra)===null||x===void 0?void 0:x.call(n)}=e,f=(b=n.default)===null||b===void 0?void 0:b.call(n),h=ve(f,L.value);return a(i("div",F(F({},o),{},{class:[l.value,{[`${l.value}-${y}`]:y!=="default",[`${l.value}-bordered`]:!!w,[`${l.value}-rtl`]:s.value==="rtl"},o.class,u.value]}),[(g||S)&&i("div",{class:`${l.value}-header`},[g&&i("div",{class:`${l.value}-title`},[g]),S&&i("div",{class:`${l.value}-extra`},[S])]),i("div",{class:`${l.value}-view`},[i("table",null,[i("tbody",null,[h.map(($,v)=>i(me,{key:v,index:v,colon:M,prefixCls:l.value,vertical:P==="vertical",bordered:w,row:$},null))])])])]))}}});C.install=function(e){return e.component(C.name,C),e.component(C.Item.name,C.Item),e};export{Se as DescriptionsItem,Le as DescriptionsItemProps,C as default,J as descriptionsContext,xe as descriptionsProps};
|