deepsky-core 2.3.11 → 2.3.12
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/package.json +2 -1
- package/dist/172d3529b26f8cedef6b.woff2 +0 -0
- package/dist/20f389c4120be058d80a.woff2 +0 -0
- package/dist/2960900c4f271311eb36.woff2 +0 -0
- package/dist/39890742bc957b368704.woff2 +0 -0
- package/dist/6d3d25f4820d0da8f01f.woff2 +0 -0
- package/dist/6eec866c69313624be60.woff2 +0 -0
- package/dist/73ea273a72f4aca30ca5.woff2 +0 -0
- package/dist/7d393d382f3e7fb1c637.woff2 +0 -0
- package/dist/931d67ea207ab37ee693.woff2 +0 -0
- package/dist/95591a929f0d32aa282a.woff2 +0 -0
- package/dist/a1abf90dfd72792a577a.woff2 +0 -0
- package/dist/c295e7f71970f03c0549.woff2 +0 -0
- package/dist/c81d1b2a4b75d3eded60.woff2 +0 -0
- package/dist/cd5e231e0cc53b2cb2c0.woff2 +0 -0
- package/dist/chunk/1037-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1066-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1216-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1230-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1425-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1432-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1476-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1545-303efe188a52bac65725.js +0 -1
- package/dist/chunk/16-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1624-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1631-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1655-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1708-303efe188a52bac65725.js +0 -1
- package/dist/chunk/172-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1729-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1757-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1803-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1839-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1857-303efe188a52bac65725.js +0 -1
- package/dist/chunk/1931-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2062-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2068-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2071-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2108-303efe188a52bac65725.js +0 -1
- package/dist/chunk/212-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2142-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2173-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2184-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2215-303efe188a52bac65725.js +0 -1
- package/dist/chunk/224-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2266-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2354-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2419-303efe188a52bac65725.js +0 -1
- package/dist/chunk/245-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2473-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2492-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2505-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2535-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2660-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2691-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2723-303efe188a52bac65725.js +0 -1
- package/dist/chunk/284-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2860-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2861-303efe188a52bac65725.js +0 -1
- package/dist/chunk/2934-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3032-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3043-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3052-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3124-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3170-303efe188a52bac65725.js +0 -1
- package/dist/chunk/321-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3227-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3247-303efe188a52bac65725.js +0 -1
- package/dist/chunk/327-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3279-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3330-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3403-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3454-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3492-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3516-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3593-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3646-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3702-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3720-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3837-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3874-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3894-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3906-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3941-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3947-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3949-303efe188a52bac65725.js +0 -1
- package/dist/chunk/396-303efe188a52bac65725.js +0 -1
- package/dist/chunk/3972-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4007-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4009-303efe188a52bac65725.js +0 -1
- package/dist/chunk/402-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4081-303efe188a52bac65725.js +0 -1
- package/dist/chunk/41-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4108-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4112-303efe188a52bac65725.js +0 -1
- package/dist/chunk/415-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4199-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4214-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4236-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4283-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4292-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4311-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4354-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4385-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4408-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4445-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4451-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4452-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4465-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4520-303efe188a52bac65725.js +0 -1
- package/dist/chunk/454-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4546-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4552-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4598-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4614-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4660-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4697-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4709-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4714-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4780-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4838-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4843-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4862-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4877-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4886-303efe188a52bac65725.js +0 -1
- package/dist/chunk/489-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4914-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4940-303efe188a52bac65725.js +0 -1
- package/dist/chunk/4962-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5026-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5034-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5050-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5099-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5119-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5141-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5143-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5177-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5203-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5283-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5314-303efe188a52bac65725.js +0 -1
- package/dist/chunk/535-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5363-303efe188a52bac65725.js +0 -1
- package/dist/chunk/542-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5424-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5443-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5521-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5536-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5542-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5585-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5589-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5601-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5611-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5628-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5638-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5647-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5709-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5728-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5731-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5744-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5814-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5827-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5884-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5891-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5936-303efe188a52bac65725.js +0 -1
- package/dist/chunk/5954-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6010-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6045-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6083-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6124-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6173-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6239-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6262-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6283-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6297-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6324-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6343-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6356-303efe188a52bac65725.js +0 -1
- package/dist/chunk/638-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6405-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6514-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6517-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6563-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6577-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6677-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6736-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6757-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6865-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6940-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6957-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6964-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6967-303efe188a52bac65725.js +0 -1
- package/dist/chunk/697-303efe188a52bac65725.js +0 -1
- package/dist/chunk/6980-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7095-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7141-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7145-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7148-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7217-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7258-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7328-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7374-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7434-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7470-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7504-303efe188a52bac65725.js +0 -1
- package/dist/chunk/753-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7549-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7561-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7567-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7611-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7615-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7625-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7642-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7670-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7681-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7688-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7765-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7768-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7788-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7789-303efe188a52bac65725.js +0 -1
- package/dist/chunk/780-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7817-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7824-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7831-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7900-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7922-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7927-303efe188a52bac65725.js +0 -1
- package/dist/chunk/794-303efe188a52bac65725.js +0 -1
- package/dist/chunk/7966-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8003-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8093-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8107-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8201-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8212-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8234-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8235-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8237-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8249-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8320-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8389-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8393-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8418-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8426-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8436-303efe188a52bac65725.js +0 -1
- package/dist/chunk/845-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8485-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8499-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8553-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8617-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8684-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8700-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8709-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8711-303efe188a52bac65725.js +0 -1
- package/dist/chunk/874-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8753-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8849-303efe188a52bac65725.js +0 -1
- package/dist/chunk/8931-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9017-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9045-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9057-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9077-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9079-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9096-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9104-303efe188a52bac65725.js +0 -1
- package/dist/chunk/914-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9175-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9179-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9198-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9206-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9225-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9270-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9281-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9294-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9478-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9524-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9526-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9556-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9641-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9661-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9681-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9689-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9692-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9728-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9730-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9780-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9788-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9806-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9809-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9819-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9831-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9845-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9876-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9904-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9910-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9965-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9976-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9982-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9983-303efe188a52bac65725.js +0 -1
- package/dist/chunk/9984-303efe188a52bac65725.js +0 -1
- package/dist/d6484fce1ef428d5bd94.woff2 +0 -0
- package/dist/dcbcbd93bac0470b462d.woff2 +0 -0
- package/dist/e1951519f6f0596f7356.woff2 +0 -0
- package/dist/e3b32fd51b23a8b71300.woff2 +0 -0
- package/dist/e418bf257af1052628d8.woff2 +0 -0
- package/dist/f650f111a3b890d116f1.woff2 +0 -0
- package/dist/fe2176f79edaa716e621.woff2 +0 -0
- package/dist/fonts/KaTeX_AMS-Regular-853be92419a6c3766b9a.ttf +0 -0
- package/dist/fonts/KaTeX_AMS-Regular-d562e886c52f12660a41.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold-7489a2fbfb9bfe704420.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold-d757c535a2e5902f1325.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular-7e873d3833eb108a0758.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular-db074fa22cf224af93d7.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold-354501bac435c3264834.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold-4c761b3711973ab04edf.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular-6fdf0ac577be0ba82a4c.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular-ed305b5434865e06ffde.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Bold-0c3b8929d377c0e9b2f3.woff +0 -0
- package/dist/fonts/KaTeX_Main-Bold-8169508bf58f8bd92ad8.ttf +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic-428978dc7837d46de091.woff +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic-828abcb200061cffbaae.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic-fa675e5e4bec9eb250b6.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic-fd947498bc16392e76c2.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular-4f35fbcc9ee8614c2bcc.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular-9eba1d77abcf2aa6e94e.ttf +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic-3f07ed67f06c720120ce.woff +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic-bf2d440b3a42ea78a998.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic-8a5f936332e8028c7278.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic-96759856b4e70f3a8338.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold-5b49f4993ae22d7975b4.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold-b9cd458ac6d5889ff9c3.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic-8d593cfaa96238d5e2f8.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic-b257a18c016f37ee4543.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular-02271ec5cb9f5b4588ac.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular-2f7bc363fc5424ebda59.ttf +0 -0
- package/dist/fonts/KaTeX_Script-Regular-073b3402d036714b4370.woff +0 -0
- package/dist/fonts/KaTeX_Script-Regular-fc9ba5249878cd8f8d88.ttf +0 -0
- package/dist/fonts/KaTeX_Size1-Regular-0108e89c9003e8c14ea3.woff +0 -0
- package/dist/fonts/KaTeX_Size1-Regular-6de7d4b539221a49e9e2.ttf +0 -0
- package/dist/fonts/KaTeX_Size2-Regular-3a99e70aee4076660d38.woff +0 -0
- package/dist/fonts/KaTeX_Size2-Regular-57f5c1837853986ea1db.ttf +0 -0
- package/dist/fonts/KaTeX_Size3-Regular-7947224e8a9914fa332b.woff +0 -0
- package/dist/fonts/KaTeX_Size3-Regular-8d6b6822586eea3d3b20.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular-4ad7c7e8bb8d10a34bb7.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular-aeffd8025cba3647f1a6.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular-4c6b94fd1d07f8beff7c.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular-c5c02d763c89380dcb4e.ttf +0 -0
- package/dist/fonts/iconfont-1f240a2f8a7ed2ba2d54.ttf +0 -0
- package/dist/fonts/iconfont-c0dd0830d105050efeab.woff +0 -0
- package/dist/index.css +0 -2839
- package/dist/index.d.ts +0 -4918
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -11
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.deepsky=t():e.deepsky=t()}(globalThis,()=>(()=>{var e,t,n={1869:e=>{var t;self,t=()=>(()=>{"use strict";var e,t,n,r,o={d:(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},i={};o.r(i),o.d(i,{DateTime:()=>m,DomAnimation:()=>c,DragDiff:()=>u,DragList:()=>p,IMath:()=>e,Iteration:()=>a,List:()=>l,MathBase:()=>_,MathLine:()=>v,MathPoint:()=>b,MathPolygon:()=>x,MathRect:()=>g,Notice:()=>s}),function(e){var t;(t=e.RectPosition||(e.RectPosition={})).left_mid="left-mid",t.left_top="left-top",t.left_bottom="left-bottom",t.top_mid="top-mid",t.bottom_mid="bottom-mid",t.right_top="right-top",t.right_mid="right-mid",t.right_bottom="right_bottom",t.center="center"}(e||(e={}));class s{static rope(e,t){return(...n)=>{let r=Symbol();return this.scope[e]=r,t(()=>r===this.scope[e],...n)}}static throttle(e,t=100){let n;return function(...r){return new Promise(o=>{if(n)return o(!1);n=setTimeout(()=>{e(...r),n=void 0,o(!0)},t)})}}static debounce(e,t=100){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}}r={},(n="scope")in(t=s)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;class a{static*zip(...e){const t=Math.min(...e.map(e=>e.length));for(let n=0;n<t;n++)yield e.map(e=>e[n])}}class l{static swap(e,t,n){const r=e[t],o=e[n];e[t]=o,e[n]=r}}class c{static scroll_element(e,t,n="vertical"){let r=t;const o=()=>{if(Math.abs(r)>2){let t=r/10;r-=t,"vertical"===n?e.scrollTop+=t:e.scrollLeft+=t,requestAnimationFrame(o)}"vertical"===n?e.scrollTop+=r:e.scrollLeft+=r};o()}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u{get el(){return this._el}init(){this._handler_down=e=>this._pointdown(e),this._handler_move=e=>this._pointmove(e),this._handler_up=e=>this._pointup(e),this._handler_cancel=e=>this._pointercancel(e),this.el.addEventListener("pointerdown",this._handler_down),document.documentElement.addEventListener("pointermove",this._handler_move),document.documentElement.addEventListener("pointerup",this._handler_up),document.documentElement.addEventListener("pointercancel",this._handler_cancel)}_pointdown(e){e.stopPropagation(),e.preventDefault();const t=e.target;this.el.contains(t)&&(this._is_down=!0,this._down_point={x:e.clientX,y:e.clientY},this._func_down&&this._func_down())}_pointmove(e){if(!this._is_down||!this._down_point||e.buttons<=0)return;e.stopPropagation(),e.preventDefault(),this._is_move=!0;const t=e.clientX-this._down_point.x,n=e.clientY-this._down_point.y;this._func_move&&this._func_move(t,n)}_pointup(e){if(e.preventDefault(),e.stopPropagation(),!this._is_down||!this._is_move)return;if(this._is_down=!1,this._is_move=!1,!this._down_point)return;const t=e.clientX-this._down_point.x,n=e.clientY-this._down_point.y;this._down_point=void 0,this._func_up&&this._func_up(t,n)}_pointercancel(e){this._is_down&&this._is_move&&(this._is_down=!1,this._is_move=!1,this._down_point=void 0,this._func_cancel&&this._func_cancel())}off(){this.el.removeEventListener("pointerdown",this._handler_down),document.documentElement.removeEventListener("pointermove",this._handler_move),document.documentElement.removeEventListener("pointerup",this._handler_up),document.documentElement.removeEventListener("pointercancel",this._handler_cancel)}register_down(e){this._func_down=e}register_move(e){this._func_move=e}register_up(e){this._func_up=e}register_cancel(e){this._func_cancel=e}constructor(e){d(this,"_el",void 0),d(this,"_handler_down",void 0),d(this,"_handler_move",void 0),d(this,"_handler_up",void 0),d(this,"_handler_cancel",void 0),d(this,"_func_down",void 0),d(this,"_func_move",void 0),d(this,"_func_up",void 0),d(this,"_func_cancel",void 0),d(this,"_is_down",!1),d(this,"_is_move",!1),d(this,"_down_point",void 0),this._el=e,this.init()}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p{init(){const e=this.order,t=new Set;this.order=[];for(let e=0;e<this.container.children.length;e++){const n=this.container.children[e],r=n.getAttribute(this.attr);r&&n instanceof HTMLElement&&(n.setAttribute("draggable","true"),n.style.position="absolute","horizental"===this.dir?n.style.left="0px":n.style.top="0px",this.order_origin.push(r),t.add(r),this.map.has(r)||this.register(n),this.map.set(r,n))}const n=this.init_container();this.container.addEventListener("dragenter",e=>{e.preventDefault()}),this.container.addEventListener("dragover",e=>{e.preventDefault()});for(let n of e)t.has(n)?(this.order.push(n),t.delete(n)):this.map.delete(n);for(let e of t)this.order.push(e);return this.sort(),n}sort(){for(let e=0;e<this.order.length;e++){const t=this.order[e],n=this.map.get(t);if(!n)continue;const r=this.sum_translate(this.order.slice(0,e));"horizental"===this.dir?n.style.transform=`translateX(${r}px)`:n.style.transform=`translateY(${r}px)`}for(let e of this.callback)e([...this.order])}init_container(){let e=0;for(const[t,n]of this.map)"horizental"===this.dir?e+=n.getBoundingClientRect().width/this.scale_h:e+=n.getBoundingClientRect().height/this.scale_v;return"horizental"===this.dir?this.container.style.width=e+"px":this.container.style.height=e+"px",e}sum_translate(e){let t=0;for(let n of e){const e=this.map.get(n);e&&("horizental"===this.dir?t+=e.getBoundingClientRect().width/this.scale_h:t+=e.getBoundingClientRect().height/this.scale_v)}return t}register(e){this._func_start=this.on_dragstart.bind(this),this._func_over=this.on_dragover.bind(this),this._func_enter=this.on_dragenter.bind(this),this._func_end=this.on_dragend.bind(this),e.addEventListener("dragstart",this._func_start,{capture:!0}),e.addEventListener("dragover",this._func_over,{capture:!0}),e.addEventListener("dragenter",this._func_enter,{capture:!0}),e.addEventListener("dragend",this._func_end,{capture:!0}),this.realtime||e.addEventListener("drop",this.on_drop.bind(this),{capture:!0})}on_dragstart(e){e.stopPropagation();const t=e.currentTarget;if(t instanceof HTMLElement&&(this.drag_id=t.getAttribute(this.attr),this.drag_id))for(let t of this.callback_start)t(e,this.drag_id);this.container.style.setProperty(this.css_var_point_events,"none")}on_dragenter(e){if(e.stopPropagation(),e.preventDefault(),!this.realtime)return;const t=e.currentTarget;if(e.target!==t)return;if(!(t instanceof HTMLElement))return;const n=t.getAttribute(this.attr),r=this.drag_id;if(!n||!r||n===r)return;const o=this.order.indexOf(n),i=this.order.indexOf(r);o<0||i<0||("swap"===this.effect?l.swap(this.order,o,i):(this.order.splice(i,1),this.order.splice(o,0,r)),this.init_container(),this.sort())}on_dragover(e){e.preventDefault(),e.stopPropagation()}on_drop(e){e.stopPropagation();const t=e.target;if(!(t instanceof HTMLElement))return;const n=t.getAttribute(this.attr),r=this.drag_id;if(!n||!r||n===r)return;const o=this.order.indexOf(n),i=this.order.indexOf(r);o<0||i<0||("swap"===this.effect?l.swap(this.order,o,i):(this.order.splice(i,1),this.order.splice(o,0,r)),this.sort())}on_dragend(e){this.container.style.setProperty(this.css_var_point_events,"auto");for(let t of this.callback_end)t(e)}register_start(e){this.callback_start.add(e)}register_dropend(e){this.callback_end.add(e)}register_callback(e){this.callback.add(e)}off_callback(e){this.callback.delete(e)}off_callback_start(e){this.callback_start.delete(e)}off_callback_drop(e){this.callback_end.delete(e)}constructor(e,t,n,r,o=!0){h(this,"container",void 0),h(this,"drag_id",void 0),h(this,"dir","vertical"),h(this,"effect",void 0),h(this,"attr",void 0),h(this,"realtime",!0),h(this,"order_origin",[]),h(this,"order",[]),h(this,"css_var_point_events","--drag-item-point-event"),h(this,"map",new Map),h(this,"callback",new Set),h(this,"callback_start",new Set),h(this,"callback_end",new Set),h(this,"scale_h",1),h(this,"scale_v",1),h(this,"_func_start",void 0),h(this,"_func_over",void 0),h(this,"_func_enter",void 0),h(this,"_func_end",void 0),h(this,"_callback_start",void 0),this.container=e,this.dir=t,this.attr=n,this.realtime=o,this.effect=r,e.style.position="relative"}}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m{static get_month_name(e){let t;return t=e||new Date,this.month_names[t.getMonth()]}static get_week_name(e){let t;return t=e||new Date,this.weeks_names[t.getDay()]}static get_date_string(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}static get_week_string(e){let t;t=e||new Date;const n=t.getDate(),r=t.getDay(),o=new Date(t.getFullYear(),t.getMonth(),n-r),i=new Date(t.getFullYear(),t.getMonth(),n+(6-r));return`${this.get_date_string(o)}:${this.get_date_string(i)}`}static get_week_days(e){const t=[];let n;n=e||new Date;const r=n.getFullYear(),o=n.getMonth(),i=n.getDate(),s=n.getDay(),a=new Date(r,o,i-s),l=a.getFullYear(),c=a.getMonth(),d=a.getDate();t.push(a);for(let e=1;e<=6;e++)t.push(new Date(l,c,d+e));return t}}f(m,"month_names",["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),f(m,"weeks_names",["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);class _{static sum(e){let t=0;for(let n of e)t+=n;return t}}class g{static get_rect_point(t,n){const{x:r,y:o,width:i,height:s}=t,a=o+s,l=r+i,c=r+i/2,d=o+s/2;if(n===e.RectPosition.left_bottom)return{x:r,y:a};if(n===e.RectPosition.left_top)return{x:r,y:o};if(n===e.RectPosition.left_mid)return{x:r,y:d};if(n===e.RectPosition.right_top)return{x:l,y:o};if(n===e.RectPosition.right_mid)return{x:l,y:d};if(n===e.RectPosition.right_bottom)return{x:l,y:a};if(n===e.RectPosition.bottom_mid)return{x:c,y:a};if(n===e.RectPosition.top_mid)return{x:c,y:o};if(n===e.RectPosition.center)return{x:c,y:d};throw Error("MathRect: the position keyword is invalid")}static is_point_in_rect(e,t,n=!0){const r=e.x===t.x||e.x===t.x+t.width,o=e.y===t.y||e.y===t.y+t.height,i=e.x>t.x&&e.x<t.x+t.width,s=e.y>t.y&&e.y<t.y+t.height;return n?(i||r)&&(s||o):i&&s}static get_point_in_rects(e,t,n=!0){const r=[];for(let o of t)this.is_point_in_rect(e,o,n)&&r.push(o);return r}static get_point_center(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}static move_rect_to_other(e,t,n,r=5){const o={width:e.width,height:Math.abs(e.y-n.y)},i={width:e.width,height:Math.abs(e.height-(n.y+n.height))},s={width:Math.abs(n.x-e.x),height:e.height},a={width:Math.abs(e.width-(n.x+n.width)),height:e.height};if(g.can_include_size(i,t)){const o=t.width+n.x-e.width,i=n.y+n.height+r;return{x:o<0?n.x:n.x-o,y:i}}if(g.can_include_size(o,t)){const o=t.width+n.x-e.width,i=n.y-t.height-r;return{x:o<0?n.x:n.x-o,y:i}}if(g.can_include_size(s,t)){const o=n.y+t.height-e.height;return{x:n.x-t.width-r,y:o<0?n.y:n.y-o}}if(g.can_include_size(a,t)){const o=n.y+t.height-e.height;return{x:n.x+n.width+r,y:o<0?n.y:n.y-o}}if(g.can_include_size(e,t)){const r=e.y+e.height-t.height;let o=n.x;return a.width>=t.width?o=n.x+n.width:s.width>=t.width&&(o=n.x-t.width),{x:o,y:r}}return{x:n.x,y:0}}static move_rect_in_other(e,t){if(g.is_include(t,e))return{dx:0,dy:0};let n=0,r=0;return e.x<t.x?n=t.x-e.x:e.x+e.width>t.x+t.width&&(n=t.x+t.width-(e.x+e.width)),e.y<t.y?r=t.y-e.y:e.y+e.height>t.y+t.height&&(r=t.y+t.height-(e.y+e.height)),{dx:n,dy:r}}static can_include_size(e,t){return t.width<=e.width&&t.height<=e.height}static is_include(e,t){return!(!this.can_include_size(e,t)||t.x<e.x||t.x>e.x+e.width-t.width||t.y<e.y||t.y>e.y+e.height-t.height)}static check_intersection(e,t){const n=this.get_point_center(e),r=this.get_point_center(t),o=Math.abs(n.x-r.x),i=Math.abs(n.y-r.y);return o<=(e.width+t.width)/2&&i<=(e.height+t.height)/2}static limit_point_in_rect(e,t){const n=t.x,r=t.y,o=t.x+t.width,i=t.y+t.height;let s=e.x,a=e.y;return s<n&&(s=n),s>o&&(s=o),a<r&&(a=r),a>i&&(a=i),{x:s,y:a}}static point_distance_with_rect(e,t){if(this.is_point_in_rect(e,t,!0))return 0;const n=t.x+t.width/2,r=t.y+t.height/2,o=t.width/2,i=t.height/2,s=Math.abs(n-e.x),a=Math.abs(r-e.y);return s<=o&&a>i?a-i:a<=i&&s>o?s-o:Math.sqrt(Math.pow(s-o,2)+Math.pow(a-i,2))}static distance_with(e,t){const n=this.get_point_center(e),r=this.get_point_center(t),o=Math.abs(n.x-r.x),i=Math.abs(n.y-r.y),s=(e.width+t.width)/2,a=(e.height+t.height)/2;if(o<=s&&i<=a)return 0;if(o>s&&i<=a)return o-s;if(o<=s&&i>a)return i-a;{let e=Math.pow(o-s,2),t=Math.pow(i-a,2);return Math.sqrt(e+t)}}static get_nearest_rect(e,t){if(0===t.length)return;let n,r=Number.POSITIVE_INFINITY;for(let o of t){let t=this.point_distance_with_rect(e,o);t<r&&(r=t,n=o)}return n}static get_shadow_point_horizental(e,t){let n=t.x,r=t.y+t.height/2;return n=e.x<=t.x?t.x:e.x>=t.x+t.width?t.x+t.width:e.x,{x:n,y:r}}static merge(...e){const t=e[0];let n=t.x,r=t.x+t.width,o=t.y,i=t.y+t.height;for(let t of e.slice(1)){const{x:e,y:s,width:a,height:l}=t;e<n&&(n=e),e+a>r&&(r=e+a),s<o&&(o=s),s+l>i&&(i=s+l)}return{x:n,y:o,width:r-n,height:i-o}}}class b{static svg_path_sample(e,t=24){if(!e||t<2)return[];this.path.setAttribute("d",e);const n=[],r=this.path.getTotalLength()/t;for(let e=0;e<t;e++){const t=e*r,o=this.path.getPointAtLength(t);n.push({x:o.x,y:o.y})}return n}static get_line_k(e,t,n=100){const r=t.y-e.y,o=t.x-e.x;return 0===o?Number.POSITIVE_INFINITY:r/o}static distance(e,t){const n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}static find_closet_point(e,t){let n=1/0,r=e[0];const{x:o,y:i}=t;for(let t of e){let e=Math.pow(o-t.x,2)+Math.pow(i-t.y,2);e<n&&(n=e,r=t)}return r}static offset_points(e,t){const n=[],{x:r,y:o}=t;for(let t of e)n.push({x:t.x+r,y:t.y+o});return n}static find_closest_points(e,t){let n=1/0,r=e[0],o=t[0];for(let i=0;i<e.length;i++){const s=e[i];for(let e=0;e<t.length;e++){const i=t[e],a=s.x-i.x,l=s.y-i.y,c=a*a+l*l;c<n&&(n=c,r=s,o=i)}}return{from:r,to:o}}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(b,"path",document.createElementNS("http://www.w3.org/2000/svg","path"));class x{static polygon_center(e){let t=0,n=0,r=0;const o=e.length;for(let i=0;i<o;i++){const{x:s,y:a}=e[i],{x:l,y:c}=e[(i+1)%o],d=s*c-l*a;r+=d,t+=(s+l)*d,n+=(a+c)*d}return r*=.5,t/=6*r,n/=6*r,{x:t,y:n}}static get_polygon_area(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const{x:o,y:i}=e[r],{x:s,y:a}=e[(r+1)%n];t+=o*a-s*i}return t/2}}class v{static check_intersection(e,t){const{from:n,to:r}=e,{from:o,to:i}=t;let s,a;if(s=n.x===r.x?Number.POSITIVE_INFINITY:(r.y-n.y)/(r.x-n.x),a=o.x===i.x?Number.POSITIVE_INFINITY:(i.y-o.y)/(i.x-o.x),s===a)return!1;const l=Math.min(n.x,r.x),c=Math.max(n.x,r.x),d=Math.min(n.y,r.y),u=Math.max(n.y,r.y),h=Math.min(o.x,i.x),p=Math.max(o.x,i.x),f=Math.min(o.y,i.y),m=Math.max(o.y,i.y);if(s===Number.POSITIVE_INFINITY){const e=n.x,t=a*(e-o.x)+o.y;return e>=l&&e<=c&&e>=h&&e<=p&&t>=d&&t<=u&&t>=f&&t<=m}if(a===Number.POSITIVE_INFINITY){const e=o.x,t=(r.y-n.y)/(r.x-n.x)*(e-n.x)+n.y;return e>=l&&e<=c&&e>=h&&e<=p&&t>=d&&t<=u&&t>=f&&t<=m}{const e=(o.y-n.y+s*n.x-a*o.x)/(s-a),t=s*(e-n.x)+n.y;return e>=l&&e<=c&&e>=h&&e<=p&&t>=d&&t<=u&&t>=f&&t<=m}}}return i})(),e.exports=t()},6960:(e,t)=>{"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.m=n,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,n)=>(o.f[n](e,t),t),[])),o.u=e=>"chunk/"+e+"-"+o.h()+".js",o.miniCssF=e=>{},o.h=()=>"303efe188a52bac65725",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="deepsky:",o.l=(n,r,i,s)=>{if(e[n])e[n].push(r);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==t+i){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",t+i),a.src=n),e[n]=[r];var h=(t,r)=>{a.onerror=a.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(e=>e(r)),t)return t(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={3057:0};o.f.j=(t,n)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,o)=>r=e[t]=[n,o]);n.push(r[2]=i);var s=o.p+o.u(t),a=new Error;o.l(s,n=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[s,a,l]=n,c=0;if(s.some(t=>0!==e[t])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)l(o)}for(t&&t(n);c<s.length;c++)i=s[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunkdeepsky=globalThis.webpackChunkdeepsky||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i={};return(()=>{"use strict";o.r(i),o.d(i,{CodeLanguageMap:()=>zg,CommandApi:()=>hh,CommandBoxFolder:()=>Pu,CommandBoxRoot:()=>xu,CommandCode:()=>Vh,CommandCube:()=>Mi,CommandCursor:()=>zi,CommandDetailList:()=>_h,CommandFomula:()=>Ew,CommandLinker:()=>Ou,CommandListOrdered:()=>Dh,CommandMap:()=>Qi,CommandNode:()=>es,CommandRt:()=>Ok,CommandTable:()=>Bw,CommandText:()=>Yd,CommandTextLink:()=>Bd,CommandTodo:()=>kh,CubeAnnotation:()=>Od,CubeApi:()=>uh,CubeBase:()=>Ri,CubeBox:()=>Cu,CubeBoxColumns:()=>Rk,CubeBoxFolder:()=>Ru,CubeBoxRoot:()=>bu,CubeChild:()=>nd,CubeCode:()=>Rg,CubeDetailList:()=>wh,CubeDoc:()=>lu,CubeFomula:()=>Dw,CubeHandler:()=>Ai,CubeImg:()=>gd,CubeLine:()=>uu,CubeLinker:()=>Du,CubeList:()=>Ih,CubeListOrdered:()=>Gh,CubeLost:()=>kd,CubeMap:()=>oh,CubeNode:()=>Ju,CubePostil:()=>Wd,CubeRoot:()=>As,CubeRt:()=>Bk,CubeSubMap:()=>Ck,CubeTable:()=>ek,CubeText:()=>Zd,CubeTextLink:()=>qd,CubeTip:()=>sk,CubeTodo:()=>Th,EventCommand:()=>sd,IApiCommand:()=>r,ICodeCommand:()=>l,ICubeCommand:()=>_,ICursorCommand:()=>g,IFomula:()=>d,IFomulaCommand:()=>u,ILinker:()=>p,ILinkerCommand:()=>f,IListCommand:()=>s,IListOrderedCommand:()=>a,IMapCommand:()=>b,IMisc:()=>S,INodeCommand:()=>x,INote:()=>k,INoteEvent:()=>y,INoteHotkeys:()=>w,IRtCommand:()=>m,ITableCommand:()=>h,ITextCommand:()=>e,ITextLinkCommand:()=>n,ITodoCommand:()=>c,LayoutChecker:()=>Ol,LinkerLine:()=>Bu,LinkerPoint:()=>ju,Map2D:()=>Wc,MapCanvas:()=>nh,MapChild:()=>Kc,MapInteraction:()=>ys,MapNodeBase:()=>Zc,MapNodeLayoutEnv:()=>Jc,MapTools:()=>Zi,Matrix2D:()=>Ji,NodeBase2D:()=>ed,NodeLayout:()=>Xc,NodeLayoutInvert:()=>Yc,NodeLayoutMeter:()=>Qc,NodeObserver:()=>Hu,NodeShape:()=>Zu,Note:()=>Ci,NoteApi:()=>xi,NoteBase:()=>bi,NoteClipBoard:()=>qi,NoteConfig:()=>Fi,NoteCourier:()=>Vi,NoteCubes:()=>Oi,NoteCursor:()=>Gi,NoteEvent:()=>ji,NoteHistory:()=>id,NoteHotkeys:()=>Di,NoteInteraction:()=>Ns,NoteListener:()=>Pi,NoteMeta:()=>Si,NotePainter:()=>Hi,NotePlayer:()=>od,NoteScope:()=>Yi,NoteStats:()=>Bi,NoteTools:()=>rd,Recorder:()=>ad,RootScopes:()=>Xi,StatusAnnotation:()=>Rd,StatusApi:()=>ph,StatusBox:()=>ku,StatusBoxFolder:()=>Au,StatusBoxRoot:()=>_u,StatusCode:()=>Ng,StatusCube:()=>Ts,StatusCubeRoot:()=>Rs,StatusDetailList:()=>vh,StatusDoc:()=>au,StatusFomula:()=>Lw,StatusImg:()=>_d,StatusLine:()=>cu,StatusList:()=>Eh,StatusListOrdered:()=>Fh,StatusLost:()=>wd,StatusMap:()=>th,StatusNode:()=>Xu,StatusNodeBase:()=>td,StatusPostil:()=>Ud,StatusRt:()=>Pk,StatusSubmap:()=>kk,StatusTable:()=>Zw,StatusText:()=>Xd,StatusTextLink:()=>jd,StatusTip:()=>ok,StatusTodo:()=>Nh,Waiter:()=>Va,_MapGroup:()=>v,_PlayStatus:()=>C,cmd:()=>Ti,key:()=>Ii,keymap:()=>Li,node_observer:()=>qu,waiter_map_svg:()=>Ua});var e,t={};o.r(t),o.d(t,{boolean:()=>Sf,booleanish:()=>Cf,commaOrSpaceSeparated:()=>Tf,commaSeparated:()=>Af,number:()=>zf,overloadedBoolean:()=>Mf,spaceSeparated:()=>Nf}),function(e){var t;(t=e.Names||(e.Names={})).reset="cube-text:text-reset",t.merge="cube-text:text-merge",t.break="cube-text:text-break"}(e||(e={}));var n,r,s,a,l,c,d,u,h,p,f,m,_,g,b,x,v=function(e){return e.outbox="outbox",e.markers="markers",e.nodes="nodes",e.linkers="linkers",e.placeholder="placeholder",e}({});!function(e){(e.Names||(e.Names={})).update="text-link:update"}(n||(n={})),function(e){(e.Names||(e.Names={})).reset="cube-api:reset"}(r||(r={})),function(e){var t;(t=e.Names||(e.Names={})).add="cube-list:add",t.remove="cube-list:remove",t.indent="cube-list:indent",t.reset="cube-list:reset",t.transform="cube-list:transform"}(s||(s={})),function(e){var t;(t=e.Names||(e.Names={})).add="cube-list-ordered:add",t.remove="cube-list-ordered:remove",t.indent="cube-list-ordered:indent",t.reset="cube-list-ordered:reset"}(a||(a={})),function(e){var t;(t=e.Names||(e.Names={})).change_lang="cube-code:change-lang",t.change_active="cube-code:change-active",t.change_theme="cube-code:change-theme",t.code_update="cube-code:update-code",t.code_add="cube-code:code-add",t.code_remove="cube-code:code-remove",t.code_rename="cube-code:code-rename"}(l||(l={})),function(e){var t;(t=e.Names||(e.Names={})).add="cube-todo:add",t.remove="cube-todo:remove",t.indent="cube-todo:indent",t.status="cube-todo:status",t.reset="cube-todo:reset"}(c||(c={})),function(e){var t;(t=e.Size||(e.Size={})).h1="\\Huge ",t.h2="\\huge ",t.h3="\\Large ",t.h4="\\normalsize ",t.h5="\\small ",t.h6="\\tiny "}(d||(d={})),function(e){(e.Names||(e.Names={})).update="cube-fomula:update"}(u||(u={})),function(e){var t;(t=e.Names||(e.Names={})).add_title="cube-table:add-title",t.remove_title="cube-table:remove-title",t.add_cell="cube-table:add-cell",t.remove_cell="cube-table:remove-cell",t.add_row="cube-table:add-row",t.remove_row="cube-table:remove-row",t.add_col="cube-table:add-col",t.remove_col="cube-table:remove-col",t.add_grid_col="cube-table:add-grid-col",t.remove_grid_col="cube-table:remove-grid-col",t.merge="cube-table:merge",t.moveto="cube-table:moveto",t.update_area="cube-table:update-area",t.reorder="cube-table:reorder",t.col_resize="cube-table:col-resize"}(h||(h={})),function(e){!function(e){e.arrow="marker-arrow",e.point="marker-point",e.square="marker-square",e.rhomb="marker-rhomb"}(e.Anchor||(e.Anchor={}))}(p||(p={})),function(e){(e.Names||(e.Names={})).update="linker:update"}(f||(f={})),function(e){(e.Names||(e.Names={})).reset="cube-rt:reset"}(m||(m={})),function(e){var t;(t=e.Names||(e.Names={})).cube_insert_child="cube-insert-child",t.cube_delete_child="cube-delete-child",t.cube_reset="cube-reset",t.cube_delete_adjacent="cube-delete-adjacent",t.cube_set_selection_css="cube-set-selection-css",t.cube_insert="cube-insert",t.cube_delete="cube-delete",t.cube_partition="cube-partition",t.cube_reorder="cube-reorder",t.cube_set_css="cube-set-css",t.cube_set_attr="cube-set-attr",t.cube_move="cube-move",t.cube_merge="cube-merge",t.cube_postil_add="cube-postil-add",t.cube_postil_remove="cube-postil-remove"}(_||(_={})),function(e){var t;(t=e.Names||(e.Names={})).cursor_in_head="cursor:in-head",t.cursor_in_tail="cursor:in-tail",t.loc="cursor:loc"}(g||(g={})),function(e){var t;(t=e.Names||(e.Names={})).node_add="node-add",t.node_remove="node-remove",t.linker_add="linker-add",t.linker_remove="linker-remove",t.update_attrs="update-attrs",t.node_drag="node-drag"}(b||(b={})),function(e){var t;(t=e.Names||(e.Names={})).layout_update="node:layout-update",t.append_child="node:append-child"}(x||(x={}));var y,w,k,S,C=function(e){return e.pending="pending",e.playing="playing",e.pause="pause",e.stop="stop",e}({});function M(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}!function(e){var t;(t=e.Names||(e.Names={}))["asset-save"]="note-event:asset-save",t["asset-download"]="note-event:asset-download",t["asset-copy"]="note-event:asset-copy",t.export="note-event:export",t["replace-id"]="note-event:replace-id",t["edit-before"]="note-event:edit-before",t["edit-after"]="note-event:edit-after",t["text-merge"]="note-event:text-merge",t.esc="note-event:esc",t["selection-change"]="note-event:selection-change",t["cursor-nav-before"]="note-event:cursor-nav-before",t["cursor-nav-after"]="note-event:cursor-nav-after",t["enter-before"]="note-event:enter-before",t["enter-after"]="note-event:enter-after",t["show-cube-editor"]="note-event:show-cube-editor",t["text-link-edit"]="note-event:text-link-edit",t["note-input-before"]="note-event:note-input-before",t["note-input-compositionend"]="note-event:note-input-compositionend",t["note-input-compositionend-before"]="note-event:note-input-compositionend-before",t["note-input-compositionupdate"]="note-event:note-input-compositionupdate",t["status-update"]="note-event:status-update",t["fig-click"]="note-event:fig-click"}(y||(y={})),function(e){var t,n;(t=e.HotKeys||(e.HotKeys={}))["break-line"]="换行",t["cursor-nav"]="光标导航",t["cursor-nav-extend"]="光标复选",t["format-brush-apply"]="应用格式刷",t["format-brush-copy"]="复制格式刷",t.undo="撤销",t.redo="重做",t["indent-line"]="缩进",t["unindent-line"]="反向缩进",t["clear-css"]="重置样式",t["scope-clear"]="清空块选区",t["scope-add"]="添加块选区",t["root-add-next"]="向后添加根级块",t["root-add-prev"]="向前添加根级块",t["break-root"]="分裂根级块",t["break-text"]="文本块换行",t["fold-block"]="折叠所在块",t["text-add-annotation"]="添加批注",t["text-italic"]="斜体",t["text-bold"]="加粗",t["text-underline"]="下划线",t["text-align-left"]="左对齐",t["text-align-center"]="居中对齐",t["text-align-right"]="右对齐",t["text-partition"]="分裂文本块",(n=e.Group||(e.Group={})).core="核心",n.common="通用",n.text="文本块",n.block="块",n.scope="块选区",n.dict="字典",n.bookmark="书签",n.search="搜索",n.css="样式",n.float="面板",n.other="其他"}(w||(w={})),function(e){var t,n;(t=e.Mode||(e.Mode={})).read="read",t.edit="edit",t.export="export",(n=e.Cores||(e.Cores={})).courier="courier",n.cursor="cursor",n.config="config",n.cubes="cubes",n.clipboard="clipboard",n.event="event",n.fomula="fomula",n.float="float",n.painter="painter",n.player="player",n.hotkeys="hotkeys",n.history="history",n.scope="scope",n.stats="stats",function(e){e.api="api",e.annotation="annotation",e.box="box",e.box_root="box-root",e.box_folder="box-folder",e.box_columns="box-columns",e.code="code",e.doc="doc",e.detail_list="detail-list",e.fomula="fomula",e.img="img",e.lost="lost",e.line="line",e.list="list",e.list_ordered="list-ordered",e.linker="linker",e.link="link",e.map="map",e.submap="submap",e.node="node",e.postil="postil",e.rt="rt",e.text="text",e.tip="tip",e.todo="todo",e.table="table"}(e.Cubes||(e.Cubes={}))}(k||(k={})),function(e){var t;(t=e.Keys||(e.Keys={})).enter="Enter",t.left="arrowleft",t.right="arrowright",t.up="arrowup",t.down="arrowdown",t.end="end",t.home="home"}(S||(S={}));const z={},N=[],A=()=>{},T=()=>!1,R=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),P=e=>e.startsWith("onUpdate:"),O=Object.assign,E=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},L=Object.prototype.hasOwnProperty,I=(e,t)=>L.call(e,t),D=Array.isArray,B=e=>"[object Map]"===U(e),j=e=>"[object Set]"===U(e),H=e=>"function"==typeof e,q=e=>"string"==typeof e,F=e=>"symbol"==typeof e,$=e=>null!==e&&"object"==typeof e,G=e=>($(e)||H(e))&&H(e.then)&&H(e.catch),V=Object.prototype.toString,U=e=>V.call(e),K=e=>"[object Object]"===U(e),W=e=>q(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,Y=M(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),X=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},J=/-\w/g,Z=X(e=>e.replace(J,e=>e.slice(1).toUpperCase())),Q=/\B([A-Z])/g,ee=X(e=>e.replace(Q,"-$1").toLowerCase()),te=X(e=>e.charAt(0).toUpperCase()+e.slice(1)),ne=X(e=>e?`on${te(e)}`:""),re=(e,t)=>!Object.is(e,t),oe=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ie=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},se=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ae;const le=()=>ae||(ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==o.g?o.g:{});function ce(e){if(D(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=q(r)?pe(r):ce(r);if(o)for(const e in o)t[e]=o[e]}return t}if(q(e)||$(e))return e}const de=/;(?![^(]*\))/g,ue=/:([^]+)/,he=/\/\*[^]*?\*\//g;function pe(e){const t={};return e.replace(he,"").split(de).forEach(e=>{if(e){const n=e.split(ue);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function fe(e){let t="";if(q(e))t=e;else if(D(e))for(let n=0;n<e.length;n++){const r=fe(e[n]);r&&(t+=r+" ")}else if($(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const me="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",_e=M(me);function ge(e){return!!e||""===e}const be=e=>!(!e||!0!==e.__v_isRef),xe=e=>q(e)?e:null==e?"":D(e)||$(e)&&(e.toString===V||!H(e.toString))?be(e)?xe(e.value):JSON.stringify(e,ve,2):String(e),ve=(e,t)=>be(t)?ve(e,t.value):B(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ye(t,r)+" =>"]=n,e),{})}:j(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ye(e))}:F(t)?ye(t):!$(t)||D(t)||K(t)?t:String(t),ye=(e,t="")=>{var n;return F(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let we,ke;class Se{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=we,!e&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=we;try{return we=this,e()}finally{we=t}}else 0}on(){1===++this._on&&(this.prevScope=we,we=this)}off(){this._on>0&&0===--this._on&&(we=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}const Ce=new WeakSet;class Me{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,we&&we.active&&we.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,Ce.has(this)&&(Ce.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||Te(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,$e(this),Oe(this);const e=ke,t=je;ke=this,je=!0;try{return this.fn()}finally{0,Ee(this),ke=e,je=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)De(e);this.deps=this.depsTail=void 0,$e(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?Ce.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Le(this)&&this.run()}get dirty(){return Le(this)}}let ze,Ne,Ae=0;function Te(e,t=!1){if(e.flags|=8,t)return e.next=Ne,void(Ne=e);e.next=ze,ze=e}function Re(){Ae++}function Pe(){if(--Ae>0)return;if(Ne){let e=Ne;for(Ne=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ze;){let t=ze;for(ze=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function Oe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ee(e){let t,n=e.depsTail,r=n;for(;r;){const e=r.prevDep;-1===r.version?(r===n&&(n=e),De(r),Be(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Le(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ie(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ie(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===Ge)return;if(e.globalVersion=Ge,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!Le(e)))return;e.flags|=2;const t=e.dep,n=ke,r=je;ke=e,je=!0;try{Oe(e);const n=e.fn(e._value);(0===t.version||re(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{ke=n,je=r,Ee(e),e.flags&=-3}}function De(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)De(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function Be(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let je=!0;const He=[];function qe(){He.push(je),je=!1}function Fe(){const e=He.pop();je=void 0===e||e}function $e(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=ke;ke=void 0;try{t()}finally{ke=e}}}let Ge=0;class Ve{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ue{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ke||!je||ke===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==ke)t=this.activeLink=new Ve(ke,this),ke.deps?(t.prevDep=ke.depsTail,ke.depsTail.nextDep=t,ke.depsTail=t):ke.deps=ke.depsTail=t,Ke(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=ke.depsTail,t.nextDep=void 0,ke.depsTail.nextDep=t,ke.depsTail=t,ke.deps===t&&(ke.deps=e)}return t}trigger(e){this.version++,Ge++,this.notify(e)}notify(e){Re();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Pe()}}}function Ke(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ke(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const We=new WeakMap,Ye=Symbol(""),Xe=Symbol(""),Je=Symbol("");function Ze(e,t,n){if(je&&ke){let t=We.get(e);t||We.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ue),r.map=t,r.key=n),r.track()}}function Qe(e,t,n,r,o,i){const s=We.get(e);if(!s)return void Ge++;const a=e=>{e&&e.trigger()};if(Re(),"clear"===t)s.forEach(a);else{const o=D(e),i=o&&W(n);if(o&&"length"===n){const e=Number(r);s.forEach((t,n)=>{("length"===n||n===Je||!F(n)&&n>=e)&&a(t)})}else switch((void 0!==n||s.has(void 0))&&a(s.get(n)),i&&a(s.get(Je)),t){case"add":o?i&&a(s.get("length")):(a(s.get(Ye)),B(e)&&a(s.get(Xe)));break;case"delete":o||(a(s.get(Ye)),B(e)&&a(s.get(Xe)));break;case"set":B(e)&&a(s.get(Ye))}}Pe()}function et(e){const t=jt(e);return t===e?t:(Ze(t,0,Je),Dt(e)?t:t.map(qt))}function tt(e){return Ze(e=jt(e),0,Je),e}const nt={__proto__:null,[Symbol.iterator](){return rt(this,Symbol.iterator,qt)},concat(...e){return et(this).concat(...e.map(e=>D(e)?et(e):e))},entries(){return rt(this,"entries",e=>(e[1]=qt(e[1]),e))},every(e,t){return it(this,"every",e,t,void 0,arguments)},filter(e,t){return it(this,"filter",e,t,e=>e.map(qt),arguments)},find(e,t){return it(this,"find",e,t,qt,arguments)},findIndex(e,t){return it(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return it(this,"findLast",e,t,qt,arguments)},findLastIndex(e,t){return it(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return it(this,"forEach",e,t,void 0,arguments)},includes(...e){return at(this,"includes",e)},indexOf(...e){return at(this,"indexOf",e)},join(e){return et(this).join(e)},lastIndexOf(...e){return at(this,"lastIndexOf",e)},map(e,t){return it(this,"map",e,t,void 0,arguments)},pop(){return lt(this,"pop")},push(...e){return lt(this,"push",e)},reduce(e,...t){return st(this,"reduce",e,t)},reduceRight(e,...t){return st(this,"reduceRight",e,t)},shift(){return lt(this,"shift")},some(e,t){return it(this,"some",e,t,void 0,arguments)},splice(...e){return lt(this,"splice",e)},toReversed(){return et(this).toReversed()},toSorted(e){return et(this).toSorted(e)},toSpliced(...e){return et(this).toSpliced(...e)},unshift(...e){return lt(this,"unshift",e)},values(){return rt(this,"values",qt)}};function rt(e,t,n){const r=tt(e),o=r[t]();return r===e||Dt(e)||(o._next=o.next,o.next=()=>{const e=o._next();return e.value&&(e.value=n(e.value)),e}),o}const ot=Array.prototype;function it(e,t,n,r,o,i){const s=tt(e),a=s!==e&&!Dt(e),l=s[t];if(l!==ot[t]){const t=l.apply(e,i);return a?qt(t):t}let c=n;s!==e&&(a?c=function(t,r){return n.call(this,qt(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));const d=l.call(s,c,r);return a&&o?o(d):d}function st(e,t,n,r){const o=tt(e);let i=n;return o!==e&&(Dt(e)?n.length>3&&(i=function(t,r,o){return n.call(this,t,r,o,e)}):i=function(t,r,o){return n.call(this,t,qt(r),o,e)}),o[t](i,...r)}function at(e,t,n){const r=jt(e);Ze(r,0,Je);const o=r[t](...n);return-1!==o&&!1!==o||!Bt(n[0])?o:(n[0]=jt(n[0]),r[t](...n))}function lt(e,t,n=[]){qe(),Re();const r=jt(e)[t].apply(e,n);return Pe(),Fe(),r}const ct=M("__proto__,__v_isRef,__isVue"),dt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(F));function ut(e){F(e)||(e=String(e));const t=jt(this);return Ze(t,0,e),t.hasOwnProperty(e)}class ht{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const r=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(r?o?At:Nt:o?zt:Mt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=D(e);if(!r){let e;if(i&&(e=nt[t]))return e;if("hasOwnProperty"===t)return ut}const s=Reflect.get(e,t,$t(e)?e:n);return(F(t)?dt.has(t):ct(t))?s:(r||Ze(e,0,t),o?s:$t(s)?i&&W(t)?s:s.value:$(s)?r?Ot(s):Rt(s):s)}}class pt extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t];if(!this._isShallow){const t=It(o);if(Dt(n)||It(n)||(o=jt(o),n=jt(n)),!D(e)&&$t(o)&&!$t(n))return t||(o.value=n),!0}const i=D(e)&&W(t)?Number(t)<e.length:I(e,t),s=Reflect.set(e,t,n,$t(e)?e:r);return e===jt(r)&&(i?re(n,o)&&Qe(e,"set",t,n):Qe(e,"add",t,n)),s}deleteProperty(e,t){const n=I(e,t),r=(e[t],Reflect.deleteProperty(e,t));return r&&n&&Qe(e,"delete",t,void 0),r}has(e,t){const n=Reflect.has(e,t);return F(t)&&dt.has(t)||Ze(e,0,t),n}ownKeys(e){return Ze(e,0,D(e)?"length":Ye),Reflect.ownKeys(e)}}class ft extends ht{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const mt=new pt,_t=new ft,gt=new pt(!0),bt=e=>e,xt=e=>Reflect.getPrototypeOf(e);function vt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function yt(e,t){const n={get(n){const r=this.__v_raw,o=jt(r),i=jt(n);e||(re(n,i)&&Ze(o,0,n),Ze(o,0,i));const{has:s}=xt(o),a=t?bt:e?Ft:qt;return s.call(o,n)?a(r.get(n)):s.call(o,i)?a(r.get(i)):void(r!==o&&r.get(n))},get size(){const t=this.__v_raw;return!e&&Ze(jt(t),0,Ye),t.size},has(t){const n=this.__v_raw,r=jt(n),o=jt(t);return e||(re(t,o)&&Ze(r,0,t),Ze(r,0,o)),t===o?n.has(t):n.has(t)||n.has(o)},forEach(n,r){const o=this,i=o.__v_raw,s=jt(i),a=t?bt:e?Ft:qt;return!e&&Ze(s,0,Ye),i.forEach((e,t)=>n.call(r,a(e),a(t),o))}};O(n,e?{add:vt("add"),set:vt("set"),delete:vt("delete"),clear:vt("clear")}:{add(e){t||Dt(e)||It(e)||(e=jt(e));const n=jt(this);return xt(n).has.call(n,e)||(n.add(e),Qe(n,"add",e,e)),this},set(e,n){t||Dt(n)||It(n)||(n=jt(n));const r=jt(this),{has:o,get:i}=xt(r);let s=o.call(r,e);s||(e=jt(e),s=o.call(r,e));const a=i.call(r,e);return r.set(e,n),s?re(n,a)&&Qe(r,"set",e,n):Qe(r,"add",e,n),this},delete(e){const t=jt(this),{has:n,get:r}=xt(t);let o=n.call(t,e);o||(e=jt(e),o=n.call(t,e));r&&r.call(t,e);const i=t.delete(e);return o&&Qe(t,"delete",e,void 0),i},clear(){const e=jt(this),t=0!==e.size,n=e.clear();return t&&Qe(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=function(e,t,n){return function(...r){const o=this.__v_raw,i=jt(o),s=B(i),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=o[e](...r),d=n?bt:t?Ft:qt;return!t&&Ze(i,0,l?Xe:Ye),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[d(e[0]),d(e[1])]:d(e),done:t}},[Symbol.iterator](){return this}}}}(r,e,t)}),n}function wt(e,t){const n=yt(e,t);return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(I(n,r)&&r in t?n:t,r,o)}const kt={get:wt(!1,!1)},St={get:wt(!1,!0)},Ct={get:wt(!0,!1)};const Mt=new WeakMap,zt=new WeakMap,Nt=new WeakMap,At=new WeakMap;function Tt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>U(e).slice(8,-1))(e))}function Rt(e){return It(e)?e:Et(e,!1,mt,kt,Mt)}function Pt(e){return Et(e,!1,gt,St,zt)}function Ot(e){return Et(e,!0,_t,Ct,Nt)}function Et(e,t,n,r,o){if(!$(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=Tt(e);if(0===i)return e;const s=o.get(e);if(s)return s;const a=new Proxy(e,2===i?r:n);return o.set(e,a),a}function Lt(e){return It(e)?Lt(e.__v_raw):!(!e||!e.__v_isReactive)}function It(e){return!(!e||!e.__v_isReadonly)}function Dt(e){return!(!e||!e.__v_isShallow)}function Bt(e){return!!e&&!!e.__v_raw}function jt(e){const t=e&&e.__v_raw;return t?jt(t):e}function Ht(e){return!I(e,"__v_skip")&&Object.isExtensible(e)&&ie(e,"__v_skip",!0),e}const qt=e=>$(e)?Rt(e):e,Ft=e=>$(e)?Ot(e):e;function $t(e){return!!e&&!0===e.__v_isRef}function Gt(e){return Ut(e,!1)}function Vt(e){return Ut(e,!0)}function Ut(e,t){return $t(e)?e:new Kt(e,t)}class Kt{constructor(e,t){this.dep=new Ue,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:jt(e),this._value=t?e:qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Dt(e)||It(e);e=n?e:jt(e),re(e,t)&&(this._rawValue=e,this._value=n?e:qt(e),this.dep.trigger())}}function Wt(e){return $t(e)?e.value:e}const Yt={get:(e,t,n)=>"__v_raw"===t?e:Wt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return $t(o)&&!$t(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Xt(e){return Lt(e)?e:new Proxy(e,Yt)}class Jt{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ue(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||ke===this))return Te(this,!0),!0}get value(){const e=this.dep.track();return Ie(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const Zt={},Qt=new WeakMap;let en;function tn(e,t,n=z){const{immediate:r,deep:o,once:i,scheduler:s,augmentJob:a,call:l}=n,c=e=>o?e:Dt(e)||!1===o||0===o?nn(e,1):nn(e);let d,u,h,p,f=!1,m=!1;if($t(e)?(u=()=>e.value,f=Dt(e)):Lt(e)?(u=()=>c(e),f=!0):D(e)?(m=!0,f=e.some(e=>Lt(e)||Dt(e)),u=()=>e.map(e=>$t(e)?e.value:Lt(e)?c(e):H(e)?l?l(e,2):e():void 0)):u=H(e)?t?l?()=>l(e,2):e:()=>{if(h){qe();try{h()}finally{Fe()}}const t=en;en=d;try{return l?l(e,3,[p]):e(p)}finally{en=t}}:A,t&&o){const e=u,t=!0===o?1/0:o;u=()=>nn(e(),t)}const _=we,g=()=>{d.stop(),_&&_.active&&E(_.effects,d)};if(i&&t){const e=t;t=(...t)=>{e(...t),g()}}let b=m?new Array(e.length).fill(Zt):Zt;const x=e=>{if(1&d.flags&&(d.dirty||e))if(t){const e=d.run();if(o||f||(m?e.some((e,t)=>re(e,b[t])):re(e,b))){h&&h();const n=en;en=d;try{const n=[e,b===Zt?void 0:m&&b[0]===Zt?[]:b,p];b=e,l?l(t,3,n):t(...n)}finally{en=n}}}else d.run()};return a&&a(x),d=new Me(u),d.scheduler=s?()=>s(x,!1):x,p=e=>function(e,t=!1,n=en){if(n){let t=Qt.get(n);t||Qt.set(n,t=[]),t.push(e)}}(e,!1,d),h=d.onStop=()=>{const e=Qt.get(d);if(e){if(l)l(e,4);else for(const t of e)t();Qt.delete(d)}},t?r?x(!0):b=d.run():s?s(x.bind(null,!0),!0):d.run(),g.pause=d.pause.bind(d),g.resume=d.resume.bind(d),g.stop=g,g}function nn(e,t=1/0,n){if(t<=0||!$(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,$t(e))nn(e.value,t,n);else if(D(e))for(let r=0;r<e.length;r++)nn(e[r],t,n);else if(j(e)||B(e))e.forEach(e=>{nn(e,t,n)});else if(K(e)){for(const r in e)nn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nn(e[r],t,n)}return e}function rn(e,t,n,r){try{return r?e(...r):e()}catch(e){sn(e,t,n)}}function on(e,t,n,r){if(H(e)){const o=rn(e,t,n,r);return o&&G(o)&&o.catch(e=>{sn(e,t,n)}),o}if(D(e)){const o=[];for(let i=0;i<e.length;i++)o.push(on(e[i],t,n,r));return o}}function sn(e,t,n,r=!0){t&&t.vnode;const{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||z;if(t){let r=t.parent;const i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return;r=r.parent}if(o)return qe(),rn(o,null,10,[e,i,s]),void Fe()}!function(e,t,n,r=!0,o=!1){if(o)throw e;console.error(e)}(e,0,0,r,i)}const an=[];let ln=-1;const cn=[];let dn=null,un=0;const hn=Promise.resolve();let pn=null;function fn(e){const t=pn||hn;return e?t.then(this?e.bind(this):e):t}function mn(e){if(!(1&e.flags)){const t=vn(e),n=an[an.length-1];!n||!(2&e.flags)&&t>=vn(n)?an.push(e):an.splice(function(e){let t=ln+1,n=an.length;for(;t<n;){const r=t+n>>>1,o=an[r],i=vn(o);i<e||i===e&&2&o.flags?t=r+1:n=r}return t}(t),0,e),e.flags|=1,_n()}}function _n(){pn||(pn=hn.then(yn))}function gn(e){D(e)?cn.push(...e):dn&&-1===e.id?dn.splice(un+1,0,e):1&e.flags||(cn.push(e),e.flags|=1),_n()}function bn(e,t,n=ln+1){for(0;n<an.length;n++){const t=an[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;0,an.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function xn(e){if(cn.length){const e=[...new Set(cn)].sort((e,t)=>vn(e)-vn(t));if(cn.length=0,dn)return void dn.push(...e);for(dn=e,un=0;un<dn.length;un++){const e=dn[un];0,4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}dn=null,un=0}}const vn=e=>null==e.id?2&e.flags?-1:1/0:e.id;function yn(e){try{for(ln=0;ln<an.length;ln++){const e=an[ln];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),rn(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;ln<an.length;ln++){const e=an[ln];e&&(e.flags&=-2)}ln=-1,an.length=0,xn(),pn=null,(an.length||cn.length)&&yn(e)}}let wn=null,kn=null;function Sn(e){const t=wn;return wn=e,kn=e&&e.type.__scopeId||null,t}function Cn(e,t=wn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&To(-1);const o=Sn(t);let i;try{i=e(...n)}finally{Sn(o),r._d&&To(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Mn(e,t){if(null===wn)return e;const n=pi(wn),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[o,i,s,a=z]=t[e];o&&(H(o)&&(o={mounted:o,updated:o}),o.deep&&nn(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:s,modifiers:a}))}return e}function zn(e,t,n,r){const o=e.dirs,i=t&&t.dirs;for(let s=0;s<o.length;s++){const a=o[s];i&&(a.oldValue=i[s].value);let l=a.dir[r];l&&(qe(),on(l,n,8,[e.el,a,e,t]),Fe())}}const Nn=Symbol("_vte"),An=e=>e.__isTeleport;const Tn=Symbol("_leaveCb");Symbol("_enterCb");const Rn=[Function,Array];Boolean,Boolean;function Pn(e,t){6&e.shapeFlag&&e.component?(e.transition=t,Pn(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function On(e,t){return H(e)?(()=>O({name:e.name},t,{setup:e}))():e}function En(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ln(e){const t=Qo(),n=Vt(null);if(t){const r=t.refs===z?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}else 0;return n}const In=new WeakMap;function Dn(e,t,n,r,o=!1){if(D(e))return void e.forEach((e,i)=>Dn(e,t&&(D(t)?t[i]:t),n,r,o));if(jn(r)&&!o)return void(512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&Dn(e,t,n,r.component.subTree));const i=4&r.shapeFlag?pi(r.component):r.el,s=o?null:i,{i:a,r:l}=e;const c=t&&t.r,d=a.refs===z?a.refs={}:a.refs,u=a.setupState,h=jt(u),p=u===z?T:e=>I(h,e);if(null!=c&&c!==l)if(Bn(t),q(c))d[c]=null,p(c)&&(u[c]=null);else if($t(c)){c.value=null;const e=t;e.k&&(d[e.k]=null)}if(H(l))rn(l,a,12,[s,d]);else{const t=q(l),r=$t(l);if(t||r){const a=()=>{if(e.f){const n=t?p(l)?u[l]:d[l]:l.value;if(o)D(n)&&E(n,i);else if(D(n))n.includes(i)||n.push(i);else if(t)d[l]=[i],p(l)&&(u[l]=d[l]);else{const t=[i];l.value=t,e.k&&(d[e.k]=t)}}else t?(d[l]=s,p(l)&&(u[l]=s)):r&&(l.value=s,e.k&&(d[e.k]=s))};if(s){const t=()=>{a(),In.delete(e)};t.id=-1,In.set(e,t),Wr(t,n)}else Bn(e),a()}else 0}}function Bn(e){const t=In.get(e);t&&(t.flags|=8,In.delete(e))}le().requestIdleCallback,le().cancelIdleCallback;const jn=e=>!!e.type.__asyncLoader;const Hn=e=>e.type.__isKeepAlive;RegExp,RegExp;function qn(e,t){return D(e)?e.some(e=>qn(e,t)):q(e)?e.split(",").includes(t):"[object RegExp]"===U(e)&&(e.lastIndex=0,e.test(t))}function Fn(e,t){Gn(e,"a",t)}function $n(e,t){Gn(e,"da",t)}function Gn(e,t,n=Zo){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Wn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Hn(e.parent.vnode)&&Vn(r,t,n,e),e=e.parent}}function Vn(e,t,n,r){const o=Wn(t,e,r,!0);tr(()=>{E(r[t],o)},n)}function Un(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Kn(e){return 128&e.shapeFlag?e.ssContent:e}function Wn(e,t,n=Zo,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{qe();const o=ni(n),i=on(t,n,e,r);return o(),Fe(),i});return r?o.unshift(i):o.push(i),i}}const Yn=e=>(t,n=Zo)=>{ai&&"sp"!==e||Wn(e,(...e)=>t(...e),n)},Xn=Yn("bm"),Jn=Yn("m"),Zn=Yn("bu"),Qn=Yn("u"),er=Yn("bum"),tr=Yn("um"),nr=Yn("sp"),rr=Yn("rtg"),or=Yn("rtc");function ir(e,t=Zo){Wn("ec",e,t)}const sr="components";const ar=Symbol.for("v-ndc");function lr(e){return q(e)?cr(sr,e,!1)||e:e||ar}function cr(e,t,n=!0,r=!1){const o=wn||Zo;if(o){const n=o.type;if(e===sr){const e=fi(n,!1);if(e&&(e===t||e===Z(t)||e===te(Z(t))))return n}const i=dr(o[e]||n[e],t)||dr(o.appContext[e],t);return!i&&r?n:i}}function dr(e,t){return e&&(e[t]||e[Z(t)]||e[te(Z(t))])}function ur(e,t,n,r){let o;const i=n&&n[r],s=D(e);if(s||q(e)){let n=!1,r=!1;s&&Lt(e)&&(n=!Dt(e),r=It(e),e=tt(e)),o=new Array(e.length);for(let s=0,a=e.length;s<a;s++)o[s]=t(n?r?Ft(qt(e[s])):qt(e[s]):e[s],s,void 0,i&&i[s])}else if("number"==typeof e){0,o=new Array(e);for(let n=0;n<e;n++)o[n]=t(n+1,n,void 0,i&&i[n])}else if($(e))if(e[Symbol.iterator])o=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{const n=Object.keys(e);o=new Array(n.length);for(let r=0,s=n.length;r<s;r++){const s=n[r];o[r]=t(e[s],s,r,i&&i[r])}}else o=[];return n&&(n[r]=o),o}const hr=e=>e?oi(e)?pi(e):hr(e.parent):null,pr=O(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>hr(e.parent),$root:e=>hr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>yr(e),$forceUpdate:e=>e.f||(e.f=()=>{mn(e.update)}),$nextTick:e=>e.n||(e.n=fn.bind(e.proxy)),$watch:e=>so.bind(e)}),fr=(e,t)=>e!==z&&!e.__isScriptSetup&&I(e,t),mr={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:a,appContext:l}=e;let c;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(fr(r,t))return s[t]=1,r[t];if(o!==z&&I(o,t))return s[t]=2,o[t];if((c=e.propsOptions[0])&&I(c,t))return s[t]=3,i[t];if(n!==z&&I(n,t))return s[t]=4,n[t];gr&&(s[t]=0)}}const d=pr[t];let u,h;return d?("$attrs"===t&&Ze(e.attrs,0,""),d(e)):(u=a.__cssModules)&&(u=u[t])?u:n!==z&&I(n,t)?(s[t]=4,n[t]):(h=l.config.globalProperties,I(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return fr(o,t)?(o[t]=n,!0):r!==z&&I(r,t)?(r[t]=n,!0):!I(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i,type:s}},a){let l,c;return!!(n[a]||e!==z&&"$"!==a[0]&&I(e,a)||fr(t,a)||(l=i[0])&&I(l,a)||I(r,a)||I(pr,a)||I(o.config.globalProperties,a)||(c=s.__cssModules)&&c[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:I(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function _r(e){return D(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let gr=!0;function br(e){const t=yr(e),n=e.proxy,r=e.ctx;gr=!1,t.beforeCreate&&xr(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:a,provide:l,inject:c,created:d,beforeMount:u,mounted:h,beforeUpdate:p,updated:f,activated:m,deactivated:_,beforeDestroy:g,beforeUnmount:b,destroyed:x,unmounted:v,render:y,renderTracked:w,renderTriggered:k,errorCaptured:S,serverPrefetch:C,expose:M,inheritAttrs:z,components:N,directives:T,filters:R}=t;if(c&&function(e,t){D(e)&&(e=Cr(e));for(const n in e){const r=e[n];let o;o=$(r)?"default"in r?Or(r.from||n,r.default,!0):Or(r.from||n):Or(r),$t(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[n]=o}}(c,r,null),s)for(const e in s){const t=s[e];H(t)&&(r[e]=t.bind(n))}if(o){0;const t=o.call(n,n);0,$(t)&&(e.data=Rt(t))}if(gr=!0,i)for(const e in i){const t=i[e],o=H(t)?t.bind(n,n):H(t.get)?t.get.bind(n,n):A;0;const s=!H(t)&&H(t.set)?t.set.bind(n):A,a=_i({get:o,set:s});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(a)for(const e in a)vr(a[e],r,n,e);if(l){const e=H(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(Zo){let n=Zo.provides;const r=Zo.parent&&Zo.parent.provides;r===n&&(n=Zo.provides=Object.create(r)),n[e]=t}else 0}(t,e[t])})}function P(e,t){D(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(d&&xr(d,e,"c"),P(Xn,u),P(Jn,h),P(Zn,p),P(Qn,f),P(Fn,m),P($n,_),P(ir,S),P(or,w),P(rr,k),P(er,b),P(tr,v),P(nr,C),D(M))if(M.length){const t=e.exposed||(e.exposed={});M.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});y&&e.render===A&&(e.render=y),null!=z&&(e.inheritAttrs=z),N&&(e.components=N),T&&(e.directives=T),C&&En(e)}function xr(e,t,n){on(D(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function vr(e,t,n,r){let o=r.includes(".")?ao(n,r):()=>n[r];if(q(e)){const n=t[e];H(n)&&oo(o,n)}else if(H(e))oo(o,e.bind(n));else if($(e))if(D(e))e.forEach(e=>vr(e,t,n,r));else{const r=H(e.handler)?e.handler.bind(n):t[e.handler];H(r)&&oo(o,r,e)}else 0}function yr(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:o.length||n||r?(l={},o.length&&o.forEach(e=>wr(l,e,s,!0)),wr(l,t,s)):l=t,$(t)&&i.set(t,l),l}function wr(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&wr(e,i,n,!0),o&&o.forEach(t=>wr(e,t,n,!0));for(const o in t)if(r&&"expose"===o);else{const r=kr[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const kr={data:Sr,props:Nr,emits:Nr,methods:zr,computed:zr,beforeCreate:Mr,created:Mr,beforeMount:Mr,mounted:Mr,beforeUpdate:Mr,updated:Mr,beforeDestroy:Mr,beforeUnmount:Mr,destroyed:Mr,unmounted:Mr,activated:Mr,deactivated:Mr,errorCaptured:Mr,serverPrefetch:Mr,components:zr,directives:zr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=O(Object.create(null),e);for(const r in t)n[r]=Mr(e[r],t[r]);return n},provide:Sr,inject:function(e,t){return zr(Cr(e),Cr(t))}};function Sr(e,t){return t?e?function(){return O(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function Cr(e){if(D(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Mr(e,t){return e?[...new Set([].concat(e,t))]:t}function zr(e,t){return e?O(Object.create(null),e,t):t}function Nr(e,t){return e?D(e)&&D(t)?[...new Set([...e,...t])]:O(Object.create(null),_r(e),_r(null!=t?t:{})):t}function Ar(){return{app:null,config:{isNativeTag:T,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Tr=0;function Rr(e,t){return function(n,r=null){H(n)||(n=O({},n)),null==r||$(r)||(r=null);const o=Ar(),i=new WeakSet,s=[];let a=!1;const l=o.app={_uid:Tr++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:gi,get config(){return o.config},set config(e){0},use:(e,...t)=>(i.has(e)||(e&&H(e.install)?(i.add(e),e.install(l,...t)):H(e)&&(i.add(e),e(l,...t))),l),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),l),component:(e,t)=>t?(o.components[e]=t,l):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,l):o.directives[e],mount(i,s,c){if(!a){0;const d=l._ceVNode||jo(n,r);return d.appContext=o,!0===c?c="svg":!1===c&&(c=void 0),s&&t?t(d,i):e(d,i,c),a=!0,l._container=i,i.__vue_app__=l,pi(d.component)}},onUnmount(e){s.push(e)},unmount(){a&&(on(s,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,l),runWithContext(e){const t=Pr;Pr=l;try{return e()}finally{Pr=t}}};return l}}let Pr=null;function Or(e,t,n=!1){const r=Qo();if(r||Pr){let o=Pr?Pr._context.provides:r?null==r.parent||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&H(t)?t.call(r&&r.proxy):t}else 0}const Er={},Lr=()=>Object.create(Er),Ir=e=>Object.getPrototypeOf(e)===Er;function Dr(e,t,n,r){const[o,i]=e.propsOptions;let s,a=!1;if(t)for(let l in t){if(Y(l))continue;const c=t[l];let d;o&&I(o,d=Z(l))?i&&i.includes(d)?(s||(s={}))[d]=c:n[d]=c:po(e.emitsOptions,l)||l in r&&c===r[l]||(r[l]=c,a=!0)}if(i){const t=jt(n),r=s||z;for(let s=0;s<i.length;s++){const a=i[s];n[a]=Br(o,t,a,r[a],e,!I(r,a))}}return a}function Br(e,t,n,r,o,i){const s=e[n];if(null!=s){const e=I(s,"default");if(e&&void 0===r){const e=s.default;if(s.type!==Function&&!s.skipFactory&&H(e)){const{propsDefaults:i}=o;if(n in i)r=i[n];else{const s=ni(o);r=i[n]=e.call(null,t),s()}}else r=e;o.ce&&o.ce._setProp(n,r)}s[0]&&(i&&!e?r=!1:!s[1]||""!==r&&r!==ee(n)||(r=!0))}return r}const jr=new WeakMap;function Hr(e,t,n=!1){const r=n?jr:t.propsCache,o=r.get(e);if(o)return o;const i=e.props,s={},a=[];let l=!1;if(!H(e)){const r=e=>{l=!0;const[n,r]=Hr(e,t,!0);O(s,n),r&&a.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!i&&!l)return $(e)&&r.set(e,N),N;if(D(i))for(let e=0;e<i.length;e++){0;const t=Z(i[e]);qr(t)&&(s[t]=z)}else if(i){0;for(const e in i){const t=Z(e);if(qr(t)){const n=i[e],r=s[t]=D(n)||H(n)?{type:n}:O({},n),o=r.type;let l=!1,c=!0;if(D(o))for(let e=0;e<o.length;++e){const t=o[e],n=H(t)&&t.name;if("Boolean"===n){l=!0;break}"String"===n&&(c=!1)}else l=H(o)&&"Boolean"===o.name;r[0]=l,r[1]=c,(l||I(r,"default"))&&a.push(t)}}}const c=[s,a];return $(e)&&r.set(e,c),c}function qr(e){return"$"!==e[0]&&!Y(e)}const Fr=e=>"_"===e||"_ctx"===e||"$stable"===e,$r=e=>D(e)?e.map(Vo):[Vo(e)],Gr=(e,t,n)=>{if(t._n)return t;const r=Cn((...e)=>$r(t(...e)),n);return r._c=!1,r},Vr=(e,t,n)=>{const r=e._ctx;for(const n in e){if(Fr(n))continue;const o=e[n];if(H(o))t[n]=Gr(0,o,r);else if(null!=o){0;const e=$r(o);t[n]=()=>e}}},Ur=(e,t)=>{const n=$r(t);e.slots.default=()=>n},Kr=(e,t,n)=>{for(const r in t)!n&&Fr(r)||(e[r]=t[r])};const Wr=vo;function Yr(e,t){le().__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:s,createComment:a,setText:l,setElementText:c,parentNode:d,nextSibling:u,setScopeId:h=A,insertStaticContent:p}=e,f=(e,t,n,r=null,o=null,i=null,s=void 0,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Lo(e,t)&&(r=V(e),H(e,o,i,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:d,shapeFlag:u}=t;switch(c){case wo:m(e,t,n,r);break;case ko:_(e,t,n,r);break;case So:null==e&&g(t,n,r,s);break;case yo:M(e,t,n,r,o,i,s,a,l);break;default:1&u?x(e,t,n,r,o,i,s,a,l):6&u?T(e,t,n,r,o,i,s,a,l):(64&u||128&u)&&c.process(e,t,n,r,o,i,s,a,l,W)}null!=d&&o?Dn(d,e&&e.ref,i,t||e,!t):null==d&&e&&null!=e.ref&&Dn(e.ref,null,i,e,!0)},m=(e,t,r,o)=>{if(null==e)n(t.el=s(t.children),r,o);else{const n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,r,o)=>{null==e?n(t.el=a(t.children||""),r,o):t.el=e.el},g=(e,t,n,r)=>{[e.el,e.anchor]=p(e.children,t,n,r,e.el,e.anchor)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=u(e),r(e),e=n;r(t)},x=(e,t,n,r,o,i,s,a,l)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?v(t,n,r,o,i,s,a,l):k(e,t,o,i,s,a,l)},v=(e,t,r,s,a,l,d,u)=>{let h,p;const{props:f,shapeFlag:m,transition:_,dirs:g}=e;if(h=e.el=i(e.type,l,f&&f.is,f),8&m?c(h,e.children):16&m&&w(e.children,h,null,s,a,Xr(e,l),d,u),g&&zn(e,null,s,"created"),y(h,e,e.scopeId,d,s),f){for(const e in f)"value"===e||Y(e)||o(h,e,null,f[e],l,s);"value"in f&&o(h,"value",null,f.value,l),(p=f.onVnodeBeforeMount)&&Wo(p,s,e)}g&&zn(e,null,s,"beforeMount");const b=Zr(a,_);b&&_.beforeEnter(h),n(h,t,r),((p=f&&f.onVnodeMounted)||b||g)&&Wr(()=>{p&&Wo(p,s,e),b&&_.enter(h),g&&zn(e,null,s,"mounted")},a)},y=(e,t,n,r,o)=>{if(n&&h(e,n),r)for(let t=0;t<r.length;t++)h(e,r[t]);if(o){let n=o.subTree;if(t===n||xo(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=o.vnode;y(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},w=(e,t,n,r,o,i,s,a,l=0)=>{for(let c=l;c<e.length;c++){const l=e[c]=a?Uo(e[c]):Vo(e[c]);f(null,l,t,n,r,o,i,s,a)}},k=(e,t,n,r,i,s,a)=>{const l=t.el=e.el;let{patchFlag:d,dynamicChildren:u,dirs:h}=t;d|=16&e.patchFlag;const p=e.props||z,f=t.props||z;let m;if(n&&Jr(n,!1),(m=f.onVnodeBeforeUpdate)&&Wo(m,n,t,e),h&&zn(t,e,n,"beforeUpdate"),n&&Jr(n,!0),(p.innerHTML&&null==f.innerHTML||p.textContent&&null==f.textContent)&&c(l,""),u?S(e.dynamicChildren,u,l,n,r,Xr(t,i),s):a||L(e,t,l,null,n,r,Xr(t,i),s,!1),d>0){if(16&d)C(l,p,f,n,i);else if(2&d&&p.class!==f.class&&o(l,"class",null,f.class,i),4&d&&o(l,"style",p.style,f.style,i),8&d){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const r=e[t],s=p[r],a=f[r];a===s&&"value"!==r||o(l,r,s,a,i,n)}}1&d&&e.children!==t.children&&c(l,t.children)}else a||null!=u||C(l,p,f,n,i);((m=f.onVnodeUpdated)||h)&&Wr(()=>{m&&Wo(m,n,t,e),h&&zn(t,e,n,"updated")},r)},S=(e,t,n,r,o,i,s)=>{for(let a=0;a<t.length;a++){const l=e[a],c=t[a],u=l.el&&(l.type===yo||!Lo(l,c)||198&l.shapeFlag)?d(l.el):n;f(l,c,u,null,r,o,i,s,!0)}},C=(e,t,n,r,i)=>{if(t!==n){if(t!==z)for(const s in t)Y(s)||s in n||o(e,s,t[s],null,i,r);for(const s in n){if(Y(s))continue;const a=n[s],l=t[s];a!==l&&"value"!==s&&o(e,s,l,a,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},M=(e,t,r,o,i,a,l,c,d)=>{const u=t.el=e?e.el:s(""),h=t.anchor=e?e.anchor:s("");let{patchFlag:p,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(u,r,o),n(h,r,o),w(t.children||[],r,h,i,a,l,c,d)):p>0&&64&p&&f&&e.dynamicChildren?(S(e.dynamicChildren,f,r,i,a,l,c),(null!=t.key||i&&t===i.subTree)&&Qr(e,t,!0)):L(e,t,r,h,i,a,l,c,d)},T=(e,t,n,r,o,i,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,s,l):R(t,n,r,o,i,s,l):P(e,t,l)},R=(e,t,n,r,o,i,s)=>{const a=e.component=Jo(e,r,o);if(Hn(e)&&(a.ctx.renderer=W),li(a,!1,s),a.asyncDep){if(o&&o.registerDep(a,O,s),!e.el){const r=a.subTree=jo(ko);_(null,r,t,n),e.placeholder=r.el}}else O(a,e,t,n,o,i,s)},P=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;0;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!o&&!a||a&&a.$stable)||r!==s&&(r?!s||go(r,s,c):!!s);if(1024&l)return!0;if(16&l)return r?go(r,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(s[n]!==r[n]&&!po(c,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void E(r,t,n);r.next=t,r.update()}else t.el=e.el,r.vnode=t},O=(e,t,n,r,o,i,s)=>{const a=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:l,vnode:c}=e;{const n=eo(e);if(n)return t&&(t.el=c.el,E(e,t,s)),void n.asyncDep.then(()=>{e.isUnmounted||a()})}let u,h=t;0,Jr(e,!1),t?(t.el=c.el,E(e,t,s)):t=c,n&&oe(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Wo(u,l,t,c),Jr(e,!0);const p=fo(e);0;const m=e.subTree;e.subTree=p,f(m,p,d(m.el),V(m),e,o,i),t.el=p.el,null===h&&bo(e,p.el),r&&Wr(r,o),(u=t.props&&t.props.onVnodeUpdated)&&Wr(()=>Wo(u,l,t,c),o)}else{let s;const{el:a,props:l}=t,{bm:c,m:d,parent:u,root:h,type:p}=e,m=jn(t);if(Jr(e,!1),c&&oe(c),!m&&(s=l&&l.onVnodeBeforeMount)&&Wo(s,u,t),Jr(e,!0),a&&J){const t=()=>{e.subTree=fo(e),J(a,e.subTree,e,o,null)};m&&p.__asyncHydrate?p.__asyncHydrate(a,e,t):t()}else{h.ce&&!1!==h.ce._def.shadowRoot&&h.ce._injectChildStyle(p);const s=e.subTree=fo(e);0,f(null,s,n,r,e,o,i),t.el=s.el}if(d&&Wr(d,o),!m&&(s=l&&l.onVnodeMounted)){const e=t;Wr(()=>Wo(s,u,e),o)}(256&t.shapeFlag||u&&jn(u.vnode)&&256&u.vnode.shapeFlag)&&e.a&&Wr(e.a,o),e.isMounted=!0,t=n=r=null}};e.scope.on();const l=e.effect=new Me(a);e.scope.off();const c=e.update=l.run.bind(l),u=e.job=l.runIfDirty.bind(l);u.i=e,u.id=e.uid,l.scheduler=()=>mn(u),Jr(e,!0),c()},E=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,a=jt(o),[l]=e.propsOptions;let c=!1;if(!(r||s>0)||16&s){let r;Dr(e,t,o,i)&&(c=!0);for(const i in a)t&&(I(t,i)||(r=ee(i))!==i&&I(t,r))||(l?!n||void 0===n[i]&&void 0===n[r]||(o[i]=Br(l,a,i,void 0,e,!0)):delete o[i]);if(i!==a)for(const e in i)t&&I(t,e)||(delete i[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(po(e.emitsOptions,s))continue;const d=t[s];if(l)if(I(i,s))d!==i[s]&&(i[s]=d,c=!0);else{const t=Z(s);o[t]=Br(l,a,t,d,e,!1)}else d!==i[s]&&(i[s]=d,c=!0)}}c&&Qe(e.attrs,"set","")}(e,t.props,r,n),((e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=z;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:Kr(o,t,n):(i=!t.$stable,Vr(t,o)),s=t}else t&&(Ur(e,t),s={default:1});if(i)for(const e in o)Fr(e)||null!=s[e]||delete o[e]})(e,t.children,n),qe(),bn(e),Fe()},L=(e,t,n,r,o,i,s,a,l=!1)=>{const d=e&&e.children,u=e?e.shapeFlag:0,h=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void B(d,h,n,r,o,i,s,a,l);if(256&p)return void D(d,h,n,r,o,i,s,a,l)}8&f?(16&u&&G(d,o,i),h!==d&&c(n,h)):16&u?16&f?B(d,h,n,r,o,i,s,a,l):G(d,o,i,!0):(8&u&&c(n,""),16&f&&w(h,n,r,o,i,s,a,l))},D=(e,t,n,r,o,i,s,a,l)=>{t=t||N;const c=(e=e||N).length,d=t.length,u=Math.min(c,d);let h;for(h=0;h<u;h++){const r=t[h]=l?Uo(t[h]):Vo(t[h]);f(e[h],r,n,null,o,i,s,a,l)}c>d?G(e,o,i,!0,!1,u):w(t,n,r,o,i,s,a,l,u)},B=(e,t,n,r,o,i,s,a,l)=>{let c=0;const d=t.length;let u=e.length-1,h=d-1;for(;c<=u&&c<=h;){const r=e[c],d=t[c]=l?Uo(t[c]):Vo(t[c]);if(!Lo(r,d))break;f(r,d,n,null,o,i,s,a,l),c++}for(;c<=u&&c<=h;){const r=e[u],c=t[h]=l?Uo(t[h]):Vo(t[h]);if(!Lo(r,c))break;f(r,c,n,null,o,i,s,a,l),u--,h--}if(c>u){if(c<=h){const e=h+1,u=e<d?t[e].el:r;for(;c<=h;)f(null,t[c]=l?Uo(t[c]):Vo(t[c]),n,u,o,i,s,a,l),c++}}else if(c>h)for(;c<=u;)H(e[c],o,i,!0),c++;else{const p=c,m=c,_=new Map;for(c=m;c<=h;c++){const e=t[c]=l?Uo(t[c]):Vo(t[c]);null!=e.key&&_.set(e.key,c)}let g,b=0;const x=h-m+1;let v=!1,y=0;const w=new Array(x);for(c=0;c<x;c++)w[c]=0;for(c=p;c<=u;c++){const r=e[c];if(b>=x){H(r,o,i,!0);continue}let d;if(null!=r.key)d=_.get(r.key);else for(g=m;g<=h;g++)if(0===w[g-m]&&Lo(r,t[g])){d=g;break}void 0===d?H(r,o,i,!0):(w[d-m]=c+1,d>=y?y=d:v=!0,f(r,t[d],n,null,o,i,s,a,l),b++)}const k=v?function(e){const t=e.slice(),n=[0];let r,o,i,s,a;const l=e.length;for(r=0;r<l;r++){const l=e[r];if(0!==l){if(o=n[n.length-1],e[o]<l){t[r]=o,n.push(r);continue}for(i=0,s=n.length-1;i<s;)a=i+s>>1,e[n[a]]<l?i=a+1:s=a;l<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}i=n.length,s=n[i-1];for(;i-- >0;)n[i]=s,s=t[s];return n}(w):N;for(g=k.length-1,c=x-1;c>=0;c--){const e=m+c,u=t[e],h=t[e+1],p=e+1<d?h.el||h.placeholder:r;0===w[c]?f(null,u,n,p,o,i,s,a,l):v&&(g<0||c!==k[g]?j(u,n,p,2):g--)}}},j=(e,t,o,i,s=null)=>{const{el:a,type:l,transition:c,children:d,shapeFlag:h}=e;if(6&h)return void j(e.component.subTree,t,o,i);if(128&h)return void e.suspense.move(t,o,i);if(64&h)return void l.move(e,t,o,W);if(l===yo){n(a,t,o);for(let e=0;e<d.length;e++)j(d[e],t,o,i);return void n(e.anchor,t,o)}if(l===So)return void(({el:e,anchor:t},r,o)=>{let i;for(;e&&e!==t;)i=u(e),n(e,r,o),e=i;n(t,r,o)})(e,t,o);if(2!==i&&1&h&&c)if(0===i)c.beforeEnter(a),n(a,t,o),Wr(()=>c.enter(a),s);else{const{leave:i,delayLeave:s,afterLeave:l}=c,d=()=>{e.ctx.isUnmounted?r(a):n(a,t,o)},u=()=>{a._isLeaving&&a[Tn](!0),i(a,()=>{d(),l&&l()})};s?s(a,d,u):u()}else n(a,t,o)},H=(e,t,n,r=!1,o=!1)=>{const{type:i,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:d,patchFlag:u,dirs:h,cacheIndex:p}=e;if(-2===u&&(o=!1),null!=a&&(qe(),Dn(a,null,n,e,!0),Fe()),null!=p&&(t.renderCache[p]=void 0),256&d)return void t.ctx.deactivate(e);const f=1&d&&h,m=!jn(e);let _;if(m&&(_=s&&s.onVnodeBeforeUnmount)&&Wo(_,t,e),6&d)$(e.component,n,r);else{if(128&d)return void e.suspense.unmount(n,r);f&&zn(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,W,r):c&&!c.hasOnce&&(i!==yo||u>0&&64&u)?G(c,t,n,!1,!0):(i===yo&&384&u||!o&&16&d)&&G(l,t,n),r&&q(e)}(m&&(_=s&&s.onVnodeUnmounted)||f)&&Wr(()=>{_&&Wo(_,t,e),f&&zn(e,null,t,"unmounted")},n)},q=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===yo)return void F(n,o);if(t===So)return void b(e);const s=()=>{r(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:r}=i,o=()=>t(n,s);r?r(e.el,s,o):o()}else s()},F=(e,t)=>{let n;for(;e!==t;)n=u(e),r(e),e=n;r(t)},$=(e,t,n)=>{const{bum:r,scope:o,job:i,subTree:s,um:a,m:l,a:c}=e;to(l),to(c),r&&oe(r),o.stop(),i&&(i.flags|=8,H(s,e,t,n)),a&&Wr(a,t),Wr(()=>{e.isUnmounted=!0},t)},G=(e,t,n,r=!1,o=!1,i=0)=>{for(let s=i;s<e.length;s++)H(e[s],t,n,r,o)},V=e=>{if(6&e.shapeFlag)return V(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=u(e.anchor||e.el),n=t&&t[Nn];return n?u(n):t};let U=!1;const K=(e,t,n)=>{null==e?t._vnode&&H(t._vnode,null,null,!0):f(t._vnode||null,e,t,null,null,null,n),t._vnode=e,U||(U=!0,bn(),xn(),U=!1)},W={p:f,um:H,m:j,r:q,mt:R,mc:w,pc:L,pbc:S,n:V,o:e};let X,J;return t&&([X,J]=t(W)),{render:K,hydrate:X,createApp:Rr(K,X)}}function Xr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Jr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Qr(e,t,n=!1){const r=e.children,o=t.children;if(D(r)&&D(o))for(let e=0;e<r.length;e++){const t=r[e];let i=o[e];1&i.shapeFlag&&!i.dynamicChildren&&((i.patchFlag<=0||32===i.patchFlag)&&(i=o[e]=Uo(o[e]),i.el=t.el),n||-2===i.patchFlag||Qr(t,i)),i.type===wo&&-1!==i.patchFlag&&(i.el=t.el),i.type!==ko||i.el||(i.el=t.el)}}function eo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:eo(t)}function to(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const no=Symbol.for("v-scx"),ro=()=>{{const e=Or(no);return e}};function oo(e,t,n){return io(e,t,n)}function io(e,t,n=z){const{immediate:r,deep:o,flush:i,once:s}=n;const a=O({},n);const l=t&&r||!t&&"post"!==i;let c;if(ai)if("sync"===i){const e=ro();c=e.__watcherHandles||(e.__watcherHandles=[])}else if(!l){const e=()=>{};return e.stop=A,e.resume=A,e.pause=A,e}const d=Zo;a.call=(e,t,n)=>on(e,d,t,n);let u=!1;"post"===i?a.scheduler=e=>{Wr(e,d&&d.suspense)}:"sync"!==i&&(u=!0,a.scheduler=(e,t)=>{t?e():mn(e)}),a.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};const h=tn(e,t,a);return ai&&(c?c.push(h):l&&h()),h}function so(e,t,n){const r=this.proxy,o=q(e)?e.includes(".")?ao(r,e):()=>r[e]:e.bind(r,r);let i;H(t)?i=t:(i=t.handler,n=t);const s=ni(this),a=io(o,i.bind(r),n);return s(),a}function ao(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const lo=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${Z(t)}Modifiers`]||e[`${ee(t)}Modifiers`];function co(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||z;let o=n;const i=t.startsWith("update:"),s=i&&lo(r,t.slice(7));let a;s&&(s.trim&&(o=n.map(e=>q(e)?e.trim():e)),s.number&&(o=n.map(se)));let l=r[a=ne(t)]||r[a=ne(Z(t))];!l&&i&&(l=r[a=ne(ee(t))]),l&&on(l,e,6,o);const c=r[a+"Once"];if(c){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,on(c,e,6,o)}}const uo=new WeakMap;function ho(e,t,n=!1){const r=n?uo:t.emitsCache,o=r.get(e);if(void 0!==o)return o;const i=e.emits;let s={},a=!1;if(!H(e)){const r=e=>{const n=ho(e,t,!0);n&&(a=!0,O(s,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return i||a?(D(i)?i.forEach(e=>s[e]=null):O(s,i),$(e)&&r.set(e,s),s):($(e)&&r.set(e,null),null)}function po(e,t){return!(!e||!R(t))&&(t=t.slice(2).replace(/Once$/,""),I(e,t[0].toLowerCase()+t.slice(1))||I(e,ee(t))||I(e,t))}function fo(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:s,attrs:a,emit:l,render:c,renderCache:d,props:u,data:h,setupState:p,ctx:f,inheritAttrs:m}=e,_=Sn(e);let g,b;try{if(4&n.shapeFlag){const e=o||r,t=e;g=Vo(c.call(t,e,d,u,p,h,f)),b=a}else{const e=t;0,g=Vo(e.length>1?e(u,{attrs:a,slots:s,emit:l}):e(u,null)),b=t.props?a:mo(a)}}catch(t){Co.length=0,sn(t,e,1),g=jo(ko)}let x=g;if(b&&!1!==m){const e=Object.keys(b),{shapeFlag:t}=x;e.length&&7&t&&(i&&e.some(P)&&(b=_o(b,i)),x=qo(x,b,!1,!0))}return n.dirs&&(x=qo(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&Pn(x,n.transition),g=x,Sn(_),g}const mo=e=>{let t;for(const n in e)("class"===n||"style"===n||R(n))&&((t||(t={}))[n]=e[n]);return t},_o=(e,t)=>{const n={};for(const r in e)P(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function go(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const i=r[o];if(t[i]!==e[i]&&!po(n,i))return!0}return!1}function bo({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r!==e)break;(e=t.vnode).el=n,t=t.parent}}const xo=e=>e.__isSuspense;function vo(e,t){t&&t.pendingBranch?D(e)?t.effects.push(...e):t.effects.push(e):gn(e)}const yo=Symbol.for("v-fgt"),wo=Symbol.for("v-txt"),ko=Symbol.for("v-cmt"),So=Symbol.for("v-stc"),Co=[];let Mo=null;function zo(e=!1){Co.push(Mo=e?null:[])}function No(){Co.pop(),Mo=Co[Co.length-1]||null}let Ao=1;function To(e,t=!1){Ao+=e,e<0&&Mo&&t&&(Mo.hasOnce=!0)}function Ro(e){return e.dynamicChildren=Ao>0?Mo||N:null,No(),Ao>0&&Mo&&Mo.push(e),e}function Po(e,t,n,r,o,i){return Ro(Bo(e,t,n,r,o,i,!0))}function Oo(e,t,n,r,o){return Ro(jo(e,t,n,r,o,!0))}function Eo(e){return!!e&&!0===e.__v_isVNode}function Lo(e,t){return e.type===t.type&&e.key===t.key}const Io=({key:e})=>null!=e?e:null,Do=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?q(e)||$t(e)||H(e)?{i:wn,r:e,k:t,f:!!n}:e:null);function Bo(e,t=null,n=null,r=0,o=null,i=(e===yo?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Io(t),ref:t&&Do(t),scopeId:kn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:wn};return a?(Ko(l,n),128&i&&e.normalize(l)):n&&(l.shapeFlag|=q(n)?8:16),Ao>0&&!s&&Mo&&(l.patchFlag>0||6&i)&&32!==l.patchFlag&&Mo.push(l),l}const jo=Ho;function Ho(e,t=null,n=null,r=0,o=null,i=!1){if(e&&e!==ar||(e=ko),Eo(e)){const r=qo(e,t,!0);return n&&Ko(r,n),Ao>0&&!i&&Mo&&(6&r.shapeFlag?Mo[Mo.indexOf(e)]=r:Mo.push(r)),r.patchFlag=-2,r}if(mi(e)&&(e=e.__vccOpts),t){t=function(e){return e?Bt(e)||Ir(e)?O({},e):e:null}(t);let{class:e,style:n}=t;e&&!q(e)&&(t.class=fe(e)),$(n)&&(Bt(n)&&!D(n)&&(n=O({},n)),t.style=ce(n))}return Bo(e,t,n,r,o,q(e)?1:xo(e)?128:An(e)?64:$(e)?4:H(e)?2:0,i,!0)}function qo(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:s,children:a,transition:l}=e,c=t?function(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=fe([t.class,r.class]));else if("style"===e)t.style=ce([t.style,r.style]);else if(R(e)){const n=t[e],o=r[e];!o||n===o||D(n)&&n.includes(o)||(t[e]=n?[].concat(n,o):o)}else""!==e&&(t[e]=r[e])}return t}(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Io(c),ref:t&&t.ref?n&&i?D(i)?i.concat(Do(t)):[i,Do(t)]:Do(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==yo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qo(e.ssContent),ssFallback:e.ssFallback&&qo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Pn(d,l.clone(d)),d}function Fo(e=" ",t=0){return jo(wo,null,e,t)}function $o(e,t){const n=jo(So,null,e);return n.staticCount=t,n}function Go(e="",t=!1){return t?(zo(),Oo(ko,null,e)):jo(ko,null,e)}function Vo(e){return null==e||"boolean"==typeof e?jo(ko):D(e)?jo(yo,null,e.slice()):Eo(e)?Uo(e):jo(wo,null,String(e))}function Uo(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:qo(e)}function Ko(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(D(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ko(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||Ir(t)?3===r&&wn&&(1===wn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=wn}}else H(t)?(t={default:t,_ctx:wn},n=32):(t=String(t),64&r?(n=16,t=[Fo(t)]):n=8);e.children=t,e.shapeFlag|=n}function Wo(e,t,n,r=null){on(e,t,7,[n,r])}const Yo=Ar();let Xo=0;function Jo(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Yo,i={uid:Xo++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Se(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Hr(r,o),emitsOptions:ho(r,o),emit:null,emitted:null,propsDefaults:z,inheritAttrs:r.inheritAttrs,ctx:z,data:z,props:z,attrs:z,slots:z,refs:z,setupState:z,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=co.bind(null,i),e.ce&&e.ce(i),i}let Zo=null;const Qo=()=>Zo||wn;let ei,ti;{const e=le(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};ei=t("__VUE_INSTANCE_SETTERS__",e=>Zo=e),ti=t("__VUE_SSR_SETTERS__",e=>ai=e)}const ni=e=>{const t=Zo;return ei(e),e.scope.on(),()=>{e.scope.off(),ei(t)}},ri=()=>{Zo&&Zo.scope.off(),ei(null)};function oi(e){return 4&e.vnode.shapeFlag}let ii,si,ai=!1;function li(e,t=!1,n=!1){t&&ti(t);const{props:r,children:o}=e.vnode,i=oi(e);!function(e,t,n,r=!1){const o={},i=Lr();e.propsDefaults=Object.create(null),Dr(e,t,o,i);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=r?o:Pt(o):e.type.props?e.props=o:e.props=i,e.attrs=i}(e,r,i,t),((e,t,n)=>{const r=e.slots=Lr();if(32&e.vnode.shapeFlag){const e=t._;e?(Kr(r,t,n),n&&ie(r,"_",e,!0)):Vr(t,r)}else t&&Ur(e,t)})(e,o,n||t);const s=i?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,mr),!1;const{setup:r}=n;if(r){qe();const n=e.setupContext=r.length>1?hi(e):null,o=ni(e),i=rn(r,e,0,[e.props,n]),s=G(i);if(Fe(),o(),!s&&!e.sp||jn(e)||En(e),s){if(i.then(ri,ri),t)return i.then(n=>{ci(e,n,t)}).catch(t=>{sn(t,e,0)});e.asyncDep=i}else ci(e,i,t)}else di(e,t)}(e,t):void 0;return t&&ti(!1),s}function ci(e,t,n){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:$(t)&&(e.setupState=Xt(t)),di(e,n)}function di(e,t,n){const r=e.type;if(!e.render){if(!t&&ii&&!r.render){const t=r.template||yr(e).template;if(t){0;const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:i,compilerOptions:s}=r,a=O(O({isCustomElement:n,delimiters:i},o),s);r.render=ii(t,a)}}e.render=r.render||A,si&&si(e)}{const t=ni(e);qe();try{br(e)}finally{Fe(),t()}}}const ui={get:(e,t)=>(Ze(e,0,""),e[t])};function hi(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,ui),slots:e.slots,emit:e.emit,expose:t}}function pi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Xt(Ht(e.exposed)),{get:(t,n)=>n in t?t[n]:n in pr?pr[n](e):void 0,has:(e,t)=>t in e||t in pr})):e.proxy}function fi(e,t=!0){return H(e)?e.displayName||e.name:e.name||t&&e.__name}function mi(e){return H(e)&&"__vccOpts"in e}const _i=(e,t)=>{const n=function(e,t,n=!1){let r,o;return H(e)?r=e:(r=e.get,o=e.set),new Jt(r,o,n)}(e,0,ai);return n};const gi="3.5.21";class bi{_root;get root(){return this._root}get doc(){const e=this.root;if(e instanceof lu)return e}get courier(){return this.root.courier}get history(){return this.root.history}get cursor(){return this.root.cursor}get event(){return this.root.event}get listener(){return this.root.listener}get clipboard(){return this.root.clipboard}get painter(){return this.root.painter}get cubes(){return this.root.cubes}get config(){return this.root.config}get stats(){return this.root.stats}get hotkeys(){return this.root.hotkeys}constructor(e){this._root=e}}class xi{static _funcs=new Map;static get url(){return this._funcs.get("asset-url")}static get tips(){return this._funcs.get("tip")}static register_asset_url(e){this._funcs.set("asset-url",e)}static register_tip(e){this._funcs.set("tip",e)}}let vi=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const yi={default:{name:"默认",css:'\ufeff/* ————————————————— Default Theme · 深空笔记 ————————————————— */\r\n/* 主色:深空青 #0891b2 / 星光青 #22d3ee / 天际蓝 #0ea5e9 */\r\n/* 亮色:星雾白 #f2fbfd / 深海墨 #0c1e28 */\r\n/* 暗色:深空黑 #060e14 / 星雾蓝白 #c0e8f4 */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\ncube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f2fbfd;\r\n --color: #0c1e28;\r\n\r\n --selection-bg: #0891b2;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #b0dcea;\r\n --ui-close-corner-bg: #0891b2;\r\n --cube-bg: #e8f6fa30;\r\n --cube-toolbar-bg: #ddf2f830;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #e8f6fa99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #0891b2cc, #22d3eecc);\r\n --float-node-layout-usable-color: #0c1e28;\r\n --float-node-layout-disable-color: #b0dceacc;\r\n --float-node-layout-shadow: 0px 2px 8px #0c1e280a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #0891b230;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #ddf4facc, #d0eefarcc);\r\n --menu-title-icon-color: #0891b2;\r\n --menu-item-color: #0c1e28;\r\n --menu-item-bg-hover: #e8f6fa;\r\n --menu-item-active-color: #0891b2;\r\n --menu-shortcut-color: #7ab8cc;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #c0dce8;\r\n --menu-dialog-mask-bg: rgba(12, 30, 40, 0.18);\r\n --menu-dialog-input-border: 1px solid #c8e8f0;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #0c1e28;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #e8f6facc;\r\n --submenu-node-line-header-color: #5aa8bccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0891b2;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #0c1e2812;\r\n --map-mini-bg: rgba(248, 252, 255, 0.95);\r\n --map-mini-border: #e2e8f0;\r\n --map-mini-title-color: #94a3b8;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #0891b218;\r\n --placeholder-box-selector-stroke: #0891b2;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e8f6fa40;\r\n --submap-shadow: #22d3ee 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #e8f6fa70;\r\n --node-selected-stroke: #0891b2;\r\n --node-editable-bg: #f2fbfd40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #b0dce8;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #d0eefa80 0%, #d8f4fa80 50%, #c8f0f880 100%);\r\n --scope-border: 2px solid #22d3ee;\r\n --scope-shadow: 0px 0px 14px #0891b240;\r\n --scope-item-bg: linear-gradient(135deg, #ddf4facf 0%, #c8f0f8cf 50%, #d0eef8cf 100%);\r\n --scope-item-border: 1px solid #7ae0f0;\r\n --scope-item-color: #0c1e28;\r\n --scope-item-shadow: 0px 2px 10px #0891b220;\r\n --scope-icon-color: #0c1e28;\r\n --scope-icon-shadow: 0px 0px 8px #0891b250;\r\n --scope-icon-hover-color: #0891b2;\r\n --scope-icon-hover-shadow: 0px 0px 10px #0891b2;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #0c1e2814;\r\n --postil-text-color: #0891b2;\r\n --postil-text-box-bg: rgb(232 246 250 / 0.88);\r\n --postil-text-icon-close-bg: #b0dceaa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #0891b2;\r\n --table-cell-bg: #e8f6faa0;\r\n --table-cell-selection-bg: #0891b225;\r\n --table-cell-active-bg: #22d3ee40;\r\n --table-title-bg: #c8eef890;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0891b225;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #e8f6fac2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #d0eefa5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #ddf4facc;\r\n --box-columns-layout-item-hover-color: #0891b2;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #ddf2f870;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e8f6fa70;\r\n --code-tabbar-item-bg: #cce8f078;\r\n --code-tabbar-item-color: #7ab8c878;\r\n --code-tabbar-item-active-color: #0c1e28;\r\n --code-tabbar-item-active-bg: #c8e8f078;\r\n --code-tabbar-item-active-border: 1px solid #b0dce8;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #0891b2;\r\n --code-tooltip-bg: #0c1e28;\r\n --code-tooltip-color: #b0dce8cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #c8e8f0;\r\n --code-input-color: #0c1e28;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #0891b225;\r\n --list-item-bg: #e8f6fa70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #e8f6faad;\r\n --todoitem-status-border: 1px solid #c8e8f0;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #0891b2;\r\n --todoitem-done-color: #7ab8c8;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #e8f6fa80;\r\n --img-load-failed-color: #b0dce880;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #d0eefa7d;\r\n --tip-border: 1px solid #22d3ee80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e8f6fa70;\r\n --detail-even-bg: #ddf4fa70;\r\n --detail-adder-bg: #e8f6fa40;\r\n --detail-list-border: 1px solid #d0eefa;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #ddf4fa80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #eef8fb;\r\n --text-link-bg: #ddf4fa;\r\n --text-link-color: #0c1e28;\r\n --text-link-icon-hover-bg: #0891b2;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #22d3ee;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #ddf4fa30;\r\n --line-hover-bg: #ddf4fa30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #22d3ee;\r\n --box-bg: #ddf4fa40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0891b2cc, #22d3eec2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-fold-bg: #0c1e28;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d0eefa80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0891b2;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0891b240;\r\n\r\n --box-folder-tag-active-border: 2px solid #0891b2;\r\n --box-folder-tag-active-bg: #0891b2;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #0891b260;\r\n\r\n --box-folder-border: 2px dashed #22d3ee80;\r\n --box-folder-active-bg: #d0eefa80;\r\n --box-folder-active-border: 1px solid #0891b2;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fde68a;\r\n --api-functions-color-light: #fde68a66;\r\n --api-functions-type-bg: #fde68a;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #164e63cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #060e14;\r\n --color: #c0e8f4;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #0891b2;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #0e2a38;\r\n --ui-close-corner-bg: #22d3ee;\r\n --cube-bg: #0c1e2830;\r\n --cube-toolbar-bg: #0e243040;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #0c1e2899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #093848cc, #0e4a5ecc);\r\n --float-node-layout-usable-color: #c0e8f4;\r\n --float-node-layout-disable-color: #0e2a38;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #0891b240;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #08161ecc;\r\n --menu-title-bg: linear-gradient(120deg, #091e2acc, #0c2232cc);\r\n --menu-title-icon-color: #22d3ee;\r\n --menu-item-color: #c0e8f4;\r\n --menu-item-bg-hover: #0e243acc;\r\n --menu-item-active-color: #22d3ee;\r\n --menu-shortcut-color: #1e4858;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #0e2838;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.5);\r\n --menu-dialog-input-border: 1px solid #0e2a3888;\r\n --menu-dialog-bg: #08161ecc;\r\n --menu-dialog-color: #c0e8f4;\r\n\r\n --submenu-node-line-header-bg: #0c1e2833;\r\n --submenu-node-line-header-color: #22d3eecc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #22d3ee;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #082030b3 0%, #0a2840b3 50%, #082438b3 100%);\r\n --scope-border: 2px solid #0891b2;\r\n --scope-shadow: 0px 0px 14px #0891b260;\r\n --scope-item-bg: linear-gradient(135deg, #082030e6 0%, #0a2840e6 50%, #082438e6 100%);\r\n --scope-item-border: 1px solid #22d3eed9;\r\n --scope-item-color: #a8dced;\r\n --scope-item-shadow: 0px 2px 12px #0891b240;\r\n --scope-icon-color: #c0e8f4;\r\n --scope-icon-shadow: 0px 0px 10px #22d3ee;\r\n --scope-icon-hover-color: #22d3ee;\r\n --scope-icon-hover-shadow: 0px 0px 12px #22d3ee;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #060e14;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(6, 14, 20, 0.92);\r\n --map-mini-border: #1e3a5060;\r\n --map-mini-title-color: #38bdf870;\r\n\r\n --placeholder-box-selector-fill: #0891b218;\r\n --placeholder-box-selector-stroke: #22d3ee99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #060e1440;\r\n --submap-shadow: #0891b280 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #0c1e2840;\r\n --node-selected-stroke: #22d3eedd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #0e2a3c;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #22d3ee;\r\n --postil-text-box-bg: #0c1e2880;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #22d3ee;\r\n --table-cell-bg: #0c1e2870;\r\n --table-cell-selection-bg: #0891b23a;\r\n --table-cell-active-bg: #0d3848a0;\r\n --table-title-bg: #0e243090;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #0c1e28cc;\r\n --box-columns-layout-item-hover-color: #22d3ee;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #0c1e2870;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0891b230;\r\n --annotation-bg: #0c1e28bf;\r\n --annotation-box-bg: #0e2438c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #09203055;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #0c1e28a8;\r\n --code-tabbar-item-bg: #0e243a80;\r\n --code-tabbar-item-color: #22d3ee;\r\n --code-tabbar-item-active-color: #7ae8f8;\r\n --code-tabbar-item-active-bg: #0e243a78;\r\n --code-tabbar-item-active-border: 1px solid #174858;\r\n --code-toolbar-bg: #0c1e2847;\r\n --code-toolbar-item-hover-color: #22d3ee;\r\n --code-tooltip-bg: rgb(8 145 178 / 50%);\r\n --code-tooltip-color: #a8dcedcc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #0e2a3888;\r\n --code-input-color: #c0e8f4;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #0c1e2870;\r\n --list-ordered-symbol-hover-bg: #0891b240;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #0c1e28ad;\r\n --todoitem-status-border: 1px solid #0e2a3888;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #0891b2;\r\n --todoitem-done-color: #1e4858;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #0c1e2880;\r\n --img-load-failed-color: #0e2a3880;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0820307d;\r\n --tip-border: 1px solid #0891b280;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #0c1e2870;\r\n --detail-even-bg: #0e243a70;\r\n --detail-adder-bg: #0c1e2840;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #0e243a50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #08161ead;\r\n --text-link-box-bg: #0c1e28c9;\r\n --text-link-bg: #0e243acc;\r\n --text-link-color: #c0e8f4e8;\r\n --text-link-icon-hover-bg: #0891b260;\r\n --text-link-icon-hover-color: #22d3eee0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #0891b2b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #0c1e2830;\r\n --line-hover-bg: #0c1e2830;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #0891b2;\r\n --box-bg: #0c1e2840;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0891b2cc, #22d3eec2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #c0e8f4;\r\n --box-root-drag-enter-bg: #0e2a3880;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0891b2;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #0891b260;\r\n\r\n --box-folder-tag-active-border: 2px solid #0891b2;\r\n --box-folder-tag-active-bg: #0891b2;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #22d3ee;\r\n\r\n --box-folder-border: 2px dashed #0891b280;\r\n --box-folder-active-bg: #0e2a3880;\r\n --box-folder-active-border: 1px solid #22d3ee;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fde68a11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fde68a;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #a5f3fc11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #22d3ee;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},teal:{name:"青绿",css:'\ufeff/* ————————————————— Teal Light Theme ————————————————— */\r\n/* 淡色系青绿主题,主色调为青绿色,搭配薄荷绿、天蓝、淡紫等淡色系配色 */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f0fdf8;\r\n --color: #134e4a;\r\n\r\n --selection-bg: #5eead4;\r\n --selection-color: #134e4a;\r\n --ui-scrollbar-thumb-bg: #99d6cc;\r\n --ui-close-corner-bg: #0d9488;\r\n --cube-bg: #e0f7f440;\r\n --cube-toolbar-bg: #ccf2ee40;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #cef5ef99;\r\n --float-node-layout-item-bg-hover: #5eead4cc;\r\n --float-node-layout-usable-color: #134e4a;\r\n --float-node-layout-disable-color: #a7d8d3cc;\r\n --float-node-layout-shadow: 0px 0px 4px #b2eae499;\r\n --float-node-layout-shadow-hover: 0px 0px 4px #5eead4cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f0fdfbcc;\r\n --menu-title-bg: linear-gradient(45deg, #a7f3d0cc, #bae6fdcc);\r\n --menu-title-icon-color: #0d9488;\r\n --menu-item-color: #1e4040;\r\n --menu-item-bg-hover: #d1faf5;\r\n --menu-item-active-color: #0891b2;\r\n --menu-shortcut-color: #7fb8b5;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #b2d8d8;\r\n --menu-dialog-mask-bg: rgba(13, 148, 136, 0.12);\r\n --menu-dialog-input-border: 1px solid #99d8d4;\r\n --menu-dialog-bg: #f0fdfb;\r\n --menu-dialog-color: #134e4a;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #d1faf5cc;\r\n --submenu-node-line-header-color: #2d7a74cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0891b2;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f0fdfb;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 6px #b2eaedcc;\r\n --map-mini-bg: rgba(240, 253, 251, 0.95);\r\n --map-mini-border: #99f6e4;\r\n --map-mini-title-color: #2dd4bf;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #a5f3fc33;\r\n --placeholder-box-selector-stroke: #0891b2;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e0f7f440;\r\n --submap-shadow: #5eead4 0px 0px 6px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #d1faf580;\r\n --node-selected-stroke: #0d9488;\r\n --node-editable-bg: #fefce840;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #99d6d3;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #a5f3fc80 0%, #6ee7b780 50%, #bae6fd80 100%);\r\n --scope-border: 2px solid #22d3ee;\r\n --scope-shadow: 0px 0px 12px #22d3ee80;\r\n --scope-item-bg: linear-gradient(135deg, #cffafecf 0%, #a7f3d0cf 50%, #bae6fdcf 100%);\r\n --scope-item-border: 1px solid #2dd4bf;\r\n --scope-item-color: #134e4a;\r\n --scope-item-shadow: 0px 0px 8px #0d948855;\r\n --scope-icon-color: #0c4a6e;\r\n --scope-icon-shadow: 0px 0px 10px #0c4a6e;\r\n --scope-icon-hover-color: #dc2626;\r\n --scope-icon-hover-shadow: 0px 0px 10px #b45309;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #b2eaeacc;\r\n --postil-text-color: #0d9488;\r\n --postil-text-box-bg: rgb(209 250 245 / 0.85);\r\n --postil-text-icon-close-bg: #b2eaeaa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #0891b2;\r\n --table-cell-bg: #e0f7f4b0;\r\n --table-cell-selection-bg: #a5f3fc8a;\r\n --table-cell-active-bg: #5eead482;\r\n --table-title-bg: #99d6d390;\r\n --table-dragger-bg: #f0fdfb75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #5eead48c;\r\n --annotation-bg: #f0fdfb85;\r\n --annotation-box-bg: #d1faf5c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #a5f3fc5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #d1faf5cc;\r\n --box-columns-layout-item-hover-color: #0891b2;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #cef5ef70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e0f7f470;\r\n --code-tabbar-item-bg: #b2eaea78;\r\n --code-tabbar-item-color: #5f9ea078;\r\n --code-tabbar-item-active-color: #134e4a;\r\n --code-tabbar-item-active-bg: #b2eaea78;\r\n --code-tabbar-item-active-border: 1px dashed #0891b2;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #0d9488;\r\n --code-tooltip-bg: #0c4a6e;\r\n --code-tooltip-color: #cffafecc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #0d9488;\r\n --code-input-color: #134e4a;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #5eead491;\r\n --list-item-bg: #e0f7f470;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #d1faf5ad;\r\n --todoitem-status-border: 1px dashed #2d7a74;\r\n --todoitem-status-active-color: #f0fdfb;\r\n --todoitem-status-active-bg: #0d9488;\r\n --todoitem-done-color: #7bc8c3;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #d1faf580;\r\n --img-load-failed-color: #7bc8c380;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #bae6fd7d;\r\n --tip-border: 1px solid #38bdf880;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e0f7f470;\r\n --detail-even-bg: #e0f2fe70;\r\n --detail-adder-bg: #d1faf540;\r\n --detail-list-border: 1px dashed #99d6d3;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #a5f3fc80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f0fdfb;\r\n --text-link-box-bg: #e0f7f4;\r\n --text-link-bg: #b2eaea;\r\n --text-link-color: #134e4a;\r\n --text-link-icon-hover-bg: #5eead4;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #99f6e4;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #d1faf530;\r\n --line-hover-bg: #d1faf530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #2dd4bf;\r\n --box-bg: #a5f3fc40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #5eead4cc, #38bdf8c2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-fold-bg: #134e4a;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #a7f3d080;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0d9488;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-tag-active-border: 2px solid #0d9488;\r\n --box-folder-tag-active-bg: #0d9488;\r\n --box-folder-tag-active-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-border: 2px dashed #0d9488a8;\r\n --box-folder-active-bg: #a5f3fc80;\r\n --box-folder-active-border: 1px solid #0d9488;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fde68a;\r\n --api-functions-color-light: #fde68a66;\r\n --api-functions-type-bg: #fde68a;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fed7aa69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #0d1f1e;\r\n --color: #cbfaf4;\r\n\r\n --selection-bg: #0d9488;\r\n --selection-color: #f0fdfb;\r\n --ui-scrollbar-thumb-bg: #2d7a74;\r\n --ui-close-corner-bg: #5eead4;\r\n --cube-bg: #1a3533;\r\n --cube-toolbar-bg: #1f3e3b40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1a373599;\r\n --float-node-layout-item-bg-hover: #0d9488cc;\r\n --float-node-layout-usable-color: #cbfaf4;\r\n --float-node-layout-disable-color: #2d5553;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 4px #0d9488cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #122120cc;\r\n --menu-title-bg: linear-gradient(45deg, #134e4acc, #0c4a6ecc);\r\n --menu-title-icon-color: #2dd4bf;\r\n --menu-item-color: #cbfaf4;\r\n --menu-item-bg-hover: #1e3b39cc;\r\n --menu-item-active-color: #22d3ee;\r\n --menu-shortcut-color: #2d7a74;\r\n --menu-item-disable-color: #234040;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.35);\r\n --menu-dialog-input-border: 1px solid #1e5c58cc;\r\n --menu-dialog-bg: #122120cc;\r\n --menu-dialog-color: #cbfaf4;\r\n\r\n --submenu-node-line-header-bg: #1a373533;\r\n --submenu-node-line-header-color: #a5f3f0cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #22d3ee;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #0f1e1d;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 6px #0d948866;\r\n --map-mini-bg: rgba(15, 30, 29, 0.92);\r\n --map-mini-border: #134e4a50;\r\n --map-mini-title-color: #2dd4bf80;\r\n\r\n --placeholder-box-selector-fill: #0d948833;\r\n --placeholder-box-selector-stroke: #22d3ee99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #0d1f1e40;\r\n --submap-shadow: #0d9488a1 0px 0px 6px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #1a373540;\r\n --node-selected-stroke: #2dd4bfde;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #1e5c58;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #0e4f5ab3 0%, #0d4a2db3 50%, #164e636cb3 100%);\r\n --scope-border: 2px solid #22d3ee;\r\n --scope-shadow: 0px 0px 12px #22d3eea6;\r\n --scope-item-bg: linear-gradient(135deg, #134e5ae6 0%, #14503ce6 50%, #0c4a6ee6 100%);\r\n --scope-item-border: 1px solid #2dd4bfd9;\r\n --scope-item-color: #e0fdfb;\r\n --scope-item-shadow: 0px 0px 10px #22d3ee66;\r\n --scope-icon-color: #cffafe;\r\n --scope-icon-shadow: 0px 0px 10px #22d3ee;\r\n --scope-icon-hover-color: #fb7185;\r\n --scope-icon-hover-shadow: 0px 0px 10px #f43f5e;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 24px #0a2424cc;\r\n --postil-text-color: #2dd4bf;\r\n --postil-text-box-bg: #1a373580;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #22d3ee;\r\n --table-cell-bg: #1a373570;\r\n --table-cell-selection-bg: #0d94888a;\r\n --table-cell-active-bg: #134e4a82;\r\n --table-title-bg: #1e5c5890;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1a3735cc;\r\n --box-columns-layout-item-hover-color: #22d3ee;\r\n --box-columns-block-bg: #1a373570;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0d94888c;\r\n --annotation-bg: #1a3735bf;\r\n --annotation-box-bg: #1e4441c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #0d948878;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1a3735a8;\r\n --code-tabbar-item-bg: #1e444140;\r\n --code-tabbar-item-color: #5eead4;\r\n --code-tabbar-item-active-color: #2dd4bf;\r\n --code-tabbar-item-active-bg: #1e444178;\r\n --code-tabbar-item-active-border: 1px dashed #22d3ee;\r\n --code-toolbar-bg: #1a373747;\r\n --code-toolbar-item-hover-color: #2dd4bf;\r\n --code-tooltip-bg: rgb(13 148 136 / 60%);\r\n --code-tooltip-color: #f0fdfbcc;\r\n --code-input-border: 1px dashed #2dd4bf;\r\n --code-input-color: #cbfaf4;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1a373570;\r\n --list-ordered-symbol-hover-bg: #0d948891;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1a3735ad;\r\n --todoitem-status-border: 1px dashed #2d7a74;\r\n --todoitem-status-active-color: #f0fdfb;\r\n --todoitem-status-active-bg: #0d9488;\r\n --todoitem-done-color: #2d7a74;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1a373580;\r\n --img-load-failed-color: #2d7a7480;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0c4a6e7d;\r\n --tip-border: 1px solid #0891b280;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1a373570;\r\n --detail-even-bg: #0c2a3970;\r\n --detail-adder-bg: #1a373540;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #0d94884a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #122120ad;\r\n --text-link-box-bg: #1a3735c9;\r\n --text-link-bg: #1e4441cc;\r\n --text-link-color: #a5f3f0e8;\r\n --text-link-icon-hover-bg: #0d948880;\r\n --text-link-icon-hover-color: #5eead4e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #0d9488b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1a373530;\r\n --line-hover-bg: #1a373530;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #2dd4bf;\r\n --box-bg: #1a373540;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0d9488cc, #0891b2c2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #cbfaf4;\r\n --box-root-drag-enter-bg: #134e4a80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0d9488;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-tag-active-border: 2px solid #0d9488;\r\n --box-folder-tag-active-bg: #0d9488;\r\n --box-folder-tag-active-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-border: 2px dashed #0d9488a8;\r\n --box-folder-active-bg: #134e4a80;\r\n --box-folder-active-border: 1px solid #0d9488;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #2dd4bf11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #2dd4bf;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #22d3ee11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #22d3ee;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},aurora:{name:"极光",css:'\ufeff/* ————————————————— Aurora Theme ————————————————— */\r\n/* 极光主题:淡色模式以星云薰衣草+极光绿为主色,暗色模式还原深夜极光的震撼感 */\r\n/* 绿 #34d399 / 紫 #a78bfa / 青 #67e8f9 / 深空蓝 #1e1b4b */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f5f3ff;\r\n --color: #1e1b4b;\r\n\r\n --selection-bg: #a78bfa;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #c4b5fd;\r\n --ui-close-corner-bg: #7c3aed;\r\n --cube-bg: #ede9fe30;\r\n --cube-toolbar-bg: #ddd6fe30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #ede9fe99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #a78bfacc, #34d399cc);\r\n --float-node-layout-usable-color: #1e1b4b;\r\n --float-node-layout-disable-color: #c4b5fdcc;\r\n --float-node-layout-shadow: 0px 0px 6px #c4b5fd88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #a78bfacc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #faf5ffcc;\r\n --menu-title-bg: linear-gradient(45deg, #ddd6fecc, #a7f3d0cc);\r\n --menu-title-icon-color: #7c3aed;\r\n --menu-item-color: #2e1065;\r\n --menu-item-bg-hover: #ede9fe;\r\n --menu-item-active-color: #7c3aed;\r\n --menu-shortcut-color: #a78bfa;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #d8b4fe;\r\n --menu-dialog-mask-bg: rgba(124, 58, 237, 0.12);\r\n --menu-dialog-input-border: 1px solid #c4b5fd;\r\n --menu-dialog-bg: #faf5ff;\r\n --menu-dialog-color: #1e1b4b;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #ede9fecc;\r\n --submenu-node-line-header-color: #5b21b6cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #7c3aed;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-transition-duration: 0.2s;\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n\r\n --map-status-tools-bg: #faf5ff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #c4b5fdcc;\r\n --map-mini-bg: rgba(250, 245, 255, 0.95);\r\n --map-mini-border: #e9d5ff;\r\n --map-mini-title-color: #a78bfa;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #a78bfa33;\r\n --placeholder-box-selector-stroke: #7c3aed;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #ede9fe30;\r\n --submap-shadow: #a78bfa 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #ede9fe50;\r\n --node-selected-stroke: #7c3aed;\r\n --node-editable-bg: #f0fdf440;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #c4b5fd;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #ddd6fe80 0%, #a7f3d080 50%, #cffafe80 100%);\r\n --scope-border: 2px solid #a78bfa;\r\n --scope-shadow: 0px 0px 14px #a78bfa99;\r\n --scope-item-bg: linear-gradient(135deg, #ede9fecf 0%, #d1fae5cf 50%, #e0f2fecf 100%);\r\n --scope-item-border: 1px solid #6ee7b7;\r\n --scope-item-color: #1e1b4b;\r\n --scope-item-shadow: 0px 0px 8px #a78bfa55;\r\n --scope-icon-color: #1e1b4b;\r\n --scope-icon-shadow: 0px 0px 10px #7c3aed;\r\n --scope-icon-hover-color: #10b981;\r\n --scope-icon-hover-shadow: 0px 0px 10px #34d399;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #c4b5fdcc;\r\n --postil-text-color: #7c3aed;\r\n --postil-text-box-bg: rgb(237 233 254 / 0.85);\r\n --postil-text-icon-close-bg: #c4b5fda3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #7c3aed;\r\n --table-cell-bg: #ede9fe80;\r\n --table-cell-selection-bg: #a78bfa3a;\r\n --table-cell-active-bg: #34d39940;\r\n --table-title-bg: #c4b5fd80;\r\n --table-dragger-bg: #faf5ff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #a78bfa8c;\r\n --annotation-bg: #faf5ff85;\r\n --annotation-box-bg: #ede9fec2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #a7f3fc5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #ede9fecc;\r\n --box-columns-layout-item-hover-color: #7c3aed;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #ddd6fe70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #ede9fe70;\r\n --code-tabbar-item-bg: #c4b5fd68;\r\n --code-tabbar-item-color: #a78bfa78;\r\n --code-tabbar-item-active-color: #1e1b4b;\r\n --code-tabbar-item-active-bg: #c4b5fd78;\r\n --code-tabbar-item-active-border: 1px dashed #7c3aed;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #10b981;\r\n --code-tooltip-bg: #2e1065;\r\n --code-tooltip-color: #c4b5fdcc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #7c3aed;\r\n --code-input-color: #1e1b4b;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #a78bfa91;\r\n --list-item-bg: #ede9fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #ede9fead;\r\n --todoitem-status-border: 1px dashed #7c3aed;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #a78bfa;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #ede9fe80;\r\n --img-load-failed-color: #c4b5fd80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #ddd6fe7d;\r\n --tip-border: 1px solid #a78bfa80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #ede9fe70;\r\n --detail-even-bg: #d1fae570;\r\n --detail-adder-bg: #ede9fe40;\r\n --detail-list-border: 1px dashed #c4b5fd;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #ddd6fe80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #faf5ff;\r\n --text-link-box-bg: #ede9fe;\r\n --text-link-bg: #ddd6fe;\r\n --text-link-color: #1e1b4b;\r\n --text-link-icon-hover-bg: #a78bfa;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #c4b5fd;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #ede9fe30;\r\n --line-hover-bg: #ede9fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #a78bfa;\r\n --box-bg: #ddd6fe40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #a78bfacc, #34d399c2);\r\n --box-root-dragger-bg: #67e8f9;\r\n --box-root-fold-bg: #1e1b4b;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d1fae580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #7c3aed;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #a78bfa;\r\n\r\n --box-folder-border: 2px dashed #7c3aeda8;\r\n --box-folder-active-bg: #ddd6fe80;\r\n --box-folder-active-border: 1px solid #7c3aed;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fde68a;\r\n --api-functions-color-light: #fde68a66;\r\n --api-functions-type-bg: #fde68a;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #0c0a1a;\r\n --color: #e9d5ff;\r\n\r\n --selection-bg: #6d28d9;\r\n --selection-color: #f5f3ff;\r\n --ui-scrollbar-thumb-bg: #4c1d95;\r\n --ui-close-corner-bg: #a78bfa;\r\n --cube-bg: #1e1b4b30;\r\n --cube-toolbar-bg: #2e1b5440;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1e1b4b99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #4c1d95cc, #065f46cc);\r\n --float-node-layout-usable-color: #e9d5ff;\r\n --float-node-layout-disable-color: #4c1d95;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #a78bfacc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #13103acc;\r\n --menu-title-bg: linear-gradient(45deg, #2e1065cc, #064e3bcc);\r\n --menu-title-icon-color: #a78bfa;\r\n --menu-item-color: #e9d5ff;\r\n --menu-item-bg-hover: #1e1b4bcc;\r\n --menu-item-active-color: #a78bfa;\r\n --menu-shortcut-color: #6d28d9;\r\n --menu-item-disable-color: #3b2367;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.45);\r\n --menu-dialog-input-border: 1px solid #4c1d95cc;\r\n --menu-dialog-bg: #13103acc;\r\n --menu-dialog-color: #e9d5ff;\r\n\r\n --submenu-node-line-header-bg: #1e1b4b33;\r\n --submenu-node-line-header-color: #c4b5fdcc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #a78bfa;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #0c0a1a;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #6d28d966;\r\n --map-mini-bg: rgba(12, 10, 26, 0.92);\r\n --map-mini-border: #4c1d9550;\r\n --map-mini-title-color: #a78bfa80;\r\n\r\n --placeholder-box-selector-fill: #a78bfa22;\r\n --placeholder-box-selector-stroke: #a78bfa99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #0c0a1a40;\r\n --submap-shadow: #a78bfaa1 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #1e1b4b40;\r\n --node-selected-stroke: #a78bfade;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #4c1d95;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #2e1065b3 0%, #064e3bb3 50%, #0c4a6eb3 100%);\r\n --scope-border: 2px solid #a78bfa;\r\n --scope-shadow: 0px 0px 16px #a78bfaaa;\r\n --scope-item-bg: linear-gradient(135deg, #3b0764e6 0%, #065f46e6 50%, #164e63e6 100%);\r\n --scope-item-border: 1px solid #34d399d9;\r\n --scope-item-color: #f0fdf4;\r\n --scope-item-shadow: 0px 0px 10px #a78bfa66;\r\n --scope-icon-color: #e9d5ff;\r\n --scope-icon-shadow: 0px 0px 12px #a78bfa;\r\n --scope-icon-hover-color: #34d399;\r\n --scope-icon-hover-shadow: 0px 0px 12px #34d399;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #1e1b4bcc;\r\n --postil-text-color: #a78bfa;\r\n --postil-text-box-bg: #1e1b4b80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #a78bfa;\r\n --table-cell-bg: #1e1b4b70;\r\n --table-cell-selection-bg: #6d28d98a;\r\n --table-cell-active-bg: #065f4682;\r\n --table-title-bg: #2e1065d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1e1b4bcc;\r\n --box-columns-layout-item-hover-color: #a78bfa;\r\n --box-columns-block-bg: #1e1b4b70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #a78bfa8c;\r\n --annotation-bg: #1e1b4bbf;\r\n --annotation-box-bg: #2e1065c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #6d28d978;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1e1b4ba8;\r\n --code-tabbar-item-bg: #2e1065a0;\r\n --code-tabbar-item-color: #c4b5fd;\r\n --code-tabbar-item-active-color: #a78bfa;\r\n --code-tabbar-item-active-bg: #2e106578;\r\n --code-tabbar-item-active-border: 1px dashed #a78bfa;\r\n --code-toolbar-bg: #1e1b4b47;\r\n --code-toolbar-item-hover-color: #34d399;\r\n --code-tooltip-bg: rgb(109 40 217 / 60%);\r\n --code-tooltip-color: #e9d5ffcc;\r\n --code-input-border: 1px dashed #a78bfa;\r\n --code-input-color: #e9d5ff;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1e1b4b70;\r\n --list-ordered-symbol-hover-bg: #6d28d991;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1e1b4bad;\r\n --todoitem-status-border: 1px dashed #4c1d95;\r\n --todoitem-status-active-color: #f5f3ff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #4c1d95;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1e1b4b80;\r\n --img-load-failed-color: #4c1d9580;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #2e10657d;\r\n --tip-border: 1px solid #7c3aed80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1e1b4b70;\r\n --detail-even-bg: #0c4a6e70;\r\n --detail-adder-bg: #1e1b4b40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #6d28d94a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #13103aad;\r\n --text-link-box-bg: #1e1b4bc9;\r\n --text-link-bg: #2e1065cc;\r\n --text-link-color: #e9d5ffe8;\r\n --text-link-icon-hover-bg: #6d28d980;\r\n --text-link-icon-hover-color: #a78bfae0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #7c3aedb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1e1b4b30;\r\n --line-hover-bg: #1e1b4b30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #a78bfa;\r\n --box-bg: #1e1b4b40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #7c3aedcc, #34d399c2);\r\n --box-root-dragger-bg: #67e8f9;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #e9d5ff;\r\n --box-root-drag-enter-bg: #065f4680;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #a78bfa;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #a78bfa;\r\n\r\n --box-folder-border: 2px dashed #7c3aeda8;\r\n --box-folder-active-bg: #2e106580;\r\n --box-folder-active-border: 1px solid #a78bfa;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #a78bfa11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #a78bfa;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #34d39911;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #34d399;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},ember:{name:"琥珀",css:'\ufeff/* ————————————————— Ember Theme ————————————————— */\r\n/* 琥珀主题:淡色模式以奶油琥珀+暖橙为主色,暗色模式呈现熔岩深夜的火焰质感 */\r\n/* 橙 #f97316 / 金 #fbbf24 / 棕 #92400e / 深夜 #1c0a00 */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fffbf0;\r\n --color: #1c1005;\r\n\r\n --selection-bg: #f97316;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fcd34d;\r\n --ui-close-corner-bg: #d97706;\r\n --cube-bg: #fef3c730;\r\n --cube-toolbar-bg: #fde68a30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fef9ec99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #f97316cc, #fbbf24cc);\r\n --float-node-layout-usable-color: #1c1005;\r\n --float-node-layout-disable-color: #fcd34dcc;\r\n --float-node-layout-shadow: 0px 0px 6px #fcd34d88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f97316cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #fffbf2cc;\r\n --menu-title-bg: linear-gradient(45deg, #fde68acc, #fed7aacc);\r\n --menu-title-icon-color: #d97706;\r\n --menu-item-color: #431407;\r\n --menu-item-bg-hover: #fef3c7;\r\n --menu-item-active-color: #d97706;\r\n --menu-shortcut-color: #fbbf24;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fde68a;\r\n --menu-dialog-mask-bg: rgba(217, 119, 6, 0.12);\r\n --menu-dialog-input-border: 1px solid #fcd34d;\r\n --menu-dialog-bg: #fffbf2;\r\n --menu-dialog-color: #1c1005;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fef3c7cc;\r\n --submenu-node-line-header-color: #92400ecc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #d97706;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #fffbf2;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #fcd34dcc;\r\n --map-mini-bg: rgba(255, 251, 242, 0.95);\r\n --map-mini-border: #fde68a;\r\n --map-mini-title-color: #d97706;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #f9731633;\r\n --placeholder-box-selector-stroke: #d97706;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fef3c730;\r\n --submap-shadow: #fbbf24 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #fbbf24;\r\n --node-bg: #fef3c750;\r\n --node-selected-stroke: #d97706;\r\n --node-editable-bg: #fffbeb40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fcd34d;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fde68a80 0%, #fed7aa80 50%, #fef08a80 100%);\r\n --scope-border: 2px solid #f97316;\r\n --scope-shadow: 0px 0px 14px #f9731699;\r\n --scope-item-bg: linear-gradient(135deg, #fef3c7cf 0%, #fde68acf 50%, #fed7aacf 100%);\r\n --scope-item-border: 1px solid #fbbf24;\r\n --scope-item-color: #1c1005;\r\n --scope-item-shadow: 0px 0px 8px #f9731655;\r\n --scope-icon-color: #1c1005;\r\n --scope-icon-shadow: 0px 0px 10px #d97706;\r\n --scope-icon-hover-color: #ef4444;\r\n --scope-icon-hover-shadow: 0px 0px 10px #ef4444;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #fcd34dcc;\r\n --postil-text-color: #d97706;\r\n --postil-text-box-bg: rgb(254 243 199 / 0.85);\r\n --postil-text-icon-close-bg: #fcd34da3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #f97316;\r\n --table-cell-bg: #fef3c780;\r\n --table-cell-selection-bg: #f973163a;\r\n --table-cell-active-bg: #fbbf2440;\r\n --table-title-bg: #fcd34d80;\r\n --table-dragger-bg: #fffbf275;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f973168c;\r\n --annotation-bg: #fffbf285;\r\n --annotation-box-bg: #fef3c7c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fde68a5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fef3c7cc;\r\n --box-columns-layout-item-hover-color: #d97706;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fde68a70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fef3c770;\r\n --code-tabbar-item-bg: #fcd34d68;\r\n --code-tabbar-item-color: #fbbf2478;\r\n --code-tabbar-item-active-color: #1c1005;\r\n --code-tabbar-item-active-bg: #fcd34d78;\r\n --code-tabbar-item-active-border: 1px dashed #d97706;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #f97316;\r\n --code-tooltip-bg: #431407;\r\n --code-tooltip-color: #fde68acc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #d97706;\r\n --code-input-color: #1c1005;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #f9731691;\r\n --list-item-bg: #fef3c770;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fef3c7ad;\r\n --todoitem-status-border: 1px dashed #d97706;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #f97316;\r\n --todoitem-done-color: #fbbf24;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fef3c780;\r\n --img-load-failed-color: #fcd34d80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fde68a7d;\r\n --tip-border: 1px solid #f9731680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fef3c770;\r\n --detail-even-bg: #fff7ed70;\r\n --detail-adder-bg: #fef3c740;\r\n --detail-list-border: 1px dashed #fcd34d;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fde68a80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #fffbf2;\r\n --text-link-box-bg: #fef3c7;\r\n --text-link-bg: #fde68a;\r\n --text-link-color: #1c1005;\r\n --text-link-icon-hover-bg: #f97316;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #fbbf24;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fef3c730;\r\n --line-hover-bg: #fef3c730;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f97316;\r\n --box-bg: #fde68a40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #f97316cc, #fbbf24c2);\r\n --box-root-dragger-bg: #fbbf24;\r\n --box-root-fold-bg: #1c1005;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d1fae580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #d97706;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #d97706;\r\n\r\n --box-folder-tag-active-border: 2px solid #d97706;\r\n --box-folder-tag-active-bg: #d97706;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #f97316;\r\n\r\n --box-folder-border: 2px dashed #d97706a8;\r\n --box-folder-active-bg: #fde68a80;\r\n --box-folder-active-border: 1px solid #d97706;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fef9c3;\r\n --api-functions-color-light: #fef9c366;\r\n --api-functions-type-bg: #fef9c3;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #fed7aa;\r\n --api-arguments-color-light: #fed7aa66;\r\n --api-arguments-type-bg: #fed7aa;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #120800;\r\n --color: #fef3c7;\r\n\r\n --selection-bg: #b45309;\r\n --selection-color: #fffbf0;\r\n --ui-scrollbar-thumb-bg: #78350f;\r\n --ui-close-corner-bg: #fbbf24;\r\n --cube-bg: #1c0e0030;\r\n --cube-toolbar-bg: #2d160040;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1c0e0099;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #92400ecc, #b45309cc);\r\n --float-node-layout-usable-color: #fef3c7;\r\n --float-node-layout-disable-color: #78350f;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f97316cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #1a0b00cc;\r\n --menu-title-bg: linear-gradient(45deg, #78350fcc, #92400ecc);\r\n --menu-title-icon-color: #fbbf24;\r\n --menu-item-color: #fef3c7;\r\n --menu-item-bg-hover: #2d160fcc;\r\n --menu-item-active-color: #fbbf24;\r\n --menu-shortcut-color: #b45309;\r\n --menu-item-disable-color: #432007;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.5);\r\n --menu-dialog-input-border: 1px solid #78350fcc;\r\n --menu-dialog-bg: #1a0b00cc;\r\n --menu-dialog-color: #fef3c7;\r\n\r\n --submenu-node-line-header-bg: #1c0e0033;\r\n --submenu-node-line-header-color: #fde68acc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #fbbf24;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #120800;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #b4530966;\r\n --map-mini-bg: rgba(18, 8, 0, 0.92);\r\n --map-mini-border: #78350f50;\r\n --map-mini-title-color: #b4530970;\r\n\r\n --placeholder-box-selector-fill: #f9731622;\r\n --placeholder-box-selector-stroke: #fbbf2499;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #12080040;\r\n --submap-shadow: #f97316a1 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #fbbf24;\r\n --node-bg: #1c0e0040;\r\n --node-selected-stroke: #f97316de;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #78350f;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #7c2d12b3 0%, #92400eb3 50%, #78350fb3 100%);\r\n --scope-border: 2px solid #f97316;\r\n --scope-shadow: 0px 0px 18px #f97316aa;\r\n --scope-item-bg: linear-gradient(135deg, #7c2d12e6 0%, #92400ee6 50%, #78350fe6 100%);\r\n --scope-item-border: 1px solid #fbbf24d9;\r\n --scope-item-color: #fef9ee;\r\n --scope-item-shadow: 0px 0px 10px #f9731666;\r\n --scope-icon-color: #fef3c7;\r\n --scope-icon-shadow: 0px 0px 12px #fbbf24;\r\n --scope-icon-hover-color: #f87171;\r\n --scope-icon-hover-shadow: 0px 0px 12px #ef4444;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #1c0e00cc;\r\n --postil-text-color: #fbbf24;\r\n --postil-text-box-bg: #1c0e0080;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fbbf24;\r\n --table-cell-bg: #1c0e0070;\r\n --table-cell-selection-bg: #b453098a;\r\n --table-cell-active-bg: #92400e82;\r\n --table-title-bg: #78350fd0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1c0e00cc;\r\n --box-columns-layout-item-hover-color: #fbbf24;\r\n --box-columns-block-bg: #1c0e0070;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f973168c;\r\n --annotation-bg: #1c0e00bf;\r\n --annotation-box-bg: #2d1600c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #b4530978;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1c0e00a8;\r\n --code-tabbar-item-bg: #2d1600a0;\r\n --code-tabbar-item-color: #fcd34d;\r\n --code-tabbar-item-active-color: #fbbf24;\r\n --code-tabbar-item-active-bg: #2d160078;\r\n --code-tabbar-item-active-border: 1px dashed #fbbf24;\r\n --code-toolbar-bg: #1c0e0047;\r\n --code-toolbar-item-hover-color: #f97316;\r\n --code-tooltip-bg: rgb(180 83 9 / 60%);\r\n --code-tooltip-color: #fef3c7cc;\r\n --code-input-border: 1px dashed #fbbf24;\r\n --code-input-color: #fef3c7;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1c0e0070;\r\n --list-ordered-symbol-hover-bg: #b4530991;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1c0e00ad;\r\n --todoitem-status-border: 1px dashed #78350f;\r\n --todoitem-status-active-color: #fffbf0;\r\n --todoitem-status-active-bg: #d97706;\r\n --todoitem-done-color: #78350f;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1c0e0080;\r\n --img-load-failed-color: #78350f80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #7c2d127d;\r\n --tip-border: 1px solid #f9731680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1c0e0070;\r\n --detail-even-bg: #2d160070;\r\n --detail-adder-bg: #1c0e0040;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #b453094a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #1a0b00ad;\r\n --text-link-box-bg: #1c0e00c9;\r\n --text-link-bg: #2d1600cc;\r\n --text-link-color: #fef3c7e8;\r\n --text-link-icon-hover-bg: #b4530980;\r\n --text-link-icon-hover-color: #fbbf24e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #d97706b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1c0e0030;\r\n --line-hover-bg: #1c0e0030;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f97316;\r\n --box-bg: #1c0e0040;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #b45309cc, #d97706c2);\r\n --box-root-dragger-bg: #fbbf24;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fef3c7;\r\n --box-root-drag-enter-bg: #92400e80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #d97706;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #f97316;\r\n\r\n --box-folder-tag-active-border: 2px solid #d97706;\r\n --box-folder-tag-active-bg: #d97706;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #f97316;\r\n\r\n --box-folder-border: 2px dashed #d97706a8;\r\n --box-folder-active-bg: #78350f80;\r\n --box-folder-active-border: 1px solid #f97316;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fbbf2411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fbbf24;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #f9731611;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #f97316;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},sakura:{name:"樱雪",css:'\ufeff/* ————————————————— Sakura Theme ————————————————— */\r\n/* 樱雪主题:淡色模式以樱花粉+薄雪白为主色,暗色模式呈现夜樱的深沉浪漫感 */\r\n/* 樱粉 #f472b6 / 玫瑰 #e11d48 / 雪白 #fdf2f8 / 深夜 #1a0010 */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fdf4f8;\r\n --color: #500724;\r\n\r\n --selection-bg: #f472b6;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fbcfe8;\r\n --ui-close-corner-bg: #be185d;\r\n --cube-bg: #fce7f330;\r\n --cube-toolbar-bg: #fbcfe830;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fdf2f899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #f472b6cc, #fb7185cc);\r\n --float-node-layout-usable-color: #500724;\r\n --float-node-layout-disable-color: #fbcfe8cc;\r\n --float-node-layout-shadow: 0px 0px 6px #fbcfe888;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f472b6cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #fdf5f9cc;\r\n --menu-title-bg: linear-gradient(45deg, #fbcfe8cc, #fce7f3cc);\r\n --menu-title-icon-color: #be185d;\r\n --menu-item-color: #500724;\r\n --menu-item-bg-hover: #fce7f3;\r\n --menu-item-active-color: #be185d;\r\n --menu-shortcut-color: #f472b6;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fbcfe8;\r\n --menu-dialog-mask-bg: rgba(190, 24, 93, 0.10);\r\n --menu-dialog-input-border: 1px solid #fbcfe8;\r\n --menu-dialog-bg: #fdf5f9;\r\n --menu-dialog-color: #500724;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fce7f3cc;\r\n --submenu-node-line-header-color: #9d174dcc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #be185d;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #fdf5f9;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #fbcfe8cc;\r\n --map-mini-bg: rgba(253, 245, 249, 0.95);\r\n --map-mini-border: #fbcfe8;\r\n --map-mini-title-color: #f472b6;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #f472b633;\r\n --placeholder-box-selector-stroke: #be185d;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fce7f330;\r\n --submap-shadow: #f9a8d4 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #f9a8d4;\r\n --node-bg: #fce7f350;\r\n --node-selected-stroke: #be185d;\r\n --node-editable-bg: #fff0f540;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fbcfe8;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fce7f380 0%, #fbcfe880 50%, #ffe4e680 100%);\r\n --scope-border: 2px solid #f472b6;\r\n --scope-shadow: 0px 0px 14px #f472b699;\r\n --scope-item-bg: linear-gradient(135deg, #fdf2f8cf 0%, #fce7f3cf 50%, #ffe4e6cf 100%);\r\n --scope-item-border: 1px solid #f9a8d4;\r\n --scope-item-color: #500724;\r\n --scope-item-shadow: 0px 0px 8px #f472b655;\r\n --scope-icon-color: #500724;\r\n --scope-icon-shadow: 0px 0px 10px #be185d;\r\n --scope-icon-hover-color: #7c3aed;\r\n --scope-icon-hover-shadow: 0px 0px 10px #7c3aed;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #fbcfe8cc;\r\n --postil-text-color: #be185d;\r\n --postil-text-box-bg: rgb(252 231 243 / 0.85);\r\n --postil-text-icon-close-bg: #fbcfe8a3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #f472b6;\r\n --table-cell-bg: #fce7f380;\r\n --table-cell-selection-bg: #f472b63a;\r\n --table-cell-active-bg: #f9a8d440;\r\n --table-title-bg: #fbcfe880;\r\n --table-dragger-bg: #fdf5f975;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f472b68c;\r\n --annotation-bg: #fdf5f985;\r\n --annotation-box-bg: #fce7f3c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fbcfe85c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fce7f3cc;\r\n --box-columns-layout-item-hover-color: #be185d;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fbcfe870;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fce7f370;\r\n --code-tabbar-item-bg: #fbcfe868;\r\n --code-tabbar-item-color: #f9a8d478;\r\n --code-tabbar-item-active-color: #500724;\r\n --code-tabbar-item-active-bg: #fbcfe878;\r\n --code-tabbar-item-active-border: 1px dashed #be185d;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #be185d;\r\n --code-tooltip-bg: #500724;\r\n --code-tooltip-color: #fbcfe8cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #be185d;\r\n --code-input-color: #500724;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #f472b691;\r\n --list-item-bg: #fce7f370;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fce7f3ad;\r\n --todoitem-status-border: 1px dashed #be185d;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #f472b6;\r\n --todoitem-done-color: #f9a8d4;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fce7f380;\r\n --img-load-failed-color: #fbcfe880;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fbcfe87d;\r\n --tip-border: 1px solid #f472b680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fce7f370;\r\n --detail-even-bg: #ffe4e670;\r\n --detail-adder-bg: #fce7f340;\r\n --detail-list-border: 1px dashed #fbcfe8;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fbcfe880;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #fdf5f9;\r\n --text-link-box-bg: #fce7f3;\r\n --text-link-bg: #fbcfe8;\r\n --text-link-color: #500724;\r\n --text-link-icon-hover-bg: #f472b6;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #f9a8d4;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fce7f330;\r\n --line-hover-bg: #fce7f330;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f472b6;\r\n --box-bg: #fbcfe840;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #f472b6cc, #fb7185c2);\r\n --box-root-dragger-bg: #f9a8d4;\r\n --box-root-fold-bg: #500724;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #fce7f380;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #be185d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #be185d;\r\n\r\n --box-folder-tag-active-border: 2px solid #be185d;\r\n --box-folder-tag-active-bg: #be185d;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #f472b6;\r\n\r\n --box-folder-border: 2px dashed #be185da8;\r\n --box-folder-active-bg: #fbcfe880;\r\n --box-folder-active-border: 1px solid #be185d;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fbcfe8;\r\n --api-functions-color-light: #fbcfe866;\r\n --api-functions-type-bg: #fbcfe8;\r\n --api-functions-type-color: #9f1239cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #ffe4e6;\r\n --api-arguments-color-light: #ffe4e666;\r\n --api-arguments-type-bg: #ffe4e6;\r\n --api-arguments-type-color: #9f1239cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fbcfe869;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #150010;\r\n --color: #fce7f3;\r\n\r\n --selection-bg: #9d174d;\r\n --selection-color: #fdf2f8;\r\n --ui-scrollbar-thumb-bg: #831843;\r\n --ui-close-corner-bg: #f9a8d4;\r\n --cube-bg: #1f0118;\r\n --cube-toolbar-bg: #2e0028;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1f011899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #9d174dcc, #831843cc);\r\n --float-node-layout-usable-color: #fce7f3;\r\n --float-node-layout-disable-color: #831843;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f472b6cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #1a0015cc;\r\n --menu-title-bg: linear-gradient(45deg, #831843cc, #9d174dcc);\r\n --menu-title-icon-color: #f9a8d4;\r\n --menu-item-color: #fce7f3;\r\n --menu-item-bg-hover: #2e0028cc;\r\n --menu-item-active-color: #f9a8d4;\r\n --menu-shortcut-color: #9d174d;\r\n --menu-item-disable-color: #4a0030;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.50);\r\n --menu-dialog-input-border: 1px solid #831843cc;\r\n --menu-dialog-bg: #1a0015cc;\r\n --menu-dialog-color: #fce7f3;\r\n\r\n --submenu-node-line-header-bg: #1f011833;\r\n --submenu-node-line-header-color: #fbcfe8cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #f9a8d4;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #150010;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #9d174d66;\r\n --map-mini-bg: rgba(21, 0, 16, 0.92);\r\n --map-mini-border: #83184350;\r\n --map-mini-title-color: #ec489980;\r\n\r\n --placeholder-box-selector-fill: #f472b622;\r\n --placeholder-box-selector-stroke: #f9a8d499;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #15001040;\r\n --submap-shadow: #f472b6a1 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #f9a8d4;\r\n --node-bg: #1f011840;\r\n --node-selected-stroke: #f472b6de;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #831843;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #831843b3 0%, #9d174db3 50%, #7c1539b3 100%);\r\n --scope-border: 2px solid #f472b6;\r\n --scope-shadow: 0px 0px 18px #f472b6aa;\r\n --scope-item-bg: linear-gradient(135deg, #831843e6 0%, #9d174de6 50%, #7e1140e6 100%);\r\n --scope-item-border: 1px solid #f9a8d4d9;\r\n --scope-item-color: #fdf2f8;\r\n --scope-item-shadow: 0px 0px 10px #f472b666;\r\n --scope-icon-color: #fce7f3;\r\n --scope-icon-shadow: 0px 0px 12px #f9a8d4;\r\n --scope-icon-hover-color: #a78bfa;\r\n --scope-icon-hover-shadow: 0px 0px 12px #a78bfa;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #1f0118cc;\r\n --postil-text-color: #f9a8d4;\r\n --postil-text-box-bg: #1f011880;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #f9a8d4;\r\n --table-cell-bg: #1f011870;\r\n --table-cell-selection-bg: #9d174d8a;\r\n --table-cell-active-bg: #83184382;\r\n --table-title-bg: #7e1140d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1f0118cc;\r\n --box-columns-layout-item-hover-color: #f9a8d4;\r\n --box-columns-block-bg: #1f011870;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f472b68c;\r\n --annotation-bg: #1f0118bf;\r\n --annotation-box-bg: #2e0028c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #9d174d78;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1f0118a8;\r\n --code-tabbar-item-bg: #2e0028a0;\r\n --code-tabbar-item-color: #f9a8d4;\r\n --code-tabbar-item-active-color: #fbcfe8;\r\n --code-tabbar-item-active-bg: #2e002878;\r\n --code-tabbar-item-active-border: 1px dashed #f9a8d4;\r\n --code-toolbar-bg: #1f011847;\r\n --code-toolbar-item-hover-color: #f472b6;\r\n --code-tooltip-bg: rgb(157 23 77 / 60%);\r\n --code-tooltip-color: #fce7f3cc;\r\n --code-input-border: 1px dashed #f9a8d4;\r\n --code-input-color: #fce7f3;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1f011870;\r\n --list-ordered-symbol-hover-bg: #9d174d91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1f0118ad;\r\n --todoitem-status-border: 1px dashed #831843;\r\n --todoitem-status-active-color: #fdf2f8;\r\n --todoitem-status-active-bg: #be185d;\r\n --todoitem-done-color: #831843;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1f011880;\r\n --img-load-failed-color: #83184380;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #9d174d7d;\r\n --tip-border: 1px solid #f472b680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1f011870;\r\n --detail-even-bg: #2e002870;\r\n --detail-adder-bg: #1f011840;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #9d174d4a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #1a0015ad;\r\n --text-link-box-bg: #1f0118c9;\r\n --text-link-bg: #2e0028cc;\r\n --text-link-color: #fce7f3e8;\r\n --text-link-icon-hover-bg: #9d174d80;\r\n --text-link-icon-hover-color: #f9a8d4e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #be185db5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1f011830;\r\n --line-hover-bg: #1f011830;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f472b6;\r\n --box-bg: #1f011840;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #be185dcc, #9d174dc2);\r\n --box-root-dragger-bg: #f9a8d4;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fce7f3;\r\n --box-root-drag-enter-bg: #83184380;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #be185d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #f472b6;\r\n\r\n --box-folder-tag-active-border: 2px solid #be185d;\r\n --box-folder-tag-active-bg: #be185d;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #f472b6;\r\n\r\n --box-folder-border: 2px dashed #be185da8;\r\n --box-folder-active-bg: #9d174d80;\r\n --box-folder-active-border: 1px solid #f472b6;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #f9a8d411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #f9a8d4;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #f472b611;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #f472b6;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},ocean:{name:"深海",css:'\ufeff/* ————————————————— Ocean Theme ————————————————— */\r\n/* 深海主题:亮色以晴空蓝+泡沫白为基调,暗色深入午夜大洋的深邃感 */\r\n/* 天蓝 #0ea5e9 / 青碧 #06b6d4 / 珊瑚 #fb923c / 深海 #0c2340 */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f0f9ff;\r\n --color: #0c2340;\r\n\r\n --selection-bg: #0ea5e9;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #7dd3fc;\r\n --ui-close-corner-bg: #0369a1;\r\n --cube-bg: #e0f2fe30;\r\n --cube-toolbar-bg: #bae6fd30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #e0f2fe99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #0ea5e9cc, #06b6d4cc);\r\n --float-node-layout-usable-color: #0c2340;\r\n --float-node-layout-disable-color: #7dd3fccc;\r\n --float-node-layout-shadow: 0px 0px 6px #7dd3fc88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #0ea5e9cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f0faffcc;\r\n --menu-title-bg: linear-gradient(45deg, #bae6fdcc, #a5f3fccc);\r\n --menu-title-icon-color: #0369a1;\r\n --menu-item-color: #0c2340;\r\n --menu-item-bg-hover: #e0f2fe;\r\n --menu-item-active-color: #0369a1;\r\n --menu-shortcut-color: #38bdf8;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #bae6fd;\r\n --menu-dialog-mask-bg: rgba(3, 105, 161, 0.12);\r\n --menu-dialog-input-border: 1px solid #7dd3fc;\r\n --menu-dialog-bg: #f0faff;\r\n --menu-dialog-color: #0c2340;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #e0f2fecc;\r\n --submenu-node-line-header-color: #075985cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0369a1;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f0faff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #7dd3fccc;\r\n --map-mini-bg: rgba(240, 250, 255, 0.95);\r\n --map-mini-border: #bae6fd;\r\n --map-mini-title-color: #38bdf8;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #0ea5e933;\r\n --placeholder-box-selector-stroke: #0369a1;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e0f2fe30;\r\n --submap-shadow: #38bdf8 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #06b6d4;\r\n --node-bg: #e0f2fe50;\r\n --node-selected-stroke: #0369a1;\r\n --node-editable-bg: #f0f9ff40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #7dd3fc;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #bae6fd80 0%, #a5f3fc80 50%, #cffafe80 100%);\r\n --scope-border: 2px solid #0ea5e9;\r\n --scope-shadow: 0px 0px 14px #0ea5e999;\r\n --scope-item-bg: linear-gradient(135deg, #e0f2fecf 0%, #cffafecf 50%, #ecfeff cf 100%);\r\n --scope-item-border: 1px solid #38bdf8;\r\n --scope-item-color: #0c2340;\r\n --scope-item-shadow: 0px 0px 8px #0ea5e955;\r\n --scope-icon-color: #0c2340;\r\n --scope-icon-shadow: 0px 0px 10px #0369a1;\r\n --scope-icon-hover-color: #fb923c;\r\n --scope-icon-hover-shadow: 0px 0px 10px #fb923c;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #bae6fdcc;\r\n --postil-text-color: #0369a1;\r\n --postil-text-box-bg: rgb(224 242 254 / 0.85);\r\n --postil-text-icon-close-bg: #7dd3fca3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #0ea5e9;\r\n --table-cell-bg: #e0f2fe80;\r\n --table-cell-selection-bg: #0ea5e93a;\r\n --table-cell-active-bg: #06b6d440;\r\n --table-title-bg: #7dd3fc80;\r\n --table-dragger-bg: #f0faff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0ea5e98c;\r\n --annotation-bg: #f0faff85;\r\n --annotation-box-bg: #e0f2fec2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #bae6fd5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #e0f2fecc;\r\n --box-columns-layout-item-hover-color: #0369a1;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #bae6fd70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e0f2fe70;\r\n --code-tabbar-item-bg: #7dd3fc68;\r\n --code-tabbar-item-color: #38bdf878;\r\n --code-tabbar-item-active-color: #0c2340;\r\n --code-tabbar-item-active-bg: #7dd3fc78;\r\n --code-tabbar-item-active-border: 1px dashed #0369a1;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #fb923c;\r\n --code-tooltip-bg: #0c2340;\r\n --code-tooltip-color: #bae6fdcc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #0369a1;\r\n --code-input-color: #0c2340;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #0ea5e991;\r\n --list-item-bg: #e0f2fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #e0f2fead;\r\n --todoitem-status-border: 1px dashed #0369a1;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #0ea5e9;\r\n --todoitem-done-color: #7dd3fc;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #e0f2fe80;\r\n --img-load-failed-color: #7dd3fc80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #bae6fd7d;\r\n --tip-border: 1px solid #0ea5e980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e0f2fe70;\r\n --detail-even-bg: #ecfeff70;\r\n --detail-adder-bg: #e0f2fe40;\r\n --detail-list-border: 1px dashed #7dd3fc;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #bae6fd80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f0faff;\r\n --text-link-box-bg: #e0f2fe;\r\n --text-link-bg: #bae6fd;\r\n --text-link-color: #0c2340;\r\n --text-link-icon-hover-bg: #0ea5e9;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #38bdf8;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #e0f2fe30;\r\n --line-hover-bg: #e0f2fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #0ea5e9;\r\n --box-bg: #bae6fd40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0ea5e9cc, #06b6d4c2);\r\n --box-root-dragger-bg: #38bdf8;\r\n --box-root-fold-bg: #0c2340;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #a5f3fc80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0369a1;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0369a1;\r\n\r\n --box-folder-tag-active-border: 2px solid #0369a1;\r\n --box-folder-tag-active-bg: #0369a1;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #0ea5e9;\r\n\r\n --box-folder-border: 2px dashed #0369a1a8;\r\n --box-folder-active-bg: #bae6fd80;\r\n --box-folder-active-border: 1px solid #0369a1;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fef9c3;\r\n --api-functions-color-light: #fef9c366;\r\n --api-functions-type-bg: #fef9c3;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fb923c69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #020d1a;\r\n --color: #bae6fd;\r\n\r\n --selection-bg: #0369a1;\r\n --selection-color: #f0f9ff;\r\n --ui-scrollbar-thumb-bg: #075985;\r\n --ui-close-corner-bg: #38bdf8;\r\n --cube-bg: #051525;\r\n --cube-toolbar-bg: #071e30;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #05152599;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #075985cc, #0c4a6ecc);\r\n --float-node-layout-usable-color: #bae6fd;\r\n --float-node-layout-disable-color: #075985;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #0ea5e9cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #031220cc;\r\n --menu-title-bg: linear-gradient(45deg, #0c4a6ecc, #164e63cc);\r\n --menu-title-icon-color: #38bdf8;\r\n --menu-item-color: #bae6fd;\r\n --menu-item-bg-hover: #071e30cc;\r\n --menu-item-active-color: #38bdf8;\r\n --menu-shortcut-color: #075985;\r\n --menu-item-disable-color: #0a3050;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.55);\r\n --menu-dialog-input-border: 1px solid #075985cc;\r\n --menu-dialog-bg: #031220cc;\r\n --menu-dialog-color: #bae6fd;\r\n\r\n --submenu-node-line-header-bg: #05152533;\r\n --submenu-node-line-header-color: #7dd3fccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #38bdf8;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #020d1a;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #0369a166;\r\n --map-mini-bg: rgba(2, 13, 26, 0.92);\r\n --map-mini-border: #0c4a6e50;\r\n --map-mini-title-color: #38bdf880;\r\n\r\n --placeholder-box-selector-fill: #0ea5e922;\r\n --placeholder-box-selector-stroke: #38bdf899;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #020d1a40;\r\n --submap-shadow: #0ea5e9a1 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #06b6d4;\r\n --node-bg: #05152540;\r\n --node-selected-stroke: #38bdf8de;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #075985;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #0c4a6eb3 0%, #164e63b3 50%, #0c2a3fb3 100%);\r\n --scope-border: 2px solid #0ea5e9;\r\n --scope-shadow: 0px 0px 18px #0ea5e9aa;\r\n --scope-item-bg: linear-gradient(135deg, #0c4a6ee6 0%, #164e63e6 50%, #07315ae6 100%);\r\n --scope-item-border: 1px solid #38bdf8d9;\r\n --scope-item-color: #e0f2fe;\r\n --scope-item-shadow: 0px 0px 10px #0ea5e966;\r\n --scope-icon-color: #bae6fd;\r\n --scope-icon-shadow: 0px 0px 12px #38bdf8;\r\n --scope-icon-hover-color: #fb923c;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fb923c;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #051525cc;\r\n --postil-text-color: #38bdf8;\r\n --postil-text-box-bg: #05152580;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #38bdf8;\r\n --table-cell-bg: #05152570;\r\n --table-cell-selection-bg: #0369a18a;\r\n --table-cell-active-bg: #075985a0;\r\n --table-title-bg: #0c4a6ed0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #051525cc;\r\n --box-columns-layout-item-hover-color: #38bdf8;\r\n --box-columns-block-bg: #05152570;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0ea5e98c;\r\n --annotation-bg: #051525bf;\r\n --annotation-box-bg: #071e30c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #0369a178;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #051525a8;\r\n --code-tabbar-item-bg: #071e30a0;\r\n --code-tabbar-item-color: #38bdf8;\r\n --code-tabbar-item-active-color: #7dd3fc;\r\n --code-tabbar-item-active-bg: #071e3078;\r\n --code-tabbar-item-active-border: 1px dashed #38bdf8;\r\n --code-toolbar-bg: #05152547;\r\n --code-toolbar-item-hover-color: #06b6d4;\r\n --code-tooltip-bg: rgb(3 105 161 / 60%);\r\n --code-tooltip-color: #bae6fdcc;\r\n --code-input-border: 1px dashed #38bdf8;\r\n --code-input-color: #bae6fd;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #05152570;\r\n --list-ordered-symbol-hover-bg: #0369a191;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #051525ad;\r\n --todoitem-status-border: 1px dashed #075985;\r\n --todoitem-status-active-color: #f0f9ff;\r\n --todoitem-status-active-bg: #0369a1;\r\n --todoitem-done-color: #075985;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #05152580;\r\n --img-load-failed-color: #07598580;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0c4a6e7d;\r\n --tip-border: 1px solid #0ea5e980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #05152570;\r\n --detail-even-bg: #071e3070;\r\n --detail-adder-bg: #05152540;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #0369a14a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #031220ad;\r\n --text-link-box-bg: #051525c9;\r\n --text-link-bg: #071e30cc;\r\n --text-link-color: #bae6fde8;\r\n --text-link-icon-hover-bg: #0369a180;\r\n --text-link-icon-hover-color: #38bdf8e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #0369a1b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #05152530;\r\n --line-hover-bg: #05152530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #0ea5e9;\r\n --box-bg: #05152540;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0369a1cc, #0891b2c2);\r\n --box-root-dragger-bg: #38bdf8;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #bae6fd;\r\n --box-root-drag-enter-bg: #07598580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0369a1;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #0ea5e9;\r\n\r\n --box-folder-tag-active-border: 2px solid #0369a1;\r\n --box-folder-tag-active-bg: #0369a1;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #0ea5e9;\r\n\r\n --box-folder-border: 2px dashed #0369a1a8;\r\n --box-folder-active-bg: #07598580;\r\n --box-folder-active-border: 1px solid #0ea5e9;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #38bdf811;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #38bdf8;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #06b6d411;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #06b6d4;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},neon:{name:"霓虹",css:'\ufeff/* ————————————————— Neon Theme ————————————————— */\r\n/* 霓虹主题:亮色以清冷白底衬托荧光配色,暗色完全释放赛博朋克气质 */\r\n/* 电青 #00e5ff / 洋红 #ff00aa / 荧光绿 #39ff14 / 深夜 #07000f */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f5f0ff;\r\n --color: #0d001f;\r\n\r\n --selection-bg: #00c8e6;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #b3e0ff;\r\n --ui-close-corner-bg: #0099bb;\r\n --cube-bg: #e8f0ff30;\r\n --cube-toolbar-bg: #d0e8ff30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #eef4ff99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #00c8e6cc, #cc00aacc);\r\n --float-node-layout-usable-color: #0d001f;\r\n --float-node-layout-disable-color: #b3e0ffcc;\r\n --float-node-layout-shadow: 0px 0px 6px #b3e0ff88;\r\n --float-node-layout-shadow-hover: 0px 0px 10px #00c8e6bb;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f8f0ffcc;\r\n --menu-title-bg: linear-gradient(45deg, #c0e8ffcc, #ffc0f0cc);\r\n --menu-title-icon-color: #0099bb;\r\n --menu-item-color: #0d001f;\r\n --menu-item-bg-hover: #e8f0ff;\r\n --menu-item-active-color: #0099bb;\r\n --menu-shortcut-color: #00c8e6;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #c0e8ff;\r\n --menu-dialog-mask-bg: rgba(0, 153, 187, 0.12);\r\n --menu-dialog-input-border: 1px solid #b3e0ff;\r\n --menu-dialog-bg: #f8f0ff;\r\n --menu-dialog-color: #0d001f;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #e8f0ffcc;\r\n --submenu-node-line-header-color: #006680cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0099bb;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f8f0ff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #b3e0ffcc;\r\n --map-mini-bg: rgba(248, 240, 255, 0.95);\r\n --map-mini-border: #a5f3fc;\r\n --map-mini-title-color: #06b6d4;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #00c8e633;\r\n --placeholder-box-selector-stroke: #0099bb;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e8f0ff30;\r\n --submap-shadow: #00c8e6 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #00c8e6;\r\n --node-bg: #e8f0ff50;\r\n --node-selected-stroke: #0099bb;\r\n --node-editable-bg: #f5f0ff40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.18));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #b3e0ff;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #c0e8ff80 0%, #ffc0f080 50%, #c0ffd880 100%);\r\n --scope-border: 2px solid #00c8e6;\r\n --scope-shadow: 0px 0px 16px #00c8e699;\r\n --scope-item-bg: linear-gradient(135deg, #e0f4ffcf 0%, #ffe0f8cf 50%, #e0ffeccf 100%);\r\n --scope-item-border: 1px solid #00c8e6;\r\n --scope-item-color: #0d001f;\r\n --scope-item-shadow: 0px 0px 8px #00c8e655;\r\n --scope-icon-color: #0d001f;\r\n --scope-icon-shadow: 0px 0px 10px #0099bb;\r\n --scope-icon-hover-color: #cc00aa;\r\n --scope-icon-hover-shadow: 0px 0px 10px #cc00aa;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #c0e8ffcc;\r\n --postil-text-color: #0099bb;\r\n --postil-text-box-bg: rgb(232 240 255 / 0.85);\r\n --postil-text-icon-close-bg: #b3e0ffa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #00c8e6;\r\n --table-cell-bg: #e8f0fe80;\r\n --table-cell-selection-bg: #00c8e63a;\r\n --table-cell-active-bg: #cc00aa20;\r\n --table-title-bg: #b3e0ff80;\r\n --table-dragger-bg: #f8f0ff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #00c8e68c;\r\n --annotation-bg: #f8f0ff85;\r\n --annotation-box-bg: #e8f0ffc2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #c0e8ff5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #e8f0ffcc;\r\n --box-columns-layout-item-hover-color: #0099bb;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #c0e8ff70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e8f0ff70;\r\n --code-tabbar-item-bg: #b3e0ff68;\r\n --code-tabbar-item-color: #00c8e678;\r\n --code-tabbar-item-active-color: #0d001f;\r\n --code-tabbar-item-active-bg: #b3e0ff78;\r\n --code-tabbar-item-active-border: 1px dashed #0099bb;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #cc00aa;\r\n --code-tooltip-bg: #0d001f;\r\n --code-tooltip-color: #c0e8ffcc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #0099bb;\r\n --code-input-color: #0d001f;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #00c8e691;\r\n --list-item-bg: #e8f0fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #e8f0fead;\r\n --todoitem-status-border: 1px dashed #0099bb;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #00c8e6;\r\n --todoitem-done-color: #b3e0ff;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #e8f0fe80;\r\n --img-load-failed-color: #b3e0ff80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #c0e8ff7d;\r\n --tip-border: 1px solid #00c8e680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e8f0fe70;\r\n --detail-even-bg: #ffe8fc70;\r\n --detail-adder-bg: #e8f0fe40;\r\n --detail-list-border: 1px dashed #b3e0ff;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #c0e8ff80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f8f0ff;\r\n --text-link-box-bg: #e8f0ff;\r\n --text-link-bg: #c0e8ff;\r\n --text-link-color: #0d001f;\r\n --text-link-icon-hover-bg: #00c8e6;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #80ddf0;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #e8f0fe30;\r\n --line-hover-bg: #e8f0fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #00c8e6;\r\n --box-bg: #c0e8ff40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #00c8e6cc, #cc00aacc);\r\n --box-root-dragger-bg: #00c8e6;\r\n --box-root-fold-bg: #0d001f;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #c0ffd880;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0099bb;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0099bb;\r\n\r\n --box-folder-tag-active-border: 2px solid #0099bb;\r\n --box-folder-tag-active-bg: #0099bb;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #00c8e6;\r\n\r\n --box-folder-border: 2px dashed #0099bba8;\r\n --box-folder-active-bg: #c0e8ff80;\r\n --box-folder-active-border: 1px solid #0099bb;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #c0ffd8;\r\n --api-functions-color-light: #c0ffd866;\r\n --api-functions-type-bg: #c0ffd8;\r\n --api-functions-type-color: #065f46cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #c0e8ff;\r\n --api-arguments-color-light: #c0e8ff66;\r\n --api-arguments-type-bg: #c0e8ff;\r\n --api-arguments-type-color: #075985cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #ffc0f0;\r\n --api-exceptions-color-light: #ffc0f066;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #07000f;\r\n --color: #00e5ff;\r\n\r\n --selection-bg: #00aacc;\r\n --selection-color: #07000f;\r\n --ui-scrollbar-thumb-bg: #003344;\r\n --ui-close-corner-bg: #00e5ff;\r\n --cube-bg: #0d001f;\r\n --cube-toolbar-bg: #12003055;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #0d001f99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #00aacc cc, #aa0088cc);\r\n --float-node-layout-usable-color: #00e5ff;\r\n --float-node-layout-disable-color: #003344;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 12px #00e5ffaa;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #09001acc;\r\n --menu-title-bg: linear-gradient(45deg, #003344cc, #330033cc);\r\n --menu-title-icon-color: #00e5ff;\r\n --menu-item-color: #00e5ff;\r\n --menu-item-bg-hover: #110022cc;\r\n --menu-item-active-color: #00e5ff;\r\n --menu-shortcut-color: #004455;\r\n --menu-item-disable-color: #110033;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.65);\r\n --menu-dialog-input-border: 1px solid #00445566;\r\n --menu-dialog-bg: #09001acc;\r\n --menu-dialog-color: #00e5ff;\r\n\r\n --submenu-node-line-header-bg: #0d001f33;\r\n --submenu-node-line-header-color: #00c8e6cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #00e5ff;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #07000f;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 12px #00e5ff55;\r\n --map-mini-bg: rgba(7, 0, 15, 0.92);\r\n --map-mini-border: #164e6350;\r\n --map-mini-title-color: #00e5ff70;\r\n\r\n --placeholder-box-selector-fill: #00e5ff18;\r\n --placeholder-box-selector-stroke: #00e5ff88;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #07000f40;\r\n --submap-shadow: #00e5ff 0px 0px 14px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #00e5ff;\r\n --node-bg: #0d001f40;\r\n --node-selected-stroke: #00e5ffdd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #003344;\r\n --linker-filter: drop-shadow(0px 0px 2px #00e5ff66);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #003344b3 0%, #330033b3 50%, #003322b3 100%);\r\n --scope-border: 2px solid #00e5ff;\r\n --scope-shadow: 0px 0px 20px #00e5ffaa;\r\n --scope-item-bg: linear-gradient(135deg, #003344e6 0%, #330033e6 50%, #003322e6 100%);\r\n --scope-item-border: 1px solid #00e5ffd9;\r\n --scope-item-color: #ccffff;\r\n --scope-item-shadow: 0px 0px 12px #00e5ff66;\r\n --scope-icon-color: #00e5ff;\r\n --scope-icon-shadow: 0px 0px 14px #00e5ff;\r\n --scope-icon-hover-color: #ff00aa;\r\n --scope-icon-hover-shadow: 0px 0px 14px #ff00aa;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 30px #0d001fcc;\r\n --postil-text-color: #00e5ff;\r\n --postil-text-box-bg: #0d001f80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #00e5ff;\r\n --table-cell-bg: #0d001f70;\r\n --table-cell-selection-bg: #00aacc8a;\r\n --table-cell-active-bg: #aa008855;\r\n --table-title-bg: #003344d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #0d001fcc;\r\n --box-columns-layout-item-hover-color: #00e5ff;\r\n --box-columns-block-bg: #0d001f70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #00e5ff55;\r\n --annotation-bg: #0d001fbf;\r\n --annotation-box-bg: #110022c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #00aacc55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #0d001fa8;\r\n --code-tabbar-item-bg: #110022a0;\r\n --code-tabbar-item-color: #00c8e6;\r\n --code-tabbar-item-active-color: #00e5ff;\r\n --code-tabbar-item-active-bg: #11002278;\r\n --code-tabbar-item-active-border: 1px dashed #00e5ff;\r\n --code-toolbar-bg: #0d001f47;\r\n --code-toolbar-item-hover-color: #ff00aa;\r\n --code-tooltip-bg: rgb(0 170 204 / 40%);\r\n --code-tooltip-color: #ccffffcc;\r\n --code-input-border: 1px dashed #00e5ff;\r\n --code-input-color: #00e5ff;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #0d001f70;\r\n --list-ordered-symbol-hover-bg: #00aacc91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #0d001fad;\r\n --todoitem-status-border: 1px dashed #003344;\r\n --todoitem-status-active-color: #07000f;\r\n --todoitem-status-active-bg: #00e5ff;\r\n --todoitem-done-color: #003344;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #0d001f80;\r\n --img-load-failed-color: #00334480;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0033447d;\r\n --tip-border: 1px solid #00e5ff80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #0d001f70;\r\n --detail-even-bg: #11002270;\r\n --detail-adder-bg: #0d001f40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #00aacc3a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #09001aad;\r\n --text-link-box-bg: #0d001fc9;\r\n --text-link-bg: #110022cc;\r\n --text-link-color: #00e5ffe8;\r\n --text-link-icon-hover-bg: #00aacc55;\r\n --text-link-icon-hover-color: #00e5ffe0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #00aaccb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #0d001f30;\r\n --line-hover-bg: #0d001f30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #00e5ff;\r\n --box-bg: #0d001f40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #00aacc cc, #aa0088cc);\r\n --box-root-dragger-bg: #00e5ff;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #00e5ff;\r\n --box-root-drag-enter-bg: #003322a0;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #00e5ff;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 10px #00e5ff;\r\n\r\n --box-folder-tag-active-border: 2px solid #00aacc;\r\n --box-folder-tag-active-bg: #00aacc;\r\n --box-folder-tag-active-shadow: 0px 0px 14px #00e5ff;\r\n\r\n --box-folder-border: 2px dashed #00e5ffa8;\r\n --box-folder-active-bg: #003344a0;\r\n --box-folder-active-border: 1px solid #00e5ff;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #39ff1411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #39ff14;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #00e5ff11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #00e5ff;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #ff00aa11;\r\n --api-exceptions-border: 4px solid #ff00aa;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},forest:{name:"森林",css:'\ufeff/* ————————————————— Forest Theme ————————————————— */\r\n/* 森林主题:亮色以苔藓白+草地绿为基调,暗色深入林间深夜的幽静感 */\r\n/* 翠绿 #22c55e / 新芽 #84cc16 / 棕 #78350f / 苔藓白 #f7fee7 */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f7fee7;\r\n --color: #14290a;\r\n\r\n --selection-bg: #22c55e;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #86efac;\r\n --ui-close-corner-bg: #15803d;\r\n --cube-bg: #dcfce730;\r\n --cube-toolbar-bg: #bbf7d030;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #f0fdf499;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #22c55ecc, #84cc16cc);\r\n --float-node-layout-usable-color: #14290a;\r\n --float-node-layout-disable-color: #86efaccc;\r\n --float-node-layout-shadow: 0px 0px 6px #86efac88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #22c55ecc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f7fef0cc;\r\n --menu-title-bg: linear-gradient(45deg, #bbf7d0cc, #d9f99dcc);\r\n --menu-title-icon-color: #15803d;\r\n --menu-item-color: #14290a;\r\n --menu-item-bg-hover: #dcfce7;\r\n --menu-item-active-color: #15803d;\r\n --menu-shortcut-color: #4ade80;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #bbf7d0;\r\n --menu-dialog-mask-bg: rgba(21, 128, 61, 0.1);\r\n --menu-dialog-input-border: 1px solid #86efac;\r\n --menu-dialog-bg: #f7fef0;\r\n --menu-dialog-color: #14290a;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #dcfce7cc;\r\n --submenu-node-line-header-color: #166534cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #15803d;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f7fef0;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #86efaccc;\r\n --map-mini-bg: rgba(247, 254, 240, 0.95);\r\n --map-mini-border: #bbf7d0;\r\n --map-mini-title-color: #4ade80;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #22c55e33;\r\n --placeholder-box-selector-stroke: #15803d;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #dcfce730;\r\n --submap-shadow: #4ade80 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #4ade80;\r\n --node-bg: #dcfce750;\r\n --node-selected-stroke: #15803d;\r\n --node-editable-bg: #f0fdf440;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #86efac;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #bbf7d080 0%, #d9f99d80 50%, #dcfce780 100%);\r\n --scope-border: 2px solid #22c55e;\r\n --scope-shadow: 0px 0px 14px #22c55e99;\r\n --scope-item-bg: linear-gradient(135deg, #dcfce7cf 0%, #ecfccbcf 50%, #f0fdf4cf 100%);\r\n --scope-item-border: 1px solid #4ade80;\r\n --scope-item-color: #14290a;\r\n --scope-item-shadow: 0px 0px 8px #22c55e55;\r\n --scope-icon-color: #14290a;\r\n --scope-icon-shadow: 0px 0px 10px #15803d;\r\n --scope-icon-hover-color: #78350f;\r\n --scope-icon-hover-shadow: 0px 0px 10px #a16207;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #bbf7d0cc;\r\n --postil-text-color: #15803d;\r\n --postil-text-box-bg: rgb(220 252 231 / 0.85);\r\n --postil-text-icon-close-bg: #86efaca3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #22c55e;\r\n --table-cell-bg: #dcfce780;\r\n --table-cell-selection-bg: #22c55e3a;\r\n --table-cell-active-bg: #84cc1640;\r\n --table-title-bg: #86efac80;\r\n --table-dragger-bg: #f7fef075;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #22c55e8c;\r\n --annotation-bg: #f7fef085;\r\n --annotation-box-bg: #dcfce7c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #bbf7d05c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #dcfce7cc;\r\n --box-columns-layout-item-hover-color: #15803d;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #bbf7d070;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #dcfce770;\r\n --code-tabbar-item-bg: #86efac68;\r\n --code-tabbar-item-color: #4ade8078;\r\n --code-tabbar-item-active-color: #14290a;\r\n --code-tabbar-item-active-bg: #86efac78;\r\n --code-tabbar-item-active-border: 1px dashed #15803d;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #78350f;\r\n --code-tooltip-bg: #14290a;\r\n --code-tooltip-color: #bbf7d0cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #15803d;\r\n --code-input-color: #14290a;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #22c55e91;\r\n --list-item-bg: #dcfce770;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #dcfce7ad;\r\n --todoitem-status-border: 1px dashed #15803d;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #22c55e;\r\n --todoitem-done-color: #86efac;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #dcfce780;\r\n --img-load-failed-color: #86efac80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #bbf7d07d;\r\n --tip-border: 1px solid #22c55e80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #dcfce770;\r\n --detail-even-bg: #ecfccb70;\r\n --detail-adder-bg: #dcfce740;\r\n --detail-list-border: 1px dashed #86efac;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #bbf7d080;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f7fef0;\r\n --text-link-box-bg: #dcfce7;\r\n --text-link-bg: #bbf7d0;\r\n --text-link-color: #14290a;\r\n --text-link-icon-hover-bg: #22c55e;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #4ade80;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #dcfce730;\r\n --line-hover-bg: #dcfce730;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #22c55e;\r\n --box-bg: #bbf7d040;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #22c55ecc, #84cc16c2);\r\n --box-root-dragger-bg: #4ade80;\r\n --box-root-fold-bg: #14290a;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d9f99d80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #15803d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #15803d;\r\n\r\n --box-folder-tag-active-border: 2px solid #15803d;\r\n --box-folder-tag-active-bg: #15803d;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #22c55e;\r\n\r\n --box-folder-border: 2px dashed #15803da8;\r\n --box-folder-active-bg: #bbf7d080;\r\n --box-folder-active-border: 1px solid #15803d;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fef08a;\r\n --api-functions-color-light: #fef08a66;\r\n --api-functions-type-bg: #fef08a;\r\n --api-functions-type-color: #713f12cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #bbf7d0;\r\n --api-arguments-color-light: #bbf7d066;\r\n --api-arguments-type-bg: #bbf7d0;\r\n --api-arguments-type-color: #14532dcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #d9f99d69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #040e06;\r\n --color: #bbf7d0;\r\n\r\n --selection-bg: #15803d;\r\n --selection-color: #f0fdf4;\r\n --ui-scrollbar-thumb-bg: #14532d;\r\n --ui-close-corner-bg: #4ade80;\r\n --cube-bg: #071a0a;\r\n --cube-toolbar-bg: #0b2410;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #071a0a99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #14532dcc, #3a5c0acc);\r\n --float-node-layout-usable-color: #bbf7d0;\r\n --float-node-layout-disable-color: #14532d;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 10px #22c55ecc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #040e06cc;\r\n --menu-title-bg: linear-gradient(45deg, #14532dcc, #3a5c0acc);\r\n --menu-title-icon-color: #4ade80;\r\n --menu-item-color: #bbf7d0;\r\n --menu-item-bg-hover: #0b2410cc;\r\n --menu-item-active-color: #4ade80;\r\n --menu-shortcut-color: #14532d;\r\n --menu-item-disable-color: #0d2e12;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.55);\r\n --menu-dialog-input-border: 1px solid #14532dcc;\r\n --menu-dialog-bg: #040e06cc;\r\n --menu-dialog-color: #bbf7d0;\r\n\r\n --submenu-node-line-header-bg: #071a0a33;\r\n --submenu-node-line-header-color: #86efaccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #4ade80;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #040e06;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 12px #15803d66;\r\n --map-mini-bg: rgba(4, 14, 6, 0.92);\r\n --map-mini-border: #14532d50;\r\n --map-mini-title-color: #4ade8070;\r\n\r\n --placeholder-box-selector-fill: #22c55e18;\r\n --placeholder-box-selector-stroke: #4ade8099;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #040e0640;\r\n --submap-shadow: #22c55ea1 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #4ade80;\r\n --node-bg: #071a0a40;\r\n --node-selected-stroke: #22c55ede;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #14532d;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #14532db3 0%, #3a5c0ab3 50%, #1a4d20b3 100%);\r\n --scope-border: 2px solid #22c55e;\r\n --scope-shadow: 0px 0px 18px #22c55eaa;\r\n --scope-item-bg: linear-gradient(135deg, #14532de6 0%, #3a5c0ae6 50%, #15451be6 100%);\r\n --scope-item-border: 1px solid #4ade80d9;\r\n --scope-item-color: #ecfccb;\r\n --scope-item-shadow: 0px 0px 10px #22c55e66;\r\n --scope-icon-color: #bbf7d0;\r\n --scope-icon-shadow: 0px 0px 12px #4ade80;\r\n --scope-icon-hover-color: #fbbf24;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fbbf24;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #071a0acc;\r\n --postil-text-color: #4ade80;\r\n --postil-text-box-bg: #071a0a80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #4ade80;\r\n --table-cell-bg: #071a0a70;\r\n --table-cell-selection-bg: #15803d8a;\r\n --table-cell-active-bg: #3a5c0a82;\r\n --table-title-bg: #14532dd0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #071a0acc;\r\n --box-columns-layout-item-hover-color: #4ade80;\r\n --box-columns-block-bg: #071a0a70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #22c55e8c;\r\n --annotation-bg: #071a0abf;\r\n --annotation-box-bg: #0b2410c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #15803d78;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #071a0aa8;\r\n --code-tabbar-item-bg: #0b2410a0;\r\n --code-tabbar-item-color: #4ade80;\r\n --code-tabbar-item-active-color: #86efac;\r\n --code-tabbar-item-active-bg: #0b241078;\r\n --code-tabbar-item-active-border: 1px dashed #4ade80;\r\n --code-toolbar-bg: #071a0a47;\r\n --code-toolbar-item-hover-color: #84cc16;\r\n --code-tooltip-bg: rgb(21 128 61 / 50%);\r\n --code-tooltip-color: #dcfce7cc;\r\n --code-input-border: 1px dashed #4ade80;\r\n --code-input-color: #bbf7d0;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #071a0a70;\r\n --list-ordered-symbol-hover-bg: #15803d91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #071a0aad;\r\n --todoitem-status-border: 1px dashed #14532d;\r\n --todoitem-status-active-color: #f0fdf4;\r\n --todoitem-status-active-bg: #15803d;\r\n --todoitem-done-color: #14532d;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #071a0a80;\r\n --img-load-failed-color: #14532d80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #14532d7d;\r\n --tip-border: 1px solid #22c55e80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #071a0a70;\r\n --detail-even-bg: #0b240f70;\r\n --detail-adder-bg: #071a0a40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #15803d4a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #040e06ad;\r\n --text-link-box-bg: #071a0ac9;\r\n --text-link-bg: #0b2410cc;\r\n --text-link-color: #bbf7d0e8;\r\n --text-link-icon-hover-bg: #15803d80;\r\n --text-link-icon-hover-color: #4ade80e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #15803db5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #071a0a30;\r\n --line-hover-bg: #071a0a30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #22c55e;\r\n --box-bg: #071a0a40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #15803dcc, #3a5c0ac2);\r\n --box-root-dragger-bg: #4ade80;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #bbf7d0;\r\n --box-root-drag-enter-bg: #14532d80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #15803d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #22c55e;\r\n\r\n --box-folder-tag-active-border: 2px solid #15803d;\r\n --box-folder-tag-active-bg: #15803d;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #4ade80;\r\n\r\n --box-folder-border: 2px dashed #15803da8;\r\n --box-folder-active-bg: #14532d80;\r\n --box-folder-active-border: 1px solid #22c55e;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #84cc1611;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #84cc16;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #22c55e11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #22c55e;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},dusk:{name:"暮色",css:'\ufeff/* ————————————————— Dusk Theme ————————————————— */\r\n/* 暮色主题:亮色以暖橙→薰衣草渐变为基色,暗色呈现云霞与深夜交接的绮丽时刻 */\r\n/* 晚霞橙 #fb923c / 薰衣草 #c084fc / 玫红 #f43f5e / 深紫暮 #1a0030 */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fff8f0;\r\n --color: #2d0040;\r\n\r\n --selection-bg: #fb923c;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fdc8a0;\r\n --ui-close-corner-bg: #ea580c;\r\n --cube-bg: #fff1e630;\r\n --cube-toolbar-bg: #ffe4cc30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fff8f099;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #fb923ccc, #c084fccc);\r\n --float-node-layout-usable-color: #2d0040;\r\n --float-node-layout-disable-color: #fdc8a0cc;\r\n --float-node-layout-shadow: 0px 0px 6px #fdc8a088;\r\n --float-node-layout-shadow-hover: 0px 0px 10px #fb923ccc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #fff8f2cc;\r\n --menu-title-bg: linear-gradient(45deg, #fed7aacc, #e9d5ffcc);\r\n --menu-title-icon-color: #c2410c;\r\n --menu-item-color: #2d0040;\r\n --menu-item-bg-hover: #fff1e6;\r\n --menu-item-active-color: #c2410c;\r\n --menu-shortcut-color: #fb923c;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fde8d5;\r\n --menu-dialog-mask-bg: rgba(194, 65, 12, 0.10);\r\n --menu-dialog-input-border: 1px solid #fdc8a0;\r\n --menu-dialog-bg: #fff8f2;\r\n --menu-dialog-color: #2d0040;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fff1e6cc;\r\n --submenu-node-line-header-color: #9a3412cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #c2410c;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #fff8f2;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #fdc8a0cc;\r\n --map-mini-bg: rgba(255, 248, 242, 0.95);\r\n --map-mini-border: #fed7aa;\r\n --map-mini-title-color: #f97316;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #fb923c33;\r\n --placeholder-box-selector-stroke: #c2410c;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fff1e630;\r\n --submap-shadow: #fb923c 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #c084fc;\r\n --node-bg: #fff1e650;\r\n --node-selected-stroke: #c2410c;\r\n --node-editable-bg: #fff8f040;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fdc8a0;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fed7aa80 0%, #e9d5ff80 50%, #fecdd380 100%);\r\n --scope-border: 2px solid #fb923c;\r\n --scope-shadow: 0px 0px 14px #fb923c99;\r\n --scope-item-bg: linear-gradient(135deg, #fff1e6cf 0%, #f3e8ffcf 50%, #ffe4e6cf 100%);\r\n --scope-item-border: 1px solid #c084fc;\r\n --scope-item-color: #2d0040;\r\n --scope-item-shadow: 0px 0px 8px #fb923c55;\r\n --scope-icon-color: #2d0040;\r\n --scope-icon-shadow: 0px 0px 10px #c2410c;\r\n --scope-icon-hover-color: #7c3aed;\r\n --scope-icon-hover-shadow: 0px 0px 10px #7c3aed;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #fdc8a0cc;\r\n --postil-text-color: #c2410c;\r\n --postil-text-box-bg: rgb(255 241 230 / 0.85);\r\n --postil-text-icon-close-bg: #fdc8a0a3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fb923c;\r\n --table-cell-bg: #fff1e680;\r\n --table-cell-selection-bg: #fb923c3a;\r\n --table-cell-active-bg: #c084fc30;\r\n --table-title-bg: #fdc8a080;\r\n --table-dragger-bg: #fff8f275;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #fb923c8c;\r\n --annotation-bg: #fff8f285;\r\n --annotation-box-bg: #fff1e6c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fed7aa5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fff1e6cc;\r\n --box-columns-layout-item-hover-color: #c2410c;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fed7aa70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fff1e670;\r\n --code-tabbar-item-bg: #fdc8a068;\r\n --code-tabbar-item-color: #fb923c78;\r\n --code-tabbar-item-active-color: #2d0040;\r\n --code-tabbar-item-active-bg: #fdc8a078;\r\n --code-tabbar-item-active-border: 1px dashed #c2410c;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #c084fc;\r\n --code-tooltip-bg: #2d0040;\r\n --code-tooltip-color: #fed7aacc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #c2410c;\r\n --code-input-color: #2d0040;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #fb923c91;\r\n --list-item-bg: #fff1e670;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fff1e6ad;\r\n --todoitem-status-border: 1px dashed #c2410c;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #fb923c;\r\n --todoitem-done-color: #fdc8a0;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fff1e680;\r\n --img-load-failed-color: #fdc8a080;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fed7aa7d;\r\n --tip-border: 1px solid #fb923c80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fff1e670;\r\n --detail-even-bg: #f3e8ff70;\r\n --detail-adder-bg: #fff1e640;\r\n --detail-list-border: 1px dashed #fdc8a0;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fed7aa80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #fff8f2;\r\n --text-link-box-bg: #fff1e6;\r\n --text-link-bg: #fed7aa;\r\n --text-link-color: #2d0040;\r\n --text-link-icon-hover-bg: #fb923c;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #fdba74;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fff1e630;\r\n --line-hover-bg: #fff1e630;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #fb923c;\r\n --box-bg: #fed7aa40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #fb923ccc, #c084fcc2);\r\n --box-root-dragger-bg: #fb923c;\r\n --box-root-fold-bg: #2d0040;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #e9d5ff80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #c2410c;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #c2410c;\r\n\r\n --box-folder-tag-active-border: 2px solid #c2410c;\r\n --box-folder-tag-active-bg: #c2410c;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #fb923c;\r\n\r\n --box-folder-border: 2px dashed #c2410ca8;\r\n --box-folder-active-bg: #fed7aa80;\r\n --box-folder-active-border: 1px solid #c2410c;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fed7aa;\r\n --api-functions-color-light: #fed7aa66;\r\n --api-functions-type-bg: #fed7aa;\r\n --api-functions-type-color: #7c2d12cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #e9d5ff;\r\n --api-arguments-color-light: #e9d5ff66;\r\n --api-arguments-type-bg: #e9d5ff;\r\n --api-arguments-type-color: #4c1d95cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fecdd3;\r\n --api-exceptions-color-light: #fecdd366;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fda4af69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #100018;\r\n --color: #fde8d5;\r\n\r\n --selection-bg: #c2410c;\r\n --selection-color: #fff8f0;\r\n --ui-scrollbar-thumb-bg: #7c2d12;\r\n --ui-close-corner-bg: #fb923c;\r\n --cube-bg: #1a0028;\r\n --cube-toolbar-bg: #260035;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1a002899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #9a3412cc, #6b21a8cc);\r\n --float-node-layout-usable-color: #fde8d5;\r\n --float-node-layout-disable-color: #7c2d12;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 12px #fb923ccc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #150020cc;\r\n --menu-title-bg: linear-gradient(45deg, #7c2d12cc, #4c1d95cc);\r\n --menu-title-icon-color: #fb923c;\r\n --menu-item-color: #fde8d5;\r\n --menu-item-bg-hover: #260035cc;\r\n --menu-item-active-color: #fb923c;\r\n --menu-shortcut-color: #7c2d12;\r\n --menu-item-disable-color: #300040;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.55);\r\n --menu-dialog-input-border: 1px solid #7c2d12cc;\r\n --menu-dialog-bg: #150020cc;\r\n --menu-dialog-color: #fde8d5;\r\n\r\n --submenu-node-line-header-bg: #1a002833;\r\n --submenu-node-line-header-color: #fdc8a0cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #fb923c;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #100018;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 12px #c2410c66;\r\n --map-mini-bg: rgba(16, 0, 24, 0.92);\r\n --map-mini-border: #78350f50;\r\n --map-mini-title-color: #c2410c80;\r\n\r\n --placeholder-box-selector-fill: #fb923c18;\r\n --placeholder-box-selector-stroke: #fb923c99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #10001840;\r\n --submap-shadow: #fb923ca1 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #c084fc;\r\n --node-bg: #1a002840;\r\n --node-selected-stroke: #fb923cde;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #7c2d12;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #7c2d12b3 0%, #4c1d95b3 50%, #9a1642b3 100%);\r\n --scope-border: 2px solid #fb923c;\r\n --scope-shadow: 0px 0px 20px #fb923caa;\r\n --scope-item-bg: linear-gradient(135deg, #7c2d12e6 0%, #4c1d95e6 50%, #881337e6 100%);\r\n --scope-item-border: 1px solid #c084fcd9;\r\n --scope-item-color: #fff1e6;\r\n --scope-item-shadow: 0px 0px 12px #fb923c66;\r\n --scope-icon-color: #fde8d5;\r\n --scope-icon-shadow: 0px 0px 14px #fb923c;\r\n --scope-icon-hover-color: #c084fc;\r\n --scope-icon-hover-shadow: 0px 0px 14px #c084fc;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 30px #1a0028cc;\r\n --postil-text-color: #fb923c;\r\n --postil-text-box-bg: #1a002880;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fb923c;\r\n --table-cell-bg: #1a002870;\r\n --table-cell-selection-bg: #c2410c8a;\r\n --table-cell-active-bg: #4c1d9555;\r\n --table-title-bg: #7c2d12d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1a0028cc;\r\n --box-columns-layout-item-hover-color: #fb923c;\r\n --box-columns-block-bg: #1a002870;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #fb923c55;\r\n --annotation-bg: #1a0028bf;\r\n --annotation-box-bg: #260035c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #c2410c55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1a0028a8;\r\n --code-tabbar-item-bg: #260035a0;\r\n --code-tabbar-item-color: #fb923c;\r\n --code-tabbar-item-active-color: #fdc8a0;\r\n --code-tabbar-item-active-bg: #26003578;\r\n --code-tabbar-item-active-border: 1px dashed #fb923c;\r\n --code-toolbar-bg: #1a002847;\r\n --code-toolbar-item-hover-color: #c084fc;\r\n --code-tooltip-bg: rgb(194 65 12 / 50%);\r\n --code-tooltip-color: #fde8d5cc;\r\n --code-input-border: 1px dashed #fb923c;\r\n --code-input-color: #fde8d5;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1a002870;\r\n --list-ordered-symbol-hover-bg: #c2410c91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1a0028ad;\r\n --todoitem-status-border: 1px dashed #7c2d12;\r\n --todoitem-status-active-color: #fff8f0;\r\n --todoitem-status-active-bg: #c2410c;\r\n --todoitem-done-color: #7c2d12;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1a002880;\r\n --img-load-failed-color: #7c2d1280;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #7c2d127d;\r\n --tip-border: 1px solid #fb923c80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1a002870;\r\n --detail-even-bg: #26003570;\r\n --detail-adder-bg: #1a002840;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #c2410c4a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #150020ad;\r\n --text-link-box-bg: #1a0028c9;\r\n --text-link-bg: #260035cc;\r\n --text-link-color: #fde8d5e8;\r\n --text-link-icon-hover-bg: #c2410c70;\r\n --text-link-icon-hover-color: #fb923ce0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #c2410cb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1a002830;\r\n --line-hover-bg: #1a002830;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #fb923c;\r\n --box-bg: #1a002840;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #c2410ccc, #7c3aedc2);\r\n --box-root-dragger-bg: #fb923c;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fde8d5;\r\n --box-root-drag-enter-bg: #4c1d9580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #c2410c;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #fb923c;\r\n\r\n --box-folder-tag-active-border: 2px solid #c2410c;\r\n --box-folder-tag-active-bg: #c2410c;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #fb923c;\r\n\r\n --box-folder-border: 2px dashed #c2410ca8;\r\n --box-folder-active-bg: #7c2d1280;\r\n --box-folder-active-border: 1px solid #fb923c;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fb923c11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fb923c;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #c084fc11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #c084fc;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},midnight:{name:"暗夜",css:'\ufeff/* ————————————————— Midnight Theme · 暗夜 ————————————————— */\r\n/* 奢华靛紫 + 烁金点缀,亮色如羊皮纸,暗色如深渊夜宫 */\r\n/* 主色:宫廷靛 #3730a3 / 金箔 #d97706 / 暗夜 #08050f */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #faf8f2;\r\n --color: #1e1b4b;\r\n\r\n --selection-bg: #4338ca;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #c7d2fe;\r\n --ui-close-corner-bg: #4338ca;\r\n --cube-bg: #eeecff30;\r\n --cube-toolbar-bg: #e0dcff30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #eeecff99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #4338cacc, #d97706cc);\r\n --float-node-layout-usable-color: #1e1b4b;\r\n --float-node-layout-disable-color: #c7d2fecc;\r\n --float-node-layout-shadow: 0px 2px 8px #1e1b4b0a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #4338ca30;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #e0e7ffcc, #fef3c7cc);\r\n --menu-title-icon-color: #4338ca;\r\n --menu-item-color: #1e1b4b;\r\n --menu-item-bg-hover: #eeecff;\r\n --menu-item-active-color: #4338ca;\r\n --menu-shortcut-color: #a5b4fc;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #c7d2fe;\r\n --menu-dialog-mask-bg: rgba(30, 27, 75, 0.18);\r\n --menu-dialog-input-border: 1px solid #c7d2fe;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #1e1b4b;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #eeecffcc;\r\n --submenu-node-line-header-color: #6366f1cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #4338ca;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #1e1b4b12;\r\n --map-mini-bg: rgba(248, 248, 255, 0.95);\r\n --map-mini-border: #e0e7ff;\r\n --map-mini-title-color: #818cf8;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #4338ca18;\r\n --placeholder-box-selector-stroke: #4338ca;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e0e7ff40;\r\n --submap-shadow: #818cf8 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #818cf8;\r\n --node-bg: #eeecff70;\r\n --node-selected-stroke: #4338ca;\r\n --node-editable-bg: #faf8f240;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #c7d2fe;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #e0e7ff80 0%, #fef3c780 50%, #ede9fe80 100%);\r\n --scope-border: 2px solid #818cf8;\r\n --scope-shadow: 0px 0px 14px #4338ca40;\r\n --scope-item-bg: linear-gradient(135deg, #e8ecffcf 0%, #fdf6d8cf 50%, #ede9fecf 100%);\r\n --scope-item-border: 1px solid #818cf8;\r\n --scope-item-color: #1e1b4b;\r\n --scope-item-shadow: 0px 2px 10px #4338ca20;\r\n --scope-icon-color: #1e1b4b;\r\n --scope-icon-shadow: 0px 0px 8px #4338ca50;\r\n --scope-icon-hover-color: #d97706;\r\n --scope-icon-hover-shadow: 0px 0px 10px #d97706;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #1e1b4b14;\r\n --postil-text-color: #4338ca;\r\n --postil-text-box-bg: rgb(238 236 255 / 0.88);\r\n --postil-text-icon-close-bg: #c7d2fea3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #4338ca;\r\n --table-cell-bg: #eeecff80;\r\n --table-cell-selection-bg: #4338ca25;\r\n --table-cell-active-bg: #d9770620;\r\n --table-title-bg: #c7d2fe80;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #4338ca25;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #eeecffc2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #e0e7ff5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #e8ecffcc;\r\n --box-columns-layout-item-hover-color: #4338ca;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #e0e7ff70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #eeecff70;\r\n --code-tabbar-item-bg: #c7d2fe78;\r\n --code-tabbar-item-color: #6366f178;\r\n --code-tabbar-item-active-color: #1e1b4b;\r\n --code-tabbar-item-active-bg: #c7d2fe78;\r\n --code-tabbar-item-active-border: 1px solid #818cf8;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #d97706;\r\n --code-tooltip-bg: #1e1b4b;\r\n --code-tooltip-color: #c7d2fecc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #c7d2fe;\r\n --code-input-color: #1e1b4b;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #4338ca25;\r\n --list-item-bg: #eeecff70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #eeecffad;\r\n --todoitem-status-border: 1px solid #c7d2fe;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #4338ca;\r\n --todoitem-done-color: #a5b4fc;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #eeecff80;\r\n --img-load-failed-color: #c7d2fe80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #e0e7ff7d;\r\n --tip-border: 1px solid #818cf880;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #eeecff70;\r\n --detail-even-bg: #fef3c770;\r\n --detail-adder-bg: #eeecff40;\r\n --detail-list-border: 1px solid #c7d2fe;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #e0e7ff80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #eef0ff;\r\n --text-link-bg: #e0e7ff;\r\n --text-link-color: #1e1b4b;\r\n --text-link-icon-hover-bg: #4338ca;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #818cf8;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #e0e7ff30;\r\n --line-hover-bg: #e0e7ff30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #818cf8;\r\n --box-bg: #eeecff40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #4338cacc, #d97706c2);\r\n --box-root-dragger-bg: #818cf8;\r\n --box-root-fold-bg: #1e1b4b;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #e0e7ff80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #4338ca;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #4338ca40;\r\n\r\n --box-folder-tag-active-border: 2px solid #4338ca;\r\n --box-folder-tag-active-bg: #4338ca;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #4338ca60;\r\n\r\n --box-folder-border: 2px dashed #818cf880;\r\n --box-folder-active-bg: #e0e7ff80;\r\n --box-folder-active-border: 1px solid #4338ca;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #d97706;\r\n --api-functions-color-light: #d9770666;\r\n --api-functions-type-bg: #d97706;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #818cf8;\r\n --api-arguments-color-light: #818cf866;\r\n --api-arguments-type-bg: #818cf8;\r\n --api-arguments-type-color: #1e1b4bcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fef3c769;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #08050f;\r\n --color: #e0e7ff;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #4338ca;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #1e1b4b;\r\n --ui-close-corner-bg: #818cf8;\r\n --cube-bg: #1e1b4b30;\r\n --cube-toolbar-bg: #1e1b4b40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1e1b4b99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #312e81cc, #78350fcc);\r\n --float-node-layout-usable-color: #e0e7ff;\r\n --float-node-layout-disable-color: #1e1b4b;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #818cf840;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #0f0c1ecc;\r\n --menu-title-bg: linear-gradient(120deg, #1e1b4bcc, #2d1f0ecc);\r\n --menu-title-icon-color: #818cf8;\r\n --menu-item-color: #e0e7ff;\r\n --menu-item-bg-hover: #1e1b4bcc;\r\n --menu-item-active-color: #a5b4fc;\r\n --menu-shortcut-color: #312e81;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #1a1838;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.6);\r\n --menu-dialog-input-border: 1px solid #1e1b4b88;\r\n --menu-dialog-bg: #0f0c1ecc;\r\n --menu-dialog-color: #e0e7ff;\r\n\r\n --submenu-node-line-header-bg: #1e1b4b33;\r\n --submenu-node-line-header-color: #818cf8cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #a5b4fc;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #1e1b4bb3 0%, #2d1f0eb3 50%, #1a1838b3 100%);\r\n --scope-border: 2px solid #4338ca;\r\n --scope-shadow: 0px 0px 16px #4338ca80;\r\n --scope-item-bg: linear-gradient(135deg, #1e1b4be6 0%, #2d1f0ee6 50%, #1a1838e6 100%);\r\n --scope-item-border: 1px solid #818cf8d9;\r\n --scope-item-color: #c7d2fe;\r\n --scope-item-shadow: 0px 2px 12px #4338ca40;\r\n --scope-icon-color: #e0e7ff;\r\n --scope-icon-shadow: 0px 0px 10px #818cf8;\r\n --scope-icon-hover-color: #fbbf24;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fbbf24;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #08050f;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(8, 5, 15, 0.92);\r\n --map-mini-border: #1e1b4b50;\r\n --map-mini-title-color: #818cf880;\r\n --placeholder-box-selector-fill: #4338ca18;\r\n --placeholder-box-selector-stroke: #818cf899;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #08050f40;\r\n --submap-shadow: #4338ca80 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #818cf8;\r\n --node-bg: #1e1b4b40;\r\n --node-selected-stroke: #a5b4fcdd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #1e1b4b;\r\n --linker-filter: drop-shadow(0px 0px 2px #818cf855);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #818cf8;\r\n --postil-text-box-bg: #1e1b4b80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #a5b4fc;\r\n --table-cell-bg: #1e1b4b70;\r\n --table-cell-selection-bg: #4338ca3a;\r\n --table-cell-active-bg: #78350fa0;\r\n --table-title-bg: #1e1b4b90;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #1e1b4bcc;\r\n --box-columns-layout-item-hover-color: #a5b4fc;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #1e1b4b70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #4338ca30;\r\n --annotation-bg: #1e1b4bbf;\r\n --annotation-box-bg: #12103ac2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #1e1b4b55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1e1b4ba8;\r\n --code-tabbar-item-bg: #12103a80;\r\n --code-tabbar-item-color: #818cf8;\r\n --code-tabbar-item-active-color: #c7d2fe;\r\n --code-tabbar-item-active-bg: #12103a78;\r\n --code-tabbar-item-active-border: 1px solid #252058;\r\n --code-toolbar-bg: #1e1b4b47;\r\n --code-toolbar-item-hover-color: #fbbf24;\r\n --code-tooltip-bg: rgb(67 56 202 / 50%);\r\n --code-tooltip-color: #a5b4fccc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #1e1b4b88;\r\n --code-input-color: #c7d2fe;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1e1b4b70;\r\n --list-ordered-symbol-hover-bg: #4338ca40;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1e1b4bad;\r\n --todoitem-status-border: 1px solid #1e1b4b88;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #4338ca;\r\n --todoitem-done-color: #312e81;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1e1b4b80;\r\n --img-load-failed-color: #1e1b4b80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #1e1b4b7d;\r\n --tip-border: 1px solid #4338ca80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1e1b4b70;\r\n --detail-even-bg: #12103a70;\r\n --detail-adder-bg: #1e1b4b40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #1e1b4b50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #0f0c1ead;\r\n --text-link-box-bg: #1e1b4bc9;\r\n --text-link-bg: #1e1b4bcc;\r\n --text-link-color: #e0e7ffe8;\r\n --text-link-icon-hover-bg: #4338ca60;\r\n --text-link-icon-hover-color: #c7d2fee0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #4338cab5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1e1b4b30;\r\n --line-hover-bg: #1e1b4b30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #4338ca;\r\n --box-bg: #1e1b4b40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #4338cacc, #fbbf24c2);\r\n --box-root-dragger-bg: #818cf8;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #e0e7ff;\r\n --box-root-drag-enter-bg: #1e1b4b80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #4338ca;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #4338ca60;\r\n\r\n --box-folder-tag-active-border: 2px solid #4338ca;\r\n --box-folder-tag-active-bg: #4338ca;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #818cf8;\r\n\r\n --box-folder-border: 2px dashed #4338ca80;\r\n --box-folder-active-bg: #1e1b4b80;\r\n --box-folder-active-border: 1px solid #818cf8;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fbbf2411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fbbf24;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #818cf811;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #818cf8;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fbbf2469;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},crimson:{name:"赤焰",css:'\ufeff/* ————————————————— Crimson Theme · 赤焰 ————————————————— */\r\n/* 烈焰赤红 + 烬橙点缀,亮色如炙热晨纸,暗色如深渊熔岩熄灭后的余烬 */\r\n/* 主色:赤红 #dc2626 / 烬橙 #ea580c / 暗夜 #0c0202 */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fdf5f5;\r\n --color: #450a0a;\r\n\r\n --selection-bg: #dc2626;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fecaca;\r\n --ui-close-corner-bg: #dc2626;\r\n --cube-bg: #fee2e230;\r\n --cube-toolbar-bg: #fecaca30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fee2e299;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #dc2626cc, #ea580ccc);\r\n --float-node-layout-usable-color: #450a0a;\r\n --float-node-layout-disable-color: #fecacacc;\r\n --float-node-layout-shadow: 0px 2px 8px #450a0a0a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #dc262630;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #fee2e2cc, #ffedd5cc);\r\n --menu-title-icon-color: #dc2626;\r\n --menu-item-color: #450a0a;\r\n --menu-item-bg-hover: #fee2e2;\r\n --menu-item-active-color: #dc2626;\r\n --menu-shortcut-color: #f87171;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fecaca;\r\n --menu-dialog-mask-bg: rgba(69, 10, 10, 0.18);\r\n --menu-dialog-input-border: 1px solid #fecaca;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #450a0a;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fee2e2cc;\r\n --submenu-node-line-header-color: #b91c1ccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #dc2626;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #450a0a12;\r\n --map-mini-bg: rgba(255, 250, 250, 0.95);\r\n --map-mini-border: #fecaca;\r\n --map-mini-title-color: #f87171;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #dc262618;\r\n --placeholder-box-selector-stroke: #dc2626;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fee2e240;\r\n --submap-shadow: #f87171 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #f87171;\r\n --node-bg: #fee2e270;\r\n --node-selected-stroke: #dc2626;\r\n --node-editable-bg: #fdf5f540;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fecaca;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fee2e280 0%, #ffedd580 50%, #fecdd380 100%);\r\n --scope-border: 2px solid #f87171;\r\n --scope-shadow: 0px 0px 14px #dc262640;\r\n --scope-item-bg: linear-gradient(135deg, #fee2e2cf 0%, #ffedd5cf 50%, #fecdd3cf 100%);\r\n --scope-item-border: 1px solid #f87171;\r\n --scope-item-color: #450a0a;\r\n --scope-item-shadow: 0px 2px 10px #dc262620;\r\n --scope-icon-color: #450a0a;\r\n --scope-icon-shadow: 0px 0px 8px #dc262650;\r\n --scope-icon-hover-color: #ea580c;\r\n --scope-icon-hover-shadow: 0px 0px 10px #ea580c;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #450a0a14;\r\n --postil-text-color: #dc2626;\r\n --postil-text-box-bg: rgb(254 226 226 / 0.88);\r\n --postil-text-icon-close-bg: #fecacaa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #dc2626;\r\n --table-cell-bg: #fee2e280;\r\n --table-cell-selection-bg: #dc262625;\r\n --table-cell-active-bg: #ea580c20;\r\n --table-title-bg: #fecaca80;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #dc262625;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #fee2e2c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fecaca5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fee2e2cc;\r\n --box-columns-layout-item-hover-color: #dc2626;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fecaca70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fee2e270;\r\n --code-tabbar-item-bg: #fecaca78;\r\n --code-tabbar-item-color: #f8717178;\r\n --code-tabbar-item-active-color: #450a0a;\r\n --code-tabbar-item-active-bg: #fecaca78;\r\n --code-tabbar-item-active-border: 1px solid #f87171;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #ea580c;\r\n --code-tooltip-bg: #450a0a;\r\n --code-tooltip-color: #fecacacc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #fecaca;\r\n --code-input-color: #450a0a;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #dc262625;\r\n --list-item-bg: #fee2e270;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fee2e2ad;\r\n --todoitem-status-border: 1px solid #fecaca;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #dc2626;\r\n --todoitem-done-color: #f87171;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fee2e280;\r\n --img-load-failed-color: #fecaca80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fecaca7d;\r\n --tip-border: 1px solid #f8717180;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fee2e270;\r\n --detail-even-bg: #ffedd570;\r\n --detail-adder-bg: #fee2e240;\r\n --detail-list-border: 1px solid #fecaca;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fecaca80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #fff1f1;\r\n --text-link-bg: #fee2e2;\r\n --text-link-color: #450a0a;\r\n --text-link-icon-hover-bg: #dc2626;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #f87171;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fee2e230;\r\n --line-hover-bg: #fee2e230;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f87171;\r\n --box-bg: #fee2e240;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #dc2626cc, #ea580cc2);\r\n --box-root-dragger-bg: #f87171;\r\n --box-root-fold-bg: #450a0a;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #fee2e280;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #dc2626;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #dc262640;\r\n\r\n --box-folder-tag-active-border: 2px solid #dc2626;\r\n --box-folder-tag-active-bg: #dc2626;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #dc262660;\r\n\r\n --box-folder-border: 2px dashed #f8717180;\r\n --box-folder-active-bg: #fee2e280;\r\n --box-folder-active-border: 1px solid #dc2626;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #ea580c;\r\n --api-functions-color-light: #ea580c66;\r\n --api-functions-type-bg: #ea580c;\r\n --api-functions-type-color: #78350fcc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #dc2626;\r\n --api-arguments-color-light: #dc262666;\r\n --api-arguments-type-bg: #dc2626;\r\n --api-arguments-type-color: #ffffffcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffedd569;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #0c0202;\r\n --color: #fee2e2;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #dc2626;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #450a0a;\r\n --ui-close-corner-bg: #f87171;\r\n --cube-bg: #450a0a30;\r\n --cube-toolbar-bg: #450a0a40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #450a0a99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #991b1bcc, #7c2d12cc);\r\n --float-node-layout-usable-color: #fee2e2;\r\n --float-node-layout-disable-color: #450a0a;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #f8717140;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #1a0505cc;\r\n --menu-title-bg: linear-gradient(120deg, #450a0acc, #431407cc);\r\n --menu-title-icon-color: #f87171;\r\n --menu-item-color: #fee2e2;\r\n --menu-item-bg-hover: #450a0acc;\r\n --menu-item-active-color: #fca5a5;\r\n --menu-shortcut-color: #7f1d1d;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #2c0808;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.6);\r\n --menu-dialog-input-border: 1px solid #450a0a88;\r\n --menu-dialog-bg: #1a0505cc;\r\n --menu-dialog-color: #fee2e2;\r\n\r\n --submenu-node-line-header-bg: #450a0a33;\r\n --submenu-node-line-header-color: #f87171cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #fca5a5;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #450a0ab3 0%, #431407b3 50%, #3d1500b3 100%);\r\n --scope-border: 2px solid #dc2626;\r\n --scope-shadow: 0px 0px 18px #dc262680;\r\n --scope-item-bg: linear-gradient(135deg, #450a0ae6 0%, #431407e6 50%, #3d1500e6 100%);\r\n --scope-item-border: 1px solid #f87171d9;\r\n --scope-item-color: #fecaca;\r\n --scope-item-shadow: 0px 2px 12px #dc262640;\r\n --scope-icon-color: #fee2e2;\r\n --scope-icon-shadow: 0px 0px 10px #f87171;\r\n --scope-icon-hover-color: #fb923c;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fb923c;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #0c0202;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(12, 2, 2, 0.92);\r\n --map-mini-border: #7f1d1d50;\r\n --map-mini-title-color: #f8717170;\r\n\r\n --placeholder-box-selector-fill: #dc262618;\r\n --placeholder-box-selector-stroke: #f8717199;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #0c020240;\r\n --submap-shadow: #dc262680 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #f87171;\r\n --node-bg: #450a0a40;\r\n --node-selected-stroke: #fca5a5dd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #450a0a;\r\n --linker-filter: drop-shadow(0px 0px 2px #f8717155);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #f87171;\r\n --postil-text-box-bg: #450a0a80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fca5a5;\r\n --table-cell-bg: #450a0a70;\r\n --table-cell-selection-bg: #dc26263a;\r\n --table-cell-active-bg: #7c2d12a0;\r\n --table-title-bg: #450a0a90;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #450a0acc;\r\n --box-columns-layout-item-hover-color: #fca5a5;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #450a0a70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #dc262630;\r\n --annotation-bg: #450a0abf;\r\n --annotation-box-bg: #2c0808c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #991b1b55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #450a0aa8;\r\n --code-tabbar-item-bg: #2c080880;\r\n --code-tabbar-item-color: #f87171;\r\n --code-tabbar-item-active-color: #fecaca;\r\n --code-tabbar-item-active-bg: #2c080878;\r\n --code-tabbar-item-active-border: 1px solid #5c1010;\r\n --code-toolbar-bg: #450a0a47;\r\n --code-toolbar-item-hover-color: #fb923c;\r\n --code-tooltip-bg: rgb(220 38 38 / 50%);\r\n --code-tooltip-color: #fecacacc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #450a0a88;\r\n --code-input-color: #fecaca;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #450a0a70;\r\n --list-ordered-symbol-hover-bg: #dc262640;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #450a0aad;\r\n --todoitem-status-border: 1px solid #450a0a88;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #dc2626;\r\n --todoitem-done-color: #7f1d1d;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #450a0a80;\r\n --img-load-failed-color: #450a0a80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #450a0a7d;\r\n --tip-border: 1px solid #dc262680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #450a0a70;\r\n --detail-even-bg: #2c080870;\r\n --detail-adder-bg: #450a0a40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #450a0a50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #1a0505ad;\r\n --text-link-box-bg: #450a0ac9;\r\n --text-link-bg: #450a0acc;\r\n --text-link-color: #fee2e2e8;\r\n --text-link-icon-hover-bg: #dc262660;\r\n --text-link-icon-hover-color: #fecacae0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #dc2626b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #450a0a30;\r\n --line-hover-bg: #450a0a30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #dc2626;\r\n --box-bg: #450a0a40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #dc2626cc, #ea580cc2);\r\n --box-root-dragger-bg: #f87171;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fee2e2;\r\n --box-root-drag-enter-bg: #450a0a80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #dc2626;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #dc262660;\r\n\r\n --box-folder-tag-active-border: 2px solid #dc2626;\r\n --box-folder-tag-active-bg: #dc2626;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #f87171;\r\n\r\n --box-folder-border: 2px dashed #dc262680;\r\n --box-folder-active-bg: #450a0a80;\r\n --box-folder-active-border: 1px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fb923c11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fb923c;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #f8717111;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #f87171;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fb923c69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},jade:{name:"翡翠",css:'\ufeff/* ————————————————— Jade Theme · 翡翠 ————————————————— */\r\n/* 东方翡翠深绿 + 烁金点缀,亮色如玉白纸,暗色如深渊墨玉 */\r\n/* 主色:翡翠深 #065f46 / 翠玉 #10b981 / 金缕 #d97706 */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f0faf5;\r\n --color: #064e3b;\r\n\r\n --selection-bg: #059669;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #a7f3d0;\r\n --ui-close-corner-bg: #059669;\r\n --cube-bg: #d1fae530;\r\n --cube-toolbar-bg: #a7f3d030;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #d1fae599;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #059669cc, #d97706cc);\r\n --float-node-layout-usable-color: #064e3b;\r\n --float-node-layout-disable-color: #a7f3d0cc;\r\n --float-node-layout-shadow: 0px 2px 8px #064e3b0a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #05966930;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #d1fae5cc, #fef3c7cc);\r\n --menu-title-icon-color: #059669;\r\n --menu-item-color: #064e3b;\r\n --menu-item-bg-hover: #d1fae5;\r\n --menu-item-active-color: #059669;\r\n --menu-shortcut-color: #6ee7b7;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #a7f3d0;\r\n --menu-dialog-mask-bg: rgba(6, 78, 59, 0.18);\r\n --menu-dialog-input-border: 1px solid #a7f3d0;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #064e3b;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #d1fae5cc;\r\n --submenu-node-line-header-color: #047857cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #059669;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #064e3b12;\r\n --map-mini-bg: rgba(248, 255, 252, 0.95);\r\n --map-mini-border: #d1fae5;\r\n --map-mini-title-color: #6ee7b7;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #05966918;\r\n --placeholder-box-selector-stroke: #059669;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #d1fae540;\r\n --submap-shadow: #34d399 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #d1fae570;\r\n --node-selected-stroke: #059669;\r\n --node-editable-bg: #f0faf540;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #a7f3d0;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #d1fae580 0%, #fef3c780 50%, #a7f3d080 100%);\r\n --scope-border: 2px solid #34d399;\r\n --scope-shadow: 0px 0px 14px #05966940;\r\n --scope-item-bg: linear-gradient(135deg, #d1fae5cf 0%, #fef3c7cf 50%, #a7f3d0cf 100%);\r\n --scope-item-border: 1px solid #34d399;\r\n --scope-item-color: #064e3b;\r\n --scope-item-shadow: 0px 2px 10px #05966920;\r\n --scope-icon-color: #064e3b;\r\n --scope-icon-shadow: 0px 0px 8px #05966950;\r\n --scope-icon-hover-color: #d97706;\r\n --scope-icon-hover-shadow: 0px 0px 10px #d97706;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #064e3b14;\r\n --postil-text-color: #059669;\r\n --postil-text-box-bg: rgb(209 250 229 / 0.88);\r\n --postil-text-icon-close-bg: #a7f3d0a3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #059669;\r\n --table-cell-bg: #d1fae580;\r\n --table-cell-selection-bg: #05966925;\r\n --table-cell-active-bg: #d9770620;\r\n --table-title-bg: #a7f3d080;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #05966925;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #d1fae5c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #a7f3d05c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #d1fae5cc;\r\n --box-columns-layout-item-hover-color: #059669;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #a7f3d070;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #d1fae570;\r\n --code-tabbar-item-bg: #a7f3d078;\r\n --code-tabbar-item-color: #34d39978;\r\n --code-tabbar-item-active-color: #064e3b;\r\n --code-tabbar-item-active-bg: #a7f3d078;\r\n --code-tabbar-item-active-border: 1px solid #34d399;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #d97706;\r\n --code-tooltip-bg: #064e3b;\r\n --code-tooltip-color: #a7f3d0cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #a7f3d0;\r\n --code-input-color: #064e3b;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #05966925;\r\n --list-item-bg: #d1fae570;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #d1fae5ad;\r\n --todoitem-status-border: 1px solid #a7f3d0;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #059669;\r\n --todoitem-done-color: #6ee7b7;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #d1fae580;\r\n --img-load-failed-color: #a7f3d080;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #a7f3d07d;\r\n --tip-border: 1px solid #34d39980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #d1fae570;\r\n --detail-even-bg: #fef3c770;\r\n --detail-adder-bg: #d1fae540;\r\n --detail-list-border: 1px solid #a7f3d0;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #a7f3d080;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #ecfdf5;\r\n --text-link-bg: #d1fae5;\r\n --text-link-color: #064e3b;\r\n --text-link-icon-hover-bg: #059669;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #34d399;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #d1fae530;\r\n --line-hover-bg: #d1fae530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #34d399;\r\n --box-bg: #d1fae540;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #059669cc, #d97706c2);\r\n --box-root-dragger-bg: #34d399;\r\n --box-root-fold-bg: #064e3b;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d1fae580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #059669;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #05966940;\r\n\r\n --box-folder-tag-active-border: 2px solid #059669;\r\n --box-folder-tag-active-bg: #059669;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #05966960;\r\n\r\n --box-folder-border: 2px dashed #34d39980;\r\n --box-folder-active-bg: #d1fae580;\r\n --box-folder-active-border: 1px solid #059669;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #d97706;\r\n --api-functions-color-light: #d9770666;\r\n --api-functions-type-bg: #d97706;\r\n --api-functions-type-color: #78350fcc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #059669;\r\n --api-arguments-color-light: #05966966;\r\n --api-arguments-type-bg: #059669;\r\n --api-arguments-type-color: #ffffffcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fef3c769;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #030e07;\r\n --color: #d1fae5;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #059669;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #064e3b;\r\n --ui-close-corner-bg: #34d399;\r\n --cube-bg: #064e3b30;\r\n --cube-toolbar-bg: #064e3b40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #064e3b99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #065f46cc, #78350fcc);\r\n --float-node-layout-usable-color: #d1fae5;\r\n --float-node-layout-disable-color: #064e3b;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #34d39940;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #06150acc;\r\n --menu-title-bg: linear-gradient(120deg, #064e3bcc, #2d1f0ecc);\r\n --menu-title-icon-color: #34d399;\r\n --menu-item-color: #d1fae5;\r\n --menu-item-bg-hover: #064e3bcc;\r\n --menu-item-active-color: #6ee7b7;\r\n --menu-shortcut-color: #065f46;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #032208;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.6);\r\n --menu-dialog-input-border: 1px solid #064e3b88;\r\n --menu-dialog-bg: #06150acc;\r\n --menu-dialog-color: #d1fae5;\r\n\r\n --submenu-node-line-header-bg: #064e3b33;\r\n --submenu-node-line-header-color: #34d399cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #6ee7b7;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #064e3bb3 0%, #2d1f0eb3 50%, #022808b3 100%);\r\n --scope-border: 2px solid #059669;\r\n --scope-shadow: 0px 0px 18px #05966980;\r\n --scope-item-bg: linear-gradient(135deg, #064e3be6 0%, #2d1f0ee6 50%, #022808e6 100%);\r\n --scope-item-border: 1px solid #34d399d9;\r\n --scope-item-color: #a7f3d0;\r\n --scope-item-shadow: 0px 2px 12px #05966940;\r\n --scope-icon-color: #d1fae5;\r\n --scope-icon-shadow: 0px 0px 10px #34d399;\r\n --scope-icon-hover-color: #fbbf24;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fbbf24;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #030e07;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(3, 14, 7, 0.92);\r\n --map-mini-border: #064e3b50;\r\n --map-mini-title-color: #34d39980;\r\n\r\n --placeholder-box-selector-fill: #05966918;\r\n --placeholder-box-selector-stroke: #34d39999;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #030e0740;\r\n --submap-shadow: #05966980 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #064e3b40;\r\n --node-selected-stroke: #6ee7b7dd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #064e3b;\r\n --linker-filter: drop-shadow(0px 0px 2px #34d39955);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #34d399;\r\n --postil-text-box-bg: #064e3b80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #6ee7b7;\r\n --table-cell-bg: #064e3b70;\r\n --table-cell-selection-bg: #0596693a;\r\n --table-cell-active-bg: #78350fa0;\r\n --table-title-bg: #064e3b90;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #064e3bcc;\r\n --box-columns-layout-item-hover-color: #6ee7b7;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #064e3b70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #05966930;\r\n --annotation-bg: #064e3bbf;\r\n --annotation-box-bg: #042f1ac2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #06503c55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #064e3ba8;\r\n --code-tabbar-item-bg: #04301680;\r\n --code-tabbar-item-color: #34d399;\r\n --code-tabbar-item-active-color: #a7f3d0;\r\n --code-tabbar-item-active-bg: #04301678;\r\n --code-tabbar-item-active-border: 1px solid #0b5e34;\r\n --code-toolbar-bg: #064e3b47;\r\n --code-toolbar-item-hover-color: #fbbf24;\r\n --code-tooltip-bg: rgb(5 150 105 / 50%);\r\n --code-tooltip-color: #a7f3d0cc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #064e3b88;\r\n --code-input-color: #a7f3d0;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #064e3b70;\r\n --list-ordered-symbol-hover-bg: #05966940;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #064e3bad;\r\n --todoitem-status-border: 1px solid #064e3b88;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #059669;\r\n --todoitem-done-color: #065f46;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #064e3b80;\r\n --img-load-failed-color: #064e3b80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #064e3b7d;\r\n --tip-border: 1px solid #05966980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #064e3b70;\r\n --detail-even-bg: #04301670;\r\n --detail-adder-bg: #064e3b40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #064e3b50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #06150aad;\r\n --text-link-box-bg: #064e3bc9;\r\n --text-link-bg: #064e3bcc;\r\n --text-link-color: #d1fae5e8;\r\n --text-link-icon-hover-bg: #05966960;\r\n --text-link-icon-hover-color: #a7f3d0e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #059669b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #064e3b30;\r\n --line-hover-bg: #064e3b30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #059669;\r\n --box-bg: #064e3b40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #059669cc, #fbbf24c2);\r\n --box-root-dragger-bg: #34d399;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #d1fae5;\r\n --box-root-drag-enter-bg: #064e3b80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #059669;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #05966960;\r\n\r\n --box-folder-tag-active-border: 2px solid #059669;\r\n --box-folder-tag-active-bg: #059669;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #34d399;\r\n\r\n --box-folder-border: 2px dashed #05966980;\r\n --box-folder-active-bg: #064e3b80;\r\n --box-folder-active-border: 1px solid #34d399;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fbbf2411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fbbf24;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #34d39911;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #34d399;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fbbf2469;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},stardust:{name:"星尘",css:'\ufeff/* ————————————————— Stardust Theme · 星尘 ————————————————— */\r\n/* 宇宙星云:薰衣紫 + 星云粉,亮色如银河薄雾,暗色如虚空绽放的星云 */\r\n/* 主色:深紫 #6d28d9 / 星云粉 #db2777 / 虚空 #04000e */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f8f5ff;\r\n --color: #2e1065;\r\n\r\n --selection-bg: #7c3aed;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #ddd6fe;\r\n --ui-close-corner-bg: #7c3aed;\r\n --cube-bg: #ede9fe30;\r\n --cube-toolbar-bg: #ddd6fe30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #ede9fe99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #7c3aedcc, #db2777cc);\r\n --float-node-layout-usable-color: #2e1065;\r\n --float-node-layout-disable-color: #ddd6fecc;\r\n --float-node-layout-shadow: 0px 2px 8px #2e10650a;\r\n --float-node-layout-shadow-hover: 0px 4px 20px #7c3aed40;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #ede9fecc, #fce7f3cc);\r\n --menu-title-icon-color: #7c3aed;\r\n --menu-item-color: #2e1065;\r\n --menu-item-bg-hover: #ede9fe;\r\n --menu-item-active-color: #7c3aed;\r\n --menu-shortcut-color: #c4b5fd;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #ddd6fe;\r\n --menu-dialog-mask-bg: rgba(46, 16, 101, 0.18);\r\n --menu-dialog-input-border: 1px solid #ddd6fe;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #2e1065;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #ede9fecc;\r\n --submenu-node-line-header-color: #6d28d9cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #7c3aed;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #2e106514;\r\n --map-mini-bg: rgba(252, 248, 255, 0.95);\r\n --map-mini-border: #ddd6fe;\r\n --map-mini-title-color: #a78bfa;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #7c3aed18;\r\n --placeholder-box-selector-stroke: #7c3aed;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #ede9fe40;\r\n --submap-shadow: #a78bfa 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #a78bfa;\r\n --node-bg: #ede9fe70;\r\n --node-selected-stroke: #7c3aed;\r\n --node-editable-bg: #f8f5ff40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #ddd6fe;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #ede9fe80 0%, #fce7f380 50%, #ddd6fe80 100%);\r\n --scope-border: 2px solid #a78bfa;\r\n --scope-shadow: 0px 0px 16px #7c3aed50;\r\n --scope-item-bg: linear-gradient(135deg, #ede9fecf 0%, #fce7f3cf 50%, #ddd6fecf 100%);\r\n --scope-item-border: 1px solid #a78bfa;\r\n --scope-item-color: #2e1065;\r\n --scope-item-shadow: 0px 2px 12px #7c3aed25;\r\n --scope-icon-color: #2e1065;\r\n --scope-icon-shadow: 0px 0px 10px #7c3aed60;\r\n --scope-icon-hover-color: #db2777;\r\n --scope-icon-hover-shadow: 0px 0px 10px #db2777;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #2e106516;\r\n --postil-text-color: #7c3aed;\r\n --postil-text-box-bg: rgb(237 233 254 / 0.88);\r\n --postil-text-icon-close-bg: #ddd6fea3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #7c3aed;\r\n --table-cell-bg: #ede9fe80;\r\n --table-cell-selection-bg: #7c3aed25;\r\n --table-cell-active-bg: #db277720;\r\n --table-title-bg: #ddd6fe80;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #7c3aed25;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #ede9fec2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #ddd6fe5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #ede9fecc;\r\n --box-columns-layout-item-hover-color: #7c3aed;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #ddd6fe70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #ede9fe70;\r\n --code-tabbar-item-bg: #ddd6fe78;\r\n --code-tabbar-item-color: #a78bfa78;\r\n --code-tabbar-item-active-color: #2e1065;\r\n --code-tabbar-item-active-bg: #ddd6fe78;\r\n --code-tabbar-item-active-border: 1px solid #a78bfa;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #db2777;\r\n --code-tooltip-bg: #2e1065;\r\n --code-tooltip-color: #ddd6fecc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #ddd6fe;\r\n --code-input-color: #2e1065;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #7c3aed25;\r\n --list-item-bg: #ede9fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #ede9fead;\r\n --todoitem-status-border: 1px solid #ddd6fe;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #c4b5fd;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #ede9fe80;\r\n --img-load-failed-color: #ddd6fe80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #ddd6fe7d;\r\n --tip-border: 1px solid #a78bfa80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #ede9fe70;\r\n --detail-even-bg: #fce7f370;\r\n --detail-adder-bg: #ede9fe40;\r\n --detail-list-border: 1px solid #ddd6fe;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #ddd6fe80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #f5f3ff;\r\n --text-link-bg: #ede9fe;\r\n --text-link-color: #2e1065;\r\n --text-link-icon-hover-bg: #7c3aed;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #a78bfa;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #ede9fe30;\r\n --line-hover-bg: #ede9fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #a78bfa;\r\n --box-bg: #ede9fe40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #7c3aedcc, #db2777c2);\r\n --box-root-dragger-bg: #a78bfa;\r\n --box-root-fold-bg: #2e1065;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #ede9fe80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #7c3aed40;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #7c3aed60;\r\n\r\n --box-folder-border: 2px dashed #a78bfa80;\r\n --box-folder-active-bg: #ede9fe80;\r\n --box-folder-active-border: 1px solid #7c3aed;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #db2777;\r\n --api-functions-color-light: #db277766;\r\n --api-functions-type-bg: #db2777;\r\n --api-functions-type-color: #ffffffcc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #7c3aed;\r\n --api-arguments-color-light: #7c3aed66;\r\n --api-arguments-type-bg: #7c3aed;\r\n --api-arguments-type-color: #ffffffcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fce7f369;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #04000e;\r\n --color: #ede9fe;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #7c3aed;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #2e1065;\r\n --ui-close-corner-bg: #a78bfa;\r\n --cube-bg: #2e106530;\r\n --cube-toolbar-bg: #2e106540;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #2e106599;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #4c1d95cc, #831843cc);\r\n --float-node-layout-usable-color: #ede9fe;\r\n --float-node-layout-disable-color: #2e1065;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 20px #a78bfa50;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #0c0520cc;\r\n --menu-title-bg: linear-gradient(120deg, #2e1065cc, #500724cc);\r\n --menu-title-icon-color: #a78bfa;\r\n --menu-item-color: #ede9fe;\r\n --menu-item-bg-hover: #2e1065cc;\r\n --menu-item-active-color: #c4b5fd;\r\n --menu-shortcut-color: #3b0764;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #1a0840;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.65);\r\n --menu-dialog-input-border: 1px solid #2e106588;\r\n --menu-dialog-bg: #0c0520cc;\r\n --menu-dialog-color: #ede9fe;\r\n\r\n --submenu-node-line-header-bg: #2e106533;\r\n --submenu-node-line-header-color: #a78bfacc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #c4b5fd;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #2e1065b3 0%, #500724b3 50%, #1a0840b3 100%);\r\n --scope-border: 2px solid #7c3aed;\r\n --scope-shadow: 0px 0px 20px #7c3aed90;\r\n --scope-item-bg: linear-gradient(135deg, #2e1065e6 0%, #500724e6 50%, #1a0840e6 100%);\r\n --scope-item-border: 1px solid #a78bfad9;\r\n --scope-item-color: #ddd6fe;\r\n --scope-item-shadow: 0px 2px 14px #7c3aed50;\r\n --scope-icon-color: #ede9fe;\r\n --scope-icon-shadow: 0px 0px 12px #a78bfa;\r\n --scope-icon-hover-color: #f472b6;\r\n --scope-icon-hover-shadow: 0px 0px 14px #f472b6;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #04000e;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 14px #7c3aed30;\r\n --map-mini-bg: rgba(4, 0, 14, 0.92);\r\n --map-mini-border: #3b076450;\r\n --map-mini-title-color: #7c3aed80;\r\n\r\n --placeholder-box-selector-fill: #7c3aed18;\r\n --placeholder-box-selector-stroke: #a78bfa99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #04000e40;\r\n --submap-shadow: #7c3aed90 0px 0px 14px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #a78bfa;\r\n --node-bg: #2e106540;\r\n --node-selected-stroke: #c4b5fddd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #2e1065;\r\n --linker-filter: drop-shadow(0px 0px 3px #a78bfa66);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 30px #00000060;\r\n --postil-text-color: #a78bfa;\r\n --postil-text-box-bg: #2e106580;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #c4b5fd;\r\n --table-cell-bg: #2e106570;\r\n --table-cell-selection-bg: #7c3aed3a;\r\n --table-cell-active-bg: #831843a0;\r\n --table-title-bg: #2e106590;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #2e1065cc;\r\n --box-columns-layout-item-hover-color: #c4b5fd;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #2e106570;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #7c3aed35;\r\n --annotation-bg: #2e1065bf;\r\n --annotation-box-bg: #1a0840c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #2e106555;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #2e1065a8;\r\n --code-tabbar-item-bg: #1a084080;\r\n --code-tabbar-item-color: #a78bfa;\r\n --code-tabbar-item-active-color: #ddd6fe;\r\n --code-tabbar-item-active-bg: #1a084078;\r\n --code-tabbar-item-active-border: 1px solid #3b0764;\r\n --code-toolbar-bg: #2e106547;\r\n --code-toolbar-item-hover-color: #f472b6;\r\n --code-tooltip-bg: rgb(124 58 237 / 50%);\r\n --code-tooltip-color: #ddd6fecc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #2e106588;\r\n --code-input-color: #ddd6fe;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #2e106570;\r\n --list-ordered-symbol-hover-bg: #7c3aed40;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #2e1065ad;\r\n --todoitem-status-border: 1px solid #2e106588;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #3b0764;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #2e106580;\r\n --img-load-failed-color: #2e106580;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #2e10657d;\r\n --tip-border: 1px solid #7c3aed80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #2e106570;\r\n --detail-even-bg: #1a084070;\r\n --detail-adder-bg: #2e106540;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #2e106550;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #0c0520ad;\r\n --text-link-box-bg: #2e1065c9;\r\n --text-link-bg: #2e1065cc;\r\n --text-link-color: #ede9fee8;\r\n --text-link-icon-hover-bg: #7c3aed60;\r\n --text-link-icon-hover-color: #ddd6fee0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #7c3aedb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #2e106530;\r\n --line-hover-bg: #2e106530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #7c3aed;\r\n --box-bg: #2e106540;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #7c3aedcc, #f472b6c2);\r\n --box-root-dragger-bg: #a78bfa;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #ede9fe;\r\n --box-root-drag-enter-bg: #2e106580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 10px #7c3aed60;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 14px #a78bfa;\r\n\r\n --box-folder-border: 2px dashed #7c3aed80;\r\n --box-folder-active-bg: #2e106580;\r\n --box-folder-active-border: 1px solid #a78bfa;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #f472b611;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #f472b6;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #a78bfa11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #a78bfa;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #f472b669;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'}},wi=new Map;function ki(e){wi.set(e.meta.type,e)}class Si{_cubes=wi;_versions={};_note;_note_theme="default";_cube_versions=this.export_versions();get note(){return this._note}get clipboard(){return this._note?.clipboard}get courier(){return this._note?.courier}get history(){return this._note?.history}get cursor(){return this._note?.cursor}get event(){return this._note?.event}get listener(){return this._note?.listener}get painter(){return this._note?.painter}get cubes(){return this._note?.cubes}get config(){return this._note?.config}get stats(){return this._note?.stats}get hotkeys(){return this._note?.hotkeys}get versions_cube(){return{...this._cube_versions}}get versions(){const e=this.clipboard?.pasted_from?.versions;return e||this._versions}get metas(){const e=new Map;for(let[t,n]of this._cubes)e.set(t,n.meta);return e}get note_theme(){return this._note_theme}set note_theme(e){this._note_theme=e}get themes(){return Object.entries(yi).map(([e,{name:t,css:n}])=>({key:e,name:t,css:n}))}create(e){const t=structuredClone(e.versions||{});return this._versions=Object.freeze(t),e.type===k.Cubes.doc?this._note=new lu(e):e.type===k.Cubes.map?this._note=new oh(e):console.error(`NoteMeta: unrecognized note type ${e}`),this.note_theme=e.attrs.theme||"default",this.use_theme(this._note_theme),this._note}register_cube(e){const t=e.meta;t||console.error(`NoteMeta: can't find member meta in ${e}`),this._cubes.set(t.type,e)}find_cube(e){return this._cubes.get(e)}export_versions(){const e={[lu.meta.type]:lu.meta.version,[oh.meta.type]:oh.meta.version};for(const[t,n]of this._cubes)e[t]=n.meta.version;return e}get_sdk_meta(){return{version:"2.3.10",time_publish:1774919100468}}use_theme(e){const t=yi[e];if(!t)return console.error(`NoteMeta: unknown theme "${e}"`);this.note_theme=e;const n="deepsky-theme";let r=document.getElementById(n);r||(r=document.createElement("style"),r.setAttribute("data-theme",e),r.id=n,document.head.appendChild(r)),r.textContent=t.css,r.setAttribute("data-theme",e),window.dispatchEvent(new CustomEvent("deepsky:note-theme-change",{detail:{name:e,css:t.css}}))}}const Ci=new Si;class Mi{static insert_child(e,t,n){return{id:e,name:_.Names.cube_insert_child,data:t,pos:n}}static delete_child(e,t,n,r=!1){return{id:e,name:_.Names.cube_delete_child,dir:t,range:n,reserve:r}}static insert(e,t,n,r,o,i){return{id:e,name:_.Names.cube_insert,data:t,start_id:n,end_id:r,offset_end:i,offset_start:o}}static delete(e,t,n,r,o,i,s=!1){return{id:e,name:_.Names.cube_delete,dir:t,start_id:n,end_id:r,offset_start:o,offset_end:i,reserve:s}}static delete_adjacent(e,t,n,r){return{id:e,name:_.Names.cube_delete_adjacent,from:t,offset:r,from_id:n}}static set_selection_css(e,t,n,r,o,i,s=!1,a=!1){return{id:e,name:_.Names.cube_set_selection_css,css:t,start_id:n,end_id:r,offset_start:o,offset_end:i,toggle:s,replace:a}}static set_css(e,t,n=!1,r=!1){return{id:e,name:_.Names.cube_set_css,css:t,toggle:n,replace:r}}static partition(e,t,n,r,o){return{name:_.Names.cube_partition,id:e,start_id:t,end_id:n,offset_start:r,offset_end:o}}static reorder(e,t,n){return{id:e,name:_.Names.cube_reorder,cubeid:t,index:n}}static reset(e,t){return{id:e,name:_.Names.cube_reset,data:t}}static merge(e,t,n,r){return{id:e,name:_.Names.cube_merge,method:t,cubeid:n,offset:r}}static postil_add(e,t=[]){return{name:_.Names.cube_postil_add,id:e,data:t}}static postil_remove(e,t){return{name:_.Names.cube_postil_remove,id:e,range:t}}static set_attr(e,t){return{id:e,name:_.Names.cube_set_attr,attr:t}}static resize(e,t,n=-1){return n>0?this.set_attr(e,{width:t,height:n}):this.set_attr(e,{width:t})}static fold(e,t){return this.set_attr(e,{fold:t})}}class zi{static loc(e,t,n,r){return{name:g.Names.loc,id:e,from:n,from_offset:r,offset:t}}static in_head(e){return{id:e,name:g.Names.cursor_in_head}}static in_tail(e){return{id:e,name:g.Names.cursor_in_tail}}}const Ni=new Map;class Ai{static get_cmd_handler(e,t){const n=Ni.get(e);return n?.get(t)}static set_cmd_handler(e,t,n){let r=Ni.get(e);r?r.set(t,n):(r=new Map,r.set(t,n),Ni.set(e,r))}static init_cmd_handler(e){const t=e.meta,n=Ni.get(t.type);if(n)for(let[t,r]of n)e.set_cmd_handler_vip(t,r.bind(e))}}function Ti(e){return(t,n)=>{const r=t[n];if(!r)return;const o=t.meta;Ai.set_cmd_handler(o.type,e,r)}}class Ri{handler=new Map;handler_vip=new Map;constructor(){}on(e){const t=this.get_cmd_handler_vip(e.name)||this.get_cmd_handler(e.name);if(t)return t(e)}get_cmd_handler(e){return this.handler.get(e)}get_cmd_handler_vip(e){return this.handler_vip.get(e)}set_cmd_handler(e,t){this.handler.set(e,t)}set_cmd_handler_vip(e,t){this.handler_vip.set(e,t)}event_capture(e){return"pass"}event_bubble(e){return"pass"}static get_default(...e){throw Error("sub-cube have't implement get_default method")}static get meta(){throw Error("sub-cube have't implement attribution meta")}}class Pi extends bi{timer_float_check=!1;constructor(e){super(e),this.listen()}listen(){this.listen_esc()}listen_esc(){this.event.on_esc(()=>{const e=this.root.cubes.postils;for(let[t,n]of e)n.show&&(n.show=!1);this.root instanceof oh&&this.root.clear_node_editing();const t=this.root.cubes.get_types_cube(k.Cubes.submap);for(let[e,n]of t)n.clear_node_editing()})}check_float(){const{stats:e,cubes:t}=this.root;this.timer_float_check||requestAnimationFrame(()=>{let e=!0;for(let t of this.root.scopes.scopes)e=!1,t.update_area();for(let[n,r]of t.postils)r.show&&(e=!1,r.update_pos());e||this.check_float()})}}class Oi extends bi{_map={};_types=new Map;_count={};constructor(e){super(e)}get postils(){return this._types.get(k.Cubes.postil)||new Map}get meta(){return Oi.meta}get_types_cube(e){return this._types.get(e)||new Map}add_cube(e){const t=e.id,n=e.meta.type;void 0===this._count[t]?this._count[t]=1:this._count[t]++,this._map[t]=e;const r=this._types.get(n);r?r.set(t,e):this._types.set(n,Pt(new Map([[t,e]]))),e instanceof Wd&&e.show&&this.root.status.add_postil(e)}remove_cube(e){const t=e.id,n=e.meta.type;0===--this._count[t]&&(delete this._map[t],this._types.get(n)?.delete(t))}find_cube(e){return this._map[e]}find_postil(e){for(let t of Object.values(this.postils)){if(t.id===e)return t;const n=t.find_cube(e);if(n)return n}}clear_all_map_selected(){const e=this.get_types_cube(k.Cubes.submap);if(e)for(let[t,n]of e)n.clear_node_selected();this.root instanceof oh&&this.root.clear_node_selected()}static get meta(){return{type:k.Cores.cubes,version:1}}}function Ei(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}const Li=new Map;function Ii(e){return(t,n)=>{let r=t[n];Li.set(e,r)}}class Di extends bi{handlers=Rt(new Map);data;get meta(){return Di.meta}constructor(e){super(e),this.data=Rt(Di.default_hotkeys)}listen(e){this.listen_cursor_hotkey(e),this.listen_uncursor_hotkey(e),this.listen_cvx(e)}listen_cursor_hotkey(e){const t=this;e.addEventListener("keydown",e=>{const n=t.stats.mode,r=e.key.toLowerCase(),o=document.activeElement;let i=!1;if(n===k.Mode.edit&&o!==document.body){for(let[n,r]of Li){let o=t.data[n];o.cursor&&(t.validate(e,o)&&(console.log("🟪命中快捷键",o.name),i=!0,r.bind(t)(e)))}for(let[n,r]of t.handlers){let o=t.data[n];o.cursor&&(t.validate(e,o)&&(console.log("🟪命中快捷键",o.name),i=!0,r(e)))}if(!i&&"tab"===r){i=!0;const{cursor:t,courier:n,history:r}=this,{cube_end:o,cube_start:s,offset_start:a,offset_end:l,has_selection:c,cube_selection:d}=t,u=n.get_recorder();if(!d||!o||!s)return;e.preventDefault(),c&&u.tell(d,Mi.delete(d.id,"backward",s.id,o.id,a,l,!0));const h=s.text,p=h.slice(0,a)+"\t"+h.slice(a),f=Yd.reset(s.id,p),m=zi.loc(s.id,a+1,s.id,l);u.tell(s,f,m),r.record(u)}}})}listen_uncursor_hotkey(e){const t=this;document.documentElement.addEventListener("keydown",e=>{const n=document.activeElement;let r=!1;if(this.cursor.cube_end||n===document.body){for(let[n,o]of Li){let i=t.data[n];i.cursor||t.validate(e,i)&&(r=!0,console.log("🟪命中快捷键",i.name),o.bind(t)(e))}for(let[n,o]of t.handlers){let i=t.data[n];i.cursor||t.validate(e,i)&&(r=!0,console.log("🟪命中快捷键",i.name),o(e))}r&&(e.preventDefault(),e.stopImmediatePropagation())}})}listen_cvx(e){let t=e;this.root instanceof oh&&(t=document.documentElement),t.addEventListener("paste",async e=>{const t=e.clipboardData,{cursor:n}=this,{cube_end:r}=n;if(r instanceof Zd&&t){e.preventDefault();const n=await this.clipboard.paste(t);this.history.record(n)}}),t.addEventListener("copy",e=>{const t=e.clipboardData,{doc:n,hotkeys:r,cursor:o}=this;t&&(this.root.scopes.scope_count_normal>0||o.has_selection||o.cube_end instanceof Zd)&&(e.preventDefault(),this.clipboard.copy(t))}),t.addEventListener("cut",e=>{const t=e.clipboardData,{root:n,cursor:r}=this;t&&(n.scopes.scope_count_normal>0||r.cube_end instanceof Zd)&&(e.preventDefault(),this.clipboard.cut(t))})}register(e,t){this.data[t.name]=t,this.handlers.set(t.name,e)}reset(e){Object.assign(this.data,e)}reset_handler(e,t){this.handlers.set(e,t)}export(){return structuredClone(jt(this.data))}update_data(...e){return{}}validate(e,t){const n=t.meta===e.metaKey,r=t.alt===e.altKey,o=t.shift===e.shiftKey,i=t.ctrl===e.ctrlKey,s=0===t.key.length||t.key.includes(e.key.toLocaleLowerCase());return n&&r&&o&&i&&s}which(e){for(let t of Object.values(this.data))if(this.validate(e,t))return t}validate_hotkeys(e,t="all"){for(let[n,r]of Li){let r=this.data[n];if("all"===t)return this.validate(e,r);if("cursor"===t&&r.cursor)return this.validate(e,r);if("uncursor"===t&&!r.cursor)return this.validate(e,r)}for(let n of Object.values(this.data)){if("all"===t)return this.validate(e,n);if("cursor"===t&&n.cursor)return this.validate(e,n);if("uncursor"===t&&!n.cursor)return this.validate(e,n)}return!1}get_hotkey_str(e){const t=this.data[e];if(!t)return"";let n="";return t.meta&&(n+="meta + "),t.ctrl&&(n+="ctrl + "),t.alt&&(n+="alt + "),t.shift&&(n+="shift + "),n+=t.key,n}clear_scope(e){e.preventDefault(),this.root.scopes.clear_scope(!1)}clear_css(e){e.preventDefault();const{cursor:t}=this;this.root.painter.clear()}bold(e){e.preventDefault(),this.root.painter.paint({"font-weight":"700"},!0)}unindent_line(e){e.preventDefault(),this.root.painter.unindent()}indent_line(e){e.preventDefault(),this.root.painter.indent()}undo(e){e.preventDefault(),this.root.history.undo()}redo(e){e.preventDefault(),this.root.history.redo()}cursor_navigation(e){const t=this.cursor.get_focus_line(),n=this.root.cursor;if(!t)return;if(!n.range)return;e.preventDefault();const r=[S.Keys.down,S.Keys.end,S.Keys.home,S.Keys.left,S.Keys.right,S.Keys.up],o=e.key.toLocaleLowerCase();if(r.includes(o)){if(this.event.emit_cursor_nav_before(e).some(e=>!1===e))return}o===S.Keys.left?n.move_left():o===S.Keys.right?n.move_right():o===S.Keys.up?n.move_up():o===S.Keys.down?n.move_down():o===S.Keys.home?n.move_home():o===S.Keys.end&&n.move_end(),this.event.emit_cursor_nav_after(e)}cursor_extend_navigation(e){const t=this.cursor.get_focus_line(),n=this.root.cursor;t&&n.cube_end instanceof Zd&&(e.preventDefault(),e.key.toLocaleLowerCase()===S.Keys.left?n.extend_left():e.key.toLocaleLowerCase()===S.Keys.right?n.extend_right():e.key.toLocaleLowerCase()===S.Keys.up?n.extend_up():e.key.toLocaleLowerCase()===S.Keys.down?n.extend_down():e.key.toLocaleLowerCase()===S.Keys.home?n.extend_home():e.key.toLocaleLowerCase()===S.Keys.end&&n.extend_end())}text_break(e){const{courier:t,cursor:n,history:r,doc:o}=this;if(n.has_selection)return;e.preventDefault();const i=new ad(t),{cube_end:s,cube_start:a,cube_selection:l,offset_end:c,offset_start:d}=n;if(s){if(s instanceof Zd){const e=s.text.slice(0,c)+"\n"+s.text.slice(c),t=s.id,n=Yd.reset(t,e),r=zi.loc(t,c+2,t,c);i.tell(s,n,r)}r.record(i)}}break(e){if(this.event.emit_enter_before(e).some(e=>"stop"===e))return;if(!this.cursor.get_focus_line())return;e.preventDefault();const{courier:t,history:n,cursor:r,doc:o}=this,{cube_end:i,cube_start:s,cube_selection:a,offset_end:l,offset_start:c}=r;if(!a||!i||!s)return;const d=new ad(t),u=s.id,h=i.id;r.has_selection&&d.tell(a,Mi.delete(a.id,"backward",u,h,c,l,!0)),d.tell(s,Yd.break(s.id,c)),n.record(d),this.event.emit_enter_after(e)}async break_root(e){const{cursor:t,courier:n,history:r}=this,{cube_end:o,offset_end:i}=t;if(!o)return;const s=o.find_upstream_target(e=>e instanceof bu);if(!s)return;const a=o.find_upstream_untill(s);if(!a)return;const l=[],c=a.index,d=s.children.slice(c);for(let e of d)l.push(e.export());const u=bu.get_default(l),h=n.get_recorder(),p=s.pcube;h.tell(p,Mi.insert_child(p.id,[u],s.index+1)),h.tell(s,Mi.delete_child(s.id,"backward",[c,s.child_count])),o instanceof Zd&&(await fn(),o.set_cursor_in_head(i)),r.record(h)}text_partition(e){const{cursor:t,history:n,courier:r}=this,o=xi.tips,{cube_selection:i,offset_end:s,offset_start:a}=t;if(!(i instanceof Zd))return o?.tip_warning("选区必须在一个文本块内");const l=r.get_recorder(),c=i.id;l.tell(i,Mi.partition(c,c,c,a,s)),n.record(l)}add_scope(e){this.root.scopes.add_scope()}underline(e){const{cursor:t,courier:n,history:r}=this,{cube_selection:o,cube_end:i,cube_start:s,offset_start:a,offset_end:l}=t,c=new ad(n);if(!o||!s||!i)return;c.tell(o,Mi.set_selection_css(o.id,{"text-decoration-line":"underline"},s.id,i.id,a,l,!0)),r.record(c)}copy_format(e){const{root:t}=this;e.preventDefault(),t.painter.copy_format()}apply_format(e){const{root:t}=this;e.preventDefault(),t.painter.apply_format_brush()}italic(e){e.preventDefault(),this.painter.paint({"font-style":"italic"},!0)}align_left(e){e.preventDefault(),this.painter.paint({"text-align":"left"},!0)}align_center(e){e.preventDefault(),this.painter.paint({"text-align":"center"},!0)}align_right(e){e.preventDefault(),this.painter.paint({"text-align":"right"},!0)}next_root(e){e.preventDefault();const{cursor:t,history:n}=this,{cube_end:r}=t;if(!r)return;const o=r.find_upstream_target(e=>e instanceof bu);if(!o)return;const i=o.pcube,s=new ad(this.courier),a=bu.get_default();s.tell(i,Mi.insert_child(i.id,[a],o.index+1)),n.record(s)}prev_root(e){e.preventDefault();const{cursor:t,history:n}=this,{cube_end:r}=t;if(!r)return;const o=r.find_upstream_target(e=>e instanceof bu);if(!o)return;const i=o.pcube,s=new ad(this.courier),a=bu.get_default();s.tell(i,Mi.insert_child(i.id,[a],o.index)),n.record(s)}add_annotation(e){e.preventDefault();const t=xi.tips,{cursor:n,courier:r,history:o}=this,{cube_selection:i,cube_start:s,cube_end:a,offset_end:l,offset_start:c}=n,d=new ad(r);if(!i||!s||!a)return t?.tip_warning("未发现光标或选区");const u=s.id,h=a.id,p=Od.get_default();if(n.has_selection)if(i instanceof Zd)if(d.tell(i,Mi.partition(i.id,u,h,c,l)),0===c){if(i.postil?.has_annotation)return t?.tip_warning("已添加批注"),d;d.tell(i,Mi.postil_add(i.id,[p])),d.tell(i,zi.loc(i.id,l,i.id,l))}else{const e=i.next_cube;if(e instanceof Zd){if(e.postil?.has_annotation)return t?.tip_warning("已添加批注"),d;d.tell(e,Mi.postil_add(e.id,[p])),d.tell(e,zi.loc(e.id,e.len,e.id,e.len))}}else t?.tip_warning("选区跨越多个文本块");else a instanceof Zd&&(d.merge(a.add_annotation()),d.tell(a,zi.loc(a.id,l,a.id,l)));o.record(d)}fold_block(e){e.preventDefault();const{cursor:t}=this,{cube_end:n,offset_end:r}=t;if(!n)return;let o,i=n;for(;!o;){let e=i.pcube;if(e instanceof Ru||e instanceof bu)o=e;else if(e instanceof As)return;i=e}if(o){const e=o.child_first,t=n.find_upstream_untill(o)===e,i=this.courier.get_recorder(),s=!o.attrs.fold,a=Mi.set_attr(o.id,{fold:s});i.tell(o,a),t?i.tell(n,zi.loc(n.id,r,n.id,r)):s&&e&&i.tell(e,zi.in_tail(e.id)),this.history.record(i)}}static get meta(){return{type:k.Cores.hotkeys,version:1}}static get default_hotkeys(){return{[w.HotKeys["fold-block"]]:{name:w.HotKeys["fold-block"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["z"],cursor:!0,group:w.Group.block},[w.HotKeys["text-partition"]]:{name:w.HotKeys["text-partition"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["x"],cursor:!0,group:w.Group.text},[w.HotKeys["text-add-annotation"]]:{name:w.HotKeys["text-add-annotation"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["a"],cursor:!0,group:w.Group.text},[w.HotKeys["scope-clear"]]:{name:w.HotKeys["scope-clear"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["c"],group:w.Group.scope},[w.HotKeys["clear-css"]]:{name:w.HotKeys["clear-css"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["r"],cursor:!0,group:w.Group.css},[w.HotKeys["root-add-prev"]]:{name:w.HotKeys["root-add-prev"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["enter"],cursor:!0,group:w.Group.block},[w.HotKeys["root-add-next"]]:{name:w.HotKeys["root-add-next"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["enter"],cursor:!0,group:w.Group.block},[w.HotKeys["text-align-left"]]:{name:w.HotKeys["text-align-left"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["l"],cursor:!0,group:w.Group.common},[w.HotKeys["text-align-center"]]:{name:w.HotKeys["text-align-center"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["e"],cursor:!0,group:w.Group.common},[w.HotKeys["text-align-right"]]:{name:w.HotKeys["text-align-right"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["r"],cursor:!0,group:w.Group.common},[w.HotKeys["break-text"]]:{name:w.HotKeys["break-text"],show:!1,meta:!1,shift:!0,alt:!1,ctrl:!1,key:["enter"],cursor:!0,group:w.Group.text},[w.HotKeys["break-line"]]:{name:w.HotKeys["break-line"],show:!1,meta:!1,shift:!1,alt:!1,ctrl:!1,key:["enter"],cursor:!0,group:w.Group.core},[w.HotKeys["break-root"]]:{name:w.HotKeys["break-root"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["enter"],cursor:!0,group:w.Group.block},[w.HotKeys["cursor-nav"]]:{name:w.HotKeys["cursor-nav"],show:!1,meta:!1,shift:!1,alt:!1,ctrl:!1,cursor:!0,key:[S.Keys.down,S.Keys.left,S.Keys.right,S.Keys.up,S.Keys.home,S.Keys.end],group:w.Group.core},[w.HotKeys["cursor-nav-extend"]]:{name:w.HotKeys["cursor-nav-extend"],show:!1,meta:!1,shift:!0,alt:!1,ctrl:!1,cursor:!0,key:[S.Keys.down,S.Keys.left,S.Keys.right,S.Keys.up,S.Keys.home,S.Keys.end],group:w.Group.core},[w.HotKeys.undo]:{name:w.HotKeys.undo,show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["z"],cursor:!1,group:w.Group.common},[w.HotKeys.redo]:{name:w.HotKeys.redo,show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["y"],cursor:!1,group:w.Group.common},[w.HotKeys["indent-line"]]:{name:w.HotKeys["indent-line"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["m"],cursor:!0,group:w.Group.common},[w.HotKeys["unindent-line"]]:{name:w.HotKeys["unindent-line"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["m"],cursor:!0,group:w.Group.common},[w.HotKeys["text-bold"]]:{name:w.HotKeys["text-bold"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["b"],cursor:!0,group:w.Group.text},[w.HotKeys["scope-add"]]:{name:w.HotKeys["scope-add"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["s"],cursor:!1,group:w.Group.scope},[w.HotKeys["text-underline"]]:{name:w.HotKeys["text-underline"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["u"],cursor:!0,group:w.Group.text},[w.HotKeys["text-italic"]]:{name:w.HotKeys["text-italic"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["i"],cursor:!0,group:w.Group.text},[w.HotKeys["format-brush-copy"]]:{name:w.HotKeys["format-brush-copy"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["c"],cursor:!0,group:w.Group.common},[w.HotKeys["format-brush-apply"]]:{name:w.HotKeys["format-brush-apply"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["v"],cursor:!0,group:w.Group.common}}}}Ei([Ii(w.HotKeys["scope-clear"])],Di.prototype,"clear_scope",null),Ei([Ii(w.HotKeys["clear-css"])],Di.prototype,"clear_css",null),Ei([Ii(w.HotKeys["text-bold"])],Di.prototype,"bold",null),Ei([Ii(w.HotKeys["unindent-line"])],Di.prototype,"unindent_line",null),Ei([Ii(w.HotKeys["indent-line"])],Di.prototype,"indent_line",null),Ei([Ii(w.HotKeys.undo)],Di.prototype,"undo",null),Ei([Ii(w.HotKeys.redo)],Di.prototype,"redo",null),Ei([Ii(w.HotKeys["cursor-nav"])],Di.prototype,"cursor_navigation",null),Ei([Ii(w.HotKeys["cursor-nav-extend"])],Di.prototype,"cursor_extend_navigation",null),Ei([Ii(w.HotKeys["break-text"])],Di.prototype,"text_break",null),Ei([Ii(w.HotKeys["break-line"])],Di.prototype,"break",null),Ei([Ii(w.HotKeys["break-root"])],Di.prototype,"break_root",null),Ei([Ii(w.HotKeys["text-partition"])],Di.prototype,"text_partition",null),Ei([Ii(w.HotKeys["scope-add"])],Di.prototype,"add_scope",null),Ei([Ii(w.HotKeys["text-underline"])],Di.prototype,"underline",null),Ei([Ii(w.HotKeys["format-brush-copy"])],Di.prototype,"copy_format",null),Ei([Ii(w.HotKeys["format-brush-apply"])],Di.prototype,"apply_format",null),Ei([Ii(w.HotKeys["text-italic"])],Di.prototype,"italic",null),Ei([Ii(w.HotKeys["text-align-left"])],Di.prototype,"align_left",null),Ei([Ii(w.HotKeys["text-align-center"])],Di.prototype,"align_center",null),Ei([Ii(w.HotKeys["text-align-right"])],Di.prototype,"align_right",null),Ei([Ii(w.HotKeys["root-add-next"])],Di.prototype,"next_root",null),Ei([Ii(w.HotKeys["root-add-prev"])],Di.prototype,"prev_root",null),Ei([Ii(w.HotKeys["text-add-annotation"])],Di.prototype,"add_annotation",null),Ei([Ii(w.HotKeys["fold-block"])],Di.prototype,"fold_block",null);class Bi extends bi{_count_word=Gt(0);_active_root_index=Gt(0);_anchor_root_id=Gt("");_mode=Gt(k.Mode.read);_view=Gt("doc");_in_composition_mode=Gt(!1);_in_recording=Gt(!1);_showing=Gt(!1);view_point=Rt({x:0,y:0});get view(){return this._view.value}set view(e){this._view.value=e}get is_doc_view(){return"doc"===this.view}get is_map_view(){return"map"===this.view}get mode_name(){return{[k.Mode.edit]:"编辑模式",[k.Mode.read]:"阅读模式",[k.Mode.export]:"导出模式"}[this.mode]}get showing(){return this._showing.value}set showing(e){this._showing.value=e,this.event.emit_status_update()}get is_recording(){return this._in_recording.value}set is_recording(e){this._in_recording.value=e,this.event.emit_status_update()}get len_undo(){return this.history.len_undo}get len_redo(){return this.history.len_redo}get is_read_mode(){return this._mode.value===k.Mode.read}get is_edit_mode(){return this._mode.value===k.Mode.edit}get in_composition_mode(){return this._in_composition_mode.value}set in_composition_mode(e){this._in_composition_mode.value=e,this.event.emit_status_update()}get mode(){return this._mode.value}set mode(e){const t=this.mode;this._mode.value=e,t!==e&&this.event.emit_status_update()}get anchor_root_id(){return this._anchor_root_id.value}set anchor_root_id(e){this._anchor_root_id.value=e,this.event.emit_status_update()}get anchor_root(){return this.root instanceof lu?this.root.children.find(e=>e.id===this.anchor_root_id):this.root.find_cube(this.anchor_root_id)}get count_root(){return this.root.child_count}get count_word(){return this._count_word.value}get active_root(){return this.root.children[this.active_root_index-1]}get active_root_index(){return this._active_root_index.value}set active_root_index(e){this._active_root_index.value=e,this.event.emit_status_update()}get count_scope(){return this.root.scopes.scopes.size}get count_scope_freeze(){return this.root.scopes.scope_count_freeze}get count_scope_normal(){return this.root.scopes.scope_count_normal}get meta(){return Bi.meta}constructor(e){super(e)}update_count_word(e){this._count_word.value+=e,this.event.emit_status_update()}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.stats,version:1}}}class ji extends bi{_listener=new Map;_updating_status=!1;get meta(){return ji.meta}constructor(e){super(e),this._listen()}_listen(){document.documentElement.addEventListener("keyup",e=>{"Escape"===e.key&&this.emit_esc()}),document.addEventListener("selectionchange",e=>{this.emit_selection_change(e)})}on(e,t){const n=this._listener.get(e);n?n.add(t):this._listener.set(e,new Set([t]))}emit(e,...t){const n=this._listener.get(e);if(!n)return[];const r=[];for(let e of n)r.push(e(...t));return r}off(e){for(let[t,n]of this._listener)for(let t of n)e===t&&n.delete(t)}on_asset_save(e){const t=xi.tips,n=this._listener.get(y.Names["asset-save"]);n?(n.clear(),t?.tip_info("唯一事件-资源保存:回调已覆盖"),n.add(e)):this._listener.set(y.Names["asset-save"],new Set([e]))}async emit_asset_save(e,t,n){const r=xi.tips,o=this._listener.get(y.Names["asset-save"]);if(!o)return r?.tip_warning("未注册保存函数"),!1;const i=[...o][0];return!!i&&await i(e,t,n)}on_asset_download(e){const t=xi.tips,n=this._listener.get(y.Names["asset-download"]);n?(n.clear(),t?.tip_info("唯一事件-资源下载:回调已覆盖"),n.add(e)):this._listener.set(y.Names["asset-download"],new Set([e]))}async emit_asset_download(e,t){const n=xi.tips,r=this._listener.get(y.Names["asset-download"]);if(!r)return n?.tip_warning("未注册保存函数"),!1;const o=[...r][0];return!!o&&await o(e,t)}on_asset_copy(e){const t=xi.tips,n=this._listener.get(y.Names["asset-copy"]);n?(n.clear(),t?.tip_info("唯一事件-资源复制:回调已覆盖"),n.add(e)):this._listener.set(y.Names["asset-copy"],new Set([e]))}async emit_asset_copy(e,t,n){const r=xi.tips,o=this._listener.get(y.Names["asset-copy"]);if(!o)return r?.tip_warning("未注册保存函数"),!1;const i=[...o][0];return!!i&&await i(e,t,n)}emit_replace_id(e,t){const n=this._listener.get(y.Names["replace-id"]);if(!n)return!1;for(let r of n)r(e,t)}on_replace_id(e){const t=this._listener.get(y.Names["replace-id"]);t?t.add(e):this._listener.set(y.Names["replace-id"],new Set([e]))}emit_edit_before(e,t){const n=this._listener.get(y.Names["edit-before"]);if(!n)return!1;for(let r of n)r(e,t)}on_edit_before(e){const t=this._listener.get(y.Names["edit-before"]);t?t.add(e):this._listener.set(y.Names["edit-before"],new Set([e]))}emit_edit_after(e,t){const n=this._listener.get(y.Names["edit-after"]);if(!n)return!1;for(let r of n)r(e,t)}on_edit_after(e){const t=this._listener.get(y.Names["edit-after"]);t?t.add(e):this._listener.set(y.Names["edit-after"],new Set([e]))}emit_text_merge(e,t){const n=this._listener.get(y.Names["text-merge"]);if(!n)return!1;for(let r of n)r(e,t)}on_text_merge(e){const t=this._listener.get(y.Names["text-merge"]);t?t.add(e):this._listener.set(y.Names["text-merge"],new Set([e]))}on_esc(e){const t=this._listener.get(y.Names.esc);t?t.add(e):this._listener.set(y.Names.esc,new Set([e]))}emit_esc(){const e=this._listener.get(y.Names.esc);if(!e)return!1;for(let t of e)t()}on_selection_change(e){this.on(y.Names["selection-change"],e)}emit_selection_change(e){this.emit(y.Names["selection-change"],e)}emit_cursor_nav_before(e){return this.emit(y.Names["cursor-nav-before"],e)}on_cursor_nav_before(e){this.on(y.Names["cursor-nav-before"],e)}emit_cursor_nav_after(e){return this.emit(y.Names["cursor-nav-after"],e)}on_cursor_nav_after(e){this.on(y.Names["cursor-nav-after"],e)}on_enter_before(e){this.on(y.Names["enter-before"],e)}emit_enter_before(e){return this.emit(y.Names["enter-before"],e)}on_enter_after(e){this.on(y.Names["enter-after"],e)}emit_enter_after(e){return this.emit(y.Names["enter-after"],e)}on_show_cube_editor(e){this.on(y.Names["show-cube-editor"],e)}emit_show_cube_editor(e){return this.emit(y.Names["show-cube-editor"],e)}on_text_link_edit(e){this.on(y.Names["text-link-edit"],e)}emit_text_link_edit(e){return this.emit(y.Names["text-link-edit"],e)}on_note_input_before(e){return this.on(y.Names["note-input-before"],e)}emit_note_input_before(e){return this.emit(y.Names["note-input-before"],e)}on_note_compositionend_before(e){return this.on(y.Names["note-input-compositionend-before"],e)}emit_note_compositionend_before(e){return this.emit(y.Names["note-input-compositionend-before"],e)}on_note_compositionend(e){return this.on(y.Names["note-input-compositionend"],e)}emit_note_compositionend(e){return this.emit(y.Names["note-input-compositionend"],e)}on_note_compositionupdate(e){return this.on(y.Names["note-input-compositionupdate"],e)}emit_note_compositionupdate(e){return this.emit(y.Names["note-input-compositionupdate"],e)}on_status_update(e){return this.on(y.Names["status-update"],e)}emit_status_update(){this._updating_status||(this._updating_status=!0,Promise.resolve().then(()=>{const{root:e}=this,t=e,n={mode:this.stats.mode,count_word:this.stats.count_word,count_scope_normal:this.stats.count_scope_normal,count_scope_all:this.root.scopes.scope_size,count_stack_redo:this.history.len_redo,count_stack_undo:this.history.len_undo,count_root:this.stats.count_root,active_root_index:this.stats.active_root_index,anchor_root_id:this.stats.anchor_root_id,note_recording:this.stats.is_recording,note_composition_input:this.stats.in_composition_mode,note_showing:this.stats.showing,map_matrix:{...t.matrix2d}};this.emit(y.Names["status-update"],n),this._updating_status=!1}))}on_fig_click(e){return this.on(y.Names["fig-click"],e)}emit_fig_click(e){return this.emit(y.Names["fig-click"],e)}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.event,version:1}}}class Hi extends bi{_format_brush=null;get meta(){return Hi.meta}get format_brush(){const e={};return this._format_brush&&Object.assign(e,this._format_brush),e}constructor(e){super(e)}paint(e,t=!1){const{root:n,cursor:r,history:o,courier:i}=this,s=new ad(i);if(!e)return;const a=structuredClone(jt(e));if(a["text-align"]){const t=e["text-align"];s.merge(this.text_align(t)),delete a["text-align"]}if(n.scopes.scope_count_normal>0){const e=n.scopes.get_scope_cubes();for(let n of e){const e=n.cube;for(let r of e.children.slice(...n.range))s.tell(r,Mi.set_css(r.id,structuredClone(a),t))}}else{const{cube_selection:e,cube_start:n,cube_end:o,offset_start:i,offset_end:l}=r;if(!e||!n||!o)return;const c=Mi.set_selection_css(e.id,a,n.id,o.id,i,l,t);s.tell(e,c)}o.record(s)}clear(){const{root:e,cursor:t,history:n,courier:r}=this,o=new ad(r),i={};if(e.scopes.scope_count_normal>0){const t=e.scopes.get_scope_cubes();for(let e of t){const t=e.cube;for(let n of t.children.slice(...e.range))o.tell(n,Mi.set_css(n.id,structuredClone(i),!1,!0))}}else{const{cube_selection:e,cube_start:n,cube_end:r,offset_start:s,offset_end:a}=t;if(!e||!n||!r)return;const l=Mi.set_selection_css(e.id,i,n.id,r.id,s,a,!1,!0);o.tell(e,l)}n.record(o)}text_align(e){const{root:t,cursor:n,history:r,courier:o}=this,i=new ad(o),s={"text-align":e};if(t.scopes.scope_count_normal>0){const e=t.scopes.get_scope_cubes();for(let t of e){const e=t.cube;for(let n of e.children.slice(...t.range))i.tell(n,Mi.set_css(n.id,structuredClone(s)))}}else{const e=t.cursor.find_selection_lines();for(let t of e){const e=Mi.set_css(t.id,structuredClone(s));i.tell(t,e)}}return i}indent(){const{root:e,cursor:t,history:n,courier:r,config:o}=this,i=new ad(r);if(e.scopes.scope_count_normal>0){const t=e.scopes.get_scope_cubes();for(let e of t){const t=e.cube;for(let n of t.children.slice(...e.range)){const e=n.attrs.indent>0?n.attrs.indent+1:1;i.tell(n,Mi.set_attr(n.id,{indent:e}))}}}else{const e=t.find_selection_lines();for(let t of e){const e=t.attrs.indent||0,n=e>0?e+1:1;i.tell(t,Mi.set_attr(t.id,{indent:n}))}}n.record(i)}unindent(){const{root:e,cursor:t,history:n,courier:r}=this,o=new ad(r);if(e.scopes.scope_count_normal>0){const t=e.scopes.get_scope_cubes();for(let e of t){const t=e.cube.children.slice(...e.range);for(let e of t){let t=e.attrs.indent;t>0&&o.tell(e,Mi.set_attr(e.id,{indent:t-1}))}}}else{const e=t.find_selection_lines();for(let t of e){const e=t.attrs.indent||0;e>0&&o.tell(t,Mi.set_attr(t.id,{indent:e-1}))}}n.record(o)}copy_format(){const{root:e,cursor:t}=this;if(e.scopes.scope_count_normal>0){const t=[...e.scopes.scope_normal][0].focus_cube;this._format_brush=structuredClone(jt(t.css))}else{const{cube_focus:e}=t;if(!e)return;this._format_brush=structuredClone(jt(e.css))}}apply_format_brush(){const e=this._format_brush;if(!e)return;const{root:t,courier:n,history:r}=this,o=new ad(n);if(t.scopes.scope_count_normal>0){const n=t.scopes.get_scope_cubes();for(let t of n)for(let n of t.cube.children.slice(...t.range)){const t=Mi.set_css(n.id,e,!1,!0);o.tell(n,t)}}else{const{cube_selection:e,cube_end:t,cube_start:n,offset_start:r,offset_end:i}=this.cursor;if(!e||!t||!n)return;const s=Mi.set_selection_css(e.id,this.format_brush,n.id,t.id,r,i,!1,!0);o.tell(e,s)}r.record(o)}static get meta(){return{type:k.Cores.painter,version:1}}}class qi extends bi{_copy_data=[];_img_mime=["image/png","image/jpeg","image/gif"];_paste_stack=[];get pasted_from(){return this._paste_stack[this._paste_stack.length-1]}get is_pasting(){return this._paste_stack.length>0}get copy_data(){return[...this._copy_data]}get pasting(){return this._paste_stack.length>0}get meta(){return qi.meta}constructor(e){super(e)}async copy(e){const{root:t,cursor:n}=this;return t.scopes.scope_count_normal>0?this.copy_scope(e):this.copy_selection(e)}async copy_selection(e){const{root:t,cursor:n}=this;if(n.has_selection){this._copy_data=n.find_inline_data();let r=n.get_selection_text();const o={noteid:t.id,versions:Ci.export_versions(),cubedata:this._copy_data},i=JSON.stringify(o);return e.setData("application/json",i),e.setData("text/plain",r),!0}{const{cube_end:r}=n;if(!r)return!1;const o=[r.export()];this._copy_data=o;let i="";for(let e of this._copy_data)e.type===k.Cubes.text&&(i+=e.info);const s={noteid:t.id,versions:Ci.export_versions(),cubedata:o},a=JSON.stringify(s);return e.setData("application/json",a),e.setData("text/plain",i),!0}}async copy_scope(e){const t=xi.tips;if(0===this.root.scopes.scope_size)return t?.tip_info("无块选区,未复制内容"),!1;if(0===this.root.scopes.scope_count_normal)return t?.tip_info("无正常块选区,未复制内容"),!1;const n=this.root.scopes.get_scope_cubes();this.root.scopes.clear_scope();const r=[];let o="";for(let e of n){for(let t of e.cube.children.slice(...e.range))o+=t.text;r.push(...e.cube.copy(...e.range))}this._copy_data=r;const i={noteid:this.root.id,versions:Ci.export_versions(),cubedata:this._copy_data},s=JSON.stringify(i);return e.setData("application/json",s),e.setData("text/plain",o),!0}set_clipboard_cubedata(e,t){const n={noteid:this.root.id,versions:Ci.export_versions(),cubedata:t},r=JSON.stringify(n),o=(new TextEncoder).encode(r),i=JSON.stringify([...o]),s=new Blob([e],{type:"text/plain"}),a=new Blob([i],{type:"text/html"}),l=new ClipboardItem({[s.type]:s,[a.type]:a});return this.set_clipboard_data(l)}async paste(e){const{cursor:t,courier:n}=this,r=e.items,o=n.get_recorder();let i=[];o.merge(this.delete()),await fn();for(let e=0;e<r.length;e++){const t=r[e];if(t.type.startsWith("image")){const e=t.getAsFile();e&&i.push(e)}}if(i.length>0){for(let e of i){const t=await this.paste_img(e);o.merge(t)}return o}const s=e.getData("application/json");if(s){let e=!1;try{const t=JSON.parse(s);if(t&&t.cubedata&&t.noteid)return this._paste_stack.push(t),e=!0,o.merge(this.paste_cubes(t.cubedata,t.versions)),o}catch(e){}finally{e&&this._paste_stack.pop()}}const a=e.getData("text/html");if(a)try{const e=new DOMParser,t=e.parseFromString(a,"text/html").body.textContent.trim(),n=JSON.parse(t),r=new Uint8Array(n),i=(new TextDecoder).decode(r),s=JSON.parse(i);let l=!1;try{if(s&&s.cubedata&&s.noteid)return this._paste_stack.push(s),l=!0,o.merge(this.paste_cubes(s.cubedata,s.versions)),o}catch(e){}finally{l&&this._paste_stack.pop()}}catch(e){console.error("🟥paste",e)}const l=e.getData("text/plain");if(l){const e=this.get_cubedata_from_text(l);return o.merge(this.paste_cubes(e,Ci.versions)),o}return o}get_cubedata_from_text(e){const t=e.replace("\r","").split("\n"),n=[];if(1===t.length){const e=Zd.get_default(t[0]);n.push(e)}else for(let e of t){if(!e.trim())continue;const t=uu.get_default_by_string(e);n.push(t)}return n}paste_cubes(e,t){const n=t||Ci.export_versions();if(0===e.length)return;const{courier:r,history:o,cursor:i}=this,s=new ad(r),{cube_selection:a,cube_end:l,cube_start:c,offset_start:d,offset_end:u}=i;if(!a||!l||!c)return;i.has_selection&&s.tell(a,Mi.delete(a.id,"backward",c.id,l.id,d,u,!0));const h=rd.replace_id(this.root,n,e);return s.tell(c,Mi.insert(c.id,h,c.id,c.id,d,d)),s}async paste_img(e){const{courier:t,history:n,cursor:r}=this,o=new ad(t),{cube_selection:i,cube_end:s,cube_start:a,offset_start:l,offset_end:c}=r;if(!i||!s||!a)return;const d=gd.get_default();if(this.root.isdev)d.info=URL.createObjectURL(e),o.tell(s,Mi.insert(s.id,[d],a.id,s.id,l,c));else{const t=d.id+".png",n=t;if(!await this.event.emit_asset_save("image",t,e))return;d.info=n,o.tell(s,Mi.insert(s.id,[d],a.id,s.id,l,c))}return o}delete(){const{root:e,courier:t,cursor:n}=this;return e.scopes.scope_count_normal>0?this.delete_scope():n.has_selection?this.delete_selection():void 0}delete_selection(){const{courier:e,cursor:t,history:n}=this,r=new ad(e),{cube_end:o,cube_start:i,cube_selection:s,offset_start:a,offset_end:l}=t;if(!s||!o||!i)return;const c=i.id,d=o.id,u=s.id,h=Mi.delete(u,"backward",c,d,a,l);return r.tell(s,h),r}delete_scope(){const e=xi.tips,{root:t,courier:n,history:r,cursor:o}=this;if(0===t.scopes.scope_size)return void e?.tip_info("无块选区");if(0===t.scopes.scope_count_normal)return void e?.tip_info("无常规块选区");const i=new ad(n),s=this._root.scopes.get_scope_cubes(),a=new Map;for(let e of s){let t=a.get(e.cube);t?t.push(e.range):a.set(e.cube,[e.range])}for(let[e,t]of a){const n=new Set,r=e.children;for(let e of t){const t=r.slice(e[0],e[1]);for(let e of t)n.add(e)}for(let e of n)i.merge(e.remove_self())}return this.root.scopes.clear_scope(),i}cut(e){const{root:t,courier:n,cursor:r}=this;t.scopes.scope_count_normal>0?this.cut_scope(e):this.cut_selection(e)}cut_scope(e){const{root:t,courier:n,history:r,cursor:o}=this,i=xi.tips;if(0===t.scopes.scope_size)return i?.tip_info("无块选区"),!1;if(0===t.scopes.scope_count_normal)return i?.tip_info("无常规块选区"),!1;const s=new ad(n),a=this._root.scopes.get_scope_cubes(),l=new Map;for(let e of a){let t=l.get(e.cube);t?t.push(e.range):l.set(e.cube,[e.range])}const c=[];for(let[e,t]of l){const n=new Set,r=e.children;for(let o of t){const t=r.slice(o[0],o[1]);for(let e of t)n.add(e);c.push(...e.copy(...o))}for(let e of n)s.merge(e.remove_self())}this._copy_data=c;let d="";for(let e of this._copy_data)e.type===k.Cubes.text&&(d+=e.info);const u={noteid:this.root.id,versions:Ci.export_versions(),cubedata:c},h=JSON.stringify(u);e.setData("text/plain",d),e.setData("application/json",h),this.root.scopes.clear_scope(),r.record(s)}cut_selection(e){const{courier:t,cursor:n,history:r}=this,o=new ad(t),{cube_end:i,cube_start:s,cube_selection:a,offset_start:l,offset_end:c}=n;if(a&&i&&s)if(n.has_selection){this._copy_data=n.find_inline_data();let t="";for(let e of this._copy_data)e.type===k.Cubes.text&&(t+=e.info);const d={noteid:this.root.id,versions:Ci.export_versions(),cubedata:this._copy_data},u=JSON.stringify(d);e.setData("text/plain",t),e.setData("application/json",u);const h=s.id,p=i.id,f=a.id,m=Mi.delete(f,"backward",h,p,l,c);o.tell(a,m),r.record(o)}else{const t=i.export();this._copy_data=[t];let n="";for(let e of this._copy_data)e.type===k.Cubes.text&&(n+=e.info);const s={noteid:this.root.id,versions:Ci.export_versions(),cubedata:this._copy_data},a=JSON.stringify(s);e.setData("text/plain",n),e.setData("application/json",a);const l=i.pcube,c=i.index,d=Mi.delete_child(l.id,"backward",[c,c+1]);o.tell(l,d),r.record(o)}}set_clipboard_data(e){return new Promise((t,n)=>{navigator.clipboard?navigator.clipboard.write([e]).then(e=>t(!0)).catch(e=>{t(!1),console.error("写入粘贴板数据失败",e)}):t(!1)})}read_clipboard(){return new Promise(e=>{navigator.clipboard?navigator.clipboard.read().then(async t=>{const n=new Map;for(let e of t)if(e instanceof ClipboardItem){const t=e.types;for(let r of t)await e.getType(r).then(async e=>n.set(e.type,e))}e(n)}):e(new Map)})}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.clipboard,version:1}}}class Fi extends bi{cp=Fi.default_config;_data_raw=Fi.default_config;data=Rt(this._data_raw);constructor(e){super(e)}get data_raw(){return{...this._data_raw}}get meta(){return Fi.meta}get css_vars(){const e=this.data;return{"--text-transition":""+(e.text_transition?"0.5s":"none"),"--text-family":`${e.text_family}`,"--text-fontsize":`${e.text_fontsize||16}px`,"--map-transition-duration":""+(e.map_transition?"0.2s":"none")}}init(e){Object.assign(this._data_raw,e)}cover(e){Object.assign(this.data,e)}export(){return structuredClone(jt(this.data))}static get meta(){return{type:k.Cores.config,version:4}}static get default_config(){return{text_transition:!0,text_family:'"Comic Sans MS"',text_fontsize:16,code_theme:"dracula",line_indent:40,history_length:1/0,player_speed:150,revert_scope:!1,map_transition:!0,map_node_gap_x:40,map_node_gap_y:40,map_node_padding:8,map_node_max_width:800,map_node_exit_by_esc:!0,map_node_default_width:140,map_lod_scale:.5,map_scale_max:5,map_scale_min:.1,map_scale_step:.1,scroll_distance:20,map_linker_type:"bezier2",map_linker_width:2,map_linker_anchor_in:p.Anchor.arrow,map_linker_anchor_out:p.Anchor.point}}}var $i=o(1869);class Gi extends bi{selection;cursor_step=20;scroll_distance=50;safa_distance=20;get meta(){return Gi.meta}get has_selection(){return!this.selection.isCollapsed}get client_rect(){return this.range?.getBoundingClientRect()}get client_rects(){return this.range?.getClientRects()}get range(){if(0!==this.selection?.rangeCount)return this.selection?.getRangeAt(0)}get ranges(){const e=[];for(let t=0;t<this.selection.rangeCount;t++)e.push(this.selection.getRangeAt(0));return e}get offset_start(){return this.range?this.range?.startOffset:-1}get offset_end(){return this.range?this.range?.endOffset:-1}get node_start(){return this.range?.startContainer}get node_end(){return this.range?.endContainer}get node_focus(){return this.selection.focusNode}get node_anchor(){return this.selection.anchorNode}get top_edge(){return this.safa_distance}get bottom_edge(){return document.documentElement.clientHeight-this.safa_distance}get cube_selection(){if(!this.range)return;const e=this.range.commonAncestorContainer,t=this.stats.active_root;if(t){return this.get_node_cube(e,t)||this.get_node_cube(e,this.root)}return this.get_node_cube(e,this.root)}get cube_start(){const e=this.range,t=this.cube_selection;if(!e||!t)return;const n=e.startContainer,r=this.get_node_cube(n,t);return r instanceof Zd?r:void 0}get cube_end(){const e=this.range,t=this.cube_selection;if(!e||!t)return;const n=e.endContainer,r=this.get_node_cube(n,t);return r instanceof Zd?r:void 0}get cube_focus(){const e=this.cube_selection,t=this.node_focus;if(!e||!t)return;const n=this.get_node_cube(t,e);return n instanceof nd?n:void 0}get cube_anchor(){const e=this.cube_selection,t=this.node_anchor;if(!e||!t)return;const n=this.get_node_cube(t,e);return n instanceof nd?n:void 0}constructor(e){super(e);let t=window.getSelection();if(!t)throw Error("NoteCursor : can't find Selection API");this.selection=t}move_up_by_coor(){}locate_next_line(e,t,n){let r="up"===e?t.prev_line:t.next_line;const o=t.clientRect;let i=r?.clientRect;for(;r&&i&&o&&(i.left>=o.right||i.right<=o.left);){let t="up"===e?r.prev_line:r.next_line;if(!t)break;r=t,i=t.clientRect}if(!r)return;const s=[],a=new Map;for(let e of r.children)if(e instanceof Zd){let t=e.clientRects;if(!t)continue;for(let n=0;n<t.length;n++)s.push(t[n]),a.set(t[n],e)}const l=$i.IMath.RectPosition,c="up"===e?$i.MathRect.get_rect_point(n.left,l.left_mid):$i.MathRect.get_rect_point(n.left,l.right_mid),d=$i.MathRect.get_nearest_rect(c,s);if(!d)return;const u=$i.MathRect.get_shadow_point_horizental(c,d),h=document.caretPositionFromPoint(u.x,u.y);if(h&&h.offsetNode instanceof Text)this.set_cursor(h.offsetNode,h.offset);else if(h&&!(h.offsetNode instanceof Text)){const e=a.get(d);if(!e)return;e.set_cursor_in_tail()}}locate_current_line(e,t,n){const r=[],o=[],i=new Map;for(let e of t.children)if(e instanceof Zd){let t=e.clientRects;if(!t)continue;for(let n=0;n<t.length;n++){const o=t[n];r.push(o),i.set(o,e)}}if(1===r.length)return!1;if("up"===e){const e=n.left.top;for(let t of r)t.bottom<=e&&o.push(t)}else if("down"===e){const e=n.right.bottom;for(let t of r)t.y>=e&&o.push(t)}if(o.length>0){const t="down"===e?{x:n.right.x,y:n.right.y}:{x:n.left.x,y:n.left.y},r=$i.MathRect.get_nearest_rect(t,o);if(!r)return!1;const s=$i.MathRect.get_shadow_point_horizental(t,r),a=document.caretPositionFromPoint(s.x,s.y);if(a&&a.offsetNode instanceof Text)return this.set_cursor(a.offsetNode,a.offset),!0;{const e=i.get(r);if(!e)return!1;e.set_cursor_in_tail()}}return!1}move_vertical(e){const{cube_start:t,cube_end:n}=this;if(!(t instanceof Zd&&n instanceof Zd))return;const r="up"===e?t.line:n.line,o=this.get_selection_edge_position();if(!r||!o)return;this.locate_current_line(e,r,o)||this.locate_next_line(e,r,o)}move_left(){if(!this.range)return;const{cube_start:e,offset_start:t,offset_end:n,node_end:r}=this,{doc:o,courier:i}=this,s=new ad(i);if(!(e instanceof Zd))return;if(this.has_selection)return this.set_cursor(this.range.startContainer,this.range.startOffset);if(e.drop_zero_width_space(t).pos>0)if(e.is_empty){let t=e.prev_cube_deep;t&&s.tell(t,zi.in_tail(t.id))}else{const n=e.find_text_nav_pos(t,"left");r&&this.set_cursor(r,n)}else{const t=e.prev_cube_deep;t&&(t instanceof Zd?s.tell(t,zi.loc(t.id,t.len-1,e.id,0)):s.tell(t,zi.in_tail(t.id)))}}move_right(){if(!this.range)return;const{cube_end:e,offset_start:t,offset_end:n,node_end:r}=this,{doc:o,courier:i}=this,s=new ad(i);if(e instanceof Zd){if(this.has_selection)return this.set_cursor(this.range.endContainer,this.range.endOffset);if(n<e.drop_zero_width_space(n).len)if(e.is_empty){let t=e.next_cube_deep;t&&s.tell(t,zi.in_head(t.id))}else{const t=e.find_text_nav_pos(n,"right");r&&this.set_cursor(r,t)}else{const t=e.next_cube_deep;t&&(t instanceof Zd?s.tell(t,zi.loc(t.id,1,e.id,e.len)):s.tell(t,zi.in_head(t.id)))}}}move_up(){this.move_vertical("up")}move_down(){return this.move_vertical("down")}move_end(){if(!this.range)return;const{cube_end:e}=this,{startContainer:t,endContainer:n,startOffset:r,endOffset:o}=this.range;if(!e)return;this.set_cursor(this.range.endContainer,this.range.endOffset);const i=this.range.getClientRects();if(0===i.length)return;const s=$i.IMath.RectPosition,a=$i.MathRect.get_rect_point(i[i.length-1],s.center);let l=rd.get_client_rects(e.id);if(!l)return;let c=l.length,d=l[0],u=l[l.length-1],h=u;if(c>1){for(let e=0;e<c;e++){const t=l[e];if($i.MathRect.is_point_in_rect(a,t)){h=t;break}}if(h!==u)return this.locate_cursor_on_rect(h,s.right_mid)}let p=e.next_cube;if(!p)return this.locate_cursor_on_rect(h,s.right_mid);for(l=rd.get_client_rects(p.id);l;){if(c=l.length,d=l[0],d.x<h.right)return this.locate_cursor_on_rect(h,s.right_mid);if(c>1)return this.locate_cursor_on_rect(d,s.right_mid);if(p=p?.next_cube,!p)return this.locate_cursor_on_rect(d,s.right_mid);l=rd.get_client_rects(p.id)}}move_home(){if(!this.range)return;const{cube_end:e}=this,{startContainer:t,endContainer:n,startOffset:r,endOffset:o}=this.range;if(this.set_cursor(this.range.startContainer,this.range.startOffset),!e)return;const i=this.range.getClientRects();if(0===i.length)return;const s=$i.IMath.RectPosition,a=$i.MathRect.get_rect_point(i[i.length-1],s.center);let l=rd.get_client_rects(e.id);if(!l)return;let c=l.length,d=l[0],u=l[l.length-1],h=d;if(c>1){for(let e=0;e<c;e++){const t=l[e];if($i.MathRect.is_point_in_rect(a,t)){h=t;break}}if(h!==d)return this.locate_cursor_on_rect(h,s.left_mid)}let p=e.prev_cube;if(!p)return this.locate_cursor_on_rect(h,s.left_mid);for(l=rd.get_client_rects(p.id);l;){if(c=l.length,u=l[l.length-1],u.right>h.left)return this.locate_cursor_on_rect(h,s.left_mid);if(c>1)return this.locate_cursor_on_rect(u,s.left_mid);if(p=p?.prev_cube,!p)return this.locate_cursor_on_rect(u,s.left_mid);l=rd.get_client_rects(p.id)}}extend_left(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_left(),fn(()=>{const e=this.range?.endContainer,t=this.range?.endOffset;e&&"number"==typeof t&&this.set_selection_between(l,c,e,t)})}extend_right(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_right(),fn(()=>{const e=this.range?.endContainer,t=this.range?.endOffset;e&&"number"==typeof t&&this.set_selection_between(l,c,e,t)})}extend_up(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_up();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}extend_down(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_down();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}extend_home(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_home();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}extend_end(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_end();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}is_contains_selection(e){const t=[];for(let e of this.ranges)t.push(e.commonAncestorContainer);for(let n of t){if(!this.get_node_cube(n,e))return!1}return!0}get_node_cube(e,t){let n=e instanceof Element?e:e.parentElement;const r=[];for(;n;){if(n.id){let e;if(r.push(n.id),e=(this.root,t.find_cube(n.id)),e)return e}n=n.parentElement}}get_focus_line(){const{cube_end:e}=this;if(e)return e instanceof Zd?e.line:void 0}set_cursor(e,t){let n;if(e instanceof Text)n=e;else{if(!(e instanceof HTMLElement&&e.dataset.type===k.Cubes.text&&e.dataset.id&&e.firstChild instanceof Text))return console.error("NoteCursor : curosr only be set in TextNode",e,t);n=e.firstChild}let r=Math.min(n.length,t);this.selection?.setPosition(n,r),e.parentElement&&e.parentElement.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}locate_cursor_on_rect(e,t){let n=$i.MathRect.get_rect_point(e,t);const r=document.caretPositionFromPoint(n.x,n.y),o=window.getSelection();if(r&&o&&r.offsetNode instanceof Text)return o.setPosition(r.offsetNode,r.offset)}locate_cursor_by_coor(e,t){const{courier:n,history:r,root:o}=this,i=document.caretPositionFromPoint(e,t),s=i?.offsetNode,a=new ad(n);if(s){if(s instanceof Text)i.offsetNode instanceof Text&&(s.parentElement?.parentElement?.focus(),this.set_cursor(i.offsetNode,i.offset));else{const e=o.cursor.get_node_cube(s,o);if(e?.in_postil)return;const t=e?.pcube;if(!e||!t)return;const n=e.meta;e.next_cube;n.block||a.tell(e,zi.in_head(e.id))}r.record(a)}}set_cursor_by_coor(e,t){if(t<=this.top_edge){let e=document.documentElement.scrollTop,n=e>this.scroll_distance?this.scroll_distance:e;$i.DomAnimation.scroll_element(document.documentElement,-this.scroll_distance,"vertical"),t+=n}else if(t>=this.bottom_edge){let e=document.documentElement.scrollHeight-document.documentElement.clientHeight-document.documentElement.scrollTop,n=e>this.scroll_distance?this.scroll_distance:e;$i.DomAnimation.scroll_element(document.documentElement,this.scroll_distance,"vertical"),t-=n}const n=document.caretPositionFromPoint(e,t);if(n&&n.offsetNode instanceof Text){n.offsetNode.parentElement?.parentElement?.focus(),this.set_cursor(n.offsetNode,n.offset);let e=this.get_selection_edge_position()?.right;if(!e)return;return e.y<=this.top_edge?window.scrollBy({top:-this.scroll_distance,behavior:"smooth"}):e.y>=this.bottom_edge&&window.scrollBy({top:this.scroll_distance,behavior:"smooth"}),n}}get_selection_edge_position(){if(!this.range)return;const e=this.range.getClientRects();if(0===e.length)return;const t=e[0],n=e[e.length-1];return{left:new DOMRect(t.x,t.y,0,t.height),right:new DOMRect(n.x,n.y,0,n.height)}}set_selection_between(e,t,n,r){this.selection.setBaseAndExtent(e,t,n,r)}get_selection_text(e=!0){const{cube_end:t,cube_start:n,offset_start:r,offset_end:o}=this;let i="";if(e&&!this.has_selection&&n instanceof Zd)return n.text;if(this.cube_selection instanceof Zd)return this.cube_selection.text.slice(r,o);{let e=!1,s=!1;const a=this.find_inline_cube();for(let l of a){for(let a of l){if(s)break;e||a!==n||(e=!0,a instanceof Zd&&(i+=a.text.slice(r))),s||a!==t||(s=!0,a instanceof Zd&&(i+=a.text.slice(0,o))),e&&!s&&a instanceof Zd&&a!==n&&a!==t&&(i+=a.text)}i+="\n"}}return i}find_cube_by_coor(e){const{x:t,y:n}=e,r=document.elementFromPoint(t,n);if(r)return this.get_node_cube(r,this.root)}find_selection_lines(){const e=[],{cube_selection:t,cube_start:n,cube_end:r}=this;if(t instanceof Zd){let e=t.line;if(e)return[e]}else{if(t instanceof uu)return[t];if(n instanceof Zd&&r instanceof Zd){const t=n.line,o=r.line;if(t&&o){let n=t;for(;n&&(e.push(n),n!==o);)n=n.next_line}}}return e}find_inline_cube(){const e=[],{cube_start:t,cube_end:n,offset_start:r,offset_end:o}=this;if(!t||!n)return e;if(!(t instanceof Zd&&n instanceof Zd))return e;const i=this.find_selection_lines();if(0===i.length)return[];const s=i[0],a=i[i.length-1],l=t.index,c=n.index;if(1===i.length){const t=[];for(let e of s.children.slice(l,c+1))t.push(e);e.push(t)}else{let t=[];for(let e of s.children.slice(l))t.push(e);e.push(t),t=[];for(let n of i.slice(1,-1)){for(let e of n.children)t.push(e);e.push(t),t=[]}for(let e of a.children.slice(0,c+1))t.push(e);e.push(t)}return e}find_inline_data(){const e=[],t=this.find_inline_cube();if(0===t.length)return e;const n=t[0],r=t[t.length-1],o=n[0],i=r[r.length-1],{cube_start:s,cube_end:a,offset_start:l,offset_end:c}=this;if(!s||!a)return e;if(s===a){const t=s.export();t.info=t.info.slice(l,c),e.push(t)}else if(n===r){if(s instanceof Zd&&s===o){const t=s.export();t.info=t.info.slice(l),e.push(t)}for(let t of n.slice(1,-1))e.push(t.export());if(a instanceof Zd&&a===i){const t=a.export();t.info=t.info.slice(0,c),e.push(t)}}else{if(s instanceof Zd&&s===o){const t=s.export();t.info=t.info.slice(l),e.push(t)}e.push(...n.slice(1).map(e=>e.export()));for(let n of t.slice(1,-1)){const t=uu.get_default(n.map(e=>e.export()));e.push(t)}const d=uu.get_default(r.slice(0,-1).map(e=>e.export()));if(a instanceof Zd&&a===i){const e=a.export();e.info=e.info.slice(0,c),d.info.push(e)}e.push(d)}return e}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.cursor,version:1}}}class Vi extends bi{command_group_do=[];command_group_undo=[];get meta(){return Vi.meta}execute_command_group(e){if(this.stats.mode===k.Mode.read)return;const t=(e,n,r)=>{n<r.length&&fn(()=>{this.pass(e),t(r[n+1],n+1,r)})};t(e[0],0,e)}constructor(e){super(e)}get_recorder(){return new ad(this)}pass(e){if(this.stats.mode===k.Mode.read)return;const t=e,n=e.id,r=this.root.find_cube(n);if(!r)return console.error("未发现cube:",n);console.log("🟡",r,e);const o=new ad(this);let i=r.on(t);return i instanceof ad&&o.merge(i),o}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.courier,version:1}}}class Ui{_float;_visible=Gt(!1);_css=Rt({position:"fixed"});_cube=Gt(null);constructor(e){this._float=e}get visible(){return this._visible.value}get float(){return this._float}get cube(){return this._cube.value}get css(){return this._css}async show(e,t){this._visible.value=!0;const n=e.currentTarget;await fn();const r={x:0,y:0,width:window.innerWidth,height:window.innerHeight},o=n.getBoundingClientRect(),i={x:e.clientX,y:e.clientY,width:1,height:1},s=$i.MathRect.move_rect_to_other(r,o,i,12);this._css.left=`${s.x}px`,this._css.top=`${s.y}px`,this._cube.value=Ht(t)}close(){this._visible.value=!1,this._cube.value=null}}class Ki extends Ui{_css=Rt({});_cube=Gt(null);constructor(e){super(e),this._listen()}_listen(){const e=this.float.event;e.on_esc(this.close.bind(this)),e.on_fig_click(this.close.bind(this))}get cube(){return this._cube.value}}class Wi extends bi{_float_node_layout=new Ki(this);constructor(e){super(e)}get float_node_layout(){return this._float_node_layout}get meta(){return Wi.meta}static get meta(){return{type:k.Cores.float,version:1}}}class Yi extends bi{_id=vi();scroll_offset=100;_freeze=Gt(!1);selection_line=Pt([]);_boxes=Rt([]);pos=Rt({x:0,y:0,width:0,height:0});css=Rt({});get boxes(){return this._boxes}get meta(){return Yi.meta}get id(){return this._id}get freeze(){return this._freeze.value}set freeze(e){this._freeze.value=e}_direction=null;get focus_cube(){return this.selection_line[this.selection_line.length-1]}get second_cube(){return this.selection_line.length<=1?void 0:this.selection_line[this.selection_line.length-2]}get len(){return this.selection_line.length}constructor(e,t){super(e),this.selection_line.push(t),this.listener.check_float()}expand(e){if(!(this.focus_cube instanceof Wd&&this._direction===e))if("up"===e){if("down"===this._direction&&this.len>1)return this.selection_line.pop(),void this.update_area();const e=this.focus_cube.prev_cube||this.focus_cube.pcube;if(!e||e instanceof As)return;if(e instanceof Kc)return;e===this.second_cube?(this.selection_line.pop(),this.update_area()):(null!==this._direction&&1!==this.len||(this._direction="up"),this.selection_line.push(e),this.update_area())}else{if("up"===this._direction&&this.len>1)return this.selection_line.pop(),void this.update_area();const e=this.focus_cube.next_cube||this.focus_cube.pcube;if(!e||e instanceof As)return;if(e instanceof Kc)return;e===this.second_cube?(this.selection_line.pop(),this.update_area()):(null!==this._direction&&1!==this.len||(this._direction="down"),this.selection_line.push(e),this.update_area())}}shrink(){1!==this.selection_line.length&&(this.selection_line.pop(),this.update_area())}update_area(e=!0){if(e){if(0===this.selection_line.length)return this.remove();const e=this.selection_line[this.selection_line.length-1].level;this._boxes.length=0;const t=[],n=1;for(let r of this.selection_line){if(r.level!==e)continue;const o=r.clientRect;if(!o)continue;const i={x:o.x+n,y:o.y+n,width:o.width-2*n,height:o.height-2*n};this._boxes.push({rect:i,cube:r}),t.push(o)}if(0===t.length)return this.remove();const r=$i.MathRect.merge(...t);this.css.width=`${r.width}px`,this.css.height=`${r.height}px`,this.css.left=r.x+"px",this.css.top=r.y+"px",this.pos.x=r.x+document.documentElement.scrollLeft,this.pos.y=r.y+document.documentElement.scrollTop,this.pos.width=r.width,this.pos.height=r.height}else{const e=this.pos.x-document.documentElement.scrollLeft,t=this.pos.y-document.documentElement.scrollTop;this.css.left=e+"px",this.css.top=t+"px"}}find_line_next(e){if(this.selection_line.indexOf(e)<this.selection_line.length)return this.selection_line[this.selection_line.length-1]}find_line_prev(e){const t=this.selection_line.indexOf(e);if(t>0)return this.selection_line[t-1]}get_scope_info(){let e=this.focus_cube.level;const t=this.focus_cube.pcube,n=[],r=[];for(let t of this.selection_line){const o=t.level,i=t.index;o===e&&(n.push(t),r.push(i))}return{cube:t,range:[Math.min(...r),Math.max(...r)+1],from:this.id}}remove(){this.root.scopes.remove_scope(this.id),this.event.emit_status_update()}find_scope_lines(){const e=this.root.scopes.get_scope_cubes(),t=[],n=[];for(let n of e)t.push(...rd.get_flat_cube(n.cube));for(let e of t)e instanceof uu&&n.push(e);return n}find_inline_data(){const e=[],t=this.find_scope_lines();for(let n of t)e.push(...n.children);return e}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.scope,version:1}}}class Xi extends bi{_scopes=new Set;constructor(e){super(e)}get status(){return this.root.status}get scope_size(){return this._scopes.size}get scope_first(){return this._scopes.values().next().value}get scope_last(){let e;for(let t of this._scopes)e=t;return e}get scopes(){return new Set(this._scopes)}get scope_count_freeze(){let e=0;for(let t of this.scopes)t.freeze&&e++;return e}get scope_count_normal(){return this.scopes.size-this.scope_count_freeze}get scope_normal(){const e=new Set;for(let t of this.scopes)t.freeze||e.add(t);return e}get scope_freeze(){const e=new Set;for(let t of this.scopes)t.freeze&&e.add(t);return e}clear_scopes(){this._scopes.clear()}add_scope_by_cube(e){const t=new Yi(this.root,e);this._scopes.add(t),this.status.add_scope(t),this.event.emit_status_update()}add_scope(e=!1){if(e){const e=this.cursor.cube_end;if(!e||e instanceof As)return xi.tips?.tip_warning("光标未在有效块内");this.add_scope_by_cube(e)}else{const e=this.stats.view_point,t=this.cursor.find_cube_by_coor(e);if(!(t&&t instanceof nd))return xi.tips?.tip_warning("光标未在有效块内");this.add_scope_by_cube(t)}}remove_scope(e){if(e instanceof Yi)this._scopes.delete(e),this.status.remove_scope(e);else for(let t of this._scopes)if(t.id===e){this._scopes.delete(t),this.status.remove_scope(t);break}}clear_scope(e=!0){for(let t of this._scopes)e&&t.freeze||this.remove_scope(t)}freeze_scopes(){for(let e of this._scopes)e.freeze=!0}sort_scope(){const e=[...this._scopes];return e.sort((e,t)=>e.pos.y-t.pos.y),e}get_scope_cubes(e=!1,t=!0){if(0===this._scopes.size)return[];const n=[],r=e?this.sort_scope():this._scopes;for(let e of r)t&&e.freeze||n.push(e.get_scope_info());return n}get_scope_cubes_data(){const e=this.get_scope_cubes(),t=[];for(let n of e)t.push(...n.cube.copy(n.range[0],n.range[1]));return t}}class Ji{static get_default(){return{a:1,b:0,c:0,d:1,e:0,f:0}}static to_array(e){return[e.a,e.b,e.c,e.d,e.e,e.f]}static is_default(e){return 1===e.a&&0===e.b&&0===e.c&&1===e.d&&0===e.e&&0===e.f}static get_matrix(e,t,n,r,o,i){return{a:e,b:t,c:n,d:r,e:o,f:i}}static get_matrix_translate(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}static get_matrix_scale(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}static get_matrix_reflection_horizental(){return{a:1,b:0,c:0,d:-1,e:0,f:0}}static get_matrix_reflection_vertical(){return{a:-1,b:0,c:0,d:1,e:0,f:0}}static multiply(e,t){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}static translate(e,t,n){const r=this.get_matrix_translate(t,n);return this.multiply(e,r)}static get_dom_string(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=e;return`matrix(${t.toFixed(1)},${n},${r},${o.toFixed(1)},${i.toFixed(1)},${s.toFixed(1)})`}static map_point_to_view(e,t){return{x:e.x+t.x,y:e.y+t.y}}static view_point_to_map(e,t){return{x:e.x-t.x,y:e.y-t.y}}}class Zi{static path=document.createElementNS("http://www.w3.org/2000/svg","path");static svg_path_sample(e,t=24){if(!e||t<2)return[];this.path.setAttribute("d",e);const n=[],r=this.path.getTotalLength()/t;for(let e=0;e<=t;e++){const t=e*r,o=this.path.getPointAtLength(t);n.push({x:o.x,y:o.y})}return n}static get_line_k(e,t){const n=t.y-e.y,r=t.x-e.x;if(0===r)return Number.POSITIVE_INFINITY;return n/r}static find_closest_point(e,t){let n=1/0,r=e[0];const{x:o,y:i}=t;for(let t of e){let e=(o-t.x)**2+(i-t.y)**2;e<n&&(n=e,r=t)}return r}static offset_points(e,t){const n=[],{x:r,y:o}=t;for(let t of e)n.push({x:t.x+r,y:t.y+o});return n}static find_closest_points(e,t){let n=1/0,r=e[0],o=t[0];for(let i=0;i<e.length;i++){const s=e[i];for(let e=0;e<t.length;e++){const i=t[e],a=s.x-i.x,l=s.y-i.y,c=a*a+l*l;c<n&&(n=c,r=s,o=i)}}return{from:r,to:o}}static polygonCentroid(e){let t=0,n=0,r=0;const o=e.length;for(let i=0;i<o;i++){const{x:s,y:a}=e[i],{x:l,y:c}=e[(i+1)%o],d=s*c-l*a;r+=d,t+=(s+l)*d,n+=(a+c)*d}return r*=.5,t/=6*r,n/=6*r,{x:t,y:n}}static get_polygon_area(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const{x:o,y:i}=e[r],{x:s,y:a}=e[(r+1)%n];t+=o*a-s*i}return t/2}static find_line_to_layout_root(e,t=new Set){if(e.is_layout_root)return{has_root:!0,line:[e]};{t.add(e.id);const n=e.pcube.get_node_from(e.id)||[];for(let r of n){if(t.has(r))continue;const n=e.pcube.get_node(r);if(n){if(n.is_layout_root)return{has_root:!0,line:[e,n]};{const r=this.find_line_to_layout_root(n,t);if(r.has_root)return r.line.unshift(e),r}}}return{has_root:!1,line:[]}}}static get_direct_layout_parent(e,t=new Set){if(e.is_layout_root)return;t.add(e.id);const n=e.pcube.get_node_from(e.id)||[];for(let r of n){if(t.has(r))continue;const n=e.pcube.get_node(r);if(n){if(n.is_layout_root)return n;if(null!=this.get_direct_layout_parent(n,t))return n}}return null}static get_linker_id(e,t){return e+"-"+t}static wait_nodes_render(e){const t=[];for(let n of e)t.push(n.wait_layout_self());return Promise.all(t)}static create_linker_info(e,t,n){const r=e.get_node(t),o=e.get_node(n),i=r?.to.size||0,s=o?.from.size||0;return{linker:Du.get_default(t,n),index_from:s,index_to:i}}static get_rect_area(e,t,n=4){const r=t.x-e.x,o=t.y-e.y,i=Math.sign(r)*n,s=Math.sign(o)*n,a=e,l=a.x+r,c=a.y,d=t,u=a.x,h=a.y+o;return`M${a.x+i} ${a.y}H${l-i}Q${l} ${c} ${l} ${c+s}V${d.y-s}Q${d.x} ${d.y} ${d.x-i} ${d.y}H ${u+i}Q${u} ${h} ${u} ${h-s}V${a.y+s}Q${a.x} ${a.y} ${a.x+i} ${a.y}Z`}}class Qi{static node_add(e,t){return{id:e,name:b.Names.node_add,data:t}}static node_remove(e,t){return{id:e,name:b.Names.node_remove,data:t}}static linker_add(e,t,n=!0){return{id:e,name:b.Names.linker_add,data:t,to_root:n}}static linker_remove(e,t,n=!0){return{id:e,name:b.Names.linker_remove,data:t,to_root:n}}static node_drag(e,t){return{id:e,name:b.Names.node_drag,data:t}}}class es{static layout_change(e,t){return{id:e,name:x.Names.layout_update,attrs:t}}static append_child(e,t,n){return{id:e,name:x.Names.append_child,nodes:t,previd:n}}}class ts extends bi{_interaction;_flow=!1;down_node;down_pos;down_pos_view;matrix=new Map;captive_nodes=new Set;hidden_downstream=new Set;matrix_translate=Ji.get_matrix_translate(0,0);scope_down;recover_select=!1;has_down=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-drag"}get map_interaction(){return this.map.map_interaction}get intention(){return this.map_interaction.node_intention}get min_distance(){return 5}set_node_linkers_visible(e,t){for(let n of e.to){const r=this.map.get_linker(this.map.get_linker_id(e.id,n));r&&(this.map.set_linker_visible(r,t),this.map.status.set_linker_visible(r,t))}for(let n of e.from){const r=this.map.get_linker(this.map.get_linker_id(n,e.id));r&&(this.map.set_linker_visible(r,t),this.map.status.set_linker_visible(r,t))}}get_excluded_intention_nodes(){const e=new Set;for(let t of this.matrix.keys())e.add(t);for(let t of this.captive_nodes)e.add(t);for(let t of this.hidden_downstream)e.add(t);return e}reset_free_nodes_to_origin(){for(let[e,t]of this.matrix)t&&(e.reset_matrix(t),e.map2d.update_sample(),e.map2d.sync_rect(),e.map2d.update_linkers("all"))}activate_drag_flow(){if(!this.flow){this.flow=!0,this.intention.preview_node=this.down_node;for(let e of this.matrix.keys())this.map.set_node_dragging(e,!0);for(let e of this.captive_nodes){this.map.set_node_dragging(e,!0);for(let t of e.env.downstream_nodes)this.matrix.has(t)||this.captive_nodes.has(t)||(this.hidden_downstream.add(t),this.map.set_node_visible(t,!1),this.map.status.set_node_visible(t,!1),this.set_node_linkers_visible(t,!1))}}}reset_status(){const e=this.hidden_downstream.size>0;this.hidden_downstream.clear(),this.captive_nodes.clear(),this.map.clear_node_dragging(),this.recover_select=!1,this.matrix.clear(),this.flow=!1,this.has_down=!1,this.intention.clear_drag_state(),e&&this.map.check_show()}down(e,t){this.scope_down=t;const{selector:n,pos:r,selected_nodes:o,view_cubes:i}=t;if("node"!==n.type||!this.map.map_interaction.check_mouse_key(e,"left")||n.res.editable)return;e.stopPropagation(),e.preventDefault(),this.reset_status(),this.has_down=!0,this.down_node=n.res,this.down_pos=this.map.view_point_to_real(r),this.down_pos_view=r;const s=o.has(this.down_node)?o:new Set([this.down_node]);for(let e of s)e.env.is_captive?this.captive_nodes.add(e):this.matrix.set(e,{...e.matrix2d})}move(e){const t=this.matrix.size>0,n=this.captive_nodes.size>0;if(!this.has_down||!this.map_interaction.check_mouse_key(e,"left")||!this.down_pos)return;if(!t&&!n)return;const r=Math.sqrt((e.clientX-this.down_pos_view.x)**2+(e.clientY-this.down_pos_view.y)**2);if(!this.flow&&r<this.min_distance)return;this.activate_drag_flow(),e.preventDefault();const o=this.map.view_point_to_real({x:e.clientX,y:e.clientY});if(this.intention.drag_count=this.matrix.size+this.captive_nodes.size,this.intention.update_intention(o,this.get_excluded_intention_nodes()),t){const e=o.x-this.down_pos.x,t=o.y-this.down_pos.y;if(!this.recover_select){this.map.clear_node_selected();for(let[e]of this.matrix)this.map.set_node_selected(e,!0);this.recover_select=!0}this.matrix_translate=Ji.get_matrix_translate(e,t);for(let[e,t]of this.matrix){if(!t)continue;const n=Ji.multiply(t,this.matrix_translate);e.reset_matrix(n),e.map2d.update_sample(),e.map2d.sync_rect(),e.map2d.update_linkers("all")}}}up(e){if(!this.flow)return this.reset_status();e.stopPropagation(),e.preventDefault();const{courier:t,history:n}=this,r=t.get_recorder(),o=this.intention.active_intention;if(o){this.reset_free_nodes_to_origin();const e=[],t=[...this.captive_nodes,...this.matrix.keys()];for(let n of t){const t="child"===o.type?o.node:o.node.env.upstream;t&&(t!==n&&(n.env.downstream_nodes.has(t)||e.push({node_id:n.id,intention:{type:o.type,target_id:o.node.id}})))}e.length>0&&r.tell(this.map,Qi.node_drag(this.map.id,e))}else{const e=new Set,t=new Set;for(let[n,r]of this.matrix)if(r&&(n.reset_matrix(r),t.add(n),n.is_layout_root&&(e.add(n),!n.env.layout_type)))for(let e of n.env.downstream_nodes)t.add(e);for(let e of t){const t=e.matrix2d,n=Ji.multiply(t,this.matrix_translate),o=es.layout_change(e.id,{matrix2d:n});r.tell(e,o)}for(let t of e)t.layout_throttle();t.size>0&&this.map.grider.update_nodes([...t])}n.record(r),this.reset_status()}cancel(e){this.flow&&(this.reset_free_nodes_to_origin(),this.reset_status())}leave(){}wheel(e){}dblclick(e){}contextmenu(e){}}class ns{get edge_size(){return 40}get hnode_size(){return{width:50,height:10}}get vnode_size(){return{width:10,height:50}}make_rect_path(e){return`M${e.x},${e.y}h${e.width}v${e.height}h${-e.width}Z`}get_hit_area(e,t){return e.find(e=>$i.MathRect.is_point_in_rect(t,e.area))}get_env_info(e){const t=e.map2d.rect,n=e.env.prev_node,r=e.env.next_node,o=n?.map2d.rect,i=r?.map2d.rect;return{rect:t,prev:n,next:r,prect:o,nrect:i,urect:e.env.upstream?.map2d.rect}}get_pnode(e,t,n,r){const{width:o,height:i}=r,s=$i.IMath.RectPosition;return n===s.left_top?{x:e,y:t,width:o,height:i}:n===s.left_mid?{x:e,y:t-i/2,width:o,height:i}:n===s.left_bottom?{x:e,y:t-i,width:o,height:i}:n===s.right_top?{x:e-o,y:t,width:o,height:i}:n===s.right_mid?{x:e-o,y:t-i/2,width:o,height:i}:n===s.right_bottom?{x:e-o,y:t-i,width:o,height:i}:n===s.top_mid?{x:e-o/2,y:t,width:o,height:i}:n===s.bottom_mid?{x:e-o/2,y:t-i,width:o,height:i}:{x:e,y:t,width:o,height:i}}get_svg(e,t,n,r,o){const i=$i.MathRect.get_rect_point;return{rect:this.make_rect_path(n),linker:Bu.get_line(i(e,t),i(n,r),o)}}}const rs=new class extends ns{constructor(){super()}get_intention(e,t){if("right"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i,nrect:s,urect:a}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const l=i?(o.y-(i.y+i.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y-l,width:o.width,height:l};r.push({type:"prev",node:t,area:e})}const c=s?(s.y-(o.y+o.height))/2:this.edge_size;if(c>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:c};r.push({type:"next",node:t,area:e})}const d=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(d)}}left(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.y-(i.y+i.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y-a,width:o.width,height:a};r.push({type:"prev",node:t,area:e})}const l=s?(s.y-(o.y+o.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:l};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}time_down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}file_tree(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i,child_last:s}=o.env,{rect:a,node_line_type:l}=o.map2d,{node_gap_x:c,node_gap_y:d}=n.map2d,u=($i.MathRect.get_rect_point,$i.IMath.RectPosition);if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x,t.y+t.height+this.edge_size,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,n,u.left_mid,l)}{const e=this.get_pnode(a.x+a.width+c,a.y+a.height/2,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,e,u.left_mid,l)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,e,u.left_mid,l)}if("left"===i){const e=$i.MathRect.get_rect_point(t,u.right_top),n=this.get_pnode(e.x,e.y,u.right_mid,this.hnode_size);return this.get_svg(a,u.left_mid,n,u.right_mid,l)}if("up"===i){const e=$i.MathRect.get_rect_point(t,u.left_bottom),n=this.get_pnode(e.x,e.y,u.bottom_mid,this.vnode_size);return this.get_svg(a,u.top_mid,n,u.bottom_mid,l)}if("down"===i){const e=$i.MathRect.get_rect_point(t,u.left_top),n=this.get_pnode(e.x,e.y,u.top_mid,this.vnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,u.left_mid),n=this.get_pnode(e.x,e.y,u.left_mid,this.vnode_size);return this.get_svg(a,u.right_mid,n,u.left_mid,l)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,u.top_mid),n=this.get_pnode(e.x,e.y,u.top_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,u.left_top),n=this.get_pnode(e.x,e.y,u.left_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.left_mid,l)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,e,u.left_mid,l)}if("left"===i){const e=$i.MathRect.get_rect_point(t,u.right_bottom),n=this.get_pnode(e.x,e.y,u.right_mid,this.hnode_size);return this.get_svg(a,u.left_mid,n,u.right_mid,l)}if("up"===i){const e=$i.MathRect.get_rect_point(t,u.right_bottom),n=this.get_pnode(e.x,e.y,u.bottom_mid,this.vnode_size);return this.get_svg(a,u.top_mid,n,u.bottom_mid,l)}if("down"===i){const e=$i.MathRect.get_rect_point(t,u.right_bottom),n=this.get_pnode(e.x,e.y,u.top_mid,this.vnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,u.right_mid),n=this.get_pnode(e.x,e.y,u.left_mid,this.vnode_size);return this.get_svg(a,u.right_mid,n,u.left_mid,l)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,u.bottom_mid),n=this.get_pnode(e.x,e.y,u.top_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,u.left_bottom),n=this.get_pnode(e.x,e.y,u.left_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.left_mid,l)}}}};const os=new class extends ns{constructor(){super()}get_intention(e,t){if("left"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){return this.left(e,t,n)}left(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.y-(i.y+i.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y-a,width:o.width,height:a};r.push({type:"prev",node:t,area:e})}const l=s?(s.y-(o.y+o.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:l};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}up(e,t,n){const r=[],{rect:o,nrect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(i.x-o.x-o.width)/2:this.edge_size;if(s>0){const e={x:o.x+o.width,y:o.y,width:s,height:o.height};r.push({type:"next",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){return this.up(e,t,n)}time_down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}file_tree(e,t,n){return this.time_down(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=$i.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width,t.y+t.height+this.edge_size,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}{const e=this.get_pnode(s.x-l,s.y+s.height/2,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,e,d.right_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};const is=new class extends ns{constructor(){super()}get_intention(e,t){if("up"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,nrect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(i.y-(o.y+o.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:s};r.push({type:"next",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=s?(s.x-o.x-o.width)/2:this.edge_size;if(l>0){const e={x:o.x+o.width,y:o.y,width:l,height:o.height};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=s?(s.x-o.x-o.width)/2:this.edge_size;if(a>0){const e={x:o.x+o.width,y:o.y,width:a,height:o.height};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_down(e,t,n){return this.right(e,t,n)}file_tree(e,t,n){return this.right(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=$i.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width+this.edge_size,t.y+t.height,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}{const e=this.get_pnode(s.x+s.width/2,s.y-c/2,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,e,d.bottom_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};const ss=new class extends ns{constructor(){super()}get_intention(e,t){if("down"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.y-(i.y+i.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y-s,width:o.width,height:s};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=s?(s.x-o.x-o.width)/2:this.edge_size;if(l>0){const e={x:o.x+o.width,y:o.y,width:l,height:o.height};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=s?(s.x-o.x-o.width)/2:this.edge_size;if(a>0){const e={x:o.x+o.width,y:o.y,width:a,height:o.height};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_down(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}file_tree(e,t,n){return this.time_down(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=$i.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width+this.edge_size,t.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}{const e=this.get_pnode(s.x+s.width/2,s.y+s.height+c,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,e,d.top_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};const as=new class extends ns{constructor(){super()}get_intention(e,t){if("time-right"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.y-(i.y+i.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y-a,width:o.width,height:a};r.push({type:"prev",node:t,area:e})}const l=s?(s.y-(o.y+o.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:l};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.x-i.x-i.width)/2:this.edge_size;if(s>0){const e={x:o.x-s,y:o.y,width:s,height:o.height};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}down(e,t,n){return this.up(e,t,n)}time_down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}file_tree(e,t,n){return this.time_down(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l}=n.map2d,c=$i.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width+this.edge_size,t.y+t.height/2,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}{const e=this.get_pnode(s.x+s.width+l,s.y+s.height/2,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,c.right_top),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,c.left_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,c.top_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,c.right_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,c.bottom_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}}};const ls=new class extends ns{constructor(){super()}get_intention(e,t){if("time-down"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.y-(i.y+i.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y-s,width:o.width,height:s};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.x-i.x-i.width)/2:this.edge_size;if(s>0){const e={x:o.x-s,y:o.y,width:s,height:o.height};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}file_tree(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_y:l}=n.map2d,c=$i.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width/2,t.y+t.height+this.edge_size,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}{const e=this.get_pnode(s.x+s.width/2,s.y+s.height+l,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,e,c.top_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,c.right_top),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,c.left_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,c.top_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,c.right_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,c.bottom_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}}};const cs=new class extends ns{constructor(){super()}get_intention(e,t){if("file-tree"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.y-(i.y+i.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y-s,width:o.width,height:s};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=s?(s.x-o.x-o.width)/2:this.edge_size;if(l>0){const e={x:o.x+o.width,y:o.y,width:l,height:o.height};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=s?(s.x-o.x-o.width)/2:this.edge_size;if(a>0){const e={x:o.x+o.width,y:o.y,width:a,height:o.height};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_down(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}file_tree(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=$i.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width/2+this.edge_size,t.y+t.height+this.edge_size,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}{const e=this.get_pnode(s.x+s.width/2+l/2,s.y+s.height+c/2,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,e,d.left_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=$i.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=$i.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=$i.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=$i.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};class ds extends bi{_map;_intention_list=Rt([]);_placeholder_linker=Gt("");_placeholder_path=Gt("");_node_rect={x:0,y:0,width:0,height:0};_cursor_pos=Gt(null);_drag_count=Gt(0);_preview_node;constructor(e){super(e.root),this._map=e}get map(){return this._map}get intention_list(){return this._intention_list}get placeholder_linker(){return this._placeholder_linker.value}set placeholder_linker(e){this._placeholder_linker.value=e}get placeholder_path(){return this._placeholder_path.value}set placeholder_path(e){this._placeholder_path.value=e}get node_rect(){return this._node_rect}set node_rect(e){this._node_rect=e}get cursor_pos(){return this._cursor_pos.value}set cursor_pos(e){this._cursor_pos.value=e}get drag_count(){return this._drag_count.value}set drag_count(e){this._drag_count.value=e}get preview_node(){return this._preview_node}set preview_node(e){this._preview_node=e}get active_intention(){if(!this._cursor_pos.value)return;const e=this._cursor_pos.value;return this._intention_list.find(t=>$i.MathRect.is_point_in_rect(e,t.area))}clear_drag_state(){this._cursor_pos.value=null,this._drag_count.value=0,this._intention_list.length=0,this._preview_node=void 0,this.placeholder_path="",this.placeholder_linker=""}update_intention(e,t=new Set){this._cursor_pos.value=e;const n=this.get_nearest_node(e,t);if(this._intention_list.length=0,!n)return!1;const{intention:r,placeholder:o}=this.get_intention(n,e);this._intention_list.push(...r),o&&(this.placeholder_linker=o.linker,this.placeholder_path=o.rect)}get_nearest_node(e,t=new Set){const n=this.map.get_view_rect(),r=this.map.grider.get_intersection_nodes(n,!1);let o,i=1/0;for(let n of r){if(t.has(n))continue;const r=$i.MathRect.point_distance_with_rect(e,n.map2d.rect);r<i&&(i=r,o=n)}return o}get_intention(e,t){const n=e.env.layout_type;return n?"right"===n?rs.get_intention(e,t):"left"===n?os.get_intention(e,t):"up"===n?is.get_intention(e,t):"down"===n?ss.get_intention(e,t):"file-tree"===n?cs.get_intention(e,t):"time-right"===n?as.get_intention(e,t):"time-down"===n?ls.get_intention(e,t):{intention:[],placeholder:void 0}:{intention:[],placeholder:void 0}}make_rect_path(e){return`M${e.x},${e.y}h${e.width}v${e.height}h${-e.width}Z`}}class us extends bi{_interaction;_flow=!1;scope_down=null;fig_matrix_origin;pos_down_real;m;count=0;rate=3;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:fig-drag"}reset_status(){this._flow=!1,this.scope_down=null}get map_interaction(){return this.map.map_interaction}down(e,t){this.scope_down=t;const{selector:n}=t;"fig"===n.type&&this.map_interaction.check_mouse_key(e,"right")&&!e.ctrlKey&&(e.stopPropagation(),e.preventDefault(),this.pos_down_real=this.map.view_point_to_real(t.pos),this._flow=!0,this.fig_matrix_origin={...this.map.matrix2d})}move(e){if(!this._flow||!this.scope_down||e.ctrlKey||!this._interaction.check_mouse_key(e,"right"))return;if(this.count++,this.count%this.rate===0)return;this.count=1,e.stopPropagation(),e.preventDefault();const{map_sum_scale:t}=this.scope_down,n=e.clientX,r=e.clientY,o=(n-this.scope_down.pos.x)/t.sx,i=(r-this.scope_down.pos.y)/t.sy;this.m=Ji.multiply(this.fig_matrix_origin,Ji.get_matrix_translate(o,i)),this.map.reset_matrix(this.m)}up(e){if(!this._flow||!this.m)return this.reset_status();e.stopPropagation(),e.preventDefault(),this.reset_status(),this.map.check_show()}cancel(e){this._flow&&(this.reset_status(),this.map.check_show())}leave(e){this._flow&&(this.reset_status(),this.map.check_show())}wheel(e){}dblclick(e){}contextmenu(e){}}class hs extends bi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:fig-scale"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){}cancel(e){}leave(){}wheel(e){if(!e.ctrlKey)return;e.stopPropagation(),e.preventDefault();const{map_scale_step:t}=this.config.data,n=e.deltaY,r=-Math.sign(n),o={x:e.clientX,y:e.clientY},i=r*t;this.map.scale_by_point(o,i,i),this.map.check_show_throttle()}dblclick(e){}contextmenu(e){}}class ps extends bi{_interaction;_flow=!1;count=0;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:fig-wheel"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){}cancel(e){}leave(){}wheel(e){e.stopPropagation(),e.preventDefault(),this.count++;const t=-Math.sign(e.deltaY)*this.config.data.scroll_distance;if(!e.ctrlKey){if(e.shiftKey){const e=Ji.multiply(this.map.matrix2d,Ji.get_matrix_translate(t,0));this.map.reset_matrix(e)}else{const e=Ji.multiply(this.map.matrix2d,Ji.get_matrix_translate(0,t));this.map.reset_matrix(e)}this.map.check_show_throttle()}}dblclick(e){}contextmenu(e){}}class fs extends bi{_interaction;down_point;view_cubes=[];flow=!1;count=0;rate=4;constructor(e){super(e.root),this._interaction=e}get map(){return this._interaction.map}get name(){return"pointer:line-delete"}get map_interaction(){return this.map.map_interaction}reset(){this.flow=!1,this.map.status.update_placeholder_line_delete(""),this.view_cubes=[]}down(e,t){const{selector:n,pos:r,view_cubes:o}=t;this.stats.is_read_mode||"fig"===n.type&&this.map_interaction.check_mouse_key(e,"right")&&e.ctrlKey&&(e.stopPropagation(),e.preventDefault(),this.flow=!0,this.down_point=this.map.view_point_to_real(r),this.view_cubes=o)}move(e){if(!this.flow)return;e.stopPropagation(),e.preventDefault(),this.count++;const t={x:e.clientX,y:e.clientY},n=this.map.view_point_to_real(t),r=Bu.line(this.down_point,n);if(this.map.status.update_placeholder_line_delete(r),this.count%this.rate!==0)return;this.count=1;const o={from:this.down_point,to:n};this.map.clear_line_deleted();for(let e of this.view_cubes)if(e instanceof Zc){let t=e.map2d.shape_sample[0];for(let n of e.map2d.shape_sample.slice(1)){const r={from:t,to:n};if($i.MathLine.check_intersection(r,o)){this.map.set_line_deleted(e,!0);break}t=n}}else if(e instanceof Du){let t=e.map2d.sample[0];for(let n of e.map2d.sample.slice(1)){const r={from:t,to:n};if($i.MathLine.check_intersection(r,o)){this.map.set_line_deleted(e,!0);break}t=n}}}up(e){if(!this.flow)return;e.stopPropagation(),e.preventDefault();const{courier:t,history:n}=this.root,r=t.get_recorder(),o=this.map.id,i=[],s=[],a=this.map.line_deleted;for(let e of a)e instanceof Zc?i.push(e.id):e instanceof Du&&s.push(e.id);const l=Qi.node_remove(o,i),c=Qi.linker_remove(o,s);r.tell(this.map,l,c),n.record(r),this.reset()}cancel(e){this.reset()}leave(){}wheel(e){}dblclick(e){}contextmenu(e){}}class ms extends bi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-add"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){this.flow&&(this.flow=!1)}cancel(e){this.flow}wheel(e){}leave(){}dblclick(e,t){const{selector:n,pos:r}=t;if("fig"!==n.type)return;e.stopPropagation(),e.preventDefault();const{courier:o,history:i}=this,s=Zc.get_default_node_pos(r,this.map),a=[Ju.get_default(s)],l=Qi.node_add(this.map.id,a),c=o.get_recorder();c.tell(this.map,l),i.record(c)}contextmenu(e){}}class _s extends bi{_interaction;_flow=!1;_rect;point_down;count=0;rate=5;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-box-select"}get map_interaction(){return this.map.map_interaction}reset(){this.flow=!1,this.map.status.update_placeholder_box_selector("")}down(e,t){const{pos:n,selector:r}=t,{type:o,res:i}=r;"fig"===o&&this.map_interaction.check_mouse_key(e,"left")&&(e.preventDefault(),this.flow=!0,this.point_down=this.map.view_point_to_real(n))}move(e){if(!this.flow)return;this.count++,e.preventDefault();const t={x:e.clientX,y:e.clientY},n=this.map.view_point_to_real(t),r=Zi.get_rect_area(this.point_down,n);if(this.map.status.update_placeholder_box_selector(r),this.count%this.rate!==0)return;this.count=1;const o={x:Math.min(this.point_down.x,n.x),y:Math.min(this.point_down.y,n.y),width:Math.abs(n.x-this.point_down.x),height:Math.abs(n.y-this.point_down.y)};this._rect=o;const i=this.map.get_nodes_intersection(o);this.map.clear_node_selected();for(let e of i)this.map.set_node_selected(e,!0)}up(e){this.flow&&(e.stopPropagation(),e.preventDefault(),this.reset())}cancel(e){this.flow&&this.reset()}wheel(e){}leave(){}dblclick(e,t){}contextmenu(e){}check_intersection(e,t){const n=e.x+e.width/2,r=e.y+e.height/2,o=t.x+t.width/2,i=t.y+t.height/2,s=Math.abs(n-o),a=Math.abs(r-i);return s<=(e.width+t.width)/2&&a<=(e.height+t.height)/2}}class gs extends bi{_interaction;flow=!1;constructor(e){super(e.root),this._interaction=e}get map(){return this._interaction.map}get name(){return"pointer:node-click-select"}get map_interaction(){return this.map.map_interaction}down(e,t){const{selector:n,pos:r}=t,{type:o,res:i}=n;if("node"!==o||n.res.editable)return;if(e.stopPropagation(),e.preventDefault(),this._interaction.check_mouse_key(e,"right"))return;e.ctrlKey||this.map.clear_node_selected();const s=this.map.status.is_node_selected(i);i.pcube.set_node_selected(i,!s)}move(e){this.flow}up(e){this.flow}leave(e){}cancel(e){}wheel(e){}dblclick(e){}contextmenu(e){}}class bs extends bi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-edit-exit"}get map_interaction(){return this.map.map_interaction}down(e,t){const{selector:n}=t,{type:r,res:o}=n;"fig"!==r&&"empty"!==r||(e.stopPropagation(),e.preventDefault(),this.cubes.clear_all_map_selected(),this.map.clear_node_editing())}move(e){}up(e){}leave(){}cancel(e){}wheel(e){}dblclick(e,t){}contextmenu(e){}}class xs extends bi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-edit"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){}leave(){}cancel(e){}wheel(e){}dblclick(e,t){if(this.stats.mode===k.Mode.read)return;const{selector:n,pos:r}=t,o=this.cursor;"node"===n.type&&(e.stopPropagation(),e.preventDefault(),n.res.editable=!0,fn(()=>{o.set_cursor_by_coor(r.x,r.y)}))}contextmenu(e){}}class vs extends bi{_interaction;_flow=!1;down_node;selected_nodes=new Set;recorver_selected=!1;has_down=!1;down_pos={x:0,y:0};constructor(e){super(e.root),this._interaction=e}get min_distance(){return 5}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-line"}get map_interaction(){return this.map.map_interaction}reset_status(){this.flow=!1,this.has_down=!1,this.selected_nodes.clear(),this.map.status.update_placeholder_linkers([]),this.recorver_selected=!1}down(e,t){const{selector:n,pos:r,selected_nodes:o}=t;if("node"===n.type&&this._interaction.check_mouse_key(e,"right"))if(this.reset_status(),this.has_down=!0,e.preventDefault(),e.stopPropagation(),this.down_pos=r,this.down_node=n.res,o.has(this.down_node))for(let e of o)this.selected_nodes.add(e);else this.selected_nodes.add(this.down_node)}move(e){if(!this.has_down)return;if(!this._interaction.check_mouse_key(e,"right")||!this.has_down)return;if(Math.sqrt((e.clientX-this.down_pos.x)**2+(e.clientY-this.down_pos.y)**2)<this.min_distance)return;this.flow=!0,e.stopPropagation(),e.preventDefault();const t=this._interaction.get_map_selector(e),{res:n,type:r}=t,o=this.map.status;if(o.update_placeholder_linkers([]),!this.recorver_selected){this.recorver_selected=!0,this.map.clear_node_selected();for(let e of this.selected_nodes)this.map.set_node_selected(e,!0)}if("node"===r)for(let e of this.selected_nodes){const{from:t,to:r}=Zi.find_closest_points(e.map2d.shape_sample,n.map2d.shape_sample),i=e.map2d.node_line_type;o.add_placeholder_linker({path:Bu.get_line(t,r,i),stroke:e.map2d.node_fill,width:e.map2d.node_line_width,anchor_start:e.map2d.node_line_anchor_out,anchor_end:p.Anchor.arrow})}else{const t={x:e.clientX,y:e.clientY},n=this.map.view_point_to_real(t);for(let e of this.selected_nodes){const t=Zi.find_closest_point(e.map2d.shape_sample,n),r=e.map2d.node_line_type;o.add_placeholder_linker({path:Bu.get_line(t,n,r),stroke:e.map2d.node_fill,width:e.map2d.node_line_width,anchor_start:e.map2d.node_line_anchor_out,anchor_end:p.Anchor.arrow})}}}async up(e){if(!this.flow)return this.reset_status();e.preventDefault(),e.stopPropagation(),await rd.sleep(1);const{courier:t,history:n}=this,r=this._interaction.get_map_selector(e),{res:o,type:i}=r;if("node"===i){if(o===this.down_node)return;const e=t.get_recorder();for(let t of this.selected_nodes){const n=Zi.get_linker_id(t.id,o.id);if(this.map.get_linker(n))xi.tips?.tip_warning("已存在连接线");else{const n=Zi.create_linker_info(this.map,t.id,o.id),r=Qi.linker_add(this.map.id,[n]);e.tell(this.map,r)}}n.record(e)}else if("fig"===i){const{courier:t,history:n}=this,r=t.get_recorder(),o=Zc.get_default_node_pos({x:e.clientX,y:e.clientY},this.map),i=Ju.get_default(o);this.selected_nodes.size>1&&(i.attrs.root=!0);const s=Qi.node_add(this.map.id,[i]);r.tell(this.map,s);for(let e of this.selected_nodes){const t=this.map.get_linker_id(e.id,i.id);if(this.map.get_linker(t)){xi.tips?.tip_warning("已存在连接线");continue}const n=Zi.create_linker_info(this.map,e.id,i.id),o=Qi.linker_add(this.map.id,[n]);r.tell(this.map,o)}n.record(r)}this.reset_status()}leave(){}cancel(e){this.reset_status()}wheel(e){}dblclick(e,t){}contextmenu(e){e.preventDefault()}}class ys extends bi{_map;_node_intention;_op_pointer=new Map;_op_keyboard=new Map;constructor(e){super(e.root),this._map=e,this._node_intention=new ds(e),this.add_operation_pointer(new us(this)),this.add_operation_pointer(new hs(this)),this.add_operation_pointer(new xs(this)),this.add_operation_pointer(new bs(this)),this.add_operation_pointer(new ms(this)),this.add_operation_pointer(new vs(this)),this.add_operation_pointer(new ts(this)),this.add_operation_pointer(new _s(this)),this.add_operation_pointer(new fs(this)),this.add_operation_pointer(new gs(this)),this.map instanceof As&&this.add_operation_pointer(new ps(this))}get node_intention(){return this._node_intention}get flowing(){return this.interactions_pointer.some(e=>e.flow)}get interactions_pointer(){return Array.from(this._op_pointer.values())}get interactions_keyboard(){return Array.from(this._op_keyboard.values())}get map(){return this._map}add_operation_pointer(e){this._op_pointer.set(e.name,e)}add_operation_keyboard(e){this._op_keyboard.set(e.name,e)}register(e){e.addEventListener("pointerdown",this.pointerdown.bind(this)),e.addEventListener("pointermove",this.pointermove.bind(this)),e.addEventListener("pointerup",this.pointerup.bind(this)),e.addEventListener("pointercancel",this.pointercancel.bind(this)),e.addEventListener("pointerleave",this.pointerleave.bind(this)),e.addEventListener("wheel",this.wheel.bind(this)),e.addEventListener("dblclick",this.dblclick.bind(this)),e.addEventListener("contextmenu",this.contextmenu.bind(this))}check_mouse_key(e,t){return rd.check_mouse_key(e,t)}get_map_selector(e){let t=e.target;for(;t&&t!==document.body;){const e=t.dataset.type,n=t.id;if(n&&e){if(e===k.Cubes.postil)return{type:"empty",res:void 0};if(e===k.Cubes.node){const e=this.map.get_node(n);if(e)return{type:"node",res:e}}else if(e===k.Cubes.linker){const e=this.map.get_linker(n);if(e)return{type:"linker",res:e}}else if(e===k.Cubes.map||e===k.Cubes.submap)return{type:"fig",res:this.map};t=t.parentElement}else t=t.parentElement}return{type:"empty",res:void 0}}pointerdown(e){const t={selector:this.get_map_selector(e),pos:{x:e.clientX,y:e.clientY},selected_nodes:this.map.nodes_selected,view_cubes:this.map.get_view_cube(!1),map_sum_scale:this.map.get_upstream_sum_scale()},{selector:n}=t,{res:r,type:o}=n;if("node"===o&&this.root.isdev){console.log("------------------------------------节点信息");const{map2d:e,env:t}=r;console.log("id",r.id),console.log("matrix:",{...e.matrix2d}),console.log("pos_tree:",e.pos_tree),console.log("rect:",e.rect),console.log("size_tree:",e.size_tree),console.log("layout_type:",t.layout_type),console.log("💦",r)}for(let n of this.interactions_pointer)n.down(e,t);"fig"===t.selector.type&&this.event.emit_fig_click(e)}pointermove(e){for(let t of this.interactions_pointer)t.move(e)}pointerup(e){for(let t of this.interactions_pointer)t.up(e)}pointercancel(e){for(let t of this.interactions_pointer)t.cancel(e)}pointerleave(e){for(let t of this.interactions_pointer)t.leave(e)}dblclick(e){const t={selector:this.get_map_selector(e),pos:{x:e.clientX,y:e.clientY},selected_nodes:this.map.nodes_selected,view_cubes:this.map.get_view_cube(!1),map_sum_scale:this.map.get_upstream_sum_scale()};for(let n of this.interactions_pointer)n.dblclick(e,t)}wheel(e){for(let t of this.interactions_pointer)t.wheel(e)}contextmenu(e){for(let t of this.interactions_pointer)t.contextmenu(e)}}class ws extends bi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-nav-select"}check_allow(e,t){const{key:n}=t;return!![S.Keys.down,S.Keys.left,S.Keys.right,S.Keys.up].includes(n)}keydown(e,t){const n=t.key;if(!this.check_allow(e,t))return;const r=[S.Keys.down,S.Keys.left,S.Keys.right,S.Keys.up],o=this.root,i=this.cubes.get_types_cube(k.Cubes.submap);if(o instanceof oh&&o.nodes_selected.size>0)r.includes(n)&&o.move_select(n);else for(let[e,t]of i)t.move_select(n)}keyup(e){}}class ks extends bi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-add-child"}check_allow(e,t){const{key:n}=t;return"tab"===n}keydown(e,t){if(!this.check_allow(e,t))return;e.preventDefault();const{courier:n,history:r}=this,o=n.get_recorder();if(this.root instanceof oh){const e=this.root.nodes_selected,t=new Set;for(let n of e){const e=n.map2d,r=n.node_last.map2d.rect,i=Ju.get_default({x:r.x,y:r.y+r.height+e.node_gap_y}),s=es.append_child(n.id,[i]);o.tell(n,s),t.add(i.id)}this.root.clear_node_selected();for(let e of t)this.root.set_node_selected(e,!0)}const i=this.cubes.get_types_cube(k.Cubes.submap);for(let[e,t]of i){const e=t.get_nodes_selected(),n=new Set;for(let t of e){const e=t.map2d,r=t.node_last.map2d.rect,i=Ju.get_default({x:r.x,y:r.y+r.height+e.node_gap_y}),s=es.append_child(t.id,[i]);o.tell(t,s),n.add(i.id)}t.clear_node_selected();for(let e of n)t.set_node_selected(e,!0)}r.record(o)}keyup(e){}}class Ss extends bi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-add-siblings"}check_allow(e,t){return"enter"===t.key}keydown(e,t){if(!this.check_allow(e,t))return;const{courier:n,history:r}=this,o=n.get_recorder();let i=!1;if(this.root instanceof oh){const t=this.root.nodes_selected,n=new Set;for(let r of t){const t=r.env.upstream;if(!t){i=!0;continue}let s=r.id;e.shiftKey&&(s=r.env.prev_node?.id||null);const a=t.map2d,l=r.map2d.rect,c=Ju.get_default({x:l.x,y:l.y+l.height+a.node_gap_y}),d=es.append_child(t.id,[c],s);o.tell(t,d),n.add(c.id)}this.root.clear_node_selected();for(let e of n)this.root.set_node_selected(e,!0)}const s=this.cubes.get_types_cube(k.Cubes.submap);for(let[t,n]of s){const t=n.get_nodes_selected(),r=new Set;for(let n of t){const t=n.env.upstream;if(!t){i=!0;continue}let s=n.id;e.shiftKey&&(s=n.env.prev_node?.id||null);const a=t.map2d,l=n.map2d.rect,c=Ju.get_default({x:l.x,y:l.y+l.height+a.node_gap_y}),d=es.append_child(t.id,[c],s);o.tell(t,d),r.add(c.id)}n.clear_node_selected();for(let e of r)n.set_node_selected(e,!0)}i&&xi.tips?.tip_warning("无法在没有布局上游的节点添加同级"),r.record(o)}keyup(e){}}class Cs extends bi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-delete"}check_allow(e,t){const n="delete"===t.key||"backspace"===t.key,r=0===this.root.scopes.scope_count_normal,o=0===t.scopes;return n&&r&&o}keydown(e,t){if(!this.check_allow(e,t))return;const{courier:n,history:r}=this,o=n.get_recorder();if(this.root instanceof oh){const e=[...this.root.nodes_selected].map(e=>e.id);o.tell(this.root,Qi.node_remove(this.root.id,e))}const i=this.cubes.get_types_cube(k.Cubes.submap);for(let[e,t]of i){const e=[...t.nodes_selected].map(e=>e.id);o.tell(t,Qi.node_remove(t.id,e))}r.record(o)}keyup(e){}}class Ms extends bi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-edit"}check_allow(e,t){return" "===t.key}keydown(e,t){if(!this.check_allow(e,t))return;const n=this.root;let r;if(e.preventDefault(),n instanceof oh){const e=n.nodes_selected;for(let t of e)t.editable=!0,r=t}const o=n.cubes.get_types_cube(k.Cubes.submap);for(let[e,t]of o){const e=t.get_nodes_selected();for(let t of e)t.editable=!0,r=t}if(r){const e=this.courier.get_recorder(),t=zi.in_tail(r.id);e.tell(r,t),this.history.record(e)}}keyup(e){}}class zs extends bi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"note:scope-delete"}check_allow(e,t){const{key:n}=t;return this.root.scopes.scope_count_normal>0&&("backspace"===n||"delete"===n)}keydown(e,t){if(e.preventDefault(),e.stopImmediatePropagation(),!this.check_allow(e,t))return;e.preventDefault();const n=this.clipboard.delete_scope();n&&this.history.record(n)}keyup(e){}}class Ns extends bi{_keydown_handler=this.keydown.bind(this);_keyup_handler=this.keyup.bind(this);_useable_interaction_keyboard=!0;_map_interaction_keyboard=new Map;_note_interaction_keyboard=new Map;constructor(e){super(e),this.add_map_interaction_keyboard(new ws(this)),this.add_map_interaction_keyboard(new ks(this)),this.add_map_interaction_keyboard(new Ss(this)),this.add_map_interaction_keyboard(new Cs(this)),this.add_map_interaction_keyboard(new Ms(this)),this.add_note_interaction_keyboard(new zs(this)),this.register()}get useable_keyboard(){return this._useable_interaction_keyboard}get map_interactions_keyboard(){return Array.from(this._map_interaction_keyboard.values())}get note_interactions_keyboard(){return Array.from(this._note_interaction_keyboard.values())}add_note_interaction_keyboard(e){this._note_interaction_keyboard.set(e.name,e)}add_map_interaction_keyboard(e){this._map_interaction_keyboard.set(e.name,e)}set_useable_keyboard(e){this._useable_interaction_keyboard=e}register(){window.removeEventListener("keydown",this._keydown_handler),window.removeEventListener("keyup",this._keyup_handler),window.addEventListener("keydown",this._keydown_handler),window.addEventListener("keyup",this._keyup_handler)}keydown(e){if(!this.useable_keyboard)return;const t=document.activeElement,n={key:e.key.toLocaleLowerCase(),note_mode:this.stats.mode,scopes:this.root.scopes.scope_count_normal};for(let t of this.note_interactions_keyboard)t.check_allow(e,n)&&t.keydown(e,n);const r=t===document.body,o=this.stats.mode===k.Mode.edit;if(r&&o&&!this.hotkeys.validate_hotkeys(e,"uncursor"))for(let t of this.map_interactions_keyboard)t.keydown(e,n)}keyup(e){if(!this.useable_keyboard)return;const t=document.activeElement===document.body,n=this.stats.mode===k.Mode.edit;if(!(t&&n)||this.hotkeys.validate_hotkeys(e,"uncursor"))return;const r={key:e.key.toLocaleLowerCase(),note_mode:this.stats.mode,scopes:this.root.scopes.scope_count_normal};for(let t of this.map_interactions_keyboard)t.keyup(e,r)}}class As extends Ri{_dom;_children=[];_cubes=new Oi(this);_hotkeys=new Di(this);_config=new Fi(this);_history=new id(this);_cursor=new Gi(this);_courier=new Vi(this);_clipboard=new qi(this);_painter=new Hi(this);_event=new ji(this);_stats=new Bi(this);_listener=new Pi(this);_float=new Wi(this);_interaction=new Ns(this);_scopes=new Xi(this);_isdev=!1;data;constructor(e){super();const t=structuredClone(e),n=this.update_data(Ci.versions,t);if(!n.data||!n.usable)throw Error(`CubeRoot setup data failed, data unusable after update${n}`);this.data=n.data,this._cubes.add_cube(this),this.set_cmd_handler(_.Names.cube_reset,this.on_reset.bind(this)),this.set_cmd_handler(_.Names.cube_reorder,this.on_cube_reorder.bind(this)),this.set_cmd_handler(_.Names.cube_insert_child,this.on_insert_cube.bind(this)),this.set_cmd_handler(_.Names.cube_delete_child,this.on_delete_cube.bind(this)),this.set_cmd_handler(_.Names.cube_set_selection_css,this.on_cube_set_selection_css.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_cube_insert.bind(this)),this.set_cmd_handler(_.Names.cube_delete,this.on_cube_delete.bind(this)),this.set_cmd_handler(_.Names.cube_set_attr,this.on_cube_set_attr.bind(this)),this.set_cmd_handler(g.Names.cursor_in_tail,this.on_cursor_in_tail.bind(this)),Ai.init_cmd_handler(this)}get children(){return[...this._children]}get scopes(){return this._scopes}get editable(){return!0}get interaction(){return this._interaction}get config(){return this._config}get hotkeys(){return this._hotkeys}get stats(){return this._stats}get cubes(){return this._cubes}get cursor(){return this._cursor}get listener(){return this._listener}get float(){return this._float}get courier(){return this._courier}get history(){return this._history}get clipboard(){return this._clipboard}get painter(){return this._painter}get event(){return this._event}get root(){return this}get isdev(){return this._isdev}get dom(){return document.getElementById(this.id)}get clientRect(){return this.dom?.getBoundingClientRect()}get clientRects(){return this.dom?.getClientRects()}get pid(){}get index(){return 0}get css(){return{...this.data.css}}get attrs(){return structuredClone(this.data.attrs)}get info(){return this.data.info}get child_count(){return this.children.length}get child_first(){return this.children[0]}get child_last(){return this.children[this.children.length-1]}get id(){return this.data.id}get pcube(){}get type(){return this.data.type}get versions(){return structuredClone(this.data.versions)}get level(){return 0}get in_postil(){return!1}get host_postil(){return null}get next_cube_deep(){}get prev_cube_deep(){}get root_dom(){return this._dom}get is_empty(){const e=1===this.child_count,t=this.child_first.is_empty;return e&&t}get prev_cube(){}get next_cube(){}set_dev(e=!0){this._isdev=e,window.root=this}setup(){this.build_child(this.data)}find_child_cube(e){return this.children.find(t=>t.id===e)}find_child_index(e){return this.children.findIndex(t=>t.id===e)}find_next_cube(e){const t=this.find_child_index(e);return this.children[t+1]}find_prev_cube(e){const t=this.find_child_index(e);return this.children[t-1]}is_contains_cube(e){return!!e&&e.root===this}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}copy(e,t){const n=this.children.slice(e,t),r=[];for(let e of n){let t=e.export();r.push(t)}return r}find_cube(e){return this.cubes.find_cube(e)}filter(e){const t=[];for(let n of this.children)e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this.children)e(t),t.each(e)}find_upstream_untill(){}delete_edge(e,t){const{courier:n}=this,r=new ad(n);if("backward"===t){const t=e.find_upstream_untill(this);if(t&&t.is_empty)return t.remove_self();const n=e.prev_cube_deep;if(n&&n.is_empty)return n.remove_self();const o=n?.next_cube;if(o&&n.type===o.type)return o.merge("left");if(n)return r.tell(n,zi.in_tail(n.id))}else{const t=e.find_upstream_untill(this);if(t&&t.is_empty)return t.remove_self();const n=e.next_cube_deep;if(n&&n.is_empty)return n.remove_self();const o=n?.prev_cube;if(o&&n.type===o.type)return n.merge("left");if(n)return r.tell(n,zi.in_tail(n.id))}}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(this._children),{children:r,data:o}}get_sdk_version(){return Ci.get_sdk_meta()}on_reset(e){const{courier:t}=this,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=this.export().info,i=rd.build_cubes(n,this);return this.splice(0,this.child_count,...i),r.add_recover(Mi.reset(this.id,o)),r}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ad(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(Mi.reorder(this.id,s.id,c)),a}on_insert_cube(e){const{courier:t}=this,n=t.get_recorder();n.add_cmd(e);const{pos:r,data:o}=e;if(0===o.length)return n;const i=rd.pick(o,!0),s=[],{head:a,body:l,tail:c}=i;if(a.length+l.length+c.length>0){const e=[];if(a.length>0&&e.push(uu.get_default(i.head)),l.length>0&&e.push(...i.body),c.length>0&&e.push(uu.get_default(i.tail)),e.length>0){const t=bu.get_default(e);s.push(new bu(t,this))}}for(let e of i.roots)s.push(new bu(e,this));let d=this.get_valid_index(r);this.splice(d,0,...s);const u=s[s.length-1];return u&&n.tell(u,zi.in_tail(u.id)),n.add_recover(Mi.delete_child(this.id,"backward",[d,d+s.length])),n}on_delete_cube(e){const{courier:t,pcube:n,pid:r}=this,{dir:o,range:i}=e,[s,a]=i;if(!this.is_valid_range(i))return;const l=t.get_recorder();l.add_cmd(e);const c=this.children[s-1],d=this.children[a],u=a-s;if(s!==a){if(s<=0&&a>=this.child_count){const e=this.child_first;return this.child_count>1&&l.tell(this,Mi.delete_child(this.id,o,[1,this.child_count])),e.is_empty||l.tell(e,Mi.reset(e.id,[])),l}{let e=this.splice(s,u);c&&"backward"===o||!d?l.tell(c,zi.in_tail(c.id)):(d&&"forward"===o||!c)&&l.tell(d,zi.in_head(d.id));const t=e.data;l.add_recover(Mi.insert_child(this.id,t,s))}return l}}on_cube_set_selection_css(e){const{cursor:t,courier:n,pcube:r,pid:o}=this,{css:i,start_id:s,end_id:a,offset_end:l,offset_start:c}=e,d=new ad(n);if(s!==a||l!==c){if(a&&!s){const e=this.find_cube(a),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(0,t.index);for(let e of n)d.tell(e,Mi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d.tell(t,Mi.set_selection_css(t.id,i,null,a,"head",l)),d}if(s&&!a){const e=this.find_cube(s),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(t.index+1);for(let e of n)d.tell(e,Mi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d.tell(t,Mi.set_selection_css(t.id,i,s,null,c,"tail")),d}if("tail"===l&&"head"===c){for(let e of this.children)d.tell(e,Mi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d}if(a&&s){const e=this.find_cube(s),t=this.find_cube(a),n=e?.find_upstream_untill(this),r=t?.find_upstream_untill(this);if(!n||!r)return;const o=this.children.slice(n.index+1,r.index);for(let e of o)d.tell(e,Mi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d.tell(n,Mi.set_selection_css(n.id,i,s,null,c,"tail")),d.tell(r,Mi.set_selection_css(r.id,i,null,a,"head",l)),d}}}on_cube_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r,pcube:o}=this,i=new ad(t),{data:s,end_id:a,start_id:l,offset_end:c,offset_start:d}=e,u=this.find_cube(l),h=this.find_cube(a),p=u?.find_upstream_untill(this),f=h?.find_upstream_untill(this);if(!p||!f)return i;if(h!==u||d!==c)if(p&&p===f)i.tell(p,Mi.delete(p.id,"backward",l,a,d,c)),i.tell(p,Mi.insert(p.id,s,l,a,d,c));else{i.tell(f,Mi.delete(f.id,"backward",null,a,"head",c)),i.tell(this,Mi.delete_child(this.id,"backward",[p.index+1,f.index])),i.tell(this,Mi.insert_child(this.id,e.data,p.index+1)),i.tell(p,Mi.delete(p.id,"backward",l,null,d,"tail"));let t=e.data[e.data.length-1];if(t){const e=this.find_child_cube(t.id);e&&i.tell(e,zi.in_tail(t.id))}}else i.tell(h,Mi.insert(a,s,l,a,d,c));return i}on_cube_delete(e){const{courier:t,cursor:n}=this,{dir:r,start_id:o,end_id:i,offset_end:s,offset_start:a,reserve:l}=e,c=new ad(t);if(!o&&i){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,Mi.delete_child(this.id,r,[0,t.index])),c.tell(t,Mi.delete(t.id,r,o,i,"head",s)),c}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,Mi.delete_child(this.id,r,[t.index+1,this.child_count])),c.tell(t,Mi.delete(t.id,r,o,i,a,s)),c}if("head"===a&&"tail"===s)return c.tell(this,Mi.reset(this.id,[])),c;if(o&&i){const e=this.find_cube(o),t=this.find_cube(i);if(!(e instanceof Zd&&t instanceof Zd))return;const n=e.find_upstream_untill(this),l=t.find_upstream_untill(this);if(!n||!l)return c;const d=n.index,u=l.index;if(o!==i||a!==s)if(n===l)c.tell(n,Mi.delete(n.id,r,o,i,a,s,!0));else{c.tell(l,Mi.delete(l.id,r,null,i,"head",s)),c.tell(this,Mi.delete_child(this.id,"backward",[d+1,u])),c.tell(n,Mi.delete(n.id,r,o,null,a,"tail",!0));let t=0;if("number"==typeof a&&(t=a),c.tell(n,Mi.merge(n.id,"right",o,t)),n.is_empty)c.tell(this,Mi.delete_child(this.id,"backward",[n.index,n.index+1]));else if(e instanceof Zd){const n=e.pcube;c.tell(n,Mi.merge(n.id,"right",o,t))}}return c}}on_cube_set_attr(e){const{courier:t,cursor:n}=this,{attr:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===Object.keys(r).length)return;const i={};for(let e in r){const t=r[e];i[e]=structuredClone(jt(this.attrs[e]))||null,null===t?delete this.attrs[e]:this.attrs[e]=t}return this.status.update_attrs(this.attrs),o.add_recover(Mi.set_attr(this.id,i)),o}on_cursor_in_tail(e){const{courier:t}=this,n=this.child_last,r=new ad(t);if(n)return r.tell(n,zi.in_tail(n.id)),r}is_valid_range(e,t=!1){const[n,r]=e;return!(n<0||r>this.child_count)&&(!t||n!==r)}get_valid_range(e){let[t,n]=e;return t<0&&(t=0),n>this.child_count&&(n=this.child_count),[t,n]}}class Ts{__children=[];_cube;_data;_children=Pt(this.__children);_has_postil=Gt(!1);constructor(e){this._cube=e}get root(){return this.cube.root}get cube(){return this._cube}get info(){return this._data.info}get attrs(){return{...this._data.attrs}}get fold(){return this._data.attrs.fold}get css(){const e=this._data.attrs,t=this.cube.config,n=(e.indent||0)*t.data.line_indent+"px";return{...this._data.css,"margin-left":n}}get children(){return[...this._children]}get has_postil(){return this._has_postil.value}get child_first(){return this._children[0]}get child_last(){return this._children[this._children.length-1]}get child_count(){return this._children.length}init(){this._data=Rt(structuredClone(this.cube.data)),this.__children.splice(0,this.__children.length,...this.cube.children)}update_has_postil(e){this._has_postil.value=e}update_info(){this._data.info=this.cube.info}update_children(e){const t=e||this.cube.children;this._children.splice(0,this._children.length,...t)}update_attrs(e,t=!0){const n=e||this.cube.attrs;if(t){for(let e in this._data.attrs)e in n||delete this._data.attrs[e];this.cover(this._data.attrs,n)}else this.cover(this._data.attrs,n)}update_css(e,t=!0){const n=e||this.cube.css;if(t){for(let e in this._data.css)e in n||delete this._data.css[e];this.cover(this._data.css,n)}else this.cover(this._data.css,n)}cover(e,t){for(let n in t)"object"==typeof t[n]&&"object"==typeof e[n]?this.cover(e[n],t[n]):e[n]=t[n]}}class Rs extends Ts{_scopes=Pt(new Set);_postils=Pt(new Map);constructor(e){super(e)}get scopes(){return new Set(this._scopes)}get css(){const e=this.cube.config.css_vars;return{...super.css,...e}}get postils(){return new Map(this._postils)}get scopes_count(){return this._scopes.size}get scope_count_normal(){let e=0;for(let t of this._scopes)t.freeze||e++;return e}get scope_count_freeze(){return this.scopes_count-this.scope_count_normal}get scope_normal(){const e=new Set;for(let t of this._scopes)t.freeze||e.add(t);return e}get scope_freeze(){const e=new Set;for(let t of this._scopes)t.freeze&&e.add(t);return e}init(){this._data=Rt(structuredClone({...this.cube.data,info:[]})),this.update_children()}add_scope(e){this._scopes.add(Ht(e))}remove_scope(e){this._scopes.delete(e)}clear_scopes(){this._scopes.clear()}add_postil(e){this._postils.set(e.id,e)}remove_postil(e){this._postils.delete(e.id)}reset_postils(e){this._postils.clear();for(let t of e)this.add_postil(t)}}const Ps=On({__name:"cube-view",props:{cube:{}},setup:e=>(e,t)=>e.cube?(zo(),Oo(lr(e.cube.component),{key:0,cube:Ht(e.cube)},null,8,["cube"])):Go("v-if",!0)});function Os(e,t){if(t.freeze)return;e.preventDefault(),e.stopPropagation();const{doc:n,stats:r}=t,{deltaY:o,currentTarget:i}=e,s=t.config.data.revert_scope;o>0&&!s?t.expand("down"):t.expand("up")}const Es=On({__name:"note-scope",props:{selection:{}},setup(e){_i(()=>{if(!e.selection.pos)return;const t=Math.min(e.selection.pos.width,e.selection.pos.height);if(0===t)return;return{"font-size":Math.min(Math.max(Math.floor(t/3),18),64)+"px"}}),_i(()=>{if(!e.selection.pos)return;const t=Math.min(e.selection.pos.width,e.selection.pos.height);if(0===t)return;return{"font-size":Math.min(Math.max(Math.floor(t/3),18),64)+"px",display:e.selection.pos.width<30?"none":"unset"}});function t(){e.selection.freeze=!e.selection.freeze}function n(t){t.preventDefault(),t.stopPropagation(),e.selection.remove()}return(e,r)=>(zo(),Po("div",{class:fe(["note-scope",{freeze:e.selection.freeze}]),style:ce(e.selection.css),onWheel:r[0]||(r[0]=t=>Wt(Os)(t,e.selection)),onClick:t,onContextmenu:n},[(zo(!0),Po(yo,null,ur(e.selection.boxes,e=>{return zo(),Po(yo,{key:e.cube.id},[e.rect?(zo(),Po("div",{key:0,class:"scope-item",style:ce((t=e.rect,{left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px"}))},xe(e.cube.meta.cubename),5)):Go("v-if",!0)],64);var t}),128))],38))}});var Ls=o(6960);const Is=(0,Ls.A)(Es,[["__scopeId","data-v-42df742a"]]),Ds=["d","id","data-type","marker-start","marker-end"],Bs=On({__name:"cube-linker",props:{cube:{}},setup(e){const{status:t,pcube:n}=e.cube;return(r,o)=>(zo(),Po("path",{d:Wt(t).path,id:r.cube.id,class:fe(["cube-linker",{"line-delete-selected":n.status.is_line_deleted(e.cube)}]),style:ce(Wt(t).css),"data-type":r.cube.type,"marker-start":`url(#${Wt(t).anchor_left})`,"marker-end":`url(#${Wt(t).anchor_right})`},null,14,Ds))}}),js=(0,Ls.A)(Bs,[["__scopeId","data-v-f5ddd6b8"]]),Hs={key:0},qs=["d"],Fs=["d"],$s=["d"],Gs=["transform"],Vs={class:"drag-counter-text","dominant-baseline":"central","text-anchor":"middle"},Us=On({__name:"op-node-drag",props:{cube:{}},setup(e){const t=e.cube.map_interaction.node_intention;return(e,n)=>Wt(t).drag_count>0?(zo(),Po("g",Hs,[Go(" 意图区域高亮 "),(zo(!0),Po(yo,null,ur(Wt(t).intention_list,(e,n)=>(zo(),Po("path",{key:n,d:Wt(t).make_rect_path(e.area),class:fe(["intention-area",`intention-area-${e.type}`])},null,10,qs))),128)),Go(" 占位连线 "),Wt(t).placeholder_linker?(zo(),Po("path",{key:0,class:"placeholder-intention-linker",d:Wt(t).placeholder_linker},null,8,Fs)):Go("v-if",!0),Go(" 占位节点 "),Wt(t).placeholder_path?(zo(),Po("path",{key:1,class:"placeholder-intention-node",d:Wt(t).placeholder_path},null,8,$s)):Go("v-if",!0),Go(" 拖拽计数器:跟随鼠标,显示拖拽节点数量 "),Wt(t).cursor_pos?(zo(),Po("g",{key:2,transform:`translate(${Wt(t).cursor_pos.x+14}, ${Wt(t).cursor_pos.y-14})`,class:"drag-counter"},[n[0]||(n[0]=Bo("circle",{r:"11",class:"drag-counter-circle"},null,-1)),Bo("text",Vs,xe(Wt(t).drag_count),1)],8,Gs)):Go("v-if",!0)])):Go("v-if",!0)}}),Ks=(0,Ls.A)(Us,[["__scopeId","data-v-33fe1bba"]]);let Ws;const Ys="undefined"!=typeof window&&window.trustedTypes;if(Ys)try{Ws=Ys.createPolicy("vue",{createHTML:e=>e})}catch(e){}const Xs=Ws?e=>Ws.createHTML(e):e=>e,Js="undefined"!=typeof document?document:null,Zs=Js&&Js.createElement("template"),Qs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o="svg"===t?Js.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Js.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Js.createElement(e,{is:n}):Js.createElement(e);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>Js.createTextNode(e),createComment:e=>Js.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Js.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==i&&(o=o.nextSibling););else{Zs.innerHTML=Xs("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);const o=Zs.content;if("svg"===r||"mathml"===r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ea=Symbol("_vtc");Boolean;const ta=Symbol("_vod"),na=Symbol("_vsh"),ra={name:"show",beforeMount(e,{value:t},{transition:n}){e[ta]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):oa(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),oa(e,!0),r.enter(e)):r.leave(e,()=>{oa(e,!1)}):oa(e,t))},beforeUnmount(e,{value:t}){oa(e,t)}};function oa(e,t){e.style.display=t?e[ta]:"none",e[na]=!t}const ia=Symbol("");const sa=/(?:^|;)\s*display\s*:/;const aa=/\s*!important$/;function la(e,t,n){if(D(n))n.forEach(n=>la(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=da[t];if(n)return n;let r=Z(t);if("filter"!==r&&r in e)return da[t]=r;r=te(r);for(let n=0;n<ca.length;n++){const o=ca[n]+r;if(o in e)return da[t]=o}return t}(e,t);aa.test(n)?e.setProperty(ee(r),n.replace(aa,""),"important"):e[r]=n}}const ca=["Webkit","Moz","ms"],da={};const ua="http://www.w3.org/1999/xlink";function ha(e,t,n,r,o,i=_e(t)){r&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(ua,t.slice(6,t.length)):e.setAttributeNS(ua,t,n):null==n||i&&!ge(n)?e.removeAttribute(t):e.setAttribute(t,i?"":F(n)?String(n):n)}function pa(e,t,n,r,o){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Xs(n):n));const i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){const r="OPTION"===i?e.getAttribute("value")||"":e.value,o=null==n?"checkbox"===e.type?"on":"":String(n);return r===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let s=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=ge(n):null==n&&"string"===r?(n="",s=!0):"number"===r&&(n=0,s=!0)}try{e[t]=n}catch(e){0}s&&e.removeAttribute(o||t)}function fa(e,t,n,r){e.addEventListener(t,n,r)}const ma=Symbol("_vei");function _a(e,t,n,r,o=null){const i=e[ma]||(e[ma]={}),s=i[t];if(r&&s)s.value=r;else{const[n,a]=function(e){let t;if(ga.test(e)){let n;for(t={};n=e.match(ga);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):ee(e.slice(2));return[n,t]}(t);if(r){const s=i[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();on(function(e,t){if(D(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=va(),n}(r,o);fa(e,n,s,a)}else s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,a),i[t]=void 0)}}const ga=/(?:Once|Passive|Capture)$/;let ba=0;const xa=Promise.resolve(),va=()=>ba||(xa.then(()=>ba=0),ba=Date.now());const ya=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;"undefined"!=typeof HTMLElement&&HTMLElement;Symbol("_moveCb"),Symbol("_enterCb");const wa=e=>{const t=e.props["onUpdate:modelValue"]||!1;return D(t)?e=>oe(t,e):t};function ka(e){e.target.composing=!0}function Sa(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ca=Symbol("_assign"),Ma={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[Ca]=wa(o);const i=r||o.props&&"number"===o.props.type;fa(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),i&&(r=se(r)),e[Ca](r)}),n&&fa(e,"change",()=>{e.value=e.value.trim()}),t||(fa(e,"compositionstart",ka),fa(e,"compositionend",Sa),fa(e,"change",Sa))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},s){if(e[Ca]=wa(s),e.composing)return;const a=null==t?"":t;if((!i&&"number"!==e.type||/^0\d/.test(e.value)?e.value:se(e.value))!==a){if(document.activeElement===e&&"range"!==e.type){if(r&&t===n)return;if(o&&e.value.trim()===a)return}e.value=a}}};const za=O({patchProp:(e,t,n,r,o,i)=>{const s="svg"===o;"class"===t?function(e,t,n){const r=e[ea];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){const r=e.style,o=q(n);let i=!1;if(n&&!o){if(t)if(q(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&la(r,t,"")}else for(const e in t)null==n[e]&&la(r,e,"");for(const e in n)"display"===e&&(i=!0),la(r,e,n[e])}else if(o){if(t!==n){const e=r[ia];e&&(n+=";"+e),r.cssText=n,i=sa.test(n)}}else t&&e.removeAttribute("style");ta in e&&(e[ta]=i?r.display:"",e[na]&&(r.display="none"))}(e,n,r):R(t)?P(t)||_a(e,t,0,r,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&ya(t)&&H(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(ya(t)&&q(n))return!1;return t in e}(e,t,r,s))?(pa(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||ha(e,t,r,s,0,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&q(r)?("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),ha(e,t,r,s)):pa(e,Z(t),r,0,t)}},Qs);let Na;function Aa(){return Na||(Na=Yr(za))}const Ta=(...e)=>{const t=Aa().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Pa(e);if(!r)return;const o=t._component;H(o)||o.render||o.template||(o.template=r.innerHTML),1===r.nodeType&&(r.textContent="");const i=n(r,!1,Ra(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function Ra(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Pa(e){if(q(e)){return document.querySelector(e)}return e}const Oa={class:"map-mini"},Ea={class:"map-mini-title"},La={class:"scale-btns"},Ia=["onClick"],Da=["width","height"],Ba=On({__name:"map-mini",props:{canvas:{}},setup(e){const t=Gt(),n=[{label:"0.5×",value:.5},{label:"1×",value:1},{label:"2×",value:2},{label:"3×",value:3}];let r=!1,o=0,i=0;function s(e){0===e.button&&(r=!0,o=e.clientX,i=e.clientY,e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault())}function a(t){if(!r)return;const n=t.clientX-o,s=t.clientY-i;o=t.clientX,i=t.clientY,e.canvas.translate_delta(n,s),t.preventDefault()}function l(t){const n=t.currentTarget;n?.hasPointerCapture(t.pointerId)&&n.releasePointerCapture(t.pointerId),r=!1,e.canvas.map.check_show()}return Jn(()=>{const n=t.value;n&&(e.canvas.init(n),fn(()=>e.canvas.refresh()))}),oo(()=>[e.canvas.ui_scale,e.canvas.ui_visible],async()=>{await fn(),e.canvas.refresh()}),(e,r)=>Mn((zo(),Po("div",Oa,[Bo("div",Ea,[r[0]||(r[0]=Bo("span",{class:"map-mini-label"},"小地图",-1)),Bo("div",La,[(zo(),Po(yo,null,ur(n,t=>Bo("button",{key:t.value,class:fe({active:e.canvas.ui_scale===t.value}),onClick:n=>e.canvas.ui_scale=t.value},xe(t.label),11,Ia)),64))])]),Bo("canvas",{ref_key:"fig",ref:t,width:e.canvas.ui_width,height:e.canvas.ui_height,style:ce({width:e.canvas.ui_width+"px",height:e.canvas.ui_height+"px"}),onPointerdown:s,onPointermove:a,onPointerup:l,onPointercancel:l},null,44,Da)],512)),[[ra,e.canvas.ui_visible]])}}),ja=(0,Ls.A)(Ba,[["__scopeId","data-v-6a36cb14"]]),Ha={class:"map-status"},qa={class:"tool-item map-scale"},Fa={class:"tool-item map-nodes"},$a=On({__name:"map-status",props:{cube:{}},setup(e){const{status:t}=e.cube;_i(()=>e.cube.cubes.get_types_cube(k.Cubes.node));function n(t){const n=e.cube.dom_rect,r={x:n.x+n.width/2,y:n.y+n.height/2};e.cube.scale_by_point(r,t,t)}return(e,r)=>(zo(),Po(yo,null,[Bo("div",Ha,[Bo("div",qa,[Bo("span",{class:"iconfont icon-icon_window_small_new-copy-copy",onClick:r[0]||(r[0]=e=>n(-.1))}),Bo("span",null,xe((100*t.matrix2d.a).toFixed(0)+"%"),1),Bo("span",{class:"iconfont icon-add",onClick:r[1]||(r[1]=e=>n(.1))})]),Bo("div",Fa,[Bo("span",null,"节点 :"+xe(`${Wt(t).nodes_view_count}✦${Wt(t).nodes_count}`),1)]),Bo("div",{class:fe(["tool-item map-canvas",{active:e.cube.canvas.ui_visible}]),onClick:r[2]||(r[2]=t=>e.cube.canvas.toggle_visible())},[...r[3]||(r[3]=[Bo("span",{class:"iconfont icon-map2"},"地图",-1)])],2)]),jo(ja,{canvas:Ht(e.cube.canvas)},null,8,["canvas"])],64))}}),Ga=(0,Ls.A)($a,[["__scopeId","data-v-09a4750a"]]);class Va{ps;resolve;reject;constructor(){this.ps=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const Ua=new Va,Ka=Rt({point:{x:0,y:0},css:{},cube:void 0,menu:void 0,stack_pos:[],stack_menus:[],stack_rect:[]}),Wa=Rt({open:!1,data:{},submit(){}});function Ya(e,t){Wa.open=!0,Wa.submit=t,Wa.data=e}function Xa(e,t){const{courier:n,history:r}=e,o=n.get_recorder(),i=e.pcube;if("A"===t)if(e instanceof bu){const t=bu.get_default();o.tell(i,Mi.insert_child(i.id,[t],e.index+1))}else{const t=uu.get_default(),n=Mi.insert_child(i.id,[t],e.index+1);o.tell(i,n)}else if("B"===t&&e)if(e instanceof bu){const t=bu.get_default();o.tell(i,Mi.insert_child(i.id,[t],e.index))}else{const t=uu.get_default(),n=Mi.insert_child(i.id,[t],e.index);o.tell(i,n)}r.record(o)}function Ja(e,t=!1){const n=[{usable:!0,title:"向前插入行",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){Xa(e,"B")}},{usable:!0,title:"向后插入行",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){Xa(e,"A")}}],r={usable:!0,title:"全屏",icon:["iconfont","icon-square"],has_submenu:!1,mouseenter(e){},click(t){e.dom?.requestFullscreen()}};return t&&n.push(r),n}function Za(e,t){return{...t,cube:Ht(e)}}function Qa(e){const t=[...Ja(e,!0),{usable:!0,title:"语言",icon:["iconfont","icon-square"],has_submenu:!0,mouseenter:t=>function(e){const t={cube:e,title:"选择语言",layout:"grid",is_cube_menu:!1,active:[e.active_tab?.lang||""],menus:e.langs.map(t=>({title:t,usable:!0,icon:["iconfont","icon-square"],mouseenter(e){},click(n){const{courier:r,history:o,id:i,active_tab:s}=e;if(!s)return;const a=r.get_recorder();a.tell(e,Vh.change_lang(i,s.id,t)),o.record(a)}}))};return t}(e),click(e){}},{usable:!0,title:"主题",icon:["iconfont","icon-square"],has_submenu:!0,mouseenter:t=>function(e){const t={cube:e,title:"选择主题",layout:"grid",is_cube_menu:!1,active:[e.active_tab?.theme||""],menus:e.themes.map(t=>({title:t,usable:!0,icon:["iconfont","icon-square"],mouseenter(e){},click(n){const{courier:r,history:o,id:i,active_tab:s}=e;if(!s)return;const a=r.get_recorder();a.tell(e,Vh.change_theme(i,s.id,t)),o.record(a)}}))};return t}(e),click(e){}},{usable:!0,title:"添加代码块",icon:["iconfont","icon-add"],click(t){Ya({文件名:""},t=>{const n=t["文件名"],r=n.lastIndexOf(".");let o="typescript";if(r>=0){const e=n.slice(r);o=zg[e]||o}const{code_theme:i}=e.config.data,s=e.create_tab(o,n,i),a=e.courier.get_recorder();a.tell(e,Vh.add(e.id,s)),e.history.record(a)})},mouseenter(e){}},{usable:!0,title:"重命名",icon:["iconfont","icon-rename"],click(t){Ya({文件名:e.active_tab?.name||""},t=>{const n=e.active_tab;if(!n)return;const r=t["文件名"],o=e.courier.get_recorder();o.tell(e,Vh.rename(e.id,n.id,r)),e.history.record(o)})},mouseenter(e){}},{usable:!0,title:"复制代码",icon:["iconfont","icon-copy"],click(t){e.copy_code()},mouseenter(e){}},{usable:!0,title:"清空代码",icon:["iconfont","icon-eraser"],click(t){const n=e.active_tab;if(!n)return;const r=e.courier.get_recorder();r.tell(e,Vh.update(e.id,n.id,"")),e.history.record(r)},mouseenter(e){}},{usable:!0,title:"删除代码",icon:["iconfont","icon-close"],click(t){const n=e.active_tab;if(!n)return;const r=e.courier.get_recorder();r.tell(e,Vh.remove(e.id,n.id)),e.history.record(r)},mouseenter(e){}}];return{cube:e,title:e.meta.cubename,layout:"grid",is_cube_menu:!0,active:[],menus:t}}function el(e){const t=e.get_active_cell(),n=[...Ja(e),{usable:!0,title:e.title?"移除标题":"添加标题",icon:["iconfont","icon-a-Addheader2x"],has_submenu:!1,mouseenter(e){},click(t){const{history:n,courier:r,id:o}=e,i=r.get_recorder();if(e.title){const t=Bw.remove_title(o);i.tell(e,t)}else{const t=Cu.get_default(),n=Bw.add_title(o,t);i.tell(e,n)}n.record(i)}},{usable:e.selection_cells.length>0,title:"复制子表",icon:["iconfont","icon-grid"],has_submenu:!1,mouseenter(e){},click(t){const{clipboard:n}=e,r=xi.tips,o=e.copy_selection_table();if(!o)return xi.tips?.tip_error("复制子表失败");const i=e.get_selection_text();n.set_clipboard_cubedata(i,[o]),r?.tip_success("复制子表成功")}},{usable:e.selection_cells.length>0,title:"合并单元格",icon:["iconfont","icon-hebingdanyuange"],has_submenu:!1,mouseenter(e){},click(t){!function(e){const{courier:t,id:n,history:r}=e,o=xi.tips,i=t.get_recorder(),s=e.get_selection_area();if(!s)return o?.tip_info("无选中单元格");i.tell(e,Bw.merge(n,s)),r.record(i)}(e)}},{usable:!!t,title:"扩大当前列宽",icon:["iconfont","icon-expand-horizontal-1--expand-resize-bigger-horizont"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){il(e,1)}},{usable:!!t,title:"缩小当前列宽",icon:["iconfont","icon-shrink-horizontal-1--resize-shrink-bigger-horizont"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){il(e,-1)}},{usable:!!t,title:"向左插入列",icon:["iconfont","icon-cc-arrow-left-square"],has_submenu:!1,shortcut:"ctrl + shift + ⇠",mouseenter(e){},click(t){tl(e)}},{usable:!!t,title:"向右插入列",icon:["iconfont","icon-cc-arrow-right-square"],has_submenu:!1,shortcut:"ctrl + shift + ⇢",mouseenter(e){},click(t){nl(e)}},{usable:!!t,title:"向上插入行",icon:["iconfont","icon-cc-arrow-up-square"],has_submenu:!1,shortcut:"ctrl + shift + ↑",mouseenter(e){},click(t){rl(e)}},{usable:!!t,title:"向下插入行",icon:["iconfont","icon-cc-arrow-down-square"],has_submenu:!1,shortcut:"ctrl + shift + ⇣",mouseenter(e){},click(t){ol(e)}},{usable:!!t,title:"向左插入单元格",icon:["iconfont","icon-cc-arrow-left-square"],has_submenu:!1,shortcut:"ctrl + ⇠",mouseenter(e){},click(t){tl(e,!0)}},{usable:!!t,title:"向右插入单元格",icon:["iconfont","icon-cc-arrow-right-square"],has_submenu:!1,shortcut:"ctrl + ⇢",mouseenter(e){},click(t){nl(e,!0)}},{usable:!!t,title:"向上插入单元格",icon:["iconfont","icon-cc-arrow-up-square"],has_submenu:!1,shortcut:"ctrl + ↑",mouseenter(e){},click(t){rl(e,!0)}},{usable:!!t,title:"向下插入单元格",icon:["iconfont","icon-cc-arrow-down-square"],has_submenu:!1,shortcut:"ctrl + ⇣",mouseenter(e){},click(t){ol(e,!0)}},{usable:!!t,title:"删除当前行",icon:["iconfont","icon-shanchuhang"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){!function(e){const{cursor:t,courier:n,stats:r,history:o,id:i}=e,s=xi.tips,{cube_end:a}=t,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");const c=e.check_orderly_row(l.row);if(!c)return s?.tip_info("当前行不整齐");{const t=n.get_recorder();t.tell(e,Bw.remove_row(i,l.row)),o.record(t)}}(e)}},{usable:!!t,title:"删除当前列",icon:["iconfont","icon-shanchulie"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){!function(e){const{cursor:t,courier:n,stats:r,history:o,id:i}=e,s=xi.tips,{cube_end:a}=t,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");const c=e.check_orderly_col(l.col);if(!c)return s?.tip_info("当前列不整齐");{const t=n.get_recorder();t.tell(e,Bw.remove_col(i,l.col)),o.record(t)}}(e)}},{usable:!!t,title:"删除当前单元格",icon:["iconfont","icon-list-delete-cell"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){!function(e){const{cursor:t,courier:n,stats:r,history:o,id:i}=e,s=xi.tips,{cube_end:a}=t,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");const c=n.get_recorder();c.tell(e,Bw.remove_cell(i,l.box.id)),o.record(c)}(e)}}];return{cube:e,title:e.meta.cubename,layout:"grid",is_cube_menu:!0,active:[],menus:n}}function tl(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=xi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row,l.col-1))return s?.tip_info("左侧已存在单元格");if(l.col-1<0)return s?.tip_info("左侧已达边界");{const t=r.get_recorder(),n={row:l.row,col:l.col-1,rowspan:1,colspan:1,data:Cu.get_default()};t.tell(e,Bw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_col_left(t.left))return s?.tip_info("左侧不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[0];t++)o.push(Cu.get_default());n.tell(e,Bw.add_col(e.id,l.col,o)),i.record(n)}}function nl(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=xi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row,l.col+1))return s?.tip_info("右侧已存在单元格");if(l.col+1>=e.size[1])return s?.tip_info("右侧已达边界");{const t=r.get_recorder(),n={row:l.row,col:l.col+1,rowspan:1,colspan:1,data:Cu.get_default()};t.tell(e,Bw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_col_right(t.right))return s?.tip_info("右侧不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[0];t++)o.push(Cu.get_default());n.tell(e,Bw.add_col(e.id,l.col+l.colspan,o)),i.record(n)}}function rl(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=xi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row-1,l.col))return s?.tip_info("上方已存在单元格");if(l.row-1<0)return s?.tip_info("上方已达边界");{const t=r.get_recorder(),n={row:l.row-1,col:l.col,rowspan:1,colspan:1,data:Cu.get_default()};t.tell(e,Bw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_row_top(t.top))return s?.tip_info("上方不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[1];t++)o.push(Cu.get_default());n.tell(e,Bw.add_row(e.id,l.row,o)),i.record(n)}}function ol(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=xi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row+1,l.col))return s?.tip_info("下方已存在单元格");if(l.row+1>=e.size[0])return s?.tip_info("下方已达边界");{const t=r.get_recorder(),n={row:l.row+1,col:l.col,rowspan:1,colspan:1,data:Cu.get_default()};t.tell(e,Bw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_row_bottom(t.bottom))return s?.tip_info("下方不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[1];t++)o.push(Cu.get_default());n.tell(e,Bw.add_row(e.id,l.row+l.rowspan,o)),i.record(n)}}function il(e,t){const{cursor:n,courier:r,stats:o,history:i,id:s}=e,a=xi.tips,{cube_end:l}=n,c=e.get_active_cell();if(!c)return a?.tip_info("未发现激活单元格");const d=r.get_recorder(),u=e.get_cell_area(c);d.tell(e,Bw.col_resize(s,[u.left,u.right],t)),i.record(d)}let sl,al,ll=!1,cl=null,dl=null;function ul(e){const{courier:t,history:n,id:r,cubes:o}=e,i=t.get_recorder();i.tell(e,Mi.fold(r,!e.attrs.fold)),n.record(i);for(let t of Object.values(o.postils))t.pcube?.top===e&&t.visible(!1);const s=e.child_first.id;if(!s)return;const a=document.getElementById(s);a?.scrollIntoView({block:"nearest",behavior:"smooth"})}function hl(e,t){ul(t)}function pl(e,t){e.preventDefault();const{root:n,stats:r}=t;r.anchor_root_id===t.id?r.anchor_root_id="":n.stats.anchor_root_id=t.id}function fl(e){const t=[...Ja(e),{usable:!0,title:"添加块",shortcut:"",has_submenu:!1,icon:["iconfont","icon-add"],mouseenter(){},click(){!function(e){const{courier:t,history:n}=e,r=t.get_recorder(),o=[Cu.get_default()];r.tell(e,Mi.insert_child(e.id,o,e.child_count)),n.record(r)}(e)}},{usable:!0,title:"布局•限定列宽",shortcut:"",has_submenu:!0,icon:["iconfont","icon-circle"],mouseenter:()=>function(e){const t=[{usable:!0,title:120,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,120)}},{usable:!0,title:140,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,140)}},{usable:!0,title:160,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,160)}},{usable:!0,title:180,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,180)}},{usable:!0,title:200,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,200)}}],n={cube:Ht(e),title:"限定列宽",layout:"list",is_cube_menu:!1,active:[e.attrs.column_width],menus:t};return n}(e),click(){}},{usable:!0,title:"布局•限定列数",shortcut:"",has_submenu:!0,icon:["iconfont","icon-circle"],mouseenter:()=>function(e){const t=[{usable:!0,title:2,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){ml(e,2)}},{usable:!0,title:3,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){ml(e,3)}},{usable:!0,title:4,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){ml(e,4)}},{usable:!0,title:5,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){ml(e,5)}},{usable:!0,title:6,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){ml(e,6)}}],n={cube:Ht(e),title:"限定列数",layout:"list",is_cube_menu:!1,active:[e.attrs.column_count],menus:t};return n}(e),click(){}}];return{cube:Ht(e),title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}function ml(e,t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,Mi.set_attr(e.id,{column_count:t,column_width:null})),r.record(o)}function _l(e,t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,Mi.set_attr(e.id,{column_width:t,column_count:null})),r.record(o)}class gl{static reset(e,t){return{id:e,name:s.Names.reset,data:t}}static add(e,t,n){return{id:e,name:s.Names.add,data:t,pos:n}}static remove(e,t){return{id:e,name:s.Names.remove,range:t}}static indent(e,t){return{id:e,name:s.Names.indent,items:t}}}function bl(e,t=!1){const n=e,{cursor:r,courier:o,history:i}=e,{cube_start:s,cube_end:a}=r;if(!s||!a)return;const l=o.get_recorder();if(t){const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!1});l.tell(n,gl.indent(n.id,o)),i.record(l)}else{const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!0});l.tell(n,gl.indent(n.id,o)),i.record(l)}}function xl(e,t=!1){const n=e,{cursor:r,courier:o,history:i}=e,{cube_start:s,cube_end:a}=r;if(!s||!a)return;const l=o.get_recorder();if(t){const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!1});l.tell(n,Dh.indent(n.id,o)),i.record(l)}else{const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!0});l.tell(n,Dh.indent(n.id,o)),i.record(l)}}function vl(e,t=!1){const n=e,{cursor:r,courier:o,history:i}=e,{cube_start:s,cube_end:a}=r;if(!s||!a)return;const l=o.get_recorder();if(t){const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!1});l.tell(n,kh.indent(n.id,o)),i.record(l)}else{const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!0});l.tell(n,kh.indent(n.id,o)),i.record(l)}}function yl(e,t="tail"){const{courier:n,history:r}=e,o=new ad(n),i=[Cu.get_default(),Cu.get_default()],s=_h.insert_row(e.id,t,[i]);o.tell(e,s),r.record(o)}const wl=Rt({alpha:8,bg:"#ffffff"}),kl=window.matchMedia("(prefers-color-scheme: dark)");kl.addEventListener("change",e=>{e.matches?(wl.bg="#000000",console.log("切换到深色模式")):(wl.bg="#ffffff",console.log("切换到浅色模式"))});function Sl(e,t,n="#FFFFFF"){return function(e,t,n="#FFFFFF"){const r=/^#([0-9A-F]{3}){1,2}$/i;if(!r.test(e)||!r.test(n))throw new Error("Invalid hex color format");const o=e=>{let t=e.replace("#","");return 3===t.length&&(t=t.split("").map(e=>e+e).join("")),t},i=o(e),s=o(n),a={r:parseInt(i.substring(0,2),16),g:parseInt(i.substring(2,4),16),b:parseInt(i.substring(4,6),16)},l={r:parseInt(s.substring(0,2),16),g:parseInt(s.substring(2,4),16),b:parseInt(s.substring(4,6),16)},c=[];for(let e=0;e<t;e++){const n=e/(t-1||1),r=Math.round(a.r+(l.r-a.r)*n),o=Math.round(a.g+(l.g-a.g)*n),i=Math.round(a.b+(l.b-a.b)*n),s="#"+((1<<24)+(r<<16)+(o<<8)+i).toString(16).slice(1).toUpperCase(),d=Cl(r,o,i,150);c.push({fill:s,color:d})}return c}(e,t,n)}function Cl(e,t,n,r=158){return(299*e+587*t+114*n)/1e3>r?"#000000":"#FFFFFF"}function Ml(e){if("transparent"===e)return{r:255,g:255,b:255,a:0};if(!/^#([0-9A-F]{3,4}){1,2}$/i.test(e))throw new Error(`Invalid hex color format: ${e}`);let t=e.replace("#","").toUpperCase();return 3!==t.length&&4!==t.length||(t=t.split("").map(e=>e+e).join("")),6===t.length&&(t+="FF"),{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:parseInt(t.substring(6,8),16)/255}}kl.matches?(wl.bg="#000000",console.log("当前是深色模式")):(wl.bg="#ffffff",console.log("当前是浅色模式(或无偏好)"));const zl={class:"menu-node-fill"},Nl={class:"box-items"},Al=["onClick"],Tl=["onClick"],Rl=On({__name:"menu-node-fill",props:{cube:{},hide:{type:Function}},setup(e){const t=[...Sl("#000000",13).slice(0,-1),...Sl("#ff006e",13).slice(0,-1),...Sl("#fb5607",13).slice(0,-1),...Sl("#f0f600",13).slice(0,-1),...Sl("#affc41",13).slice(0,-1),...Sl("#06d6a0",13).slice(0,-1),...Sl("#00b4d8",13).slice(0,-1),...Sl("#5c7aff",13).slice(0,-1),...Sl("#7400b8",13).slice(0,-1)],n=_i(()=>{const e=[{name:"清空",value:{fill:null,color:null},css:{background:"transparent"}},{name:"透明",value:{fill:"transparent"},css:{background:"transparent"}}],n=function(e){if(e<1||e>10)throw new Error("透明度等级必须在1-10之间");if(!Number.isInteger(e))throw new Error("透明度等级必须是整数");const t=(e-1)/9;return Math.round(255*t).toString(16).toUpperCase().padStart(2,"0")}(wl.alpha);for(let r of t){let t=r.fill+n;e.push({name:"",value:{fill:t},css:{background:t}})}return e});return(t,r)=>(zo(),Po("div",zl,[r[0]||(r[0]=Bo("div",{class:"menu-title"},[Bo("span",{class:"title iconfont icon-sp"},"节点填充色")],-1)),Bo("div",Nl,[(zo(),Po(yo,null,ur(10,e=>Bo("div",{class:fe(["alpha-item",{active:Wt(wl).alpha===e}]),onClick:t=>{return n=e,void(wl.alpha=n);var n}},xe(e),11,Al)),64)),(zo(!0),Po(yo,null,ur(n.value,t=>(zo(),Po("div",{class:"background-item",style:ce(t.css),onClick:n=>function(t){const{courier:n,history:r}=e.cube,o=n.get_recorder(),i=e.cube.map,s=new Set([...i.nodes_selected,e.cube]);for(let e of s){const n=es.layout_change(e.id,t.value);o.tell(e,n)}r.record(o)}(t)},xe(t.name),13,Tl))),256))])]))}}),Pl=(0,Ls.A)(Rl,[["__scopeId","data-v-ab778236"]]);class Ol{static check_allow(e,t,n=!0){if(e?.is_layout_root&&!e.attrs.root||!e?.env.layout_root||n&&!t)return!0;const r=e.env.layout_type;return"right"===r?this.right.includes(t):"left"===r?this.left.includes(t):"up"===r?this.up.includes(t):"down"===r?this.down.includes(t):"time-right"===r?this.time_right.includes(t):"time-down"===r?this.time_down.includes(t):"file-tree"!==r||this.file_tree.includes(t)}static get left(){return["left","right","up","down","time-down","time-right","file-tree"]}static get right(){return["right","left","up","down","time-down","time-right","file-tree"]}static get up(){return["left","right","up","down","time-right","time-down","file-tree"]}static get down(){return["left","right","up","down","time-right","time-down","file-tree"]}static get time_right(){return["left","right","down","up","time-down","file-tree"]}static get time_down(){return["left","right","up","down","time-right","file-tree"]}static get file_tree(){return["left","right","up","down","time-right","time-down","file-tree"]}static get_layout_icons(e){if(!e)return[];return{right:["iconfont","icon-right"],left:["iconfont","icon-left"],up:["iconfont","icon-up"],down:["iconfont","icon-down"],"time-down":["iconfont","icon-time-down"],"time-right":["iconfont","icon-time-right"],"file-tree":["iconfont","icon-file-tree"]}[e]||[]}static get_layout_detail(e){return[{type:null,name:"无布局",icon:["iconfont","icon-close"],usable:this.check_allow(e,null)},{type:"right",name:"向右逻辑图",icon:["iconfont","icon-right"],usable:this.check_allow(e,"right")},{type:"left",name:"向左逻辑图",icon:["iconfont","icon-left"],usable:this.check_allow(e,"left")},{type:"up",name:"向上逻辑图",icon:["iconfont","icon-up"],usable:this.check_allow(e,"up")},{type:"down",name:"向下逻辑图",icon:["iconfont","icon-down"],usable:this.check_allow(e,"down")},{type:"time-right",name:"时间向右逻辑图",icon:["iconfont","icon-time-right"],usable:this.check_allow(e,"time-right")},{type:"time-down",name:"时间向下逻辑图",icon:["iconfont","icon-time-down"],usable:this.check_allow(e,"time-down")},{type:"file-tree",name:"文件树",icon:["iconfont","icon-file-tree"],usable:this.check_allow(e,"file-tree")}]}}const El={class:"menu-node-layout"},Ll=["onClick"],Il=On({__name:"menu-node-layout",props:{cube:{},hide:{type:Function}},setup(e){const t=e.cube,n=_i(()=>Ol.get_layout_detail(t?.env.upstream));return(r,o)=>(zo(),Po("div",El,[(zo(!0),Po(yo,null,ur(n.value,n=>(zo(),Po("div",{class:fe(["layout-item",{usable:n.usable}]),onClick:r=>function(t,n){if(!t||!n.usable)return e.hide();const{courier:r,history:o}=t,i=t.map,s=new Set([...i.nodes_selected,t]),a=r.get_recorder();for(let e of s){const t=es.layout_change(e.id,{layout:n.type});a.tell(e,t)}o.record(a),e.hide()}(Wt(t),n)},[Bo("div",{class:fe(n.icon)},null,2)],10,Ll))),256))]))}}),Dl=(0,Ls.A)(Il,[["__scopeId","data-v-7d066162"]]),Bl={class:"menu-node-linker"},jl={class:"box-items"},Hl=On({__name:"menu-node-linker",props:{cube:{},hide:{type:Function}},setup(e){function t(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=n.get_recorder(),s=new Set([...o.nodes_selected,e.cube]);for(let e of s){const n=es.layout_change(e.id,{anchor_out:t});i.tell(e,n)}r.record(i)}function n(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=new Set([...o.nodes_selected,e.cube]),s=n.get_recorder();for(let e of i){const n=es.layout_change(e.id,{anchor_in:t});s.tell(e,n)}r.record(s)}function r(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=new Set([...o.nodes_selected,e.cube]),s=n.get_recorder();for(let e of i){const n=es.layout_change(e.id,{line_type:t});s.tell(e,n)}r.record(s)}function o(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=new Set([...o.nodes_selected,e.cube]),s=n.get_recorder();for(let e of i){const n=es.layout_change(e.id,{line_width:t});s.tell(e,n)}r.record(s)}function i(t){return{active:t===e.cube.status.node_anchor_out}}function s(t){return{active:t===e.cube.status.node_anchor_in}}function a(t){return{active:t===e.cube.status.node_line_type}}function l(t){return{active:t===e.cube.status.node_line_width}}return(e,c)=>(zo(),Po("div",Bl,[c[28]||(c[28]=Bo("div",{class:"menu-title"},[Bo("span",{class:"title iconfont icon-sp"},"节点连线")],-1)),Bo("div",jl,[c[22]||(c[22]=Bo("div",{class:"item header"},"出点",-1)),Bo("div",{class:fe(["item iconfont icon-a-Arrow-Right",i(Wt(p).Anchor.arrow)]),onClick:c[0]||(c[0]=e=>t(Wt(p).Anchor.arrow))},null,2),Bo("div",{class:fe(["item iconfont icon-circle",i(Wt(p).Anchor.point)]),onClick:c[1]||(c[1]=e=>t(Wt(p).Anchor.point))},null,2),Bo("div",{class:fe(["item iconfont icon-square",i(Wt(p).Anchor.square)]),onClick:c[2]||(c[2]=e=>t(Wt(p).Anchor.square))},null,2),Bo("div",{class:fe(["item iconfont icon-cube",i(Wt(p).Anchor.rhomb)]),onClick:c[3]||(c[3]=e=>t(Wt(p).Anchor.rhomb))},null,2),c[23]||(c[23]=$o('<div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item header" data-v-0894defd>线型</div>',5)),Bo("div",{class:fe(["item iconfont icon-zhixian",a("line")]),onClick:c[4]||(c[4]=e=>r("line"))},null,2),Bo("div",{class:fe(["item iconfont icon-line-type",a("bezier2")]),onClick:c[5]||(c[5]=e=>r("bezier2"))},null,2),Bo("div",{class:fe(["item iconfont icon-zhexian1",a("polyline")]),onClick:c[6]||(c[6]=e=>r("polyline"))},null,2),Bo("div",{class:fe(["item iconfont icon-zhexian2",a("polyline2")]),onClick:c[7]||(c[7]=e=>r("polyline2"))},null,2),Bo("div",{class:fe(["item iconfont icon-zhexian3",a("polyline3")]),onClick:c[8]||(c[8]=e=>r("polyline3"))},null,2),Bo("div",{class:fe(["item iconfont icon-bolangxian",a("wave")]),onClick:c[9]||(c[9]=e=>r("wave"))},null,2),Bo("div",{class:fe(["item iconfont icon-fold-line-1",a("fold1")]),onClick:c[10]||(c[10]=e=>r("fold1"))},null,2),Bo("div",{class:fe(["item iconfont icon-fold-line-2",a("fold2")]),onClick:c[11]||(c[11]=e=>r("fold2"))},null,2),c[24]||(c[24]=Bo("div",{class:"item header"},"入点",-1)),Bo("div",{class:fe(["item iconfont icon-a-Arrow-Right",s(Wt(p).Anchor.arrow)]),onClick:c[12]||(c[12]=e=>n(Wt(p).Anchor.arrow))},null,2),Bo("div",{class:fe(["item iconfont icon-circle",s(Wt(p).Anchor.point)]),onClick:c[13]||(c[13]=e=>n(Wt(p).Anchor.point))},null,2),Bo("div",{class:fe(["item iconfont icon-square",s(Wt(p).Anchor.square)]),onClick:c[14]||(c[14]=e=>n(Wt(p).Anchor.square))},null,2),Bo("div",{class:fe(["item iconfont icon-cube",s(Wt(p).Anchor.rhomb)]),onClick:c[15]||(c[15]=e=>n(Wt(p).Anchor.rhomb))},null,2),c[25]||(c[25]=$o('<div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item header" data-v-0894defd>线宽</div>',5)),Bo("div",{class:fe(["item line-1",l(1)]),onClick:c[16]||(c[16]=e=>o(1))},null,2),Bo("div",{class:fe(["item line-2",l(2)]),onClick:c[17]||(c[17]=e=>o(2))},null,2),Bo("div",{class:fe(["item line-3",l(3)]),onClick:c[18]||(c[18]=e=>o(3))},null,2),Bo("div",{class:fe(["item line-4",l(4)]),onClick:c[19]||(c[19]=e=>o(4))},null,2),Bo("div",{class:fe(["item line-5",l(5)]),onClick:c[20]||(c[20]=e=>o(5))},null,2),Bo("div",{class:fe(["item line-6",l(6)]),onClick:c[21]||(c[21]=e=>o(6))},null,2),c[26]||(c[26]=Bo("div",{class:"item"},null,-1)),c[27]||(c[27]=Bo("div",{class:"item"},null,-1))])]))}}),ql=(0,Ls.A)(Hl,[["__scopeId","data-v-0894defd"]]),Fl={class:"menu-node-gap"},$l={class:"box-items"},Gl=On({__name:"menu-node-gap",props:{cube:{},hide:{type:Function}},setup(e){function t(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=n.get_recorder(),s=new Set([...o.nodes_selected,e.cube]);for(let e of s){const n=es.layout_change(e.id,{gap_x:t});i.tell(e,n)}r.record(i)}function n(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=n.get_recorder(),s=new Set([...o.nodes_selected,e.cube]);for(let e of s){const n=es.layout_change(e.id,{gap_y:t});i.tell(e,n)}r.record(i)}function r(t){return{active:t===e.cube.status.node_gap_x}}function o(t){return{active:t===e.cube.status.node_gap_y}}return(e,i)=>(zo(),Po("div",Fl,[i[18]||(i[18]=Bo("div",{class:"menu-title"},[Bo("span",{class:"title iconfont icon-sp"},"节点间隔")],-1)),Bo("div",$l,[i[16]||(i[16]=Bo("div",{class:"item header"},"水平间隔",-1)),Bo("div",{class:fe(["item gap-h",r(10)]),onClick:i[0]||(i[0]=e=>t(10))},"10",2),Bo("div",{class:fe(["item gap-h",r(20)]),onClick:i[1]||(i[1]=e=>t(20))},"20",2),Bo("div",{class:fe(["item gap-h",r(30)]),onClick:i[2]||(i[2]=e=>t(30))},"30",2),Bo("div",{class:fe(["item gap-h",r(40)]),onClick:i[3]||(i[3]=e=>t(40))},"40",2),Bo("div",{class:fe(["item gap-h",r(50)]),onClick:i[4]||(i[4]=e=>t(50))},"50",2),Bo("div",{class:fe(["item gap-h",r(60)]),onClick:i[5]||(i[5]=e=>t(60))},"60",2),Bo("div",{class:fe(["item gap-h",r(70)]),onClick:i[6]||(i[6]=e=>t(70))},"70",2),Bo("div",{class:fe(["item gap-h",r(80)]),onClick:i[7]||(i[7]=e=>t(80))},"80",2),i[17]||(i[17]=Bo("div",{class:"item header"},"垂直间隔",-1)),Bo("div",{class:fe(["item gap-v",o(10)]),onClick:i[8]||(i[8]=e=>n(10))},"10",2),Bo("div",{class:fe(["item gap-v",o(20)]),onClick:i[9]||(i[9]=e=>n(20))},"20",2),Bo("div",{class:fe(["item gap-v",o(30)]),onClick:i[10]||(i[10]=e=>n(30))},"30",2),Bo("div",{class:fe(["item gap-v",o(40)]),onClick:i[11]||(i[11]=e=>n(40))},"40",2),Bo("div",{class:fe(["item gap-v",o(50)]),onClick:i[12]||(i[12]=e=>n(50))},"50",2),Bo("div",{class:fe(["item gap-v",o(60)]),onClick:i[13]||(i[13]=e=>n(60))},"60",2),Bo("div",{class:fe(["item gap-v",o(70)]),onClick:i[14]||(i[14]=e=>n(70))},"70",2),Bo("div",{class:fe(["item gap-v",o(80)]),onClick:i[15]||(i[15]=e=>n(80))},"80",2)])]))}}),Vl=(0,Ls.A)(Gl,[["__scopeId","data-v-b248a780"]]),Ul={class:"slider-root"},Kl=On({__name:"slider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,r=t,o=Gt(),i=_i(()=>{const e=n.max-n.min;return 0===e?0:(n.modelValue-n.min)/e*100});function s(e){const t=Math.round((e-n.min)/n.step)*n.step+n.min;return function(e){return Math.min(n.max,Math.max(n.min,e))}(parseFloat(t.toFixed(10)))}function a(e){const t=o.value;if(!t)return n.modelValue;const r=t.getBoundingClientRect(),i=(e-r.left)/r.width;return s(n.min+i*(n.max-n.min))}function l(e){const t=a(e.clientX);r("update:modelValue",t),r("change",t)}function c(e){e.preventDefault();const t=e.currentTarget;function n(e){const t=a(e.clientX);r("update:modelValue",t)}t.setPointerCapture(e.pointerId),t.addEventListener("pointermove",n),t.addEventListener("pointerup",function e(o){t.releasePointerCapture(o.pointerId);const i=a(o.clientX);r("update:modelValue",i),r("change",i),t.removeEventListener("pointermove",n),t.removeEventListener("pointerup",e)})}return(e,t)=>(zo(),Po("div",Ul,[Bo("div",{class:"slider-track",ref_key:"track",ref:o,onClick:l},[Bo("div",{class:"slider-fill",style:ce({width:i.value+"%"})},null,4),Bo("div",{class:"slider-thumb",style:ce({left:i.value+"%"}),onPointerdown:c},null,36)],512)]))}}),Wl=(0,Ls.A)(Kl,[["__scopeId","data-v-6bdc1f6b"]]),Yl={class:"menu-node-max-width"},Xl={class:"body"},Jl={class:"display-val"},Zl=300,Ql=On({__name:"menu-node-max-width",props:{cube:{},hide:{type:Function}},setup(e){const t=Gt(e.cube.status.node_max_width||Zl);oo(()=>e.cube.status.node_max_width,e=>{t.value=e||Zl});const n=Gt(t.value);function r(e){n.value=e}function o(r){const{courier:o,history:i}=e.cube,s=e.cube.map,a=new Set([...s.nodes_selected,e.cube]),l=o.get_recorder();for(let e of a){const t=es.layout_change(e.id,{max_width:r});l.tell(e,t)}i.record(l),t.value=r,n.value=r}function i(){const{courier:r,history:o}=e.cube,i=e.cube.map,s=new Set([...i.nodes_selected,e.cube]),a=r.get_recorder();for(let e of s){const t=es.layout_change(e.id,{max_width:0});a.tell(e,t)}o.record(a),t.value=Zl,n.value=Zl}return(e,s)=>(zo(),Po("div",Yl,[s[1]||(s[1]=Bo("div",{class:"menu-title"},[Bo("span",{class:"title iconfont icon-sp"},"节点最大宽度")],-1)),Bo("div",Xl,[jo(Wl,{modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=e=>t.value=e),r],min:Zl,max:2400,step:10,onChange:o},null,8,["modelValue"]),Bo("div",Jl,xe(n.value)+"px",1)]),Bo("div",{class:"reset-row"},[Bo("div",{class:"reset-btn",onClick:i},"重置")])]))}}),ec=(0,Ls.A)(Ql,[["__scopeId","data-v-0fa64e8e"]]);function tc(e){const t=[{usable:!!e.env.upstream,title:"新建同级-之后",icon:["iconfont","icon-circle"],shortcut:"enter",has_submenu:!1,mouseenter(){},click(t){nc(e)}},{usable:!!e.env.upstream,title:"新建同级-之前",icon:["iconfont","icon-circle"],shortcut:"shift+enter",has_submenu:!1,mouseenter(){},click(t){nc(e,!0)}},{usable:!!e.env.layout_type,title:"新建子级",icon:["iconfont","icon-circle"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){!function(e){const{courier:t,history:n,root:r}=e,o=t.get_recorder(),i=e.map2d,s=e.node_last.map2d.rect,a=Ju.get_default({x:s.x,y:s.y+s.height+i.node_gap_y}),l=es.append_child(e.id,[a]);o.tell(e,l),n.record(o)}(e)}},{usable:!0,title:"切换布局根",icon:["iconfont","icon-system-mind-map-filled"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const n=e.map,r=e.courier.get_recorder(),o=new Set([...n.nodes_selected,e]);for(let e of o){const t=es.layout_change(e.id,{root:!e.attrs.root});r.tell(e,t)}e.history.record(r)}},{usable:!0,title:"切换折叠",icon:["iconfont","icon-minus"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const n=e.map,r=e.courier.get_recorder(),o=new Set([...n.nodes_selected,e]);for(let e of o){const t=es.layout_change(e.id,{fold:!e.attrs.fold});r.tell(e,t)}e.history.record(r)}},{usable:!0,title:"切换布局",icon:["iconfont","icon-layout-2-fill"],shortcut:"",has_submenu:!0,mouseenter:()=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:Ht(Dl)}}(e),click(e){}},{usable:!0,title:"填充色",icon:["iconfont","icon-background"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:Ht(Pl)}}(e),click(e){}},{usable:!0,title:"连线",icon:["iconfont","icon-background"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:Ht(ql)}}(e),click(e){}},{usable:!0,title:"布局间隔",icon:["iconfont","icon-bimgis_suanliang"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:Ht(Vl)}}(e),click(e){}},{usable:!0,title:"最大宽度",icon:["iconfont","icon-bimgis_suanliang"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:Ht(ec)}}(e),click(e){}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}function nc(e,t=!1){const{courier:n,history:r,root:o}=e,i=n.get_recorder(),s=e.env.upstream;if(!s)return xi.tips?.tip_warning("无法在没有布局上游的节点添加同级");let a=e.id;t&&(a=e.env.prev_node?.id||null);const l=s.map2d,c=e.map2d.rect,d=Ju.get_default({x:c.x,y:c.y+c.height+l.node_gap_y}),u=es.append_child(s.id,[d],a);return i.tell(s,u),r.record(i)}async function rc(e,t){if(!rd.check_mouse_key(e,"right"))return;t.root;e.preventDefault(),e.stopPropagation(),Ka.cube=t,Ka.point={x:e.clientX,y:e.clientY},Ka.stack_pos.length=0,Ka.stack_rect.length=0,Ka.stack_menus.length=0;const n=oc(t);n&&(Ka.menu=n)}function oc(e){let t;return e instanceof uh?t=function(e){const t=[...Ja(e),{usable:!e.exceptions,title:"添加异常块",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){e.add_exceptions()}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Rk?t=fl(e):e instanceof bu?t=function(e){const t=[...Ja(e),{usable:!e.attrs.fold,title:"折叠",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){ul(e)}},{usable:!!e.attrs.fold,title:"展开",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){ul(e)}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Rg?t=Qa(e):e instanceof wh?t=function(e){const t=[...Ja(e,!1),{usable:!0,title:"向下插入行",shortcut:"ctrl + enter",icon:["iconfont","icon-cc-arrow-down-square"],mouseenter(){},click(){const{cursor:t}=e,{cube_end:n}=t;if(!n)return;const r=n.find_upstream_untill(e);r instanceof Cu&&yl(e,Math.floor(r.index/2)+1)}},{usable:!0,title:"向上插入行",shortcut:"ctrl + shift + enter",icon:["iconfont","icon-cc-arrow-up-square"],mouseenter(){},click(){const{cursor:t}=e,{cube_end:n}=t;if(!n)return;const r=n.find_upstream_untill(e);r instanceof Cu&&yl(e,Math.floor(r.index/2))}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Ih?t=function(e){const t=[{usable:!0,title:"缩进",icon:["iconfont","icon-square"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){bl(e)}},{usable:!0,title:"反向缩进",icon:["iconfont","icon-square"],shortcut:"shift + tab",has_submenu:!1,mouseenter(){},click(t){bl(e,!0)}},{get usable(){return!(e.pcube instanceof uh)},title:"转换为有序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=rd.get_id(),o.type=k.Cubes.list_ordered;const i=e.pcube,s=e.index,a=n.get_recorder(),l=Mi.delete_child(i.id,"backward",[s,s+1],!0),c=Mi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}},{get usable(){return!(e.pcube instanceof uh)},title:"转换为待办列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=rd.get_id(),o.type=k.Cubes.todo;for(let e of o.info)e.done=e.done||!1;const i=e.pcube,s=e.index,a=n.get_recorder(),l=Mi.delete_child(i.id,"backward",[s,s+1],!0),c=Mi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}}];return e.pcube instanceof uh||t.unshift(...Ja(e)),{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Gh?t=function(e){const t=[...Ja(e),{usable:!0,title:"缩进",icon:["iconfont","icon-square"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){xl(e)}},{usable:!0,title:"反向缩进",icon:["iconfont","icon-square"],shortcut:"shift + tab",has_submenu:!1,mouseenter(){},click(t){xl(e,!0)}},{usable:!0,title:"转换为无序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=rd.get_id(),o.type=k.Cubes.list;const i=e.pcube,s=e.index,a=n.get_recorder(),l=Mi.delete_child(i.id,"backward",[s,s+1],!0),c=Mi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}},{usable:!0,title:"转换为待办列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=rd.get_id(),o.type=k.Cubes.todo;for(let e of o.info)e.done=e.done||!1;const i=e.pcube,s=e.index,a=n.get_recorder(),l=Mi.delete_child(i.id,"backward",[s,s+1],!0),c=Mi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Th?t=function(e){const t=[...Ja(e),{usable:!0,title:"缩进",icon:["iconfont","icon-square"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){vl(e)}},{usable:!0,title:"反向缩进",icon:["iconfont","icon-square"],shortcut:"shift + tab",has_submenu:!1,mouseenter(){},click(t){vl(e,!0)}},{usable:!0,title:"转换为无序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=rd.get_id(),o.type=k.Cubes.list;const i=e.pcube,s=e.index,a=n.get_recorder(),l=Mi.delete_child(i.id,"backward",[s,s+1],!0),c=Mi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}},{usable:!0,title:"转换为有序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=rd.get_id(),o.type=k.Cubes.list_ordered;const i=e.pcube,s=e.index,a=n.get_recorder(),l=Mi.delete_child(i.id,"backward",[s,s+1],!0),c=Mi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Ju?t=tc(e):e instanceof Ck?t=function(e){const t=[...Ja(e),{usable:!0,title:"重置视图",icon:["iconfont","icon-circle"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){e.reset_matrix(Ji.get_default())}}];return Za(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e):e instanceof ek?t=el(e):e instanceof gd?t=function(e){const t=[{usable:!0,title:"下载",icon:["iconfont","icon-download"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){e.event.emit_asset_download("image",e.info)}},{usable:!0,title:"复制到粘贴板",icon:["iconfont","icon-copy"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const n=e.dom?.querySelector("img");if(!n)return xi.tips?.tip_error("复制失败");fetch(n.src).then(e=>e.blob()).then(async t=>{const n=new ClipboardItem({"image/png":t});await e.clipboard.set_clipboard_data(n)&&xi.tips?.tip_success("复制成功🍊")})}},{usable:!0,title:"文字环绕",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!0,mouseenter:()=>function(e){const t=[{usable:!0,title:"无环绕",icon:["iconfont","icon-close"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{history:n}=e;n.record(e.clear_float())}},{usable:!0,title:"左环绕",icon:["iconfont","icon-floatleft"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{history:n}=e;n.record(e.float_image("L"))}},{usable:!0,title:"右环绕",icon:["iconfont","icon-floatright"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{history:n}=e;n.record(e.float_image("R"))}}];return{cube:e,title:"文字环绕",layout:"list",is_cube_menu:!1,active:[],menus:t}}(e),click(e){}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Cu?t=function(e){const t=[...Ja(e)];return Za(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e):e instanceof Ru?t=function(e){const t=[...Ja(e),{usable:!e.attrs.fold,title:"折叠",icon:["iconfont","icon-minussquare"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,Mi.fold(e.id,!0)),r.record(o)}},{usable:!!e.attrs.fold,title:"展开",icon:["iconfont","icon-add1"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,Mi.fold(e.id,!1)),r.record(o)}}];return Za(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e):e instanceof sk&&(t=function(e){const t=[...Ja(e)];return Za(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e)),t&&t.cube&&(t.cube=Ht(t.cube)),t}function ic(e,t,n,r=5){e.width,Math.abs(e.y-n.y),e.width,Math.abs(e.height-(n.y+n.height)),Math.abs(n.x-e.x),e.height;const o={width:Math.abs(e.width-(n.x+n.width)),height:e.height};if($i.MathRect.can_include_size(o,t)){const o=n.y+t.height-e.height;return{x:n.x+n.width+r,y:o<0?n.y:n.y-o}}{const o=n.y+t.height-e.height;return{x:n.x-t.width-r,y:o<0?n.y:n.y-o}}}const sc={class:"dialog-form"},ac={class:"form-grid"},lc={class:"label"},cc=["onUpdate:modelValue"],dc=On({__name:"menu-dialog",setup(e){const t=Gt();function n(){const e=t.value;e&&(Wa.open=!1,e.close())}function r(){n(),Wa.submit(Wa.data)}return oo(()=>Wa.open,()=>{const e=t.value;e&&(Wa.open?e.showModal():e.close())}),(e,o)=>(zo(),Po("dialog",{class:"menu-dialog",ref_key:"root",ref:t,onClose:n},[Bo("div",sc,[Bo("div",{class:"close-corner",onClick:n}),Bo("div",ac,[(zo(!0),Po(yo,null,ur(Object.keys(Wt(Wa).data),e=>(zo(),Po(yo,{key:e},[Bo("div",lc,xe(e),1),Mn(Bo("input",{type:"text",autofocus:"","onUpdate:modelValue":t=>Wt(Wa).data[e]=t},null,8,cc),[[Ma,Wt(Wa).data[e]]])],64))),128))]),Bo("div",{class:"dialog-submit",onClick:r},"确认")])],544))}}),uc=(0,Ls.A)(dc,[["__scopeId","data-v-13d4fd0e"]]),hc={class:"title iconfont icon-sp"},pc={key:0,class:"iconfont icon-arrow-right"},fc=["onPointerdown","onMouseenter"],mc={class:"item-shortcut"},_c={key:0,class:"iconfont icon-arrow-right"},gc=["onMouseenter"],bc={class:"title iconfont icon-sp"},xc={key:0,class:"iconfont icon-arrow-right"},vc=["onPointerdown","onMouseenter"],yc={class:"item-shortcut"},wc={key:0,class:"iconfont icon-arrow-right"},kc=On({__name:"note-menu",props:{root:{}},setup(e){const t=Gt(),n=Gt([]);oo(()=>Ka.point,async()=>{const e=t.value;if(!e)return;await fn(),Ka.stack_pos.length=0;const n={x:0,y:0,width:window.innerWidth,height:window.innerHeight},r=e.getBoundingClientRect(),o={x:Ka.point.x,y:Ka.point.y,width:0,height:0},i=$i.MathRect.move_rect_to_other(n,r,o);Ka.css={left:i.x+"px",top:i.y+"px"}}),oo(Ka.stack_menus,async()=>{await fn();const e=n.value;if(!e)return;Ka.stack_pos.length=0;const t={x:0,y:0,width:window.innerWidth,height:window.innerHeight};for(let n=0;n<Ka.stack_menus.length;n++){const r=Ka.stack_rect[n],o=ic(t,e[n].getBoundingClientRect(),r);Ka.stack_pos.push({left:o.x+"px",top:o.y+"px"})}});const r=_i(()=>Ka.menu);function o(){Ka.stack_menus.length=Math.max(0,Ka.stack_menus.length-1),Ka.stack_rect.length=Math.max(0,Ka.stack_rect.length-1)}function i(e,t=!1){t?(Ka.stack_menus.length=e,Ka.stack_rect.length=e,Ka.menu=void 0):(Ka.stack_menus.length=e,Ka.stack_rect.length=e)}function s(e,t){if(!t.is_cube_menu)return;const n=t?.cube?.pcube;if(!n||n instanceof As)return;const r=oc(n);if(!r)return;i(Ka.stack_menus.findLastIndex(e=>e.is_cube_menu)+1);const o=e.currentTarget;Ka.stack_rect.push(o.getBoundingClientRect()),Ka.stack_menus.push(r)}function a(e,t,n){if(i(t),!n.has_submenu)return;const r=e.currentTarget;Ka.stack_rect.push(r.getBoundingClientRect());const o=n.mouseenter(e);o&&(o.cube&&(o.cube=Ht(o.cube)),Ka.stack_menus.push(o))}function l(e,t){t.usable&&(o(),t.click(e))}function c(e){const t=e.usable;return{cursor:t?"pointer":"not-allowed",color:t?"unset":"var(--menu-item-disable-color)"}}function d(e){e.stopPropagation()}function u(e){return{"layout-list":!e.layout||"list"===e.layout,"layout-grid":"grid"===e.layout}}function h(e){return e.is_cube_menu&&function(e){if(!e)return!1;const t=[Ju,Rg,ek,bu,Rk,Ih,Gh,Th,gd,wh,uh,Ck,Cu,Ru,sk],n=e.pcube;if(!n)return!1;for(const e of t)if(n instanceof e)return!0;return!1}(e.cube)}return Jn(()=>{document.documentElement.addEventListener("pointerdown",e=>{const n=t.value;if(!n)return;const r=e.target;r&&!n.contains(r)&&(Ka.menu=void 0,Ka.stack_menus.length=0,Ka.stack_pos.length=0,Ka.stack_rect.length=0)},{capture:!0})}),(e,i)=>(zo(),Po("div",{class:"note-menus",style:ce(Wt(Ka).css),ref_key:"dom",ref:t,onWheel:d},[Go(" 弹窗 "),jo(uc),Go(" 主菜单列表 "),r.value?(zo(),Po("div",{key:0,class:"menu menu-list",ref_key:"ms",ref:n},[Bo("div",{class:"menu-title",onMouseenter:i[0]||(i[0]=e=>s(e,r.value))},[Bo("span",hc,xe(r.value.title),1),h(r.value)?(zo(),Po("div",pc)):Go("v-if",!0)],32),Bo("div",{class:fe(["box-menu-items",u(r.value)])},[(zo(!0),Po(yo,null,ur(r.value.menus,e=>(zo(),Po("div",{class:fe(["menu-item",{"active-item":r.value.active.includes(e.title)}]),style:ce(c(e)),key:e.title,onPointerdown:t=>l(t,e),onMouseenter:t=>a(t,0,e)},[Bo("div",{class:fe(["item-title",e.icon])},xe(e.title),3),Bo("div",mc,xe(e.shortcut),1),e.has_submenu?(zo(),Po("div",_c)):Go("v-if",!0)],46,fc))),128))],2)],512)):Go("v-if",!0),Go(" 子菜单组 "),(zo(!0),Po(yo,null,ur(Wt(Ka).stack_menus,(e,t)=>(zo(),Po("div",{class:"menu submenu-list",ref_for:!0,ref_key:"ms",ref:n,style:ce(Wt(Ka).stack_pos[t])},["component"===e.type?(zo(),Oo(lr(e.component),{key:0,cube:Ht(e.cube),hide:Ht(o)},null,8,["cube","hide"])):(zo(),Po(yo,{key:1},[Bo("div",{class:"menu-title",onMouseenter:t=>s(t,e)},[Bo("span",bc,xe(e.title),1),h(e)?(zo(),Po("div",xc)):Go("v-if",!0)],40,gc),Bo("div",{class:fe(["box-menu-items",u(e)])},[(zo(!0),Po(yo,null,ur(e.menus,n=>(zo(),Po("div",{class:fe(["menu-item",{"active-item":e.active.includes(n.title)}]),style:ce(c(n)),key:n.title,onPointerdown:e=>l(e,n),onMouseenter:e=>a(e,t+1,n)},[Bo("div",{class:fe(["item-title",n.icon])},xe(n.title),3),Bo("div",yc,xe(n.shortcut),1),n.has_submenu?(zo(),Po("div",wc)):Go("v-if",!0)],46,vc))),128))],2)],64))],4))),256))],36))}}),Sc=(0,Ls.A)(kc,[["__scopeId","data-v-7499f3ca"]]),Cc=["onClick"],Mc=On({__name:"float-node-layout",props:{float:{}},setup(e){const t=e.float.float_node_layout,n=_i(()=>{const e=Ol.get_layout_detail(t.cube?.env.upstream);return console.log("layouts:",e),e});return(e,r)=>Wt(t).visible?(zo(),Po("div",{key:0,class:"float-node-layout",style:ce(Wt(t).css)},[(zo(!0),Po(yo,null,ur(n.value,e=>(zo(),Po("div",{class:fe(["layout-item",{usable:e.usable}]),onClick:n=>function(e,n){if(!e||!n.usable)return t.close();const{courier:r,history:o}=e,i=r.get_recorder(),s=es.layout_change(e.id,{layout:n.type});i.tell(e,s),o.record(i),t.close()}(Wt(t).cube,e)},[Bo("div",{class:fe(e.icon)},null,2)],10,Cc))),256))],4)):Go("v-if",!0)}}),zc=(0,Ls.A)(Mc,[["__scopeId","data-v-1ee82010"]]),Nc={class:"note-float"},Ac=On({__name:"note-float",props:{root:{}},setup(e){const t=e.root.float;return(e,n)=>(zo(),Po("div",Nc,[jo(zc,{float:Wt(t)},null,8,["float"])]))}}),Tc=(0,Ls.A)(Ac,[["__scopeId","data-v-a9c1c4fe"]]);class Rc extends bi{has_down=!1;down_caret=void 0;constructor(e){super(e)}get root(){return this._root}pointerdown(e){if(this.root.stats.is_read_mode)return e.preventDefault();e.preventDefault(),this.has_down=!0,this.down_caret=document.caretPositionFromPoint(e.clientX,e.clientY),this.click_selection_text(e),this.cursor.locate_cursor_by_coor(e.clientX,e.clientY)}pointermove(e){this.stats.view_point={x:e.clientX,y:e.clientY},this.drag_selection_text(e)}pointercancel(e){this.has_down=!1,this.down_caret=null}pointerup(e){e.preventDefault(),this.has_down=!1,this.down_caret=null}beforeinput(e){if(this.stats.in_composition_mode)return;if(this.event.emit_note_input_before(e).some(e=>"stop"===e))return;e.preventDefault();const{courier:t,cursor:n,history:r}=this,o=e.data,{cube_end:i,cube_start:s,cube_selection:a,offset_start:l,offset_end:c}=n;if(!a||!i||!s)return;const d=s.id,u=i.id,h=a.id;if("insertText"===e.inputType){if(!(a instanceof Zd&&o)){const e=t.get_recorder(),n=Zd.get_default(o||""),i=Mi.insert(h,[n],d,u,l,c);return e.tell(a,i),r.record(e)}{const e=t.get_recorder();this.ins(e,this.root,o,a,l,c),r.record(e)}}else if("deleteContentBackward"===e.inputType||"deleteContentForward"===e.inputType){const n=t.get_recorder();if(this.root.scopes.scope_count_normal)return;{let t="deleteContentBackward"===e.inputType?"backward":"forward";const o=Mi.delete(h,t,d,u,l,c);return n.tell(a,o),r.record(n)}}}compositionstart(e){this.stats.in_composition_mode=!0,this.clear_selection_text()}compositionupdate(e){this.event.emit_note_compositionupdate(e).some(e=>"stop"===e)}compositionend(e){if(this.event.emit_note_compositionend_before(e).some(e=>"stop"===e))return;const{courier:t,cursor:n,history:r,stats:o,event:i}=this.root;if(n.has_selection)return;if(!o.in_composition_mode)return;const{cube_end:s,cube_start:a,cube_selection:l,offset_start:c,offset_end:d}=n,u=e.data,h=new ad(t);if(l&&s&&a){if(l instanceof Zd){const e=l.text,t=d-u.length,n=`${e.slice(0,t)}${u}${e.slice(t)}`,r=Yd.reset(l.id,n,d,t);h.tell(l,r)}else console.error("编辑目标无法在内存结构中找到,此问题多由于未将子cube计算到children属性");o.in_composition_mode=!1,r.record(h),i.emit_note_compositionend(e)}}async save_image(e,t){const n=gd.get_default(),r=n.id+"."+t.type.split("/")[1];if(await this.event.emit_asset_save(e,r,t))return n.info=r,n}clear_selection_text(){const{cursor:e,courier:t,history:n}=this;if(!e.has_selection)return;const{cube_end:r,cube_start:o,cube_selection:i,offset_start:s,offset_end:a}=e;if(!i||!r||!o)return;const l=new ad(t);l.tell(i,Mi.delete(i.id,"backward",o.id,r.id,s,a)),n.record(l)}ins(e,t,n,r,o,i){const{courier:s,history:a}=t,l=r.text,c=l.slice(0,o)+n+l.slice(i),d=o+n.length,u=Yd.reset(r.id,c,d,o);e.tell(r,u);const h=Mi.merge(r.id,"both",r.id,d);return e.tell(r,h),e}click_selection_text(e){if(!this.down_caret||!e.shiftKey)return;const{offset_end:t,node_end:n}=this.cursor,{offset:r,offsetNode:o}=this.down_caret;n instanceof Text&&o instanceof Text&&Promise.resolve().then(()=>{this.cursor.set_selection_between(n,t,o,r)})}drag_selection_text(e){if(!this.has_down||!this.down_caret||!rd.check_mouse_key(e,"left"))return;const t=document.caretPositionFromPoint(e.clientX,e.clientY);t&&this.down_caret.offsetNode instanceof Text&&t.offsetNode instanceof Text&&this.cursor.set_selection_between(this.down_caret.offsetNode,this.down_caret.offset,t.offsetNode,t.offset)}}class Pc extends Rc{get map(){return this.root}pointerdown(e){const t=this.map.map_interaction.get_map_selector(e);("node"!==t.type||t.res.editable)&&"linker"!==t.type&&"fig"!==t.type&&super.pointerdown(e)}dragenter(e){e.preventDefault()}dragover(e){e.preventDefault()}dragleave(e){e.preventDefault()}async drop(e){e.preventDefault();const{cursor:t,courier:n,clipboard:r,history:o}=this.root,{cube_end:i,offset_end:s}=t,a=e.dataTransfer;if(!a)return;const l={x:e.clientX,y:e.clientY},c=this.map.view_point_to_real(l),d=n.get_recorder(),u=(new DOMParser,a.getData("text/plain")),h=a.getData("text/html"),p=a.files;if(console.log("🍊",{files:p,html:h,text:u}),p.length>0){const{cube_end:e,cube_start:t,offset_end:n,offset_start:r}=this.cursor,o=[];if(this.map.nodes_editing.size>0&&e instanceof Zd){for(let e of Array.from(p))if(e.type.startsWith("image/"))if(this.map.isdev){const t=gd.get_default();t.info=URL.createObjectURL(e),o.push(t)}else{const t=await this.save_image("image",e);t&&o.push(t)}const t=e.id,i=Mi.insert(t,o,t,t,r,n);d.tell(e,i)}else{for(let e of Array.from(p))if(e.type.startsWith("image/"))if(this.map.isdev){const t=gd.get_default();t.info=URL.createObjectURL(e),o.push(t)}else{const t=await this.save_image("image",e);t&&o.push(t)}const e=uu.get_default(o),t=bu.get_default([e]),n=Ju.get_default(c,[t]),r=Qi.node_add(this.map.id,[n]);d.tell(this.map,r)}}else if(u){const{offset_end:e,offset_start:t,cube_selection:n}=this.cursor;if(!(n instanceof Zd))return;this.ins(d,this._root,u,n,t,e)}o.record(d)}}const Oc=["id","data-type"],Ec=["transform"],Lc=["data-group"],Ic=["data-group"],Dc=["d"],Bc=["data-group"],jc=["data-group"],Hc=["data-group"],qc=["d"],Fc=["d","marker-start","marker-end"],$c=["d"],Gc={class:"doc-postils"},Vc=On({__name:"cube-map",props:{cube:{}},setup(e){const{status:t}=e.cube,n=new Pc(e.cube),r=Gt(),o=new ResizeObserver(t=>{e.cube.get_view_rect(),Ua.resolve()});Jn(()=>{const t=r.value;t&&o.observe(t),window.addEventListener("resize",t=>{e.cube.check_show_throttle()})});const i=e=>n.pointerdown(e),s=e=>n.pointermove(e),a=e=>n.pointerup(e),l=e=>n.pointercancel(e),c=e=>n.compositionstart(e),d=e=>n.compositionupdate(e),u=e=>n.compositionend(e),h=e=>n.beforeinput(e),p=e=>n.dragover(e),f=e=>n.dragenter(e),m=e=>n.dragleave(e),_=e=>n.drop(e);return Jn(()=>{document.documentElement.addEventListener("pointerup",a),document.documentElement.addEventListener("pointermove",s),document.documentElement.addEventListener("pointercancel",l)}),(e,n)=>(zo(),Po("div",{class:"cube-map",id:e.cube.id,"data-type":e.cube.type},[Bo("div",{class:"note",onPointerdown:i,onCompositionstart:c,onCompositionupdate:d,onCompositionend:u,onBeforeinput:h},[(zo(),Po("svg",{ref_key:"svg",ref:r,style:ce(Wt(t).css),onDragover:p,onDragenter:f,onDragleave:m,onDrop:_},[Bo("g",{transform:Wt(t).matrix2d_dom_string},[Bo("g",{"data-group":Wt(v).markers,class:"group-defs"},[...n[0]||(n[0]=[$o('<defs data-v-6cc57278>\x3c!-- 箭头 --\x3e<marker id="marker-arrow" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-6cc57278><path d="M 0 0 L 6 3 L 0 6 z" data-v-6cc57278></path></marker>\x3c!-- 圆 --\x3e<marker id="marker-point" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-6cc57278><circle cx="3" cy="3" r="3" data-v-6cc57278></circle></marker>\x3c!-- 方块 --\x3e<marker id="marker-square" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-6cc57278><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-6cc57278></rect></marker>\x3c!-- 菱形 --\x3e<marker id="marker-rhomb" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="45" fill="context-stroke" data-v-6cc57278><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-6cc57278></rect></marker></defs>',1)])],8,Lc),Bo("g",{"data-group":Wt(v).outbox,class:"group-outbox"},[(zo(!0),Po(yo,null,ur(Wt(t).nodes_outbox,e=>(zo(),Po("path",{key:e.id,class:"node-outbox",d:e.status.outbox},null,8,Dc))),128))],8,Ic),Bo("g",{"data-group":Wt(v).linkers,class:"group-linkers"},[(zo(!0),Po(yo,null,ur(Wt(t).linkers_view,e=>(zo(),Oo(js,{key:e.id,cube:e},null,8,["cube"]))),128))],8,Bc),Bo("g",{"data-group":Wt(v).nodes,class:"group-nodes"},[(zo(!0),Po(yo,null,ur(Wt(t).nodes_view,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],8,jc),Bo("g",{"data-group":Wt(v).placeholder,class:"group-placeholder"},[Wt(t).placeholder_box_selector?(zo(),Po("path",{key:0,class:"placeholder-box-selector",d:Wt(t).placeholder_box_selector},null,8,qc)):Go("v-if",!0),(zo(!0),Po(yo,null,ur(Wt(t).placeholder_linkers,e=>(zo(),Po(yo,{key:e.path},[e?(zo(),Po("path",{key:0,class:"placeholder-linker",d:e.path,style:ce({stroke:e.stroke,"stroke-width":e.width}),"marker-start":`url(#${e.anchor_start})`,"marker-end":`url(#${e.anchor_end})`},null,12,Fc)):Go("v-if",!0)],64))),128)),Wt(t).placeholder_line_delete?(zo(),Po("path",{key:1,class:"placeholder-line-delete",d:Wt(t).placeholder_line_delete,stroke:"#ff7f7f","marker-start":"url(#marker-point)","marker-end":"url(#marker-arrow)"},null,8,$c)):Go("v-if",!0),jo(Ks,{cube:e.cube},null,8,["cube"]),Go(' <rect :x="cube.view_rect.x" :y="cube.view_rect.y" :width="cube.view_rect.width" :height="cube.view_rect.height" stroke="#0891b2" fill="none" stroke-width="2"></rect> ')],8,Hc)],8,Ec)],36)),Go(" doc-cubes "),Bo("div",Gc,[(zo(!0),Po(yo,null,ur(Wt(t).postils.values(),e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))])],32),Go(" scope selection "),(zo(!0),Po(yo,null,ur(Wt(t).scopes,e=>(zo(),Oo(Is,{key:e.id,selection:Ht(e)},null,8,["selection"]))),128)),Go(" map status "),jo(Ga,{cube:e.cube},null,8,["cube"]),Go(" menus "),jo(Sc,{root:e.cube},null,8,["root"]),jo(Tc,{root:e.cube},null,8,["root"])],8,Oc))}}),Uc=(0,Ls.A)(Vc,[["__scopeId","data-v-6cc57278"]]);class Kc extends Ri{_pcube;_children=[];_has_postil=Gt(!1);postil=null;data;constructor(e,t){super(),this._pcube=t;const n=structuredClone(e),r=Ci.versions,o=this.update_data(r,n);this.data=o.data,this._setup(),this.cubes.add_cube(this)}get pcube(){return this._pcube}get has_postil(){return this._has_postil.value}set has_postil(e){this._has_postil.value=e,this.status.update_has_postil(e)}get root(){return this.pcube.root}get courier(){return this.root.courier}get config(){return this.root.config}get history(){return this.root.history}get hotkeys(){return this.root.hotkeys}get cursor(){return this.root.cursor}get event(){return this.root.event}get clipboard(){return this.root.clipboard}get float(){return this.root.float}get painter(){return this.root.painter}get cubes(){return this.root.cubes}get stats(){return this.root.stats}get versions(){return this.root.versions}get text(){let e="";for(let t of this.children)e+=t.text,t instanceof uu&&(e+="\n");return this instanceof uu&&(e+="\n"),e}get top(){let e=this;for(;e;){if(e.pcube instanceof As)return e;e=e.pcube}return e}get is_empty(){const e=this.children;return 0===e.length||1===e.length&&this.child_first.is_empty}get children(){return[...this._children]}get dom(){return document.getElementById(this.id)}get level(){return this.pcube.level+1}get host_postil(){return this instanceof Wd?this:this.pcube.host_postil}get in_postil(){return this instanceof Wd||this.pcube.in_postil}get child_count(){return this.children.length}get child_first(){return this.children[0]}get child_first_line(){for(let e of this._children)if(e instanceof uu)return e}get child_last(){return this.children[this.children.length-1]}get pid(){return this.pcube.id}get id(){return this.data.id}get css(){return{...this.data.css,"margin-left":this.attrs.indent>0?this.attrs.indent*this.root.config.data.line_indent+"px":"0px"}}get attrs(){return this.data.attrs||(this.data.attrs={}),this.data.attrs}get info(){return this.data.info}get type(){return this.data.type}get clientRect(){return this.dom?.getBoundingClientRect()}get clientRects(){return this.dom?.getClientRects()}get prev_cube(){return this.pcube.find_prev_cube(this.id)}get next_cube(){return this.pcube.find_next_cube(this.id)}get prev_cube_deep(){let e=this;for(;e;){let t=e.prev_cube;if(t instanceof nd)return t;e=e.pcube}}get next_cube_deep(){let e=this;for(;e;){let t=e.next_cube;if(t instanceof nd)return t;e=e.pcube}}get index(){return this.pcube?this.pcube.find_child_index(this.id):0}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(this._children),{children:r,data:o}}_setup(){this.set_cmd_handler(_.Names.cube_set_selection_css,this.on_cube_set_selection_css.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_insert.bind(this)),this.set_cmd_handler(_.Names.cube_delete,this.on_cube_delete.bind(this)),this.set_cmd_handler(_.Names.cube_set_css,this.on_cube_set_css.bind(this)),this.set_cmd_handler(_.Names.cube_set_attr,this.on_cube_set_attr.bind(this)),this.set_cmd_handler(_.Names.cube_delete_adjacent,this.on_cube_delete_adjacent.bind(this)),this.set_cmd_handler(_.Names.cube_postil_add,this.on_postil_add.bind(this)),this.set_cmd_handler(_.Names.cube_postil_remove,this.on_postil_remove.bind(this)),this.set_cmd_handler(g.Names.cursor_in_head,this.on_cursor_in_head.bind(this)),this.set_cmd_handler(g.Names.cursor_in_tail,this.on_cursor_in_tail.bind(this)),Ai.init_cmd_handler(this)}setup(){this.build_child(this.data)}create_child_block(e){const t=rd.pick(e);return rd.build_cubes(t.list,this)}gc(){this.base_gc()}base_gc(){this.cubes.remove_cube(this);for(let e of this.children)e.gc()}base_export(){const e=structuredClone(this.data);return this.postil&&(e.attrs.postil=this.postil.export()),e}copy(e,t){const n=this.children.slice(e,t),r=[];for(let e of n){let t=e.export();r.push(t)}return r}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Ck||t instanceof Uc)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}remove_self(e="backward"){const{pcube:t,courier:n,index:r}=this,o=new ad(n);return o.tell(t,Mi.delete_child(t.id,e,[r,r+1])),o}merge(e){const{pcube:t,cursor:n,courier:r}=this,{cube_end:o,offset_end:i}=n;if(!o)return;const s=new ad(r);return s.tell(this,Mi.merge(this.id,e,o.id,i)),s}find_cube(e){if(e===this.id)return this;for(let t of this.children){if(t.id===e)return t;const n=t.find_cube(e);if(n)return n}}filter(e){const t=[];e(this)&&t.push(this);for(let n of this.children)e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this.children)e(t),t.each(e)}find_dom_cube(e){let t=e instanceof Element?e:e.parentElement;const n=[];for(;t;){if(t.id){let e;if(n.push(t.id),e=this.find_cube(t.id),e)return e}t=t.parentElement}}is_contains_cube(e){if(e===this)return!0;let t=e;for(;t;){if(t.pcube===this)return!0;t=t.pcube}return!1}find_upstream_untill(e){if(!e.is_contains_cube(this))return;let t=this;for(;t;){if(t instanceof nd&&t.pcube===e)return t;t=t.pcube}}find_upstream_target(e){let t=this;for(;t instanceof nd;)if(t=t.pcube,e(t))return t}find_child_cube(e){return this.children.find(t=>t.id===e)}find_child_index(e){return this.children.findIndex(t=>t.id===e)}find_next_cube(e){const t=this.find_child_index(e);return this.children[t+1]}find_prev_cube(e){const t=this.find_child_index(e);return this.children[t-1]}on_cube_set_selection_css(e){const{cursor:t,courier:n}=this,{css:r,start_id:o,end_id:i,offset_end:s,offset_start:a,toggle:l,replace:c}=e,d=new ad(n);if(o!==i||s!==a){if(i&&!o){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(0,t.index);for(let e of n)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,Mi.set_selection_css(t.id,r,null,i,"head",s,l,c)),d}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(t.index+1);for(let e of n)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,Mi.set_selection_css(t.id,r,o,null,a,"tail",l,c)),d}if("tail"===s&&"head"===a){for(let e of this.children)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d}if(i&&o){const e=this.find_cube(o),t=this.find_cube(i),n=e?.find_upstream_untill(this),u=t?.find_upstream_untill(this);if(!n||!u)return;const h=this.children.slice(n.index+1,u.index);for(let e of h)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(n,Mi.set_selection_css(n.id,r,o,null,a,"tail",l,c)),n!==u&&d.tell(u,Mi.set_selection_css(u.id,r,null,i,"head",s,l,c)),d}}}on_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r}=this,o=new ad(t),{data:i,end_id:s,start_id:a,offset_end:l,offset_start:c}=e,d=this.find_cube(a),u=this.find_cube(s),h=d?.find_upstream_untill(this),p=u?.find_upstream_untill(this);if(!h||!p)return o;if(u!==d||c!==l)if(h&&h===p)o.tell(h,Mi.delete(h.id,"backward",a,s,c,l)),o.tell(h,Mi.insert(h.id,i,a,s,c,l));else{o.tell(p,Mi.delete(p.id,"backward",null,s,"head",l)),o.tell(this,Mi.delete_child(this.id,"backward",[h.index+1,p.index])),o.tell(this,Mi.insert_child(this.id,i,h.index+1)),o.tell(h,Mi.delete(h.id,"backward",a,null,c,"tail"));let e=i[i.length-1];const t=this.top.find_cube(e.id);t&&o.tell(t,zi.in_tail(e.id))}else o.tell(u,Mi.insert(s,i,a,s,c,l));return o}on_cube_delete(e){const{courier:t,cursor:n}=this,{dir:r,start_id:o,end_id:i,offset_end:s,offset_start:a,reserve:l}=e,c=new ad(t);if(!o&&i){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,Mi.delete_child(this.id,r,[0,t.index],l)),c.tell(t,Mi.delete(t.id,r,o,i,"head",s,l)),c}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,Mi.delete_child(this.id,r,[t.index+1,this.child_count],l)),c.tell(t,Mi.delete(t.id,r,o,i,a,s,l)),c}if("head"===a&&"tail"===s){if(l){if(this.is_empty)return;c.tell(this,Mi.delete_child(this.id,r,[1,this.child_count]));const e=this.child_first;e.meta.block?c.tell(e,Mi.delete_child(e.id,r,[0,e.child_count],l)):e instanceof Zd?c.tell(e,Yd.reset(e.id,"",1,1)):c.tell(e,Mi.reset(e.id,[]))}else c.tell(this.pcube,Mi.delete_child(this.pid,"backward",[this.index,this.index+1]));return c}if(o&&i){const e=this.find_cube(o),t=this.find_cube(i);if(!e||!t)return;const n=e.find_upstream_untill(this),l=t.find_upstream_untill(this);if(!n||!l)return c;const d=n.index,u=l.index;if(o!==i||a!==s)if(n===l)c.tell(n,Mi.delete(n.id,r,o,i,a,s,!0));else if(c.tell(l,Mi.delete(l.id,r,null,i,"head",s)),c.tell(this,Mi.delete_child(this.id,"backward",[d+1,u])),c.tell(n,Mi.delete(n.id,r,o,null,a,"tail",!0)),e instanceof Zd){const t=e.get_valid_index(a);e.set_cursor_in_head(t)}return c}}on_cube_set_css(e){const{courier:t,cursor:n}=this,{css:r,toggle:o,replace:i}=e,s=t.get_recorder();if(s.add_cmd(e),i){const e=structuredClone(this.css);return this.data.css=r,s.add_recover(Mi.set_css(this.id,e,!1,!0)),s}if(0===Object.keys(r).length)return;let a=!0;const l=structuredClone(this.css),c=structuredClone(this.css);for(let e in r){const t=r[e],n=this.css[e]||null;l[e]=n,null===t||o&&t===n?(a=!1,delete c[e]):t!==n&&(a=!1,c[e]=t)}return this.data.css=c,a?void 0:(this.status.update_css(),s.add_recover(Mi.set_css(this.id,l)),s)}on_cube_set_attr(e){const{courier:t,cursor:n}=this,{attr:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===Object.keys(r).length)return;const i={};for(let e in r){const t=r[e];i[e]=structuredClone(this.attrs[e])||null,null===t?delete this.data.attrs[e]:this.data.attrs[e]=t}return this.status.update_attrs(),o.add_recover(Mi.set_attr(this.id,i)),o}on_cube_delete_adjacent(e){const{courier:t,pcube:n,pid:r,index:o}=this,{from:i,from_id:s,offset:a}=e,l=new ad(t);if(this.meta.block){const e=this.child_first,t=this.child_last;this.is_empty&&l.tell(n,Mi.delete_child(r,"backward",[this.index,this.index+1])),"left"===i?l.tell(e,zi.in_head(e.id)):l.tell(t,zi.in_tail(t.id))}else l.tell(n,Mi.delete_child(r,"backward",[this.index,this.index+1]));return l}on_postil_add(e){const{courier:t}=this,{data:n}=e;if(this.postil){const e=new ad(t),r=this.postil;return e.tell(r,Mi.insert_child(r.id,n,r.child_count)),this.has_postil=!0,this.postil.show=!0,e}{const r=t.get_recorder();r.add_cmd(e);const o=Wd.get_default(n),i=new Wd(o,this);return this.postil=i,r.add_recover(Mi.postil_remove(this.id,[0,i.child_count])),this.postil.show=!0,this.has_postil=!0,r}}on_postil_remove(e){const{courier:t}=this,{range:n}=e,[r,o]=n,i=this.postil;if(!i)return;let s=r<0?0:r,a=o>i.child_count?i.child_count:o;if(s<=0&&a>=i.child_count){const n=t.get_recorder();n.add_cmd(e);const r=i.export();return n.add_recover(Mi.postil_add(this.id,r.info)),this.postil=null,this.has_postil=!1,i.gc(),n}{const e=new ad(t);return e.tell(i,Mi.delete_child(i.id,"backward",[s,a])),e}}on_cursor_in_head(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ad(t);if(this.meta.block){const e=this.child_first;if(!e)return i;i.tell(e,zi.in_head(e.id))}else if(this instanceof Zd)this.prev_cube instanceof Zd&&this.len>=1?this.set_cursor_in_head(1):this.set_cursor_in_head(0);else if(o&&o instanceof Zd)o.set_cursor_in_head();else{const e=Zd.get_default();i.tell(r,Mi.insert_child(r.id,[e],this.index+1))}return i}on_cursor_in_tail(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ad(t);if(this.meta.block){const e=this.child_last;if(!e)return i;i.tell(e,zi.in_tail(e.id))}else if(this instanceof Zd)this.next_cube instanceof Zd&&this.len>=1?this.set_cursor_in_tail(1):this.set_cursor_in_tail(0);else if(n&&n instanceof Zd)n.set_cursor_in_tail();else{const e=Zd.get_default();i.tell(r,Mi.insert_child(r.id,[e],this.index))}return i}is_valid_range(e,t=!1){const[n,r]=e;return!(n<0||r>this.child_count)&&(!t||n!==r)}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}get_valid_range(e){let[t,n]=e;return t<0&&(t=0),n>this.child_count&&(n=this.child_count),[t,n]}}class Wc{_cube;constructor(e){this._cube=e}get cube(){return this._cube}get pcube(){return this.cube.pcube}}class Yc{static layout_tree(e){const t=e.env.layout_type;if(t)return"right"===t?this.right(e):"left"===t?this.left(e):"down"===t?this.down(e):"up"===t?this.up(e):"time-down"===t?this.time_down(e):"time-right"===t?this.time_right(e):"file-tree"===t?this.file_tree(e):void 0}static right(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x,y:n.y+n.height/2-r.height/2}}static left(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x+n.width-r.width,y:n.y+n.height/2-r.height/2}}static down(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x+n.width/2-r.width/2,y:n.y}}static up(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x+n.width/2-r.width/2,y:n.y+n.height-r.height}}static time_down(e){const t=e.map2d.rect_raw;let n=t.width;const r=e.env.downstream_visible;for(let e of r){const t=e.map2d.rect_raw.width;t>n&&(n=t)}return{x:t.x+t.width/2-n/2,y:t.y}}static file_tree(e){const t=e.map2d.rect_raw;return{x:t.x,y:t.y}}static time_right(e){const t=e.map2d.rect_raw;let n=t.height;const r=e.env.downstream_visible;for(let e of r){const t=e.map2d.rect_raw.height;t>n&&(n=t)}return{x:t.x,y:t.y+t.height/2-n/2}}}class Xc{static layout_tree(e,t,n){const r=e.env.layout_type,o=e.env.downstream_visible;return 0===o.length||("right"===r?this.right(e,o,t,n):"left"===r?this.left(e,o,t,n):"down"===r?this.down(e,o,t,n):"up"===r?this.up(e,o,t,n):"time-down"===r?this.time_down(e,o,t,n):"time-right"===r?this.time_right(e,o,t,n):"file-tree"===r?this.file_tree(e,o,t,n):this.none(e,o)),o}static none(e,t){for(let e=0;e<t.length;e++){const n=t[e],r=Yc.layout_tree(n);r&&n.map2d.update_pos_tree(r.x,r.y,!1)}}static right(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw,a=o.size_tree_raw;let l=i.x+n+s.width,c=i.y,d=0,u=0;if(a.height<=s.height){let e=0;for(let n of t)e+=n.map2d.rect_raw.height;e+=(t.length-1)*r,u=(s.height-e)/2}for(let e=0;e<t.length;e++){const n=t[e].map2d;n.update_pos_tree(l,c+d+e*r+u),d+=n.size_tree_raw.height}}static left(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw,a=o.size_tree_raw;let l=i.x+a.width-s.width-n,c=i.y,d=0,u=0;if(a.height<=s.height){let e=0;for(let n of t)e+=n.map2d.rect_raw.height;e+=(t.length-1)*r,u=(s.height-e)/2}for(let e=0;e<t.length;e++){const n=t[e].map2d;n.update_pos_tree(l-n.size_tree_raw.width,c+d+e*r+u),d+=n.size_tree_raw.height}}static down(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw;let a=i.x,l=i.y+r+s.height,c=0;for(let e=0;e<t.length;e++){const r=t[e].map2d;r.update_pos_tree(a+c+e*n,l),c+=r.size_tree_raw.width}}static up(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw,a=o.size_tree_raw;let l=i.x,c=i.y+a.height-s.height-r,d=0;for(let e=0;e<t.length;e++){const r=t[e].map2d;r.update_pos_tree(l+d+e*n,c-r.size_tree_raw.height),d+=r.size_tree_raw.width}}static time_right(e,t,n,r){const o=e.map2d.rect_raw;let i=o.x+o.width+n,s=o.y+o.height/2,a=0;for(let e=0;e<t.length;e++){const r=t[e],o=r.map2d,l=o.rect_raw,c=o.size_tree_raw,d=r.attrs.layout;"right"===d||"left"===d?o.update_pos_tree(i+a+e*n,s-c.height/2):"up"===d?o.update_pos_tree(i+a+e*n,s-(c.height-l.height/2)):o.update_pos_tree(i+a+e*n,s-l.height/2),a+=c.width}}static file_tree(e,t,n,r){const o=e.map2d.rect_raw,i=o.x+o.width/2+n,s=o.y+o.height+r;let a=0;for(let e=0;e<t.length;e++){const n=t[e].map2d;n.update_pos_tree(i,s+a+e*r),a+=n.size_tree_raw.height}}static time_down(e,t,n,r){const o=e.map2d.rect_raw;let i=o.x+o.width/2,s=o.y+o.height+r,a=0;for(let e=0;e<t.length;e++){const n=t[e],o=n.map2d,l=n.env.layout_type,c=o.rect_raw,d=o.size_tree_raw;"left"===l?o.update_pos_tree(i-(d.width-c.width/2),s+a+e*r):"down"===l||"up"===l?o.update_pos_tree(i-d.width/2,s+a+e*r):o.update_pos_tree(i-c.width/2,s+a+e*r),a+=d.height}}}class Jc{_node;_map;_upenv;_env={root:void 0,upstream:void 0,downstream:[],layout:null,prev:void 0,next:void 0,index:0};constructor(e){this._node=e,this._map=e.pcube}get env(){return{...this._env}}get root(){return this._env.root}get status(){return this.node.status}get map2d(){return this.node.map2d}get map(){return this._map}get to(){return this.node.to}get from(){return this.node.from}get attrs(){return this._node.attrs}get upenv(){return this._upenv}get nodes_to(){return this.node.nodes_to}get nodes_from(){return this.node.nodes_from}get node(){return this._node}get index(){return this.upstream?this.upstream.env.downstream.indexOf(this.node):0}get prev_node(){if(!this.upstream)return;const e=this.index;return this.upstream.env.downstream[e-1]}get next_node(){if(!this.upstream)return;const e=this.index;return this.upstream.env.downstream[e+1]}get child_last(){const e=this._env.downstream;return e[e.length-1]}get child_first(){return this._env.downstream[0]}get level(){return this.is_captive?this.layout_line.length-1:0}get layout_type(){return this._env.layout||this.node.attrs.layout||null}get upstream(){return this._env.upstream}get downstream_visible(){return this.folded_self?[]:this.downstream}get downstream(){return this._env.downstream}get downstream_nodes(){const e=new Set,t=n=>{for(const r of n)e.add(r),t(r.env.downstream)};return t(this._env.downstream),e}get is_captive(){return!this.is_layout_root&&(this.layout_root&&this.upstream?.env.layout_type)}get is_under_root(){const e=this.layout_root,t=this.layout_root!==this.node;return e&&t}get has_layout_ability(){return!!this.layout_root}get is_under_free_root(){const e=this.layout_root;return!!e&&!e.env.layout_type}get layout_line(){if(this.is_layout_root)return[this.node];if(!this.upstream)return[];const e=[];let t=this.node;for(;t;){if(e.unshift(t),t.is_layout_root)return e;t=t.env.upstream}return[]}get is_layout_root(){return this.node.is_layout_root||!1}get layout_root(){return this.is_layout_root?this.node:this._env.root}get folded_upstream(){return!this.is_layout_root&&(this.upenv?.folded_self||this.upenv?.folded_upstream)}get folded_self(){return this.node.attrs.fold}get folded(){return this.folded_self||this.folded_upstream}get raw_layout_type(){return this._env.layout||this.attrs.layout||null}check_env(e=!0){const t=Zi.find_line_to_layout_root(this.node);return!t.has_root&&e&&this.clear(),{...t,root:t.line[t.line.length-1]}}free_root(){if(this.check_env(!1).has_root)return;const e=this.node.courier.get_recorder();if(this.folded_self){const t=es.layout_change(this.node.id,{fold:!1});e.tell(this.node,t)}const t=this.downstream_nodes;this.clear();const n=new Map;for(let e of t){e.env.clear();const t=e.env.check_env();t.has_root&&n.set(e,t)}const r=new Map;for(let[e,t]of n)for(let e of t.line.slice(1)){const n=t.line[t.line.length-1];if(n&&(e.env.is_captive||e.is_layout_root)){const t=r.get(n);(!t||t.env.level>e.env.level)&&r.set(n,e);break}}for(let[e,t]of r)t.env.flow("downstream"),t.map2d.flow("downstream"),t.map2d.flow("upstream"),t.env.root?.layout_throttle();return e}clear(){this._upenv=void 0,this._env.upstream=void 0,this._env.downstream.length=0,this._env.layout=null,this._env.root=this.node.is_layout_root?this.node:void 0,this.map2d.update_pos(),this.status.update_layout_type(this.layout_type),this.status.update_has_layout_ability(this.has_layout_ability),this.status.update_upstream(this._env.upstream)}update(e,t){if(e===this)return console.error("🟠Error: Layout Env loop");this._upenv=e,this._env.upstream=e.node,this._env.root=e.layout_root,this._env.layout=e.get_downstream_layout_type(this.node),this._env.index=t,this._env.prev=e.env.downstream[t-1],this._env.next=e.env.downstream[t+1],this.status.update_upstream(e.node),this.status.update_layout_type(this.layout_type),this.status.update_has_layout_ability(this.has_layout_ability)}flow(e="downstream",t=!0){if(this._node.is_layout_root&&this.clear(),this._env.downstream.length=0,t){if(!this.check_env().has_root)return this._env}const n=new Set,r=this._map.get_node_to(this._node.id)||[];for(let e of r){const t=this._map.get_node(e);if(!t)continue;n.clear();const r=Zi.get_direct_layout_parent(t,n);null!==r?r===this.node&&this._env.downstream.push(t):t.env.clear()}const o="downstream"===e;for(let e=0;e<this._env.downstream.length;e++){const t=this._env.downstream[e];t.env.update(this,e),o&&t.env.flow("downstream",!1)}return this.status.update_downstream(this._env.downstream),this._env}get_downstream_layout_type(e){const t=this.layout_type;if(!t)return null;if(e===this.node)return t;const n=e.attrs.layout||null;return Ol.check_allow(this._node,n,!1)?n:"right"===t?"right":"left"===t?"left":"up"===t?"up":"down"===t?"down":"time-right"===t?"time-down":"time-down"===t?"right":t}}class Zc extends Kc{_editable=!1;_waiter=new Set;_layouted=!1;_env=new Jc(this);constructor(e,t){super(e,t),this._init_handler()}get layouted(){return this._layouted}set layouted(e){this._layouted=e,this.status.update_layouted(e)}get is_selected(){return this.pcube.is_node_selected(this)}get env(){return this._env}get mis(){return 2}get map(){return this.pcube}get matrix2d(){return this.attrs.matrix2d}get show(){return this.pcube.is_node_visible(this)}get attrs(){return this.data.attrs}get editable(){return this._editable}set editable(e){this.pcube.set_node_editing(this,e),this._editable=e,this.status.update_editable(e)}get is_folded(){return this.attrs.fold||!1}get is_layout_root(){return this.data.attrs.root||!1}get from(){const e=this.pcube.get_node_from(this.id);return new Set(e||[])}get to(){const e=this.pcube.get_node_to(this.id);return new Set(e||[])}get linkers_from(){const e=[];for(let t of this.from){const n=Zi.get_linker_id(t,this.id),r=this.pcube.get_linker(n);r&&e.push(r)}return e}get linkers_to(){const e=[];for(let t of this.to){const n=Zi.get_linker_id(this.id,t),r=this.pcube.get_linker(n);r&&e.push(r)}return e}get node_last(){const e=this.pcube.get_node_to(this.id),t=e?e[e.length-1]:this.id;return this.pcube.get_node(t)||this}get count_from(){return this.from.size}get count_to(){return this.to.size}get nodes_to(){const e=[];for(let t of this.to){const n=this.pcube.get_node(t);n&&e.push(n)}return e}get nodes_from(){const e=[];for(let t of this.from){const n=this.pcube.get_node(t);n&&e.push(n)}return e}get matrix2d_real(){const{a:e,b:t,c:n,d:r,e:o,f:i}=this.matrix2d;if(this.is_layout_root||!this.env.upstream)return{...this.matrix2d};{const o=this.map2d.pos;return{a:e,b:t,c:n,d:r,e:o.x,f:o.y}}}_init_handler(){this.set_cmd_handler(_.Names.cube_reset,this.on_reset.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_cube_insert.bind(this)),this.set_cmd_handler(_.Names.cube_reorder,this.on_cube_reorder.bind(this)),this.set_cmd_handler(_.Names.cube_delete_child,this.on_delete_child.bind(this)),this.set_cmd_handler(_.Names.cube_insert_child,this.on_insert_child.bind(this)),this.set_cmd_handler(x.Names.append_child,this.on_append_child.bind(this)),this.set_cmd_handler(x.Names.layout_update,this.on_layout_update.bind(this))}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Ck||t instanceof oh)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}move_to_center(){const e=this.pcube.get_view_center(),t=this.pcube.transform_point(e),n=this.map2d.pos_center,r=this.pcube.real_point_to_fig(n),o=t.x-r.x,i=t.y-r.y,s=Ji.multiply(this.pcube.matrix2d,Ji.get_matrix_translate(o,i));this.pcube.reset_matrix(s)}move_in_fig_view(){if(this.check_in_fig_view(!0))return;const e=this.pcube,t=e.view_rect,{dx:n,dy:r}=$i.MathRect.move_rect_in_other(this.map2d.rect,t),o=Ji.multiply(e.matrix2d,Ji.get_matrix_translate(n,r));e.reset_matrix(o),this.map.check_show()}check_in_fig_view(e=!1){const t=this.pcube.view_rect;return e?$i.MathRect.is_include(t,this.map2d.rect):$i.MathRect.check_intersection(t,this.map2d.rect)}check_show_downstream(){return this.env.folded}layout(e=0,t=0){let n=Date.now(),r=this.is_layout_root;r&&this.map2d.update_pos_tree_root();const o=this.attrs.gap_x||e||this.config.data_raw.map_node_gap_x,i=this.attrs.gap_y||t||this.config.data_raw.map_node_gap_y;if(this.env.has_layout_ability){const e=Xc.layout_tree(this,o,i);for(let t of e)t.layout(o,i);r&&console.log("⚫布局根布局",this.id,Date.now()-n)}r&&this.map.check_show_throttle()}layout_throttle=$i.Notice.throttle(this.layout.bind(this),10);layout_self(e){const t=e.borderBoxSize[0];if(!t)return;const{blockSize:n,inlineSize:r}=t,o=this.map2d.rect_cbox;if(this.layouted&&Math.abs(o.width-r)<this.mis&&Math.abs(o.height-n)<this.mis)return;const i={width:Math.ceil(r),height:Math.ceil(n)};this.map2d.update_size(i.width,i.height);for(let e of this._waiter)e();this.layouted=!0}wait_layout_self(){return new Promise(e=>{this.layouted?e(!0):this._waiter.add(e)})}restore_layout_from_cache(){for(let e of this._waiter)e();this._waiter.clear(),this.layouted=!0}check_show_line(){const e=this.id;for(let t of this.to){const n=Zi.get_linker_id(e,t),r=this.pcube.get_linker(n);r&&(this.attrs.fold?this.pcube.set_linker_visible(r,!1):r.to_node?.show||this.show?this.pcube.set_linker_visible(r,!0):this.pcube.set_linker_visible(r,!1))}for(let t of this.from){const n=Zi.get_linker_id(t,e),r=this.pcube.get_linker(n);if(!r)continue;let o=r.from_node;const i=!o?.attrs.fold,s=this.show||o?.show;i&&s?this.pcube.set_linker_visible(r,!0):this.pcube.set_linker_visible(r,!1)}}gc(){this.base_gc(),this.map?.grider.remove_node(this)}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(),{children:r,data:o}}reset_matrix(e){Object.assign(this.attrs.matrix2d,e),this.map2d.update_pos()}get_node(e){if(e)return this.pcube.get_node(e)}get_layout_index(e){return e.indexOf(this)}translate(e,t){const n=Ji.translate(this.matrix2d,e,t);this.reset_matrix(n)}break_link_node(e){this.from.delete(e),this.to.delete(e)}remove_self(){for(let e of this.from){const t=this.pcube.find_child_cube(e);t&&t instanceof Zc&&t.break_link_node(this.id)}for(let e of this.to){const t=this.pcube.find_child_cube(e);t&&t instanceof Zc&&t.break_link_node(this.id)}return super.remove_self()}find_dom_cube(e){let t=e instanceof Element?e:e.parentElement;const n=[];for(;t;){if(t.id){let e;if(n.push(t.id),e=this.find_cube(t.id),e)return e}t=t.parentElement}}on_reset(e){const{courier:t}=this,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=this.export().info,i=rd.build_cubes(n,this);return this.splice(0,this.child_count,...i),r.add_recover(Mi.reset(this.id,o)),r}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ad(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(Mi.reorder(this.id,s.id,c)),a}on_insert_child(e){const{courier:t}=this,n=t.get_recorder();n.add_cmd(e);const{pos:r,data:o}=e;if(0===o.length)return n;const i=[];for(let e of o)e.type===k.Cubes.box_root&&i.push(new bu(e,this));let s=this.get_valid_index(r);this.splice(s,0,...i);const a=i[i.length-1];return a&&n.tell(a,zi.in_tail(a.id)),n.add_recover(Mi.delete_child(this.id,"backward",[s,s+i.length])),n}on_delete_child(e){const{courier:t,pcube:n,pid:r}=this,{dir:o,range:i}=e;if(!this.is_valid_range(i))return;const[s,a]=i,l=t.get_recorder();l.add_cmd(e);const c=this.children[s-1],d=this.children[a],u=a-s;if(s<=0&&a>=this.child_count){l.tell(this,Mi.reset(this.id,[]));const e=Mi.insert_child(this.id,[bu.get_default()],0);return l.tell(this,e),l}{let e=this.splice(s,u);c&&"backward"===o||!d?l.tell(c,zi.in_tail(c.id)):(d&&"forward"===o||!c)&&l.tell(d,zi.in_head(d.id));const t=e.data;l.add_recover(Mi.insert_child(this.id,t,s))}return l}on_cube_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r,pcube:o}=this,i=new ad(t),{data:s,end_id:a,start_id:l,offset_end:c,offset_start:d}=e,u=this.find_cube(l),h=this.find_cube(a),p=u?.find_upstream_untill(this),f=h?.find_upstream_untill(this);if(!p||!f)return i;if(h!==u||d!==c)if(p&&p===f)i.tell(p,Mi.delete(p.id,"backward",l,a,d,c)),i.tell(p,Mi.insert(p.id,s,l,a,d,c));else{i.tell(f,Mi.delete(f.id,"backward",null,a,"head",c)),i.tell(this,Mi.delete_child(this.id,"backward",[p.index+1,f.index])),i.tell(this,Mi.insert_child(this.id,e.data,p.index+1)),i.tell(p,Mi.delete(p.id,"backward",l,null,d,"tail"));let t=e.data[e.data.length-1];if(t){const e=this.find_child_cube(t.id);e&&i.tell(e,zi.in_tail(t.id))}}else i.tell(h,Mi.insert(a,s,l,a,d,c));return i}on_layout_update(e){const{courier:t,history:n}=this,r={...e.attrs},o=t.get_recorder(),i=structuredClone(jt(this.data.attrs));o.add_cmd(e);const s={fold:i.fold,is_under_root:this.env.is_under_root,upstream:this.env.upstream,is_root:this.is_layout_root,outbox:i.outbox};"layout"in r&&r.layout&&(this.env.is_under_root||"root"in r||i.root||(r.root=!0),"file-tree"!==r.layout||this.attrs.line_type||r.line_type||(r.line_type="fold1"));for(let e in r){const t=r[e];t!==this.attrs[e]&&(this.attrs[e]=t)}let a=!1,l=!1,c=!1;const d="layout"in r&&i.layout!==r.layout,u="fold"in r&&s.fold!==r.fold,h="gap_x"in r&&i.gap_x!==r.gap_x,p="gap_y"in r&&i.gap_y!==r.gap_y,f="root"in r&&i.root!==r.root,m="matrix2d"in r&&r.matrix2d,_="outbox"in r&&i.outbox!==r.outbox,g="line_type"in r&&i.line_type!==r.line_type,b="line_width"in r&&i.line_width!==r.line_width,x="fill"in r&&i.fill!==r.fill;if(m&&!this.env.is_captive&&(this.map2d.update_pos(),this.env.has_layout_ability)){if(this.env.is_under_free_root){const e=Yc.layout_tree(this);e&&this.map2d.update_pos_tree(e.x,e.y,!1)}this.layout_throttle(),this.is_layout_root&&(c=!0)}if(f)if(!s.is_root&&r.root)s.upstream?.env.flow("self"),s.upstream?.map2d.flow("self"),s.upstream?.map2d.flow("upstream"),s.upstream?.env.layout_root?.layout_throttle(),this.env.flow("downstream"),this.map2d.flow("downstream"),this.layout_throttle(),l=!0,a=!0,c=!0;else if(s.is_root&&!this.is_layout_root){const e=Zi.find_line_to_layout_root(this);if(e.has_root){const t=e.line[1];t?.env.flow("downstream"),t?.map2d.flow("self"),t?.map2d.flow("upstream"),t?.env.layout_root?.layout_throttle()}else o.merge(this.env.free_root()),this.map.check_show_throttle()}if(l||d&&(this.is_layout_root?this.env.flow("downstream"):this.env.upstream?.env.flow("downstream"),this.env.layout_root?.layout_throttle(),l=!0,c=!0),a||(d||u||h||p)&&(this.map2d.flow("downstream"),this.map2d.flow("upstream"),this.env.layout_root?.layout_throttle(),a=!0),c||(d||u||h||p)&&this.env.layout_root?.layout_throttle(),g||b||x){const e=new Set;for(let t of this.linkers_to)e.add(t);for(let t of this.env.downstream_nodes){if(g&&!t.attrs.line_type||b&&!t.attrs.line_width||x&&!t.attrs.fill)for(let n of t.linkers_to)e.add(n)}for(let t of e)t.map2d.update_path()}_&&this.pcube.set_node_outbox(this,this.attrs.outbox||!1),this.status.update_attrs();const v=es.layout_change(this.id,i);return o.add_recover(v),o}on_append_child(e){const{courier:t,history:n,pcube:r}=this,{previd:o,nodes:i}=e,s=(this.map2d.node_gap_x,t.get_recorder()),a=i.map(e=>e.id),l=r.get_node_to(this.id);if(l)if(null===o)l.unshift(...a);else if(o){const e=l.indexOf(o);l.splice(e+1,0,...a)}const c=Qi.node_add(r.id,i);s.tell(r,c);const d=[];for(let e of i){const t=Zi.create_linker_info(this.pcube,this.id,e.id);d.push(t)}const u=Qi.linker_add(r.id,d);return s.tell(r,u),this.env.flow("self"),s}static get_default_node_size(e=0){return{width:Fi.default_config.map_node_default_width+2*e,height:52+2*e}}static get_default_node_pos(e,t){const{map_node_padding:n}=t.config.data_raw,r=t.view_point_to_real(e),o=Zc.get_default_node_size(n);return{x:r.x-o.width/2,y:r.y-o.height/2}}}class Qc{_map2d;constructor(e){this._map2d=e}get map2d(){return this._map2d}get env(){return this.map2d.env}get_pos(){const e=this.env.layout_type;return"right"===e?this.pos_right():"left"===e?this.pos_left():"down"===e?this.pos_down():"up"===e?this.pos_up():"time-right"===e?this.pos_time_right():"time-down"===e?this.pos_time_down():"file-tree"===e?this.pos_file_tree():void 0}get_size_tree(){const e=this.map2d.node,t=e.env.downstream_visible,n=e.env.layout_type,r=this.map2d.rect_raw;return 0===t.length?{width:r.width,height:r.height}:"left"===n?this.size_tree_left(t):"right"===n?this.size_tree_right(t):"down"===n?this.size_tree_down(t):"up"===n?this.size_tree_up(t):"time-right"===n?this.size_tree_time_right(t):"time-down"===n?this.size_tree_time_down(t):"file-tree"===n?this.size_tree_file_tree(t):void 0}get_root_pos_tree(){return Yc.layout_tree(this.map2d.node)}pos_left(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x+o.width-r.width,t.y=n.y+o.height/2-r.height/2,t}pos_right(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x,t.y=n.y-r.height/2+o.height/2,t}pos_up(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x+o.width/2-r.width/2,t.y=n.y+o.height-r.height,t}pos_down(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x+o.width/2-r.width/2,t.y=n.y,t}pos_time_right(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw;t.x=n.x;const r=e.node.env.downstream_visible;if(0===r.length)return{x:n.x,y:n.y};const o=e.rect_raw.height/2;let i=o;for(let e of r){let t=e.map2d.size_tree_raw,n=e.map2d.rect_raw.height/2;if("up"===e.env.layout_type){let e=t.height-n;e>i&&(i=e)}else{n>i&&(i=n)}}return t.y=n.y+i-o,t}pos_file_tree(){const e=this.map2d.pos_tree_raw;return{x:e.x,y:e.y}}pos_time_down(){const e=this.map2d,t=e.pos_tree_raw,n=e.node.env.downstream_visible;if(0===n.length)return{x:t.x,y:t.y};const r={x:0,y:0};r.y=t.y;const o=e.rect_raw.width/2;let i=o;for(let e of n){let t=e.map2d.size_tree_raw,n=e.map2d.rect_raw.width/2;if("left"===e.env.layout_type){let e=t.width-n;e>i&&(i=e)}else{n>i&&(i=n)}}return r.x=t.x+i-o,r}size_tree_left(e){const t=this.map2d,n={width:0,height:0},r=this.map2d.node_gap_x,o=this.map2d.node_gap_y,i=t.rect_raw;let s=0,a=0;for(let t of e){let e=t.map2d.size_tree_raw;a+=e.height,e.width>s&&(s=e.width)}return n.width=i.width+r+s,n.height=Math.max(i.height,a+(e.length-1)*o),n}size_tree_right(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){let e=t.map2d.size_tree_raw;s+=e.height,e.width>i&&(i=e.width)}return t.width=o.width+n+i,t.height=Math.max(o.height,s+(e.length-1)*r),t}size_tree_down(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){let e=t.map2d.size_tree_raw;s+=e.width,e.height>i&&(i=e.height)}return t.width=Math.max(o.width,s+(e.length-1)*n),t.height=o.height+r+i,t}size_tree_up(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){let e=t.map2d.size_tree_raw;s+=e.width,e.height>i&&(i=e.height)}return t.width=Math.max(o.width,s+(e.length-1)*n),t.height=o.height+r+i,t}size_tree_file_tree(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){const e=t.map2d.size_tree_raw;s+=e.height,e.width>i&&(i=e.width)}return t.width=Math.max(o.width,o.width/2+n+i),t.height=o.height+r+s+(e.length-1)*r,t}size_tree_time_right(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=(this.map2d.node_gap_y,this.map2d.rect_raw);let o=r.height/2,i=0,s=o,a=o;for(let t of e){let e=t.map2d.size_tree_raw,n=t.map2d.rect_raw.height/2,r=t.env.layout_type;if(i+=e.width,n>s&&(s=n),n>a&&(a=n),"up"===r){let t=e.height-n;t>s&&(s=t)}else{let t=e.height-n;t>a&&(a=t)}}return t.width=r.width+i+e.length*n,t.height=s+a,t}size_tree_time_down(e){const t={width:0,height:0},n=(this.map2d.node_gap_x,this.map2d.node_gap_y),r=this.map2d.rect_raw;let o=r.width/2,i=0,s=o,a=o;for(let t of e){let e=t.map2d.size_tree_raw,n=t.map2d.rect_raw.width/2,r=t.env.layout_type;if(i+=e.height,n>s&&(s=n),n>a&&(a=n),"left"===r){let t=e.width-n;t>s&&(s=t)}else{let t=e.width-n;t>a&&(a=t)}}return t.width=s+a,t.height=r.height+i+e.length*n,t}}class ed extends Wc{_meter=new Qc(this);_shape_type="rect";_shape_path="";_shape_sample=[];_size_tree=Zc.get_default_node_size();_rect_cbox={x:Fi.default_config.map_node_padding,y:Fi.default_config.map_node_padding,...Zc.get_default_node_size()};_rect={x:0,y:0,...Zc.get_default_node_size()};_pos_tree={x:0,y:0};_synced_rect=!1;constructor(e){super(e);const t=e.data.attrs,n=t.matrix2d,r=n.e,o=n.f;this.shape_type=t.shape||"rect",this.pos_tree={x:r,y:o},this.rect={x:r,y:o},t.size&&(this.update_size(t.size.width,t.size.height),e.restore_layout_from_cache())}get cube(){return this._cube}get node(){return this._cube}get map(){return this.cube.map}get meter(){return this._meter}get config(){return this.cube.config}get env(){return this.cube.env}get status(){return this.cube.status}get matrix2d(){return{...this.node.matrix2d}}get attrs(){return this.cube.attrs}get rect(){return{...this._rect}}get rect_raw(){return this._rect}set rect(e){Object.assign(this._rect,e),this.sync_rect()}get rect_cbox(){return{...this._rect_cbox}}set rect_cbox(e){Object.assign(this._rect_cbox,e),this.status.update_rect_cbox(this._rect_cbox)}get sample_count(){return 8}get shape_type(){return this._shape_type}set shape_type(e){this._shape_type=e,this.status.update_shape_type(e)}get shape_path(){return this._shape_path}set shape_path(e){this._shape_path=e,this.status.update_shape_path(e)}get shape_sample(){return[...this._shape_sample]}set shape_sample(e){this._shape_sample.length=0,this._shape_sample.push(...e),this.status.update_shape_sample(e)}get size_tree(){return{...this._size_tree}}get size_tree_raw(){return this._size_tree}set size_tree(e){Object.assign(this._size_tree,e)}get pos(){return{x:this._rect.x,y:this._rect.y}}get pos_center(){return{x:this._rect.x+this._rect.width/2,y:this._rect.y+this._rect.height/2}}get pos_tree(){return{...this._pos_tree}}get rect_tree(){return{...this._pos_tree,...this._size_tree}}set pos_tree(e){Object.assign(this._pos_tree,e)}get pos_tree_raw(){return this._pos_tree}get is_layout_root(){return this.cube.is_layout_root}get up2d(){return this.env.upstream?.map2d}get node_fill(){return this.is_layout_root?this.attrs.fill:this.attrs.fill||this.up2d?.node_fill}get node_line_type(){return this.is_layout_root?this.attrs.line_type||this.node.config.data_raw.map_linker_type:this.attrs.line_type||this.up2d?.node_line_type||this.node.config.data_raw.map_linker_type}get node_line_width(){return this.is_layout_root?this.attrs.line_width||this.node.config.data_raw.map_linker_width:this.attrs.line_width||this.up2d?.node_line_width||this.node.config.data_raw.map_linker_width}get node_line_anchor_in(){return this.is_layout_root?this.attrs.anchor_in||this.node.config.data_raw.map_linker_anchor_in:this.attrs.anchor_in||this.up2d?.node_line_anchor_in||this.node.config.data_raw.map_linker_anchor_in}get node_line_anchor_out(){return this.is_layout_root?this.attrs.anchor_out||this.node.config.data_raw.map_linker_anchor_out:this.attrs.anchor_out||this.up2d?.node_line_anchor_out||this.node.config.data_raw.map_linker_anchor_out}get node_gap_x(){return this.is_layout_root?this.attrs.gap_x||this.node.config.data_raw.map_node_gap_x:this.attrs.gap_x||this.up2d?.node_gap_x||this.node.config.data_raw.map_node_gap_x}get node_gap_y(){return this.is_layout_root?this.attrs.gap_y||this.node.config.data_raw.map_node_gap_y:this.attrs.gap_y||this.up2d?.node_gap_y||this.node.config.data_raw.map_node_gap_y}update_pos_cbox(){const e=this.node.attrs.shape,{width:t,height:n}=this.rect,{map_node_padding:r}=this.node.config.data,o=t/2,i=n/2;"circle"===e?(this.rect_cbox={x:o-this._rect_cbox.width/2,y:i-this._rect_cbox.height/2},this._rect_cbox.x=o-this._rect_cbox.width/2,this._rect_cbox.y=i-this._rect_cbox.height/2):(this._rect_cbox.x=r,this._rect_cbox.y=r)}update_pos(){if(this.env.has_layout_ability&&!this.node.is_layout_root){const e=this.meter.get_pos();e&&(Object.assign(this._rect,e),this._synced_rect=!1)}else if(this.env.is_captive)this.env.folded_self&&(Object.assign(this._rect,this.pos_tree),this._synced_rect=!1);else{const e=this.matrix2d,t=e.e,n=e.f;Object.assign(this._rect,{x:t,y:n}),this._synced_rect=!1}this.map.grider.update_node(this.node)}get_pos_center(){const e=this.rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}update_pos_tree_root(){if(!this.node.is_layout_root)return;const e=this.node.env.layout_type,t=this.matrix2d.e,n=this.matrix2d.f;if(!e||this.node.attrs.fold)this._pos_tree.x=t,this._pos_tree.y=n;else{const e=this.meter.get_root_pos_tree();e&&Object.assign(this._pos_tree,e)}this.cube.attrs.outbox&&this.status.update_outbox(this.rect_tree)}update_pos_tree(e,t,n=!0){this._pos_tree.x=e,this._pos_tree.y=t,n&&this.update_pos()}update_size(e,t){this.rect_cbox={width:e,height:t},this.update_rect(),this.update_pos_cbox(),this.pcube.has_layout&&Promise.resolve().then(async()=>{if(this.flow("upstream"),this.pcube.has_layout&&!this.node.clipboard.pasting){const e=this.node.env.layout_root;e&&e.layout_throttle()}})}update_rect(){const{map_node_padding:e}=this.node.config.data,t=this._rect_cbox.width+2*e,n=this._rect_cbox.height+2*e;this.rect={width:t,height:n},this.update_path(),this.update_sample()}update_size_tree(){const e=this.meter.get_size_tree();Object.assign(this._size_tree,e),this.cube.attrs.outbox&&this.status.update_outbox(this.rect_tree)}flow(e="downstream"){const t=this.env.downstream_visible;if(0===t.length&&Object.assign(this._size_tree,this._rect),"downstream"===e){for(let e of t)e.map2d.flow();this.update_size_tree()}else if("upstream"===e){this.update_size_tree();const t=this.env.upstream;t?.is_layout_root?t.map2d.flow("self"):t?.map2d.flow(e)}else"self"===e&&this.update_size_tree()}get_bound_rect_point(e){const t=this.rect;return $i.MathRect.get_rect_point(t,e)}update_path(){this.shape_path=Zu.get_shaple(this,this.node.config.data_raw.map_node_padding)}update_sample(){if("rect"===this.shape_type){const e=this.rect,t=$i.MathRect.get_rect_point,n=$i.IMath.RectPosition;this.shape_sample=[t(e,n.left_top),t(e,n.top_mid),t(e,n.right_top),t(e,n.right_mid),t(e,n.right_bottom),t(e,n.bottom_mid),t(e,n.left_bottom),t(e,n.left_mid),t(e,n.left_top)]}else this.shape_sample=Zi.svg_path_sample(this.shape_path,this.sample_count)}sync_rect(){this._synced_rect||(this.status.update_rect(this._rect),this.update_sample(),this._synced_rect=!0)}update_linkers(e){if("to"===e||"all"===e)for(let e of this.node.linkers_to)e.map2d.update_path();if("from"===e||"all"===e)for(let e of this.node.linkers_from)e.map2d.update_path()}}class td extends Ts{_rect_cbox=Rt({x:0,y:0,...Zc.get_default_node_size()});_rect=Rt({x:10,y:10,...Zc.get_default_node_size()});_editable=Gt(!1);_shape_type=Gt("rect");_shape_path=Gt("");_shape_sample=Pt([]);_layout_type=Gt(null);_has_layout_ability=Gt(!0);__downstream=new Set;_downstream=Pt(this.__downstream);_layouted=Gt(!1);_upstream=Vt(void 0);_outbox=Gt("");constructor(e){super(e)}_downstream_nodes=_i(()=>{const e=[];let t=[...this._downstream];for(let n of t)e.push(n),t.push(...n.status.downstream);return e});_css=_i(()=>({...super.css,fill:this.node_fill,"--node-max-width":this.node_max_width+"px"}));get layouted(){return this._layouted.value}get cube(){return this._cube}get config(){return this.cube.config}get env(){return this.cube.env}get attrs(){return this._data.attrs}get upstream(){return this._upstream.value}get map2d(){return this.cube.map2d}get outbox(){return this._outbox.value}get layout_type(){return this._layout_type.value}get has_layout_ability(){return this._has_layout_ability.value}get downstream_nodes_count(){return this._downstream_nodes.value.length}get downstream_nodes(){return this._downstream_nodes.value}get downstream(){return[...this._downstream]}get css(){return this._css.value}get rect(){return{...this._rect}}get rect_cbox(){return{...this._rect_cbox}}get matrix2d(){return{...this.attrs.matrix2d}}get is_layout_root(){return this.attrs.root||!1}get upstatus(){return this.upstream?.status}get node_fill(){return this.is_layout_root?this.attrs.fill:this.attrs.fill||this.upstream?.status.node_fill}get node_line_type(){return this.is_layout_root?this.attrs.line_type||this.cube.config.data.map_linker_type:this.attrs.line_type||this.upstatus?.node_line_type||this.cube.config.data.map_linker_type}get node_line_width(){return this.is_layout_root?this.attrs.line_width||this.cube.config.data.map_linker_width:this.attrs.line_width||this.upstatus?.node_line_width||this.cube.config.data.map_linker_width}get node_anchor_in(){return this.is_layout_root?this.attrs.anchor_in||this.cube.config.data.map_linker_anchor_in:this.attrs.anchor_in||this.upstatus?.node_anchor_in||this.cube.config.data.map_linker_anchor_in}get node_anchor_out(){return this.is_layout_root?this.attrs.anchor_out||this.cube.config.data.map_linker_anchor_out:this.attrs.anchor_out||this.upstatus?.node_anchor_out||this.cube.config.data.map_linker_anchor_out}get node_gap_x(){return this.is_layout_root?this.attrs.gap_x||this.cube.config.data.map_node_gap_x:this.attrs.gap_x||this.upstatus?.node_gap_x||this.cube.config.data.map_node_gap_x}get node_gap_y(){return this.is_layout_root?this.attrs.gap_y||this.cube.config.data.map_node_gap_y:this.attrs.gap_y||this.upstatus?.node_gap_y||this.cube.config.data.map_node_gap_y}get node_max_width(){return this.is_layout_root?this.attrs.max_width||this.config.data.map_node_max_width:this.attrs.max_width||this.upstatus?.node_max_width||this.config.data.map_node_max_width}get matrix2d_dom_string(){const{a:e,b:t,c:n,d:r,e:o,f:i}=this.cube.matrix2d,s=this.rect;return`matrix(${e.toFixed(1)},${t},${n},${r.toFixed(1)},${s.x.toFixed(1)},${s.y.toFixed(1)})`}get editable(){return this._editable.value}get shape_type(){return this._shape_type.value}get shape_path(){return this._shape_path.value}get shape_sample(){return[...this._shape_sample]}update_layouted(e){this._layouted.value=e}update_upstream(e){this._upstream.value=e}update_has_layout_ability(e){this._has_layout_ability.value=e}update_downstream(e){this._downstream.clear();for(let t of e)this._downstream.add(t)}update_layout_type(e){this._layout_type.value=e}update_rect(e){Object.assign(this._rect,e)}update_rect_cbox(e){Object.assign(this._rect_cbox,e)}update_matrix2d(e){Object.assign(this.attrs.matrix2d,e||this.cube.matrix2d)}update_editable(e){this._editable.value=e}update_shape_type(e){this._shape_type.value=e}update_shape_path(e){this._shape_path.value=e}update_shape_sample(e){this._shape_sample.splice(0,this._shape_sample.length,...e)}update_outbox(e,t=8){const n={x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t},r={x:n.x,y:n.y},o={x:n.x+n.width,y:n.y+n.height};this._outbox.value=Zi.get_rect_area(r,o,8)}update_attrs(e){super.update_attrs(e),this.update_matrix2d(this.cube.matrix2d),this.update_outbox(this.cube.map2d.rect_tree)}}class nd extends Ri{_pcube;_children=[];_has_postil=!1;data;postil=null;constructor(e,t){super(),this._pcube=t;const n=structuredClone(e),r=Ci.versions,o=this.update_data(r,n);this.data=o.data,this._setup(),this.cubes.add_cube(this)}get pcube(){return this._pcube}get root(){return this.pcube.root}get courier(){return this.root.courier}get config(){return this.root.config}get history(){return this.root.history}get hotkeys(){return this.root.hotkeys}get cursor(){return this.root.cursor}get event(){return this.root.event}get clipboard(){return this.root.clipboard}get float(){return this.root.float}get painter(){return this.root.painter}get cubes(){return this.root.cubes}get stats(){return this.root.stats}get versions(){return this.root.versions}get text(){let e="";for(let t of this.children)e+=t.text,t instanceof uu&&(e+="\n");return this instanceof uu&&(e+="\n"),e}get boxroot(){let e=this;for(;e;){if(e instanceof bu)return e;e=e.pcube}return e}get is_empty(){const e=this.children;return 0===e.length||1===e.length&&this.child_first.is_empty}get children(){return[...this._children]}get has_postil(){return this._has_postil}set has_postil(e){this._has_postil=e,this.status.update_has_postil(e)}get dom(){return document.getElementById(this.id)}get level(){return this.pcube.level+1}get host_postil(){return this instanceof Wd?this:this.pcube.host_postil}get host_node(){let e=this.pcube;for(;e;){if(e instanceof Zc)return e;e=e.pcube}}get in_postil(){return this instanceof Wd||this.pcube.in_postil}get child_count(){return this.children.length}get child_first(){return this.children[0]}get child_first_line(){for(let e of this._children)if(e instanceof uu)return e}get child_last(){return this.children[this.children.length-1]}get pid(){return this.pcube.id}get id(){return this.data.id}get css(){return this.data.css||(this.data.css={}),{...this.data.css,"margin-left":this.attrs.indent>0?this.attrs.indent*this.root.config.data.line_indent+"px":"0px"}}get attrs(){return this.data.attrs||(this.data.attrs={}),this.data.attrs}get info(){return this.data.info}get type(){return this.data.type}get clientRect(){return this.dom?.getBoundingClientRect()}get clientRects(){return this.dom?.getClientRects()}get prev_cube(){return this.pcube.find_prev_cube(this.id)}get next_cube(){return this.pcube.find_next_cube(this.id)}get prev_cube_deep(){let e=this;for(;e;){let t=e.prev_cube;if(t instanceof nd)return t;e=e.pcube}}get next_cube_deep(){let e=this;for(;e;){let t=e.next_cube;if(t instanceof nd)return t;e=e.pcube}}get index(){return this.pcube?this.pcube.find_child_index(this.id):0}_setup(){this.set_cmd_handler(_.Names.cube_set_selection_css,this.on_cube_set_selection_css.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_insert.bind(this)),this.set_cmd_handler(_.Names.cube_delete,this.on_cube_delete.bind(this)),this.set_cmd_handler(_.Names.cube_set_css,this.on_cube_set_css.bind(this)),this.set_cmd_handler(_.Names.cube_set_attr,this.on_cube_set_attr.bind(this)),this.set_cmd_handler(_.Names.cube_delete_adjacent,this.on_cube_delete_adjacent.bind(this)),this.set_cmd_handler(_.Names.cube_postil_add,this.on_postil_add.bind(this)),this.set_cmd_handler(_.Names.cube_postil_remove,this.on_postil_remove.bind(this)),this.set_cmd_handler(g.Names.cursor_in_head,this.on_cursor_in_head.bind(this)),this.set_cmd_handler(g.Names.cursor_in_tail,this.on_cursor_in_tail.bind(this)),Ai.init_cmd_handler(this)}setup(){this.build_child(this.data)}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(this._children),{children:r,data:o}}get_children_cubedata(){const e=[];for(let t of this.children)e.push(t.export());return e}create_child_block(e){const t=rd.pick(e);return rd.build_cubes(t.list,this)}gc(){this.base_gc()}base_gc(){this.cubes.remove_cube(this);for(let e of this.children)e.gc()}base_export(){const e=structuredClone(jt(this.data));return e.attrs.postil=void 0,this.postil&&(e.attrs.postil=this.postil.export()),e}copy(e,t){const n=this.children.slice(e,t),r=[];for(let e of n){let t=e.export();r.push(t)}return r}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Ck||t instanceof oh)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}remove_self(e="backward"){const{pcube:t,courier:n,index:r}=this;if(r<0)return;const o=new ad(n);return o.tell(t,Mi.delete_child(t.id,e,[r,r+1])),o}merge(e){const{pcube:t,cursor:n,courier:r}=this,{cube_end:o,offset_end:i}=n;if(!o)return;const s=r.get_recorder();return s.tell(this,Mi.merge(this.id,e,o.id,i)),s}find_cube(e){if(e===this.id)return this;for(let t of this.children){if(t.id===e)return t;const n=t.find_cube(e);if(n)return n}}filter(e){const t=[];e(this)&&t.push(this);for(let n of this.children)e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this.children)e(t),t.each(e)}find_dom_cube(e){let t=e instanceof Element?e:e.parentElement;const n=[];for(;t;){if(t.id){let e;if(n.push(t.id),e=this.find_cube(t.id),e)return e}t=t.parentElement}}is_contains_cube(e){if(e===this)return!0;let t=e;for(;t;){if(t.pcube===this)return!0;t=t.pcube}return!1}find_upstream_untill(e){if(!e.is_contains_cube(this))return;let t=this;for(;t;){if(t.pcube===e)return t;t=t.pcube}}find_upstream_target(e){let t=this;for(;t;)if(t=t.pcube,e(t))return t}find_child_cube(e){return this.children.find(t=>t.id===e)}find_child_index(e){return this.children.findIndex(t=>t.id===e)}find_next_cube(e){const t=this.find_child_index(e);return this.children[t+1]}find_prev_cube(e){const t=this.find_child_index(e);return this.children[t-1]}on_cube_set_selection_css(e){const{cursor:t,courier:n}=this,{css:r,start_id:o,end_id:i,offset_end:s,offset_start:a,toggle:l,replace:c}=e,d=new ad(n);if(o!==i||s!==a){if(i&&!o){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(0,t.index);for(let e of n)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,Mi.set_selection_css(t.id,r,null,i,"head",s,l,c)),d}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(t.index+1);for(let e of n)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,Mi.set_selection_css(t.id,r,o,null,a,"tail",l,c)),d}if("tail"===s&&"head"===a){for(let e of this.children)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d}if(i&&o){const e=this.find_cube(o),t=this.find_cube(i),n=e?.find_upstream_untill(this),u=t?.find_upstream_untill(this);if(!n||!u)return;const h=this.children.slice(n.index+1,u.index);for(let e of h)d.tell(e,Mi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(n,Mi.set_selection_css(n.id,r,o,null,a,"tail",l,c)),n!==u&&d.tell(u,Mi.set_selection_css(u.id,r,null,i,"head",s,l,c)),d}}}on_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r}=this,o=new ad(t),{data:i,end_id:s,start_id:a,offset_end:l,offset_start:c}=e,d=this.find_cube(a),u=this.find_cube(s),h=d?.find_upstream_untill(this),p=u?.find_upstream_untill(this);if(!h||!p)return o;if(u!==d||c!==l)if(h&&h===p)o.tell(h,Mi.delete(h.id,"backward",a,s,c,l)),o.tell(h,Mi.insert(h.id,i,a,s,c,l));else{o.tell(p,Mi.delete(p.id,"backward",null,s,"head",l)),o.tell(this,Mi.delete_child(this.id,"backward",[h.index+1,p.index])),o.tell(this,Mi.insert_child(this.id,i,h.index+1)),o.tell(h,Mi.delete(h.id,"backward",a,null,c,"tail"));let e=i[i.length-1];const t=this.boxroot.find_cube(e.id);t&&o.tell(t,zi.in_tail(e.id))}else o.tell(u,Mi.insert(s,i,a,s,c,l));return o}on_cube_delete(e){const{courier:t,cursor:n}=this,{dir:r,start_id:o,end_id:i,offset_end:s,offset_start:a,reserve:l}=e,c=new ad(t);if(!o&&i){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,Mi.delete_child(this.id,r,[0,t.index],l)),c.tell(t,Mi.delete(t.id,r,o,i,"head",s,l)),c}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,Mi.delete_child(this.id,r,[t.index+1,this.child_count],l)),c.tell(t,Mi.delete(t.id,r,o,i,a,s,l)),c}if("head"===a&&"tail"===s){if(l){if(this.is_empty)return;c.tell(this,Mi.delete_child(this.id,r,[1,this.child_count]));const e=this.child_first;e.meta.block?c.tell(e,Mi.delete_child(e.id,r,[0,e.child_count],l)):e instanceof Zd?c.tell(e,Yd.reset(e.id,"",1,1)):c.tell(e,Mi.reset(e.id,[]))}else c.tell(this.pcube,Mi.delete_child(this.pid,"backward",[this.index,this.index+1]));return c}if(o&&i){const e=this.find_cube(o),t=this.find_cube(i);if(!e||!t)return;const n=e.find_upstream_untill(this),l=t.find_upstream_untill(this);if(!n||!l)return c;const d=n.index,u=l.index;if(o!==i||a!==s)if(n===l)c.tell(n,Mi.delete(n.id,r,o,i,a,s,!0));else if(c.tell(l,Mi.delete(l.id,r,null,i,"head",s)),c.tell(this,Mi.delete_child(this.id,"backward",[d+1,u])),c.tell(n,Mi.delete(n.id,r,o,null,a,"tail",!0)),e instanceof Zd){const t=e.get_valid_index(a);e.set_cursor_in_head(t)}return c}}on_cube_set_css(e){const{courier:t,cursor:n}=this,{css:r,toggle:o,replace:i}=e,s=t.get_recorder();if(s.add_cmd(e),i){const e=structuredClone(jt(this.css));return this.data.css=r,this.status.update_css(this.css),s.add_recover(Mi.set_css(this.id,e,!1,!0)),s}if(0===Object.keys(r).length)return;let a=!0;const l=structuredClone(jt(this.data.css)),c=structuredClone(jt(this.data.css));for(let e in r){const t=r[e],n=this.css[e]||null;l[e]=n,null===t||o&&t===n?(a=!1,delete c[e]):t!==n&&(a=!1,c[e]=t)}return this.data.css=c,a?void 0:(this.status.update_css(this.css),s.add_recover(Mi.set_css(this.id,l)),s)}on_cube_set_attr(e){const{courier:t,cursor:n}=this,{attr:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===Object.keys(r).length)return;const i={};for(let e in r){const t=r[e];i[e]=structuredClone(jt(this.attrs[e]))||null,null===t?delete this.data.attrs[e]:this.data.attrs[e]=t}return this.status.update_attrs(this.attrs),o.add_recover(Mi.set_attr(this.id,i)),o}on_cube_delete_adjacent(e){const{courier:t,pcube:n,pid:r,index:o}=this,{from:i,from_id:s,offset:a}=e,l=new ad(t);if(this.meta.block){const e=this.child_first,t=this.child_last;this.is_empty&&l.tell(n,Mi.delete_child(r,"backward",[this.index,this.index+1])),"left"===i?l.tell(e,zi.in_head(e.id)):l.tell(t,zi.in_tail(t.id))}else l.tell(n,Mi.delete_child(r,"backward",[this.index,this.index+1]));return l}on_postil_add(e){const{courier:t}=this,{data:n}=e;if(this.postil){const e=new ad(t);return e.tell(this.postil,Mi.insert_child(this.postil.id,n,this.postil.child_count)),this.has_postil=!0,this.postil.show=!0,e}{const r=t.get_recorder();r.add_cmd(e);const o=Wd.get_default(n),i=new Wd(o,this);return this.postil=i,r.add_recover(Mi.postil_remove(this.id,[0,i.child_count])),this.postil.show=!0,this.has_postil=!0,r}}on_postil_remove(e){const{courier:t}=this,{range:n}=e,[r,o]=n,i=this.postil;if(!i)return;let s=r<0?0:r,a=o>i.child_count?i.child_count:o;if(s<=0&&a>=i.child_count){const n=t.get_recorder();n.add_cmd(e);const r=i.export();return n.add_recover(Mi.postil_add(this.id,r.info)),this.postil&&(this.postil.show=!1),this.postil=null,this.has_postil=!1,i.gc(),n}{const e=new ad(t);return e.tell(i,Mi.delete_child(i.id,"backward",[s,a])),e}}on_cursor_in_head(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ad(t);if(this.meta.block){const e=this.child_first;if(!e)return i;i.tell(e,zi.in_head(e.id))}else if(this instanceof Zd)this.set_cursor_in_head(0);else if(o&&o instanceof Zd)o.set_cursor_in_head();else{const e=Zd.get_default();i.tell(r,Mi.insert_child(r.id,[e],this.index+1))}return i}on_cursor_in_tail(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ad(t);if(this.meta.block){const e=this.child_last;if(!e)return i;i.tell(e,zi.in_tail(e.id))}else if(this instanceof Zd)this.set_cursor_in_tail(0);else if(n&&n instanceof Zd)n.set_cursor_in_tail();else{const e=Zd.get_default();i.tell(r,Mi.insert_child(r.id,[e],this.index))}return i}is_valid_range(e,t=!0){const[n,r]=e;return!(n<0||r>this.child_count||n>r)&&(!t||n!==r)}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}get_valid_range(e){let[t,n]=e;return t<0&&(t=0),n>this.child_count&&(n=this.child_count),[t,n]}}class rd{static get_id(){return vi()}static get_char_zws(){return""}static async sleep(e=100){return new Promise(t=>{setTimeout(t,e)})}static is_same_style(e,t){let n=new Set(Object.keys(e)),r=new Set(Object.keys(t)),o=new Set([...n,...r]);if(n.size!==o.size||n.size!==r.size)return!1;for(let r of n){if(e[r]!==t[r])return!1}return!0}static is_same_attrs(e,t){let n=new Set(Object.keys(e)),r=new Set(Object.keys(t)),o=new Set([...n,...r]);if(n.size!==o.size||n.size!==r.size)return!1;for(let r of n){if(e[r]!==t[r])return!1}return!0}async locate(e,t,n=!0){const{courier:r,history:o}=e,i=e.find_cube(t),s=xi.tips;if(i instanceof nd&&i.boxroot){const e=i.boxroot;if(i.find_upstream_untill(e)!==e.child_first){const t=r.get_recorder();t.tell(e,Mi.fold(e.id,!1)),o.record(t)}}const a=document.getElementById(t);if(!a)return s?.tip_error("未发现书签锚点");let l=a.style.backgroundColor;a.style.backgroundColor="var(--locate-anchor-bg)",setTimeout(()=>{"var(--locate-anchor-bg)"===a.style.backgroundColor&&(a.style.backgroundColor=l)},3e3),n&&a.scrollIntoView({block:"center",behavior:"instant"})}static exports(e){const t=[];for(let n of e)t.push(n.export());return t}static build_cubes(e,t,n=[]){for(let r of e){if(!r)continue;let e=Ci.find_cube(r.type);if(e)n.push(new e(r,t));else{const e=new kd(r,t,"未注册cube");n.push(e)}}return n}static get_client_rects(e){const t=document.getElementById(e);if(t)return t.getClientRects()}static pick(e,t=!1){const n=Ci.metas;let r=[],o=[],i=[],s=[],a=null,l=e,c=[];for(let t=0;t<e.length;t++){const n=e[t];if(n.type===k.Cubes.box_root){l=e.slice(0,t),c=e.slice(t+1),a=n,s.push(a);break}}let d=-1,u=-1;for(let e=0;e<l.length;e++){const t=l[e];n.get(t.type)?.block&&(d<0?d=e:u=e)}if(d>=0&&u>=0){const e=l.slice(0,d),s=l.slice(u+1),a=[];let c=uu.get_default();c.info=[];for(let e of l.slice(d,u+1))n.get(e.type)?.block?(e.type===k.Cubes.box&&t?a.push(...e.info):a.push(e),c.info.length>0&&(a.push(c),c=uu.get_default(),c.info=[])):c.info.push(e);r=e,o=a,i=s}else if(d>=0&&u<0){r=l.slice(0,d),i=l.slice(d+1);const e=l.slice(d,d+1);if(t)for(let t of e)t.type===k.Cubes.box?o.push(...t.info):o.push(t);else o=e}else r=l,o=[],i=[];if(a){let e=uu.get_default();e.info=[];for(let t of c)t.type===k.Cubes.box_root?(a=t,s.push(t)):n.get(t.type)?.block?(t.type===k.Cubes.box?a.info.push(...t.info):a.info.push(t),e.info.length>0&&a&&(a.info.push(e),e=uu.get_default())):e.info.push(t);e.info.length>0&&a&&a.info.push(e)}const h=[];if(r.length>0&&h.push(uu.get_default(r)),o.length>0&&h.push(...o),i.length>0&&h.push(uu.get_default(i)),s.length>0)for(let e of s)h.push(...e.info);return{head:r,body:o,tail:i,roots:s,list:h}}static find_line(e,t="first"){if(e instanceof uu)return e;const n=Ci.metas.get(e.type);if(!n||!n.block)return;const r="first"===t?e.children:e.children.reverse();for(let e of r){let n=this.find_line(e,t);if(n)return n}}static filter_out_empty(e){return e.filter(e=>!Zd.is_empty_text(e))}static get_flat_cube(e,t=!0){const n=e.children,r=[];if(t)for(let e of n)r.push(e),r.push(...this.get_flat_cube(e));else{r.push(...n);for(let e of r)r.push(...e.children)}return r}static replace_id(e,t,n,r={}){const o=[];for(let i of n){const n=Ci.find_cube(i.type);if(!n||!n.replace_id)continue;const s=n.update_data(t,i);o.push(n.replace_id(e,t,s.data,r))}return o}static check_mouse_key(e,t){let n={left:{pointermove:{button:-1,buttons:1},pointerdown:{button:0,buttons:1},pointerup:{button:0,buttons:0},contextmenu:{button:0,buttons:1}},right:{pointermove:{button:-1,buttons:2},pointerdown:{button:2,buttons:2},pointerup:{button:2,buttons:0},contextmenu:{button:2,buttons:0}},mid:{pointermove:{button:-1,buttons:4},pointerdown:{button:1,buttons:4},pointerup:{button:1,buttons:0}}}[t][e.type];return!(!n||e.button!=n.button||e.buttons!=n.buttons)}}class od extends bi{_record;_resolve;_status=C.pending;_p=Promise.resolve();_prev_tip_remove;get meta(){return od.meta}get status(){return this._status}constructor(e,t){const n=xi.tips;super(e),this._record=t,this._prev_tip_remove=n?.tip_info("播放器已就绪,点我播放",1/0,this.play.bind(this))}waiting(){return new Promise(e=>{this._resolve=e;[C.pending,C.playing].includes(this.status)&&e()})}clear_message(){this._prev_tip_remove&&this._prev_tip_remove()}async play(){const e=xi.tips;this.clear_message(),this.status!==C.stop&&(this._status=C.playing,this._prev_tip_remove=e?.tip_info("正在演示,点此暂停",1/0,this.pause.bind(this)));for(let e of this._record.stack){const t=this.courier.get_recorder();for(let n of e.do){await rd.sleep(this.config.data.player_speed),await fn(),this.stats.showing=!0;let e=this.root.find_cube(n.id);e?(e.dom?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"}),t.tell(e,n)):console.warn(`未发现演示cube:${n}`)}await fn(),this.history.record(t),await this.waiting()}this._status=C.stop,this.clear_message(),this.stats.showing=!1,e?.tip_success("演示完毕",9e3)}pause(){const e=xi.tips;this.clear_message(),this._status!==C.stop&&(this._status=C.pause,this.stats.showing=!1,this._prev_tip_remove=e?.tip_info("暂停演示,点此恢复",1/0,this.continue.bind(this)))}continue(){const e=xi.tips;this.clear_message(),this._status!==C.stop&&(this._resolve&&this._resolve(),this._status=C.playing,this._prev_tip_remove=e?.tip_info("正在演示,点此暂停",1/0,this.pause.bind(this)))}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:k.Cores.player,version:1}}}class id extends bi{stack_undo=Pt([]);stack_redo=Pt([]);get meta(){return id.meta}get len_undo(){return this.stack_undo.length}get len_redo(){return this.stack_redo.length}constructor(e){super(e)}execute_command_group(e){let t=Promise.resolve();for(let n of e)t=t.then(()=>fn(()=>this.courier.pass(n)))}undo(){const e=xi.tips;if(this.stats.is_read_mode)return e?.tip_info("阅读模式不可操作");if(!this.courier)return;const t=this.stack_undo.pop();if(!t)return e?.tip_info("已无更多记录");this.stack_redo.push(t);const n=t.stack_undo;this.execute_command_group(n),this.event.emit_status_update()}redo(){const e=xi.tips;if(this.stats.is_read_mode)return e?.tip_info("阅读模式不可操作");if(!this.courier)return;const t=this.stack_redo.pop();if(!t)return e?.tip_info("已无更多记录");this.stack_undo.push(t);const n=t.stack_do;this.execute_command_group(n),this.event.emit_status_update()}record(e){if(!this.stats.is_read_mode&&0!==e.stack_undo.length){if(this.config.data.history_length>0&&this.config.data.history_length<Number.POSITIVE_INFINITY){const e=this.stack_undo.length-this.config.data.history_length;e>0&&this.stack_undo.splice(0,e)}this.stack_undo.push(e),this.event.emit_status_update()}}play(e){return new od(this.root,e)}export(e=0){const t=this.stack_undo.slice(e),n={version:this.meta.version,stack:[],docid:this.root.id};for(let e of t)n.stack.push({do:e.stack_do,undo:e.stack_undo});return n}download(e="record.json"){const t=this.export(),n=document.createElement("a");n.download="filename";const r=new Blob([JSON.stringify(t)],{type:"text/plain"});n.href=URL.createObjectURL(r),n.click()}update_data(...e){return{}}clear_stack(){this.stack_undo.length=0,this.stack_redo.length=0,this.event.emit_status_update()}static get meta(){return{type:k.Cores.history,version:1}}}class sd{_recorder;_cube;_cmds;_line=[];_status_action="pass";_status_event="capture";constructor(e,t,n){this._recorder=e,this._cube=t,this._cmds=n,this._line=this.get_cube_upstreams(!1)}get cube(){return this._cube}get cmds(){return this._cmds}get pcube(){return this.cube.pcube}get recorder(){return this._recorder}get line_bubble(){return[...this._line]}get line_capture(){return this._line.toReversed()}get status(){return this._status_action}reset_status(){this._status_action="pass"}stop(){this._status_action="stop"}stop_immediate(){this._status_action="stop-immediate"}check_in_line(e){return this._line.includes(e)}get_cube_upstreams(e=!0){let t=[],n=e?this.cube:this.pcube;for(;n;)t.push(n),n=n.pcube;return t}}class ad{do=[];undo=[];courier;get len_do(){return this.do.length}get len_undo(){return this.undo.length}get stack_do(){const e=[];return e.push(...this.do),e}get stack_undo(){const e=[];return e.push(...this.undo),e}constructor(e){this.courier=e}add_cmd(e){this.do.push(structuredClone(jt(e)))}add_recover(e){e&&this.undo.unshift(e)}pass(e){let t=this.courier.pass(e);t instanceof ad&&this.merge(t)}tick(e,t){fn(()=>{t?this.tell(t,e):this.courier.pass(e)})}tell(e,...t){const n=xi.tips;if(!e)return this;if(this.courier.stats.is_read_mode)return n?.tip_info("只读模式不可操作"),this;const r=Object.freeze(t),o=new sd(this,e,r);for(let e of o.line_capture)if(e.event_capture(o),"stop-immediate"===o.status)return this;if("stop"===o.status)return this;for(let n of t)console.log("🟩",e,e.type,n),this.courier.event.emit_edit_before(e,n),this.merge(e.on(n)),this.courier.event.emit_edit_after(e,n);for(let e of o.line_bubble)if(e.event_bubble(o),"stop-immediate"===o.status)return this;return this}exe(e,...t){const n=xi.tips;if(!e)return this;if(this.courier.stats.is_read_mode)return n?.tip_info("只读模式不可操作"),this;for(let n of t){if(!e||e.id!==n.id)continue;console.log("🟨",e,e.type,n),this.courier.event.emit_edit_before(e,n);let t=e.on(n);this.merge(t),this.courier.event.emit_edit_after(e,n)}return this}merge(e){return e instanceof ad?(this.do.push(...structuredClone(jt(e.stack_do))),this.undo.unshift(...structuredClone(jt(e.stack_undo))),this):this}}function ld(e,t){return t.status.attrs.width?Number.parseInt(t.css.width.trim().slice(0,-2)):e.getBoundingClientRect().width}function cd(e,t,n,r){e.stopPropagation(),e.preventDefault(),r.isdown=!0,r.dir=n,r.dom=t.dom;const o=e.currentTarget,i=o.parentElement?.parentElement;if(!i)return;r.x=e.clientX,r.width_origin=t.css.width;const s=ld(i,t);r.width=s,r.width_result=s}const dd=["id","data-type"],ud={class:"tools-left"},hd={class:"tools-right"},pd=["src","loading"],fd=On({__name:"cube-img",props:{cube:{}},setup(e){const{root:t,stats:n,status:r}=e.cube,o={isdown:!1,ismove:!1,x:0,width:-1,dir:"left",width_origin:500},i=Rt({resize_origin_width:-1,resize_result:-1,resize_scroll:!1}),s=t.id,a=xi.url,l=t=>cd(t,e.cube,"left",o),c=t=>cd(t,e.cube,"right",o),d=t=>function(e,t,n){if(!n.isdown||!n.dom||!rd.check_mouse_key(e,"left"))return;n.ismove=!0,e.preventDefault();const r="left"===n.dir?1:-1,o=e.clientX-n.x,i=Math.abs(n.width-o*r);t.status.update_css({width:i+"px"},!1),n.width_result=i}(t,e.cube,o),u=t=>function(e,t,n){if(n.width===n.width_result||!n.isdown||!n.ismove)return;n.isdown=!1,n.ismove=!1,t.data.css.width=n.width_origin;const{courier:r,history:o}=t.root,i=new ad(r);i.tell(t,Mi.set_css(t.id,{width:n.width_result+"px"})),o.record(i)}(0,e.cube,o),h=t=>function(e,t,n){if(n.width===n.width_result||!n.isdown||!n.ismove)return;n.isdown=!1,n.ismove=!1,t.data.css.width=n.width_origin;const{courier:r,history:o}=t.root,i=new ad(r);i.tell(t,Mi.set_css(t.id,{width:n.width_result+"px"})),o.record(i)}(0,e.cube,o);function p(t){const n=t.currentTarget.parentElement;Object.assign(n.style,e.cube.css),n.classList.add("cube-img-load-failed")}function f(t){if(!i.resize_scroll)return;const{deltaY:n}=t,o=t.currentTarget;if(!o)return;t.preventDefault(),t.stopPropagation();let s=ld(o,e.cube)+10*Math.sign(n);r.update_css({width:s+"px"},!1),i.resize_result=s}return Jn(()=>{document.documentElement.addEventListener("pointermove",d),document.documentElement.addEventListener("pointerup",u),document.documentElement.addEventListener("pointercancel",h)}),tr(()=>{document.documentElement.removeEventListener("pointermove",d),document.documentElement.removeEventListener("pointerup",u),document.documentElement.removeEventListener("pointercancel",h)}),(o,d)=>(zo(),Po("div",{class:fe(["cube-img",{"resize-scroll":i.resize_scroll}]),id:o.cube.id,"data-type":o.cube.type,onContextmenu:d[1]||(d[1]=e=>Wt(rc)(e,o.cube)),onWheel:f},[Bo("div",ud,[Bo("div",{class:"dragger",onPointerdown:l},null,32)]),Bo("div",hd,[Bo("div",{class:"dragger",onPointerdown:c},null,32)]),Bo("img",{style:ce(Wt(r).css),src:t.isdev?e.cube.info:a?a(s,"image",e.cube.info):void 0,alt:"",onErrorOnce:p,onClick:d[0]||(d[0]=t=>function(t){const n=t.currentTarget;if(i.resize_scroll=!i.resize_scroll)i.resize_origin_width=ld(n,e.cube);else{if(i.resize_origin_width<0||i.resize_result<0)return;const{courier:t,history:n}=e.cube.root;e.cube.status.update_css({width:i.resize_origin_width+"px"});const r=t.get_recorder();r.tell(e.cube,Mi.set_css(e.cube.id,{width:i.resize_result+"px"})),n.record(r)}}(t)),loading:Wt(n).mode===Wt(k).Mode.export?"eager":"lazy"},null,44,pd)],42,dd))}}),md=(0,Ls.A)(fd,[["__scopeId","data-v-562f3d45"]]);class _d extends Ts{constructor(e){super(e)}}class gd extends nd{_status=new _d(this);constructor(e,t){super(e,t);const n=Ci.clipboard?.pasted_from;n&&this.event.emit_asset_copy(n.noteid,"image",e.info),this.setup(),this.status.init()}get status(){return this._status}get is_empty(){return 0===this.data.info.trim().length}get meta(){return gd.meta}get component(){return md}build_child(){}update_data(e,t){return gd.update_data(e,t)}float_image(e){const{courier:t}=this.root,n={float:"L"===e?"inline-start":"inline-end"},r=t.get_recorder(),o=Mi.set_css(this.id,n,!0);return r.tell(this,o),r}clear_float(){const{courier:e}=this.root,t=e.get_recorder(),n=Mi.set_css(this.id,{float:null},!0);return t.tell(this,n),t}gc(){super.base_gc()}export(){return this.base_export()}replace_id(e,t,n={}){return gd.replace_id(this.root,e,t,n)}static get meta(){return{type:k.Cubes.img,cubename:"图片",block:!1,version:2,show:!1}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n}static get_default(e="",t={},n={}){return{id:rd.get_id(),type:k.Cubes.img,info:e,css:t,attrs:n}}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(1===n&&t.info.startsWith("image://")&&(t.info=t.info.slice(8)),{data:t,usable:!0})}}gd=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([ki],gd);const bd=["id","data-type"],xd={class:"lost-info"},vd=On({__name:"cube-lost",props:{cube:{}},setup:e=>(e,t)=>(zo(),Po("div",{class:"cube-lost",id:e.cube.id,"data-type":e.cube.type,style:ce(e.cube.css)},[t[2]||(t[2]=Bo("div",{class:"lost-title"},"异常方块",-1)),Bo("div",xd,[t[0]||(t[0]=Bo("div",null,"方块类型:",-1)),Bo("div",null,xe(e.cube.cube_name),1),t[1]||(t[1]=Bo("div",null,"异常原因:",-1)),Bo("div",null,xe(e.cube.msg),1)])],12,bd))}),yd=(0,Ls.A)(vd,[["__scopeId","data-v-2be8d488"]]);class wd extends Ts{constructor(e){super(e)}}class kd extends nd{_status=new wd(this);_msg=Gt("");constructor(e,t,n){super(e,t),this.msg=n,this.status.init()}get status(){return this._status}get msg(){return this._msg.value}set msg(e){this._msg.value=e}get component(){return yd}get meta(){return kd.meta}get cube_name(){return this.data.type}get is_empty(){return!1}get children(){return[]}build_child(){}update_data(e,t){return kd.update_data(e,t)}gc(){}replace_id(e,t,n={}){return kd.replace_id(this.root,e,t,n)}export(){const e=this.base_export();return e.attrs.postil&&(e.info.attrs.postil=e.attrs.postil),e}on_cursor_in_head(e){const{courier:t,next_cube:n}=this,r=new ad(t);return n&&r.tell(n,zi.in_head(n.id)),r}on_cursor_in_tail(e){const{courier:t,prev_cube:n}=this,r=new ad(t);return n&&r.tell(n,zi.in_head(n.id)),r}static get_default(e){return{id:vi(),type:k.Cubes.lost,info:e,css:{},attrs:{}}}static get meta(){return{cubename:"异常方块",type:k.Cubes.lost,block:!1,version:1,show:!1}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}kd=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([ki],kd);const Sd=["id","data-type"],Cd=On({__name:"cube-text",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(){const t=e.cube.postil;t&&t.visible(!t.show)}return(e,r)=>(zo(),Po("span",{class:fe(["cube-text",{"text-mark":Wt(t).has_postil}]),style:ce(Wt(t).css),onClick:n,id:e.cube.id,"data-type":e.cube.type},xe(Wt(t).text),15,Sd))}}),Md=(0,Ls.A)(Cd,[["__scopeId","data-v-a618a1ba"]]),zd=["id","data-type"],Nd={class:"iconbox"},Ad=On({__name:"cube-annotation",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Rt({fold:!1});function r(){const{courier:t,history:n}=e.cube.root,r=e.cube.pcube,o=e.cube.index,i=new ad(t);i.tell(r,Mi.delete_child(r.id,"backward",[o,o+1])),n.record(i)}function o(){n.fold=!n.fold}return(e,i)=>(zo(),Po("div",{class:"cube-annotation",style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type},[Bo("div",Nd,[Bo("div",{class:fe(["iconfont","icon-fold",n.fold?"annotation-icon-active":""]),onClick:o,title:"折叠批注块"},null,2),Bo("div",{class:"iconfont icon-Delete",onClick:r,title:"删除批注块"})]),n.fold?Go("v-if",!0):(zo(),Po("div",{key:0,class:fe(["annotation-contents",{"annotation-fold":n.fold}])},[(zo(!0),Po(yo,null,ur(Wt(t).children,e=>(zo(),Oo(Ps,{key:e.id,cube:e,class:"annotation-box"},null,8,["cube"]))),128))],2))],12,zd))}}),Td=(0,Ls.A)(Ad,[["__scopeId","data-v-c5d949a8"]]);class Rd extends Ts{constructor(e){super(e)}}function Pd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Od extends nd{_status=new Rd(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Td}get meta(){return Od.meta}gc(){super.base_gc()}export(){const e=this.base_export();e.info=[];for(let t of this._children)e.info.push(t.export());return e}build_child(e){rd.build_cubes(e.info,this,this._children)}update_data(e,t){return Od.update_data(e,t)}replace_id(e,t,n={}){return Od.replace_id(this.root,e,t,n)}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(Mi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,zi.in_head(a.id)):o.tell(this.child_last,zi.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,i=t.get_recorder();i.add_cmd(e);const{dir:s,range:a}=e,[l,c]=a;if(!this.is_valid_range(a))return;let d=l,u=c;if(d>=u)return;if(d<=0&&u>=this.child_count)return this.is_empty?i.tell(o,Mi.delete_child(n,s,[r,r+1])):i.tell(this,Mi.reset(this.id,[])),i;const h=this.children[d-1],p=this.children[u],f=u-d;let m=this.splice(l,f);return i.add_recover(Mi.insert_child(this.id,m.data,l)),"backward"===s?h?i.tell(h,zi.in_tail(h.id)):p&&i.tell(p,zi.in_head(p.id)):"forward"===s&&(p?i.tell(p,zi.in_head(p.id)):h&&i.tell(h,zi.in_tail(h.id))),i}on_reset(e){const{courier:t,history:n}=this,{data:r}=e,o=new ad(t),i=[];for(let e of this.children)i.push(e.export());const s=rd.build_cubes(r,this);this.splice(0,this.child_count,...s);return o.add_recover(Mi.reset(this.id,i)),o}static get meta(){return{cubename:"批注",type:k.Cubes.annotation,block:!0,version:1,show:!1}}static get_default(e={},t={}){const n={id:vi(),type:k.Cubes.text,info:"",attrs:{},css:{}},r={id:vi(),type:k.Cubes.line,info:[n],attrs:{},css:{}},o={id:vi(),type:k.Cubes.box,info:[r],attrs:{},css:{}};return{id:vi(),type:k.Cubes.annotation,info:[o],css:e,attrs:t}}static replace_id(e,t,n,r={}){t[this.meta.type];const o=n.id,i=rd.get_id();r[o]=i,n.id=i;let s=[];for(let o of n.info){const n=Ci.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Pd([Ti(_.Names.cube_insert_child)],Od.prototype,"on_insert_child",null),Pd([Ti(_.Names.cube_delete_child)],Od.prototype,"on_delete_child",null),Pd([Ti(_.Names.cube_reset)],Od.prototype,"on_reset",null),Od=Pd([ki],Od);const Ed=["id","data-type"],Ld={class:"title"},Id=On({__name:"cube-text-link",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(){const t=document.createElement("a");t.href=e.cube.data.info.url,t.target="_blank",t.click()}function r(){e.cube.event.emit_text_link_edit(e.cube)}function o(){const{courier:t,history:n}=e.cube.root,{pcube:r,index:o}=e.cube,i=new ad(t);i.tell(r,Mi.delete_child(r.id,"backward",[o,o+1])),n.record(i)}return(e,i)=>(zo(),Po("div",{class:"cube-link",style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type},[Bo("div",Ld,xe(Wt(t).info.title),1),Bo("div",{class:"link",onClick:n},xe(Wt(t).info.url),1),Bo("div",{class:"iconbox"},[Bo("div",{class:"iconfont icon-rename",onClick:r}),Bo("div",{class:"iconfont icon-Delete",onClick:o})])],12,Ed))}}),Dd=(0,Ls.A)(Id,[["__scopeId","data-v-5c081d26"]]);class Bd{static update(e,t,r){return{id:e,name:n.Names.update,title:t,url:r}}}class jd extends Ts{constructor(e){super(e)}}function Hd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class qd extends nd{_status=new jd(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get info(){return this.data.info}get component(){return Dd}get meta(){return qd.meta}get url(){return this.data.info.url}get title(){return this.data.info.title}build_child(e){}gc(){}export(){return this.base_export()}replace_id(e,t,n={}){return qd.replace_id(this.root,e,t,n)}update_data(e,t){return qd.update_data(e,t)}on_update_info(e){const{courier:t,cursor:n}=this,{url:r,title:o}=e,i=t.get_recorder();i.add_cmd(e);const s=this.info.title,a=this.info.url;return this.info.url=r,this.info.title=o,this.status.update_info(),i.add_recover(Bd.update(this.id,s,a)),i}static get meta(){return{cubename:"文本链接",type:k.Cubes.link,block:!0,show:!1,version:1}}static get_default(e,t,n={},r={}){return{id:vi(),type:k.Cubes.link,info:{url:e,title:t},css:n,attrs:r}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Hd([Ti(n.Names.update)],qd.prototype,"on_update_info",null),qd=Hd([ki],qd);const Fd=["id","data-type"],$d={class:"iconbox"},Gd=On({__name:"cube-postil",props:{cube:{}},setup(e){const{status:t}=e.cube,n=_i(()=>t.children.filter(e=>e instanceof qd)),r=_i(()=>t.children.filter(e=>!(e instanceof qd)));function o(){e.cube.visible(!1)}function i(){const{courier:t,history:n}=e.cube.root,r=e.cube.pcube,o=new ad(t);o.tell(r,Mi.postil_remove(r.id,[0,e.cube.child_count])),n.record(o)}function s(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const{deltaY:n}=e;n>0?$i.DomAnimation.scroll_element(t,20,"vertical"):$i.DomAnimation.scroll_element(t,-20,"vertical")}return(e,a)=>Wt(t).show?(zo(),Po("div",{key:0,class:"cube-postil",style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type},[Bo("div",$d,[Bo("div",{class:"iconfont icon-a-Arrow-Right pointer",style:ce({transform:`rotate(${Wt(t).pointer_angle}deg)`}),title:"批注目标位置"},null,4),a[0]||(a[0]=Bo("div",{style:{flex:"1"}},null,-1)),Bo("div",{class:"iconfont icon-Delete delete",title:"清空",onClick:i}),Bo("div",{class:"iconfont icon-close close",title:"关闭",onClick:o})]),Bo("div",{class:"mark-contents",onWheel:s},[(zo(!0),Po(yo,null,ur(n.value,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128)),(zo(!0),Po(yo,null,ur(r.value,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],32)],12,Fd)):Go("v-if",!0)}}),Vd=(0,Ls.A)(Gd,[["__scopeId","data-v-3b33c2d4"]]);class Ud extends Ts{_show=Gt(!1);_pointer_angle=Gt(0);constructor(e){super(e)}get show(){return this._show.value}get pointer_angle(){return this._pointer_angle.value}update_pointer_angle(e){this._pointer_angle.value=e}get cube(){return this._cube}update_show(e){this._show.value=e,e?(this.root.listener.check_float(),this.root.status.add_postil(this.cube)):this.root.status.remove_postil(this.cube)}}function Kd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Wd extends nd{_status=new Ud(this);_handler_update_pos;_handler_corrent;_timer_corrent;_show=!1;constructor(e,t){super(e,t),this.setup(),this.status.init(),t.has_postil=!0}get status(){return this._status}get default_size(){return{x:0,y:0,width:180,height:130}}get show(){return this._show}set show(e){this._show=e,this.status.update_show(e)}get has_annotation(){for(let e of this.children)if(e instanceof Od)return!0;return!1}get meta(){return Wd.meta}get component(){return Vd}get is_empty(){return 1===this.child_count&&this.child_first.is_empty}build_child(e){rd.build_cubes(e.info,this,this._children)}update_data(e,t){return Wd.update_data(e,t)}export(){const e=this.base_export();e.info=[];for(let t of this.children)e.info.push(t.export());return e}gc(){super.base_gc(),this.root.cubes.remove_cube(this),this._handler_update_pos&&(this.root.event.off(this._handler_update_pos),this._handler_update_pos=null)}replace_id(e,t,n={}){return Wd.replace_id(this.root,e,t,n)}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(Mi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,zi.in_head(a.id)):o.tell(this.child_last,zi.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,i=t.get_recorder();i.add_cmd(e);const{dir:s,range:a}=e;if(!this.is_valid_range(a))return;const[l,c]=a;let d=l,u=c;if(d<=0&&u>=this.child_count)return i.tell(this,Mi.reset(this.id,[])),i;const h=this.children[d-1],p=this.children[u],f=u-d;let m=this.splice(l,f);return i.add_recover(Mi.insert_child(this.id,m.data,l)),"backward"===s?h?i.tell(h,zi.in_tail(h.id)):p&&i.tell(p,zi.in_head(p.id)):"forward"===s&&(p?i.tell(p,zi.in_head(p.id)):h&&i.tell(h,zi.in_tail(h.id))),i}on_reset(e){const{courier:t,history:n}=this,{data:r}=e,o=new ad(t),i=[];for(let e of this.children)i.push(e.export());const s=rd.build_cubes(r,this);this.splice(0,this.child_count,...s);return o.add_recover(Mi.reset(this.id,i)),o}visible(e){if(e){const{courier:e,child_last:t}=this;this.update_pos(),this.show=!0,fn(()=>{const n=e.get_recorder();n.tell(t,zi.in_tail(t.id)),this.history.record(n)})}else this.show=!1}update_pos(e=!0){fn(()=>{const e=this.pcube.clientRect,t=this.clientRect||this.default_size;if(!e)return void(this.show=!1);const n={x:0,y:0,width:window.innerWidth,height:window.innerHeight},r=$i.MathRect.move_rect_to_other(n,t,e,5);this.status.update_css({left:`${r.x}px`,top:`${r.y}px`}),this.update_pointer()})}update_pointer(){const e=document.getElementById(this.id),t=this.pcube.dom;if(!e||!t)return;const n=Array.from(t.getClientRects());let r,o;if(n.length>0){let e=0,t=0;for(const r of n)e+=r.x+r.width/2,t+=r.y+r.height/2;r=e/n.length,o=t/n.length}else{const e=t.getBoundingClientRect();r=e.x+e.width/2,o=e.y+e.height/2}const i=e.getBoundingClientRect(),s=r-(i.left+i.width/2),a=o-(i.top+i.height/2);this.status.update_pointer_angle(180*Math.atan2(a,s)/Math.PI)}static get_default(e=[],t={}){return{id:vi(),type:k.Cubes.postil,info:e,attrs:{},css:t}}static get meta(){return{cubename:"标注内容",type:k.Cubes.postil,show:!1,version:1,block:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Ci.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Kd([Ti(_.Names.cube_insert_child)],Wd.prototype,"on_insert_child",null),Kd([Ti(_.Names.cube_delete_child)],Wd.prototype,"on_delete_child",null),Kd([Ti(_.Names.cube_reset)],Wd.prototype,"on_reset",null),Wd=Kd([ki],Wd);class Yd{static reset(t,n,r=NaN,o=NaN){return{id:t,name:e.Names.reset,info:n,pos:r,pos_before:o}}static break(t,n){return{id:t,name:e.Names.break,offset:n}}}class Xd extends Ts{constructor(e){super(e)}get cube(){return this._cube}get text(){return this._data.info}update_text(){this._data.info=this.cube.text}}function Jd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Zd extends nd{_status=new Xd(this);constructor(e,t){super(e,t),this.setup(),this.status.init(),this.init()}get status(){return this._status}get attrs(){return this.data.attrs}get component(){return Md}get meta(){return Zd.meta}get is_empty(){return Zd.is_empty_text(this.data)}get len(){return this.text.length}get text(){return this.data.info}get text_node(){const e=this.dom?.firstChild;if(e instanceof Text)return e}get children(){return[]}get line(){let e=this.pcube;for(;e;){if(e instanceof uu)return e;e=e.pcube}}init(){this.root.stats.update_count_word(this.len)}build_child(e){const t=e.attrs?.postil;t&&(this.postil=new Wd(t,this))}gc(){super.base_gc(),this.root.stats.update_count_word(-this.len)}replace_id(e,t,n={}){return Zd.replace_id(this.root,e,t,n)}find_child_cube(e){}export(){return this.base_export()}update_data(e,t){return Zd.update_data(e,t)}merge_text(e){const{courier:t}=this,n=t.get_recorder(),r=this.prev_cube,o=this.next_cube,i=r instanceof Zd,s=o instanceof Zd;if(i&&s){const t=Mi.merge(this.id,"both",this.id,e);n.tell(this,t)}else if(i){const t=Mi.merge(this.id,"left",this.id,e);n.tell(this,t)}else if(s){const t=Mi.merge(this.id,"right",this.id,e);n.tell(this,t)}return n}on_text_reset(e){const{courier:t,pid:n,index:r,pcube:o,len:i}=this,{info:s,pos:a,pos_before:l}=e,c=t.get_recorder();c.add_cmd(e);let d=this.text;const u=Zd.drop_zero_intelligence(s,a);return this.data.info=u.text,this.status.update_text(),Ci.stats?.update_count_word(u.len-i),c.add_recover(Yd.reset(this.id,d,l,a)),Number.isNaN(a)||this.set_cursor_in_head(u.pos),c}on_cursor_loc(e){const{from:t,from_offset:n,offset:r}=e,{courier:o}=this,i=o.get_recorder();return i.add_cmd(e),this.set_cursor_in_head(r),i.add_recover(zi.loc(t,n,this.id,r)),i}on_partition(e){const{courier:t,cursor:n,pcube:r}=this,{start_id:o,end_id:i,offset_end:s,offset_start:a}=e,l=this.get_valid_index(a),c=this.get_valid_index(s),d=new ad(t),u=this.text.slice(0,l),h=this.text.slice(l,c),p=this.text.slice(c);if(h){const e=Zd.get_default(h,structuredClone(jt(this.css)));if(u){if(u){const t=u.length,n=Yd.reset(this.id,u,t,t);if(d.tell(this,n),p){const e=Zd.get_default(p,structuredClone(jt(this.css)));d.tell(r,Mi.insert_child(r.id,[e],this.index+1))}d.tell(r,Mi.insert_child(r.id,[e],this.index+1))}}else{const e=h.length,t=Yd.reset(this.id,h,e,e);if(d.tell(this,t),p){const e=Zd.get_default(p,structuredClone(jt(this.css)));d.tell(r,Mi.insert_child(r.id,[e],this.index+1))}}return d}if(0===l){const e=Zd.get_default();d.tell(r,Mi.insert_child(r.id,[e],this.index))}else if(l===this.len){const e=Zd.get_default();d.tell(r,Mi.insert_child(r.id,[e],this.index+1))}else if(l>0&&l<this.len){const e=Zd.get_default(p,structuredClone(jt(this.css))),t=Mi.insert_child(r.id,[e],this.index+1),n=u.length,o=Yd.reset(this.id,u,n,n);return d.tell(r,t),d.tell(this,o),d}return d}on_cube_merge(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o,pid:i,index:s}=this,{method:a,offset:l,cubeid:c}=e;let d=this.get_valid_index(l);const u=new ad(t);if("left"===a&&n instanceof Zd&&this.can_merge_with(n)){const e=n.id,t=Mi.delete_child(i,"forward",[s-1,s]),o=Yd.reset(this.id,n.text+this.text,d+n.len,d);u.tell(r,t),u.tell(this,o),this.event.emit_text_merge(e,this.id)}else if("right"===a&&o instanceof Zd&&this.can_merge_with(o)){const e=o.id,t=Mi.delete_child(i,"backward",[s+1,s+2]),n=Yd.reset(this.id,this.text+o.text,d,d);u.tell(r,t),u.tell(this,n),this.event.emit_text_merge(e,this.id)}else if("both"===a)if(n instanceof Zd&&o instanceof Zd&&this.can_merge_with(n)&&this.can_merge_with(o)){const e=n.len+d,t=n.id,i=o.id;u.tell(r,Mi.delete_child(this.pid,"backward",[this.index-1,this.index])),u.tell(r,Mi.delete_child(this.pid,"backward",[this.index+1,this.index+2])),u.tell(this,Yd.reset(this.id,n.text+this.text+o.text,e,d)),this.event.emit_text_merge(t,this.id),this.event.emit_text_merge(i,this.id)}else if(n instanceof Zd&&this.can_merge_with(n)){const e=n.id;u.tell(r,Mi.delete_child(i,"forward",[s-1,s])),u.tell(this,Yd.reset(this.id,n.text+this.text,d+n.len,d)),this.event.emit_text_merge(e,this.id)}else if(o instanceof Zd&&this.can_merge_with(o)){const e=o.id;u.tell(r,Mi.delete_child(i,"backward",[s+1,s+2])),u.tell(this,Yd.reset(this.id,this.text+o.text,d,d)),this.event.emit_text_merge(e,this.id)}return u}on_cube_insert(e){const{data:t,start_id:n,end_id:r,offset_end:o,offset_start:i}=e,{courier:s,pid:a,pcube:l}=this,c=new ad(s);this.cursor.has_selection;let d=i,u=o;if(d<0&&(d=0),u>this.text.length&&(u=this.text.length),o!==i){const e=Mi.delete(this.id,"backward",this.id,this.id,i,o,!0);c.tell(this,e)}const h=rd.pick(t),p=this.text.slice(0,d),f=this.text.slice(u);if(h.head.length>0)if(p)if(p&&f){const e=Yd.reset(this.id,p,p.length,p.length);c.tell(this,e);const t=Zd.get_default(f,structuredClone(jt(this.css)),structuredClone(jt(this.attrs)));c.tell(l,Mi.insert_child(a,[t],this.index+1)),c.tell(l,Mi.insert_child(a,h.head,this.index+1))}else f||c.tell(l,Mi.insert_child(a,h.head,this.index+1));else c.tell(l,Mi.insert_child(a,h.head,this.index));const m=[...h.body];if(h.tail.length>0&&m.push(uu.get_default(h.tail)),h.roots.length>0)for(let e of h.roots)m.push(...e.info);if(m.length>0){if(0===h.head.length&&o>0&&o<this.len){const e=Yd.reset(this.id,p,p.length,p.length);c.tell(this,e);const t=Zd.get_default(f,structuredClone(jt(this.css)),structuredClone(jt(this.attrs)));c.tell(l,Mi.insert_child(a,[t],this.index+1))}0===o?c.tell(l,Mi.insert_child(this.pid,m,this.index)):c.tell(l,Mi.insert_child(this.pid,m,this.index+h.head.length+1))}return c}on_cube_delete(e){const{courier:t,index:n,pcube:r,pid:o}=this,{dir:i,start_id:s,end_id:a,offset_start:l,offset_end:c,reserve:d}=e,u=new ad(t),h=this.get_valid_index(l),p=this.get_valid_index(c),f=h!==p||"head"===l||"tail"===c;if(0===h&&p===this.len){if(d){const e=Yd.reset(this.id,"",1,this.len);u.tell(this,e)}else u.tell(r,Mi.delete_child(o,"backward",[n,n+1]));return u}const m=this.text.slice(0,h),_=this.text.slice(p);if(f){const e=Yd.reset(this.id,m+_,h,p);u.tell(this,e)}else{const e=h;if("backward"===i)if(0===e||0===Zd.drop_zero_width_space(this.text,h).pos){const e=this.prev_cube;e&&!e.meta.block?u.tell(e,Mi.delete_adjacent(e.id,"right",this.id,0)):u.merge(this._delete_edge(i))}else if(this.is_empty)u.tell(r,Mi.delete_child(o,"backward",[n,n+1]));else{const e=this.find_text_deleted(h,"left"),t=Yd.reset(this.id,e.text,e.pos,m.length);u.tell(this,t),e.text&&u.tell(this,Mi.merge(this.id,"both",this.id,m.length-1))}else if("forward"===i)if(e===this.len||e===Zd.drop_zero_width_space(this.text,h).len){const e=this.next_cube;e&&!e.meta.block?u.tell(e,Mi.delete_adjacent(e.id,"left",this.id,this.len)):u.merge(this._delete_edge(i))}else if(this.is_empty)u.tell(r,Mi.delete_child(o,"forward",[n,n+1]));else{const t=this.find_text_deleted(e,"right"),n=Yd.reset(this.id,t.text,m.length,m.length),r=Mi.merge(this.id,"both",this.id,m.length);u.tell(this,n),u.tell(this,r)}}return u}on_cube_set_selection_css(e){const{courier:t,pid:n,pcube:r}=this,{css:o,start_id:i,end_id:s,offset_start:a,offset_end:l,toggle:c,replace:d}=e;if(0===Object.keys(o).length&&!d)return;const u=new ad(t),h=this.get_valid_index(a),p=this.get_valid_index(l),f=Zd.drop_zero_width_space(this.text.slice(0,h),0).text,m=Zd.drop_zero_width_space(this.text.slice(h,p),0).text,_=Zd.drop_zero_width_space(this.text.slice(p),0).text;if(0===h&&p===this.len||h===p&&i===s)u.tell(this,Mi.set_css(this.id,o,c,d)),u.tell(this,Mi.merge(this.id,"both",this.id,p));else if(0===h&&m){const e=structuredClone(jt(this.css)),t=Yd.reset(this.id,m,m.length,this.len);if(u.tell(this,t),u.tell(this,Mi.set_css(this.id,o,c,d)),_){const t=Zd.get_default(_,e);u.tell(r,Mi.insert_child(n,[t],this.index+1));const o=r.find_cube(t.id);o&&u.tell(o,Mi.merge(t.id,"both",t.id,0))}u.tell(this,zi.in_tail(this.id)),u.tell(this,Mi.merge(this.id,"left",this.id,this.len))}else if(h>0){if(f){const e=Yd.reset(this.id,f,h,h),t=Mi.merge(this.id,"left",this.id,p);u.tell(this,e,t)}if(_){const e=Zd.get_default(_,structuredClone(jt(this.css))),t=[e];u.tell(r,Mi.insert_child(n,t,this.index+1));const o=r.find_cube(e.id);o&&u.tell(o,Mi.merge(o.id,"right",o.id,0))}if(m){const e=Zd.get_default(m,structuredClone(jt(this.css)));u.tell(r,Mi.insert_child(n,[e],this.index+1));const t=r.find_cube(e.id);t&&(u.tell(t,Mi.set_css(e.id,o,c,d)),u.tell(t,Mi.merge(e.id,"both",e.id,f.length+h)))}}return u}on_cube_break(e){const{courier:t,cursor:n,pcube:r,pid:o,index:i}=this,s=r.pcube;if(!s)return;const{offset:a}=e;let l=i+1;const c=new ad(t),d=this.text[a-1],u=this.text[a];let h=a,p=!1;if(d){const e=d.charCodeAt(0);55296<=e&&e<=56319&&(p=!0)}if(u&&!p){const e=u.charCodeAt(0);56320<=e&&e<=57343&&(p=!0)}p&&(h+=1),c.tell(this,Mi.partition(this.id,this.id,this.id,h,h));const f=[];for(let e of r.children.slice(l))f.push(e.export());c.tell(r,Mi.delete_child(r.id,"backward",[l,r.child_count]));const m=uu.get_default(f),_=this.line;_&&_.inherit_line([m]),c.tell(s,Mi.insert_child(s.id,[m],r.index+1));const g=r.next_cube;return g?.id===m.id&&c.tell(g,zi.in_head(g.id)),c}on_cube_delete_adjacent(e){const{courier:t,pcube:n}=this,{from:r,from_id:o,offset:i}=e,s=new ad(t);if("left"===r)if(this.is_empty)s.merge(this.remove_self());else{const e=this.prev_cube_deep;e?.meta.block?s.tell(this,zi.in_head(this.id)):s.tell(this,Mi.delete(this.id,"forward",this.id,this.id,0,0))}else if(this.is_empty)s.merge(this.remove_self());else{const e=this.next_cube_deep;e?.meta.block?s.tell(this,zi.in_tail(this.id)):s.tell(this,Mi.delete(this.id,"backward",this.id,this.id,this.len,this.len))}return s}add_link(e,t){const{cursor:n,courier:r}=this,o=r.get_recorder(),i=qd.get_default(t,e);return o.tell(this,Mi.postil_add(this.id,[i])),o}add_annotation(e){const t=this.courier.get_recorder(),n=e||Od.get_default();return t.tell(this,Mi.postil_add(this.id,[n])),t}get_valid_index(e){return"head"===e?0:"tail"===e?this.text.length:e<0?0:e>this.text.length?this.text.length:e}set_cursor_in_head(e=0){const t=this.get_valid_index(e);fn(()=>{this.line?.dom?.focus();const e=this.text_node;e&&this.cursor.set_cursor(e,t<0?0:t)})}set_cursor_in_tail(e=0){let t=this.len-this.get_valid_index(e);fn(()=>{this.line?.dom?.focus();const e=this.text_node;e&&this.cursor.set_cursor(e,t<0?0:t)})}find_text_nav_pos(e,t){const n=this.text;let r=e;if(e<0&&(r=0),e>n.length&&(r=n.length),"left"===t){let e=r-1,t=n[e];for(;""===t&&e>=0;)e-=1,t=n[e];if(t){const n=t.charCodeAt(0);56320<=n&&n<=57343&&(e-=1)}return e<0?0:e}{let e=r+1,t=n[e];for(;""===t&&e<n.length;)e+=1,t=n[e];if(t){const n=t.charCodeAt(0);55296<=n&&n<=56319&&(e+=1)}return e>n.length?n.length:e}}find_text_deleted(e,t){if(e<0)return{text:this.text,pos:0};if(e>this.len)return{text:this.text,pos:this.len};if("left"===t){let n=this.find_text_nav_pos(e,t),r=this.text.slice(0,n),o=this.text.slice(e),i=r[r.length-1];if(i){const t=i.charCodeAt(0);55296<=t&&t<=56319&&(r=r.slice(0,-1),e-=1)}return{text:r+o,pos:n}}{let n=this.find_text_nav_pos(e,t),r=this.text.slice(0,e),o=this.text.slice(n),i=o[0];if(i){const e=i.charCodeAt(0);56320<=e&&e<=57343&&(o=o.slice(1))}return{text:r+o,pos:e}}}is_text_remain(e,t){if(0===this.len)return!1;const[n,r]=t;if(n===r){if("backward"===e){return 0!==this.find_text_nav_pos(n,"left")||this.find_text_nav_pos(r-1,"right")!==this.len}return this.find_text_nav_pos(n,"right")!==this.len||0!==this.find_text_nav_pos(n,"left")}{if(0===n&&r===this.len)return!1;const e=this.find_text_nav_pos(n+1,"left"),t=this.find_text_nav_pos(r-1,"right");return e>0||t<this.len}}drop_zero_width_space(e){return Zd.drop_zero_width_space(this.text,e)}can_merge_with(e){const t=rd.is_same_style(this.css,e.css)||0===Object.keys(e.css).length,n=rd.is_same_attrs(this.attrs,e.attrs),r=!this.postil&&!e.postil;return t&&n&&r}is_valid_pos(e){return!(e<0||e>this.text.length)}_delete_edge(e){const{courier:t}=this,n=this.pcube;if("backward"===e){const e=this.prev_cube_deep,r=e?.next_cube;if(!e){const e=this.boxroot;if(!e)return;const t=this.find_upstream_untill(e);if(t?.meta.block&&!(t instanceof uu)&&t instanceof nd){const n=this.courier.get_recorder(),r=t.get_children_cubedata(),o=Mi.insert_child(e.id,r,t.index);return n.tell(e,o),n.merge(t.remove_self()),n}}if(!(r instanceof nd))return;if(this.in_postil&&!e?.in_postil)return;if(r&&e.type===r.type){const e=r.merge("left");if(e&&e.len_undo>0)return e}if(r&&1===r.child_count&&r.child_first.meta.block){const e=this.courier.get_recorder(),t=r.pcube,n=r.index,o=r.child_first.export(),i=rd.pick([o],!0),s=Mi.insert_child(t.id,i.list,n);if(e.tell(t,s),e.len_undo>0)return e.merge(r.remove_self()),e}if(n&&n.is_empty&&n instanceof nd){const e=this.courier.get_recorder();if(e.merge(n.remove_self()),e.len_undo>0)return e}if(e&&e.is_empty){const n=new ad(t);return n.merge(e.remove_self()),r&&n.tell(r,zi.in_head(r.id)),n}if(e){return new ad(t).tell(e,zi.in_tail(e.id))}}else{const e=this.next_cube_deep,t=e?.prev_cube;if(!e){const e=this.boxroot;if(!e)return;const t=this.find_upstream_untill(e);if(t?.meta.block&&!(t instanceof uu)&&t instanceof nd){const n=this.courier.get_recorder(),r=t.get_children_cubedata(),o=Mi.insert_child(e.id,r,t.index);return n.tell(e,o),n.merge(t.remove_self()),n}}if(!(t instanceof nd))return;if(this.in_postil&&!e?.in_postil)return;if(t&&e?.type===t?.type){const e=t.merge("right");if(e&&e.len_undo>0)return e}if(t&&1===t.child_count&&t.child_first.meta.block){const e=this.courier.get_recorder(),n=t.pcube,r=t.index,o=t.child_first.export(),i=rd.pick([o],!0),s=Mi.insert_child(n.id,i.list,r);if(e.tell(n,s),e.len_undo>0)return e.merge(t.remove_self()),e}if(n&&n.is_empty&&n instanceof nd){const e=this.courier.get_recorder();if(e.merge(n.remove_self()),e.len_undo>0)return e}if(e&&e.is_empty){const n=this.courier.get_recorder();return n.merge(e.remove_self()),t&&n.tell(t,zi.in_tail(t.id)),n}if(e){return this.courier.get_recorder().tell(e,zi.in_tail(e.id))}}}static drop_zero_width_space(e,t){let n="",r=t;r<0&&(r=0),r>e.length&&(r=e.length);const o=e.slice(0,r),i=e.slice(r);if(o){for(let e of o)""!==e&&(n+=e);r=n.length}if(i)for(let e of i)""!==e&&(n+=e);return{text:n,pos:r,get len(){return this.text.length}}}static drop_zero_intelligence(e,t){let n="",r=t;r<0&&(r=0),r>e.length&&(r=e.length);const o=e.slice(0,r),i=e.slice(r);if(o){for(let e=0;e<o.length;e++){let t=o[e],r=o[e-1];""===t&&"\n"!==r||(n+=t)}r=n.length}if(i)for(let e=0;e<i.length;e++){let t=i[e],r=i[e-1];""===t&&"\n"!==r||(n+=t)}return n||(n="",r=1),{text:n,pos:r,get len(){return this.text.length}}}static is_empty_text(e){if(e.type!==k.Cubes.text)return!1;let t="";for(let n of e.info)if(""!==n&&(t+=n),t.length>0)return!1;return 0===t.length}static get meta(){return{version:1,type:k.Cubes.text,cubename:"文本",block:!1,show:!1}}static get_default(e="",t={},n={}){const r=e||"";return{id:vi(),type:k.Cubes.text,info:r,css:structuredClone(jt(t)),attrs:structuredClone(jt(n))}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,e.event.emit_replace_id(o,i),n}static update_data(e,t){const n=e[this.meta.type]||1;return t.info=t.info.replace("\r",""),t.info||(t.info=""),n>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Jd([Ti(e.Names.reset)],Zd.prototype,"on_text_reset",null),Jd([Ti(g.Names.loc)],Zd.prototype,"on_cursor_loc",null),Jd([Ti(_.Names.cube_partition)],Zd.prototype,"on_partition",null),Jd([Ti(_.Names.cube_merge)],Zd.prototype,"on_cube_merge",null),Jd([Ti(_.Names.cube_insert)],Zd.prototype,"on_cube_insert",null),Jd([Ti(_.Names.cube_delete)],Zd.prototype,"on_cube_delete",null),Jd([Ti(_.Names.cube_set_selection_css)],Zd.prototype,"on_cube_set_selection_css",null),Jd([Ti(e.Names.break)],Zd.prototype,"on_cube_break",null),Jd([Ti(_.Names.cube_delete_adjacent)],Zd.prototype,"on_cube_delete_adjacent",null),Zd=Jd([ki],Zd);const Qd=["id","data-type","contenteditable"],eu=On({__name:"cube-line",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(zo(),Po("div",{class:fe(["cube-line",{"line-first-letter-lower":Wt(t).attrs.first_letter_lower}]),id:e.cube.id,"data-type":e.cube.type,style:ce(Wt(t).css),contenteditable:e.cube.editable,spellcheck:"false"},[(zo(!0),Po(yo,null,ur(Wt(t).children,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],14,Qd))}}),tu=(0,Ls.A)(eu,[["__scopeId","data-v-5d19e8f7"]]);class nu extends Rc{dragenter(e){e.preventDefault()}dragover(e){e.preventDefault()}dragleave(e){e.preventDefault()}async drop(e){e.preventDefault();const{cursor:t,courier:n,clipboard:r,history:o}=this.root,{cube_end:i,offset_end:s}=t,a=e.dataTransfer;if(!a)return;const l=n.get_recorder(),c=(new DOMParser,a.getData("text/plain")),d=a.getData("text/html"),u=a.files;if(console.log("🍊",{files:u,html:d,text:c}),console.log("❤",(new DOMParser).parseFromString(d,"text/html")),u.length>0){for(let e of Array.from(u))if(e.type.startsWith("image/")){const t=await r.paste_img(e);l.merge(t)}}else if(c){const{offset_end:e,offset_start:t,cube_selection:n}=this.cursor;if(!(n instanceof Zd))return;this.ins(l,this._root,c,n,t,e)}o.record(l)}handler_click_foot(e){e.preventDefault();const{courier:t,cursor:n,history:r}=this.root,o=this.root.child_last;if(o&&o.is_empty){let e=o;for(;e;){if(e instanceof Zd){e.line?.dom?.focus(),e.set_cursor_in_tail();break}e=e.child_last}}else{const e=new ad(t),n=bu.get_default();e.tell(this.root,Mi.insert_child(this.root.id,[n],this.root.child_count)),r.record(e)}}}const ru=["id","data-type"],ou={class:"doc-postils"},iu=On({__name:"cube-doc",props:{cube:{}},setup(e){const{status:t}=e.cube,n=new nu(e.cube),r=e=>n.pointerdown(e),o=e=>n.pointermove(e),i=e=>n.pointerup(e),s=e=>n.pointercancel(e),a=e=>n.handler_click_foot(e),l=e=>n.compositionstart(e),c=e=>n.compositionupdate(e),d=e=>n.compositionend(e),u=e=>n.beforeinput(e),h=e=>n.dragover(e),p=e=>n.dragenter(e),f=e=>n.dragleave(e),m=e=>n.drop(e);return Jn(()=>{document.documentElement.addEventListener("pointerup",i),document.documentElement.addEventListener("pointermove",o),document.documentElement.addEventListener("pointercancel",s)}),(e,n)=>(zo(),Po("div",{class:"cube-doc",id:e.cube.id,"data-type":e.cube.type,style:ce(Wt(t).css),onDragover:h,onDragenter:p,onDragleave:f,onDrop:m},[Bo("div",{class:"note",onPointerdown:r,onCompositionstart:l,onCompositionupdate:c,onCompositionend:d,onBeforeinput:u},[(zo(!0),Po(yo,null,ur(Wt(t).children,e=>(zo(),Oo(lr(e.component),{key:e.id,cube:e,id:e.id},null,8,["cube","id"]))),128)),Go(" footer "),Bo("div",{class:"cube-doc-footer",onPointerdown:a},null,32),Go(" doc-cubes "),Bo("div",ou,[(zo(!0),Po(yo,null,ur(Wt(t).postils,([e,t])=>(zo(),Oo(Ps,{key:t.id,cube:t},null,8,["cube"]))),128))])],32),Go(" scope selection "),(zo(!0),Po(yo,null,ur(Wt(t).scopes,e=>(zo(),Oo(Is,{key:e.id,selection:Ht(e)},null,8,["selection"]))),128)),Go(" menus "),jo(Sc,{root:e.cube},null,8,["root"]),jo(Tc,{root:e.cube},null,8,["root"])],44,ru))}}),su=(0,Ls.A)(iu,[["__scopeId","data-v-4d14938e"]]);class au extends Rs{constructor(e){super(e)}}class lu extends As{_status=new au(this);_app;constructor(e){super(e),this.setup(),this.status.init(),this._app=Ta(su,{cube:this})}get status(){return this._status}get app(){return this._app}get component(){return su}get meta(){return lu.meta}get doc(){return this}build_child(e){rd.build_cubes(e.info,this,this._children)}gc(){}export(){const e=structuredClone({...this.data,info:[]});e.attrs.theme=Ci.note_theme,e.versions=Ci.export_versions();for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return lu.update_data(e,t)}replace_id(e,t,n={}){return lu.replace_id(this.root,e,t,n)}render(e){this._dom=e,this.hotkeys.listen(e),this.app.mount(e),this.event.emit_status_update()}static get meta(){return{type:k.Cubes.doc,cubename:"文档",version:1,block:!0,show:!1}}static get_default(){return{id:vi(),type:k.Cubes.doc,versions:Ci.export_versions(),info:[],css:{},attrs:{}}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Ci.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}lu=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([ki],lu);class cu extends Ts{constructor(e){super(e)}}function du(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class uu extends nd{_status=new cu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return tu}get editable(){if(this.stats.is_read_mode)return!1;const e=this.host_postil,t=this.host_node;return!e&&t?t.status.editable:!(!e||t)||(!e||!t||(e.level>t.level||t.status.editable))}get meta(){return uu.meta}get is_empty(){return 1===this.child_count&&this.child_first.is_empty}get attrs(){return this.data.attrs}get child_first_text(){for(let e of this._children)if(e instanceof Zd)return e}get child_last_text(){for(let e of[...this._children].reverse())if(e instanceof Zd)return e}get next_line(){let e=this.next_cube_deep;for(;e;){if(e instanceof lu)return;let t=rd.find_line(e,"first");if(t)return t;e=e.next_cube_deep}}get prev_line(){let e=this.prev_cube_deep;for(;e;){if(e instanceof lu)return;let t=rd.find_line(e,"last");if(t)return t;e=e.prev_cube_deep}}build_child(e){rd.build_cubes(e.info,this,this._children)}export(){const e=this.base_export();e.info=[];for(let t of this.children)e.info.push(t.export());return e}update_data(e,t){return uu.update_data(e,t)}gc(){super.base_gc()}replace_id(e,t,n={}){return uu.replace_id(this.root,e,t,n)}inherit_line(e){const t=Math.min(...e.map(e=>e.attrs.indent||0));for(let n of e){const e=this.attrs.indent;if(e){const r=n.attrs.indent||0;n.attrs.indent=e+r-t}this.css["text-indent"]&&n.type===this.type&&(n.css["text-indent"]=this.css["text-indent"])}}on_cube_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i,pcube:s}=this,{method:a,cubeid:l,offset:c}=e,d=new ad(t);if("left"===a&&n instanceof uu){const e=rd.exports(this.children),t=rd.filter_out_empty(e);d.tell(n,Mi.insert_child(n.id,t,"tail")),d.merge(this.remove_self("backward"));const r=n.find_child_cube(l);if(r){const e=zi.loc(l,c,l,c);d.tell(r,e)}}else if("right"===a&&r instanceof uu){const e=r.export().info,t=rd.filter_out_empty(e);d.tell(this,Mi.insert_child(this.id,t,"tail")),d.tell(s,Mi.delete_child(i,"backward",[o+1,o+2]));const n=this.find_child_cube(l);n&&d.tell(n,zi.loc(l,c,l,c))}else if("both"===a)if(n instanceof uu&&r instanceof uu){const e=rd.filter_out_empty(this.export().info),t=rd.filter_out_empty(r.export().info);d.tell(n,Mi.insert_child(n.id,e.concat(t),"tail")),d.tell(s,Mi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_child_cube(l);o&&d.tell(o,zi.loc(l,c,l,c))}else if(n instanceof uu&&!(r instanceof uu)){const e=rd.filter_out_empty(this.export().info);d.tell(n,Mi.insert_child(n.id,e,"tail")),d.tell(s,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_child_cube(l);t&&d.tell(t,zi.loc(l,c,l,c))}else if(!(n instanceof uu)&&r instanceof uu){const e=rd.filter_out_empty(r.export().info);d.tell(this,Mi.insert_child(this.id,e,"tail")),d.tell(s,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_child_cube(l);t&&d.tell(t,zi.loc(l,c,l,c))}return d}on_cube_reset(e){const{courier:t}=this,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=rd.filter_out_empty(n);if(0===o.length){if(this.is_empty)return;const e=this.export().info,t=new Zd(Zd.get_default(),this);this.splice(0,this.child_count,t),r.add_recover(Mi.reset(this.id,e)),r.tell(t,zi.in_tail(t.id))}else{const e=this.export().info,t=rd.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(Mi.reset(this.id,e))}return r}on_insert_child(e){const{courier:t,pid:n,pcube:r}=this,{pos:o,data:i}=e,s=new ad(t);if(0===i.length)return s;let a=this.get_valid_index(o);const l=rd.pick(i);if(l.head.length>0){s.add_cmd(e);const t=rd.build_cubes(i,this),n=t[t.length-1];this.splice(a,0,...t),s.add_recover(Mi.delete_child(this.id,"backward",[a,a+t.length])),n&&s.tell(n,zi.in_tail(n.id))}const c=[...l.body];if(l.tail.length>0&&c.push(uu.get_default(l.tail)),l.roots.length>0)for(let e of l.roots)c.push(...e.info);if(c.length>0)if(this.inherit_line(c),this.is_empty)s.tell(r,Mi.insert_child(n,c,this.index)),s.tell(r,Mi.delete_child(n,"backward",[this.index,this.index+1]));else{const e=this.get_valid_index(a+l.head.length);if(0===e)s.tell(r,Mi.insert_child(n,c,this.index));else if(e<this.child_count){const t=this._children.slice(e);if(t.length>0){const o=t.map(e=>e.export()),i=uu.get_default(o);this.inherit_line([i]),s.tell(this,Mi.delete_child(this.id,"backward",[e,this.child_count])),s.tell(r,Mi.insert_child(n,[i],this.index+1))}s.tell(r,Mi.insert_child(n,c,this.index+1))}else e===this.child_count&&s.tell(r,Mi.insert_child(n,c,this.index+1))}return s}on_delete_child(e){const{dir:t,range:n,reserve:r}=e;if(!this.is_valid_range(n))return;const{courier:o,pid:i,index:s,pcube:a}=this,l=o.get_recorder();l.add_cmd(e);const[c,d]=n;let u=c,h=d;if(u<=0&&h>=this.child_count)if(r){if(this.is_empty)return;const e=this.child_first;e instanceof Zd?(l.tell(this,Mi.delete_child(this.id,t,[1,this.child_count])),l.tell(e,Yd.reset(e.id,"",1,1))):l.tell(this,Mi.reset(this.id,[]))}else this.is_empty?l.tell(a,Mi.delete_child(i,t,[s,s+1])):l.tell(this,Mi.reset(this.id,[]));else{const e=this.children[u-1],n=this.children[h],r=h-u;if(u>=this.child_count||r<=0)return;let o=this.splice(u,r);l.add_recover(Mi.insert_child(this.id,o.data,c)),"backward"===t?e?l.tell(e,zi.in_tail(e.id)):n&&l.tell(n,zi.in_head(n.id)):"forward"===t&&(n?l.tell(n,zi.in_head(n.id)):e&&l.tell(e,zi.in_tail(e.id)))}return l}on_cube_delete_adjacent(e){const{courier:t,pid:n,prev_cube:r,next_cube:o,pcube:i}=this,{from:s,from_id:a,offset:l}=e,c=new ad(t);if("left"===s){this.prev_cube_deep instanceof uu?c.tell(this,Mi.merge(this.id,"left",a,l)):c.tell(this,zi.in_head(this.id))}else if("right"===s){this.next_cube_deep instanceof uu?c.tell(this,Mi.merge(this.id,"right",a,l)):c.tell(this,zi.in_tail(this.id))}return c}static filter_out_empty(e){return e.filter(e=>!Zd.is_empty_text(e))}static get meta(){return{version:1,type:k.Cubes.line,cubename:"行",block:!0,show:!1}}static get_default(e=[],t={},n={}){const r=0===e.length?[Zd.get_default()]:e;return{id:vi(),type:k.Cubes.line,info:r,css:t,attrs:n}}static get_default_by_string(e="",t={},n={}){const r=[Zd.get_default(e||"")];return{id:vi(),type:k.Cubes.line,info:r,css:t,attrs:n}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n.info=rd.replace_id(e,t,n.info),n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}du([Ti(_.Names.cube_merge)],uu.prototype,"on_cube_merge",null),du([Ti(_.Names.cube_reset)],uu.prototype,"on_cube_reset",null),du([Ti(_.Names.cube_insert_child)],uu.prototype,"on_insert_child",null),du([Ti(_.Names.cube_delete_child)],uu.prototype,"on_delete_child",null),du([Ti(_.Names.cube_delete_adjacent)],uu.prototype,"on_cube_delete_adjacent",null),uu=du([ki],uu);const hu=["id","data-type"],pu={class:"cube-box-root-content"},fu=On({__name:"cube-box-root",props:{cube:{}},setup(e){const{status:t}=e.cube,n=e.cube,r=_i(()=>({opacity:(e.cube.child_count+10)/60})),o=e=>function(e,t){if(e.stopPropagation(),!ll)return void e.preventDefault();const n=e.currentTarget;n instanceof HTMLElement&&(cl=n,sl=t,document.body.style.setProperty("--box-root-pointer-events","none"))}(e,n),i=e=>function(e,t){if(!ll||!sl)return;e.stopPropagation();const n=e.currentTarget;n instanceof HTMLElement&&t!==sl&&(n!==dl&&dl?.classList.remove("drag-enter"),dl=n,al=t,dl.classList.add("drag-enter"))}(e,n),s=e=>function(e,t){ll&&(e.preventDefault(),e.stopPropagation(),sl&&al&&cl&&dl&&sl!==al&&(cl.style["view-transition-name"]=sl.id,document.startViewTransition(()=>{if(!(sl&&al&&cl&&dl))return;const{courier:e,history:n}=t,r=new ad(e),o=cl.getBoundingClientRect(),i=al.index,s=sl.export(),a=al.pcube;sl.pcube===a?r.tell(sl.pcube,Mi.reorder(sl.pid,sl.id,al.index)):(r.merge(sl.remove_self()),r.tell(a,Mi.insert_child(a.id,[s],i))),n.record(r);const l=dl.getBoundingClientRect(),c=l.x-o.x,d=l.y-o.y;document.body.style.setProperty("--x",c+"px"),document.body.style.setProperty("--y",d+"px")}),ll=!1))}(e,n),a=e=>(dl&&dl.classList.remove("drag-enter"),cl&&cl.classList.remove("drag-enter"),void(ll=!1)),l=e=>function(e){e.preventDefault(),e.stopPropagation(),dl&&dl.classList.add("drag-enter")}(e),c=e=>function(e){e.stopPropagation(),dl&&dl.classList.remove("drag-enter")}(e),d=e=>function(e){const t=e.target;t instanceof HTMLElement&&"cube-box-root-dragger"===t.dataset.tag&&(ll=!0,e.stopPropagation())}(e),u=e=>function(e,t){const{stats:n}=t.root,r=t.index+1;n.active_root_index=r}(0,n);function h(e){const{stats:n}=e;return{"anchor-root":n.anchor_root_id===e.id,"fold-root":t.attrs.fold}}return(e,n)=>(zo(),Po("div",{class:"cube-box-root",style:ce(Wt(t).css),draggable:"true",id:e.cube.id,"data-type":e.cube.type,onContextmenu:n[2]||(n[2]=t=>Wt(rc)(t,e.cube)),onFocusin:u,onDragstart:o,onDragenter:i,onDrop:s,onDragend:a,onDragover:l,onDragleave:c,onPointerdown:d},[Bo("div",{class:fe(["cube-dragger",h(e.cube)]),style:ce(r.value),onClick:n[0]||(n[0]=t=>Wt(hl)(t,e.cube)),onContextmenu:n[1]||(n[1]=t=>Wt(pl)(t,e.cube)),"data-tag":"cube-box-root-dragger"},null,38),Bo("div",pu,[Wt(t).attrs.fold?(zo(),Oo(Ps,{key:0,cube:Wt(t).child_first},null,8,["cube"])):(zo(!0),Po(yo,{key:1},ur(Wt(t).children,e=>(zo(),Oo(Ps,{key:e.id,cube:Ht(e)},null,8,["cube"]))),128))])],44,hu))}}),mu=(0,Ls.A)(fu,[["__scopeId","data-v-851b6342"]]);class _u extends Ts{constructor(e){super(e)}}function gu(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class bu extends nd{_status=new _u(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return mu}get meta(){return bu.meta}get is_empty(){return 1===this.child_count&&this.child_first instanceof uu&&this.child_first.is_empty}get attrs(){return this.data.attrs}build_child(e){rd.build_cubes(e.info,this,this._children)}gc(){super.base_gc()}export(){const e=this.base_export();e.info=[];for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return bu.update_data(e,t)}replace_id(e,t,n={}){return bu.replace_id(this.root,e,t,n)}on_cube_delete_adjacent(e){const{courier:t}=this,{from:n,offset:r,from_id:o}=e,i=new ad(t);if("left"===n){this.prev_cube_deep instanceof bu?i.tell(this,Mi.merge(this.id,"left",o,r)):i.tell(this,zi.in_head(this.id))}else if("right"===n){this.next_cube_deep instanceof bu?i.merge(this.on(Mi.merge(this.id,"right",o,r))):i.tell(this,zi.in_tail(this.id))}return i}on_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i}=this,{method:s,cubeid:a,offset:l}=e,c=new ad(t);if("left"===s&&n instanceof bu){const e=this.export().info;c.tell(n,Mi.insert_child(n.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if("right"===s&&r instanceof bu){const e=r.export().info;c.tell(this,Mi.insert_child(this.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if("both"===s)if(n instanceof bu&&r instanceof bu){const e=this.export().info,t=r.export().info;c.tell(n,Mi.insert_child(n.id,e.concat(t),"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_cube(a);if(o){const e=zi.loc(a,l,a,l);c.tell(o,e)}}else if(n instanceof bu&&!(r instanceof bu)){const e=this.export().info;c.tell(n,Mi.insert_child(n.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if(!(n instanceof bu)&&r instanceof bu){const e=r.export().info;c.tell(this,Mi.insert_child(this.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}return c}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ad(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(Mi.reorder(this.id,s.id,c)),a}on_cube_reset(e){const t=this.courier,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=rd.filter_out_empty(n);if(0===o.length){const e=this.children[0];if(1===this.child_count&&e instanceof Zd&&e.is_empty)return;const t=this.export().info,n=new uu(uu.get_default(),this);this.splice(0,this.child_count,n),r.add_recover(Mi.reset(this.id,t)),r.tell(n,zi.in_tail(n.id))}else{const e=this.export().info,t=rd.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(Mi.reset(this.id,e))}return r}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;let i=this.get_valid_index(n);const s=rd.pick(r),a=rd.build_cubes(s.list,this);this.splice(i,0,...a),o.add_recover(Mi.delete_child(this.id,"backward",[i,i+a.length]));const l=a[a.length-1],c=this.children[i+1];return l?o.tell(l,zi.in_tail(l.id)):o.tell(c,zi.in_head(c.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const l=t.get_recorder();l.add_cmd(e);const[c,d]=s;let u=c,h=d;if(!(u>=h)){if(u<=0&&h>=this.child_count&&!a){if(a){if(this.is_empty)return;l.tell(this,Mi.delete_child(this.id,i,[1,this.child_count]));const e=this.child_first;e&&l.tell(e,Mi.delete_child(e.id,i,[0,e.child_count],a))}else this.is_empty?l.tell(o,Mi.delete_child(n,i,[r,r+1])):l.tell(this,Mi.reset(this.id,[]));return l}{const e=this.children[u-1],t=this.children[h],n=h-u;let r=this.splice(c,n);l.add_recover(Mi.insert_child(this.id,r.data,c)),"backward"===i?e?l.tell(e,zi.in_tail(e.id)):t&&l.tell(t,zi.in_head(t.id)):"forward"===i&&(t?l.tell(t,zi.in_head(t.id)):e&&l.tell(e,zi.in_tail(e.id)))}return l}}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}static filter_out_empty(e){return e.filter(e=>!Zd.is_empty_text(e))}static get meta(){return{type:k.Cubes.box_root,cubename:"根块",version:1,block:!0,show:!1}}static get_default(e=[],t={},n={fold:!1}){const r=0===e.length?[uu.get_default()]:e;return{id:rd.get_id(),type:k.Cubes.box_root,info:r,css:t,attrs:n}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Ci.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}gu([Ti(_.Names.cube_delete_adjacent)],bu.prototype,"on_cube_delete_adjacent",null),gu([Ti(_.Names.cube_merge)],bu.prototype,"on_merge",null),gu([Ti(_.Names.cube_reorder)],bu.prototype,"on_cube_reorder",null),gu([Ti(_.Names.cube_reset)],bu.prototype,"on_cube_reset",null),gu([Ti(_.Names.cube_insert_child)],bu.prototype,"on_insert_child",null),gu([Ti(_.Names.cube_delete_child)],bu.prototype,"on_delete_child",null),bu=gu([ki],bu);class xu{}const vu=["id","data-type"],yu=On({__name:"cube-box",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(t){if(t.target===t.currentTarget){t.stopPropagation();const{courier:n,history:r}=e.cube,o=n.get_recorder(),i=zi.in_tail(e.cube.id);o.tell(e.cube,i),r.record(o)}}return(e,r)=>(zo(),Po("div",{class:"cube-box",style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type,onPointerup:n,onContextmenu:r[0]||(r[0]=t=>Wt(rc)(t,e.cube))},[(zo(!0),Po(yo,null,ur(Wt(t).children,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],44,vu))}}),wu=(0,Ls.A)(yu,[["__scopeId","data-v-09ad6fa4"]]);class ku extends Ts{constructor(e){super(e)}}function Su(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Cu extends nd{_status=new ku(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return wu}get attrs(){return this.data.attrs}get meta(){return Cu.meta}get is_empty(){return 1===this.child_count&&this.child_first.is_empty}build_child(e){rd.build_cubes(e.info,this,this._children)}export(){const e=this.base_export();e.info=[];for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return Cu.update_data(e,t)}gc(){super.base_gc()}replace_id(e,t,n={}){return Cu.replace_id(this.root,e,t,n)}on_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i}=this,{method:s,cubeid:a,offset:l}=e,c=new ad(t);if("left"===s&&n instanceof Cu){const e=this.export().info;c.tell(n,Mi.insert_child(n.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_child_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if("right"===s&&r instanceof Cu){const e=r.export().info;c.tell(this,Mi.insert_child(this.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if("both"===s)if(n instanceof Cu&&r instanceof Cu){const e=this.export().info,t=r.export().info;c.tell(n,Mi.insert_child(n.id,e.concat(t),"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_cube(a);if(o){const e=zi.loc(a,l,a,l);c.tell(o,e)}}else if(n instanceof Cu&&!(r instanceof Cu)){const e=this.export().info;c.tell(n,Mi.insert_child(n.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if(!(n instanceof Cu)&&r instanceof Cu){const e=r.export().info;c.tell(this,Mi.insert_child(this.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}return c}on_box_order(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ad(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(Mi.reorder(this.id,s.id,c)),a}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(Mi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,zi.in_head(a.id)):o.tell(this.child_last,zi.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const[l,c]=s,d=t.get_recorder();d.add_cmd(e);let u=l<0?0:l,h=c>this.child_count?this.child_count:c;if(!(u>=h)){if(u<=0&&h>=this.child_count)if(a){if(this.is_empty)return;d.tell(this,Mi.delete_child(this.id,i,[1,this.child_count]));const e=this.child_first;e&&d.tell(e,Mi.delete_child(e.id,i,[0,e.child_count],a))}else this.is_empty?d.tell(o,Mi.delete_child(n,i,[r,r+1])):d.tell(this,Mi.reset(this.id,[]));else{const e=this.children[u-1],t=this.children[h],n=h-u;if(u>=this.child_count||n<=0)return;let r=this.splice(u,n);d.add_recover(Mi.insert_child(this.id,r.data,l)),"backward"===i?e?d.tell(e,zi.in_tail(e.id)):t&&d.tell(t,zi.in_head(t.id)):"forward"===i&&(t?d.tell(t,zi.in_head(t.id)):e&&d.tell(e,zi.in_tail(e.id)))}return d}}on_box_reset(e){const t=this.courier,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=rd.filter_out_empty(n);if(0===o.length){if(this.is_empty)return;const e=this.export().info,t=new uu(uu.get_default(),this);this.splice(0,this.child_count,t),r.add_recover(Mi.reset(this.id,e)),r.tell(t,zi.in_tail(t.id))}else{const e=this.export().info,t=rd.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(Mi.reset(this.id,e))}return r}on_cube_delete_adjacent(e){const{courier:t,pcube:n,pid:r}=this,{from:o,from_id:i,offset:s}=e,a=new ad(t);if("left"===o){if(this.prev_cube_deep instanceof Cu)a.tell(this,Mi.merge(this.id,"left",i,s));else{const e=this.export().info,t=this.child_first.id;a.tell(n,Mi.insert_child(r,e,this.index)),a.merge(this.remove_self());const l=n.find_cube(t);l&&a.tell(l,Mi.delete_adjacent(t,o,i,s))}}else if("right"===o){if(this.next_cube_deep instanceof Cu)a.merge(this.on(Mi.merge(this.id,"right",i,s)));else{const e=this.export().info,t=this.child_first.id;a.tell(n,Mi.insert_child(r,e,this.index)),a.merge(this.remove_self());const l=n.find_cube(t);l&&a.tell(l,Mi.delete_adjacent(t,o,i,s))}}return a}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}static get meta(){return{type:k.Cubes.box,cubename:"块",version:1,block:!0,show:!0}}static get_default(e=[],t={},n={}){const r=[];return 0===e.length?r.push(uu.get_default()):r.push(...rd.pick(e).list),{id:rd.get_id(),type:k.Cubes.box,info:r,css:t,attrs:n}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Ci.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Su([Ti(_.Names.cube_merge)],Cu.prototype,"on_merge",null),Su([Ti(_.Names.cube_reorder)],Cu.prototype,"on_box_order",null),Su([Ti(_.Names.cube_insert_child)],Cu.prototype,"on_insert_child",null),Su([Ti(_.Names.cube_delete_child)],Cu.prototype,"on_delete_child",null),Su([Ti(_.Names.cube_reset)],Cu.prototype,"on_box_reset",null),Su([Ti(_.Names.cube_delete_adjacent)],Cu.prototype,"on_cube_delete_adjacent",null),Cu=Su([ki],Cu);const Mu=["id","data-type"],zu=On({__name:"cube-box-folder",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(zo(),Po("div",{class:fe(["cube-box-folder",{"cube-box-folder-active":Wt(t).attrs.fold}]),id:e.cube.id,style:ce(Wt(t).css),"data-type":e.cube.type,onContextmenu:n[1]||(n[1]=t=>Wt(rc)(t,e.cube))},[Wt(t).attrs.fold?(zo(),Oo(Ps,{key:0,cube:Wt(t).child_first},null,8,["cube"])):(zo(!0),Po(yo,{key:1},ur(Wt(t).children,e=>(zo(),Oo(Ps,{key:e.id,cube:Ht(e)},null,8,["cube"]))),128)),Bo("div",{class:fe(["folder-tag",{"folder-tag-active":Wt(t).attrs.fold}]),onClick:n[0]||(n[0]=t=>function(e,t){const{courier:n,history:r,cubes:o,id:i,pcube:s}=t,a=n.get_recorder();a.tell(t,Mi.fold(i,!t.attrs.fold)),r.record(a);for(let e of Object.values(o.postils))e.find_upstream_untill(s)===t&&e.visible(!1);const l=t.child_first.id;if(!l)return;const c=document.getElementById(l);c?.scrollIntoView({block:"nearest",behavior:"smooth"})}(0,e.cube))},null,2)],46,Mu))}}),Nu=(0,Ls.A)(zu,[["__scopeId","data-v-a35cb97c"]]);class Au extends Ts{constructor(e){super(e)}}function Tu(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Ru extends nd{_status=new Au(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return Nu}get meta(){return Ru.meta}get is_empty(){return 1===this.child_count&&this.child_first instanceof uu&&this.child_first.is_empty}get attrs(){return this.data.attrs}build_child(e){rd.build_cubes(e.info,this,this._children)}gc(){super.base_gc()}export(){const e=this.base_export();e.info=[];for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return Ru.update_data(e,t)}replace_id(e,t,n){return Ru.replace_id(this.root,e,t,n)}on_cube_delete_adjacent(e){const{courier:t}=this,{from:n,offset:r,from_id:o}=e,i=new ad(t);if("left"===n){this.prev_cube_deep instanceof Ru?i.tell(this,Mi.merge(this.id,"left",o,r)):i.tell(this,zi.in_head(this.id))}else if("right"===n){this.next_cube_deep instanceof Ru?i.merge(this.on(Mi.merge(this.id,"right",o,r))):i.tell(this,zi.in_tail(this.id))}return i}on_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i}=this,{method:s,cubeid:a,offset:l}=e,c=new ad(t);if("left"===s&&n instanceof Ru){const e=this.export().info;c.tell(n,Mi.insert_child(n.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if("right"===s&&r instanceof Ru){const e=r.export().info;c.tell(this,Mi.insert_child(this.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if("both"===s)if(n instanceof Ru&&r instanceof Ru){const e=this.export().info,t=r.export().info;c.tell(n,Mi.insert_child(n.id,e.concat(t),"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_cube(a);if(o){const e=zi.loc(a,l,a,l);c.tell(o,e)}}else if(n instanceof Ru&&!(r instanceof Ru)){const e=this.export().info;c.tell(n,Mi.insert_child(n.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}else if(!(n instanceof Ru)&&r instanceof Ru){const e=r.export().info;c.tell(this,Mi.insert_child(this.id,e,"tail")),c.tell(this.pcube,Mi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=zi.loc(a,l,a,l);c.tell(t,e)}}return c}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ad(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(Mi.reorder(this.id,s.id,c)),a}on_cube_reset(e){const t=this.courier,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=rd.filter_out_empty(n);if(0===o.length){const e=this.children[0];if(1===this.child_count&&e instanceof Zd&&e.is_empty)return;const t=this.export().info,n=new uu(uu.get_default(),this);this.splice(0,this.child_count,n),r.add_recover(Mi.reset(this.id,t)),r.tell(n,zi.in_tail(n.id))}else{const e=this.export().info,t=rd.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(Mi.reset(this.id,e))}return r}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(Mi.delete_child(this.id,"backward",[i,i+s.length]));const a=s[s.length-1],l=this.children[i+1];return a?o.tell(a,zi.in_tail(a.id)):o.tell(l,zi.in_head(l.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const l=t.get_recorder();l.add_cmd(e);const[c,d]=s;let u=c,h=d;if(u>=h)return;if(u<=0&&h>=this.child_count){if(a){if(this.is_empty)return;l.tell(this,Mi.delete_child(this.id,i,[1,this.child_count]));const e=this.child_first;e&&l.tell(e,Mi.delete_child(e.id,i,[0,e.child_count],a))}else this.is_empty?l.tell(o,Mi.delete_child(n,i,[r,r+1])):l.tell(this,Mi.reset(this.id,[]));return l}const p=this.children[u-1],f=this.children[h],m=h-u;let _=this.splice(c,m);return l.add_recover(Mi.insert_child(this.id,_.data,c)),"backward"===i?p?l.tell(p,zi.in_tail(p.id)):f&&l.tell(f,zi.in_head(f.id)):"forward"===i&&(f?l.tell(f,zi.in_head(f.id)):p&&l.tell(p,zi.in_tail(p.id))),l}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}static filter_out_empty(e){return e.filter(e=>!Zd.is_empty_text(e))}static get meta(){return{type:k.Cubes.box_folder,cubename:"折叠块",version:1,block:!0,show:!0}}static get_default(e=[],t={},n={fold:!1}){const r=0===e.length?[uu.get_default()]:e;return{id:rd.get_id(),type:k.Cubes.box_folder,info:r,css:t,attrs:n}}static replace_id(e,t,n,r){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Ci.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Tu([Ti(_.Names.cube_delete_adjacent)],Ru.prototype,"on_cube_delete_adjacent",null),Tu([Ti(_.Names.cube_merge)],Ru.prototype,"on_merge",null),Tu([Ti(_.Names.cube_reorder)],Ru.prototype,"on_cube_reorder",null),Tu([Ti(_.Names.cube_reset)],Ru.prototype,"on_cube_reset",null),Tu([Ti(_.Names.cube_insert_child)],Ru.prototype,"on_insert_child",null),Tu([Ti(_.Names.cube_delete_child)],Ru.prototype,"on_delete_child",null),Ru=Tu([ki],Ru);class Pu{}class Ou{static update(e,t){return{id:e,name:f.Names.update,attrs:t}}}class Eu extends Wc{_linker;_point_from={x:0,y:0};_point_to={x:0,y:0};_path="";_sample=[];_from_node;_to_node;_prev_layout_type=null;_prev_line_type="bezier2";_prev_line_width=2;_prev_line_stroke=void 0;_prev_from_rect={x:0,y:0,width:0,height:0};_prev_to_rect={x:0,y:0,width:0,height:0};constructor(e){super(e),this._linker=e,this._from_node=this.pcube.get_node(this.linker.from_id),this._to_node=this.pcube.get_node(this.linker.to_id)}get linker(){return this._linker}get status(){return this.linker.status}get path(){return this._path}get attrs(){return this.cube.attrs}get sample(){return[...this._sample]}get from_node(){return this.linker.from_node}get to_node(){return this.linker.to_node}get line_type(){return this.attrs.type||this.from_node?.map2d.node_line_type||"bezier2"}get anchor_left(){return this.from_node?.attrs.anchor_out||p.Anchor.point}get anchor_right(){return this.to_node?.attrs.anchor_in||p.Anchor.arrow}get line_stroke(){return this.attrs.stroke||this.from_node?.map2d.node_fill}get line_width(){return this.attrs.stroke_width||this.from_node?.map2d.node_line_width||2}get rect(){return{x:Math.min(this._point_from.x,this._point_to.x),y:Math.min(this._point_from.y,this._point_to.y),width:Math.abs(this._point_from.x-this._point_to.x),height:Math.abs(this._point_from.y-this._point_to.y)}}clone_rect(e){return{x:e.x,y:e.y,width:e.width,height:e.height}}update_path(){const e=this.linker,t=e.from_node,n=e.to_node;if(!t||!n)return"";const r=t.env.layout_type,o=t.map2d.rect,i=n.map2d.rect;let s,a=!1;for(s in o)if(o[s]!==this._prev_from_rect[s]){a=!0;break}if(!a)for(s in i)if(i[s]!==this._prev_to_rect[s]){a=!0;break}a||r===this._prev_layout_type||(a=!0);const l=this.line_type;a||l===this._prev_line_type||(a=!0);const c=this.line_width;a||c===this._prev_line_width||(a=!0);const d=this.line_stroke;if(a||d===this._prev_line_stroke||(a=!0),!a)return;this._prev_layout_type=r,this._prev_line_type=l,this._prev_line_width=c,this._prev_line_stroke=d,this._prev_from_rect=this.clone_rect(o),this._prev_to_rect=this.clone_rect(i);const u=ju.find(t,n);if(u){this._point_from=u.from,this._point_to=u.to;const e=Bu.draw({type:l,...u});this._path=e,this._sample=Zi.svg_path_sample(e,8),this.status.update_path(e),this.status.update_sample(this._sample),this.status.update_line_type(l),this.status.update_line_stroke(d),this.status.update_line_width(c)}}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Ck||t instanceof oh)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}}class Lu extends Ts{_path=Gt("");_sample=Rt([]);_point_from=Rt({x:0,y:0});_point_to=Rt({x:0,y:0});_line_type=Gt("bezier2");_line_width=Gt(2);_line_stroke=Gt(void 0);constructor(e){super(e)}init(){super.init(),this._line_type.value=this._data.attrs.type||this.from_node?.status.node_line_type||"bezier2",this._line_stroke.value=this._data.attrs.stroke||this.from_node?.status.node_fill,this._line_width.value=this._data.attrs.stroke_width||this.from_node?.status.node_line_width||2}get map2d(){return this.cube.map2d}get cube(){return this._cube}get path(){return this._path.value}get point_from(){return this._point_from}get point_to(){return this._point_to}set point_from(e){Object.assign(this._point_from,e)}set point_to(e){Object.assign(this._point_to,e)}get map(){return this.cube.pcube}get from_node(){return this.cube.from_node}get to_node(){return this.cube.to_node}get sample(){return[...this._sample]}get anchor_left(){return this.from_node?.status.node_anchor_out||p.Anchor.point}get anchor_right(){return this.to_node?.status.node_anchor_in||p.Anchor.arrow}get line_type(){return this._line_type.value}get line_stroke(){return this._line_stroke.value}get line_width(){return this._line_width.value}get css(){return{...super.css,stroke:this.line_stroke,"stroke-width":this.line_width}}update_path(e){this._path.value=e}update_line_type(e){this._line_type.value=e}update_line_stroke(e){this._line_stroke.value=e}update_line_width(e){this._line_width.value=e}update_sample(e){this._sample.splice(0,this._sample.length,...e)}fresh_sample(){return Zi.svg_path_sample(this.path,8)}}function Iu(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Du extends Kc{_status=new Lu(this);_map2d=new Eu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get map2d(){return this._map2d}get status(){return this._status}get show(){return this.pcube.is_linker_visible(this)}get info(){return this.data.info}get rect(){return this.map2d.rect}get component(){return js}get from_id(){return this.attrs.from}get to_id(){return this.attrs.to}get from_node(){return this.pcube.get_node(this.from_id)}get to_node(){return this.pcube.get_node(this.to_id)}get meta(){return Du.meta}get id(){return Zi.get_linker_id(this.from_id,this.to_id)}export(){const e=this.base_export();return e.attrs.from=this.from_id,e.attrs.to=this.to_id,e}build_child(e){}update_data(e,t){return Du.update_data(e,t)}replace_id(e,t,n={}){return Du.replace_id(this.root,e,t,n)}get_linker_info(){const e=this.from_node,t=this.to_node;if(!e||!t)return;const n=this.pcube.get_node_to(e.id),r=this.pcube.get_node_from(t.id),o=n?.indexOf(t.id)||-1,i=r?.indexOf(e.id)||-1;return{linker:this.export(),index_from:i,index_to:o}}on_linker_update(e){const{courier:t,history:n}=this,{attrs:r}=e,o=t.get_recorder();o.add_cmd(e);const i=structuredClone(jt(this.data.attrs));Object.assign(this.attrs,r),this.status.update_attrs(r);const s=Ou.update(this.id,i);return o.add_recover(s),o}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n.attrs.from=r[n.attrs.from]||n.attrs.from,n.attrs.to=r[n.attrs.to]||n.attrs.to,n}static get meta(){return{cubename:"连接线",type:k.Cubes.linker,block:!1,version:2,show:!1}}static get_default(e,t,n){return{id:Zi.get_linker_id(e,t),type:k.Cubes.linker,info:{},attrs:{from:e,to:t},css:{}}}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(n<2&&(delete t.attrs.stroke,delete t.attrs.stroke_width,delete t.attrs.type),{usable:!0,data:t})}}Iu([Ti(f.Names.update)],Du.prototype,"on_linker_update",null),Du=Iu([ki],Du);class Bu{static draw(e){const{type:t,from:n,to:r}=e;return"line"===t?this.line(n,r):"bezier2"===t?this.bezier2(n,r):"polyline"===t?this.polyline(n,r):"polyline2"===t?this.polyline2(n,r):"polyline3"===t?this.polyline3(n,r):"wave"===t?this.wave(n,r):"fold1"===t?this.fold1(n,r):"fold2"===t?this.fold2(n,r):this.bezier2(n,r)}static get_line(e,t,n){return"line"===n?this.line(e,t):"bezier2"===n?this.bezier2(e,t):"polyline"===n?this.polyline(e,t):"polyline2"===n?this.polyline2(e,t):"polyline3"===n?this.polyline3(e,t):"wave"===n?this.wave(e,t):"fold1"===n?this.fold1(e,t):"fold2"===n?this.fold2(e,t):this.bezier2(e,t)}static line(e,t){return`M${e.x.toFixed(1)} ${e.y.toFixed(1)}L${t.x.toFixed(1)} ${t.y.toFixed(1)}`}static bezier2(e,t){const n=(e.x+t.x)/2,r=n,o=e.y,i=n,s=t.y;return`M${e.x.toFixed(1)} ${e.y.toFixed(1)} C${r} ${o} ${i} ${s} ${t.x.toFixed(1)} ${t.y.toFixed(1)}`}static polyline(e,t,n=4){const r=(e.x+t.x)/2,o=e,i=t,s=r,a=o.y,l=r,c=i.y,d=Math.sign(e.x-t.x),u=Math.sign(t.y-e.y),h=Math.sign(e.y-t.y),p=Math.sign(t.x-e.x);return`M${o.x} ${o.y} H ${s+d*n} Q ${s} ${a} ${s} ${a+u*n} V ${c+h*n} Q${l} ${c} ${l+p*n} ${c} H ${i.x}`}static polyline2(e,t,n=4){const r=e,o=t,i=(e.x+t.x)/2,s=r.y;return`M${r.x} ${r.y} L${i} ${s} L ${o.x} ${o.y}`}static polyline3(e,t,n=4){const r=(e.x+t.x)/2,o=e,i=t,s=(o.y,r),a=i.y;return`M${o.x} ${o.y} L${s} ${a} L ${i.x} ${i.y}`}static fold1(e,t,n=4){const r=Math.sign(t.y-e.y),o=Math.sign(t.x-e.x),i=Math.min(n,Math.abs(t.y-e.y)/2,Math.abs(t.x-e.x)/2);return`M${e.x} ${e.y} V${t.y-r*i} Q${e.x} ${t.y} ${e.x+o*i} ${t.y} H${t.x}`}static fold2(e,t,n=4){const r=Math.sign(t.x-e.x),o=Math.sign(t.y-e.y),i=Math.min(n,Math.abs(t.x-e.x)/2,Math.abs(t.y-e.y)/2);return`M${e.x} ${e.y} H${t.x-r*i} Q${t.x} ${e.y} ${t.x} ${e.y+o*i} V${t.y}`}static wave(e,t,n=2,r=8){const o=t.x-e.x,i=t.y-e.y,s=Math.sqrt(o*o+i*i),a=Math.atan2(i,o),l=r??s/10;let c=`M ${e.x} ${e.y}`;const d=20*n;for(let t=0;t<=d;t++){const r=t/d,s=e.x+o*r,u=e.y+i*r,h=l*Math.sin(r*n*Math.PI*2),p=s+-Math.sin(a)*h,f=u+Math.cos(a)*h;if(0===t)c+=` M ${p} ${f}`;else{const r=(t-1)/d,s=l*Math.sin(r*n*Math.PI*2),u=-Math.sin(a)*s,h=Math.cos(a)*s,m=e.x+o*r+u,_=e.y+i*r+h;c+=` C ${m+(p-m)/3} ${_+(f-_)/3}, ${p-(p-m)/3} ${f-(f-_)/3}, ${p} ${f}`}}return c}}class ju{static map={right:this.right.bind(this),left:this.left.bind(this),down:this.down.bind(this),up:this.up.bind(this),"time-right":this.time_right.bind(this),"time-down":this.time_down.bind(this),"file-tree":this.file_tree.bind(this)};static find(e,t){const n=e.env.layout_type;if(t.env.upstream!==e)return this.free_to_any(e,t);if(n){return(0,this.map[n])(e,t)}return this.free_to_any(e,t)}static get_point(e){const t=e.env.layout_type;if(!t)return;const n=e.map2d.rect,r=$i.IMath.RectPosition;return"right"===t?$i.MathRect.get_rect_point(n,r.right_mid):"left"===t?$i.MathRect.get_rect_point(n,r.left_mid):"down"===t?$i.MathRect.get_rect_point(n,r.bottom_mid):"up"===t?$i.MathRect.get_rect_point(n,r.top_mid):"time-down"===t?$i.MathRect.get_rect_point(n,r.bottom_mid):"time-right"===t?$i.MathRect.get_rect_point(n,r.right_mid):void 0}static time_down(e,t){const n=(t.env.prev_node||e).map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.bottom_mid),to:$i.MathRect.get_rect_point(r,o.top_mid)}}static time_right(e,t){const n=(t.env.prev_node||e).map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.right_mid),to:$i.MathRect.get_rect_point(r,o.left_mid)}}static up(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.top_mid),to:$i.MathRect.get_rect_point(r,o.bottom_mid)}}static right(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.right_mid),to:$i.MathRect.get_rect_point(r,o.left_mid)}}static left(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.left_mid),to:$i.MathRect.get_rect_point(r,o.right_mid)}}static down(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.bottom_mid),to:$i.MathRect.get_rect_point(r,o.top_mid)}}static file_tree(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=$i.IMath.RectPosition;return{from:$i.MathRect.get_rect_point(n,o.bottom_mid),to:$i.MathRect.get_rect_point(r,o.left_mid)}}static free_to_any(e,t){const n=e.map2d.shape_sample,r=t.map2d.shape_sample;if(0!==n.length&&0!==r.length)return Zi.find_closest_points(n,r)}}class Hu{_observer;_nodes={};constructor(){this._observer=new ResizeObserver(this.watch.bind(this))}watch(e,t){for(let t of e){const e=t.target,n=t.target.dataset.id,r=this._nodes[n];r&&e.isConnected&&r.layout_self(t)}}register(e,t){const n=e.dataset.id;n&&(this._nodes[n]=t,this._observer.observe(e))}unregister(e){const t=e.dataset.id;t&&(delete this._nodes[t],e&&this._observer.unobserve(e))}}const qu=new Hu,Fu=["id","data-type","transform","data-editing"],$u=["d"],Gu=["x","y","width","height"],Vu=["data-id"],Uu={class:"node-status"},Ku=On({__name:"cube-node",props:{cube:{}},setup(e){const{map2d:t,status:n}=e.cube,r=Gt();Jn(()=>{const t=r.value;t&&qu.register(t,e.cube)}),er(()=>{const e=r.value;e&&qu.unregister(e)});const o=_i(()=>({"node-selected":e.cube.pcube.status.is_node_selected(e.cube),"node-editable":n.editable,"line-delete-selected":e.cube.pcube.status.is_line_deleted(e.cube),"node-dragging":e.cube.pcube.status.is_node_dragging(e.cube)}));function i(){const{courier:t,history:n}=e.cube,r=t.get_recorder(),o=es.layout_change(e.cube.id,{root:!1});r.tell(e.cube,o),n.record(r)}function s(t=!0){const{courier:n,history:r}=e.cube,o=n.get_recorder(),i=es.layout_change(e.cube.id,{fold:t});o.tell(e.cube,i),r.record(o)}const a=_i(()=>{const e=n.css.fill;return{"--fill":e,"--color":function(e,t="#FFFFFF",n=158){if(!e)return"";const r=Ml(e),{r:o,g:i,b:s,a}=r;if(1===a)return(299*o+587*i+114*s)/1e3>n?"#000000":"#FFFFFF";if(0===a){const e=Ml(t);return(299*e.r+587*e.g+114*e.b)/1e3>n?"#000000":"#FFFFFF"}const l=Ml(t);return(299*Math.round(o*a+l.r*(1-a))+587*Math.round(i*a+l.g*(1-a))+114*Math.round(s*a+l.b*(1-a)))/1e3>n?"#000000":"#FFFFFF"}(e,wl.bg)}});function l(){const{courier:t,history:n}=e.cube,r=t.get_recorder(),o=es.layout_change(e.cube.id,{outbox:!1});r.tell(e.cube,o),n.record(r)}return(t,c)=>(zo(),Po("g",{id:t.cube.id,"data-type":t.cube.type,class:fe(["cube-node",o.value]),transform:Wt(n).matrix2d_dom_string,"data-editing":Wt(n).editable,style:ce(a.value)},[Bo("path",{d:Wt(n).shape_path,ref:"p"},null,8,$u),(zo(),Po("foreignObject",{x:Wt(n).rect_cbox.x,y:Wt(n).rect_cbox.y,width:Wt(n).rect_cbox.width,height:Wt(n).rect_cbox.height,style:ce(Wt(n).css)},[Bo("div",{class:"cube-node-box",ref_key:"box",ref:r,"data-id":t.cube.id},[(zo(!0),Po(yo,null,ur(Wt(n).children,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128)),Go(" node statusbar "),Bo("div",Uu,[Wt(n).attrs.root?(zo(),Po("div",{key:0,class:"iconfont icon-system-mind-map-filled",onClick:i})):Go("v-if",!0),Wt(n).attrs.layout?(zo(),Po("div",{key:1,class:fe(Wt(Ol).get_layout_icons(Wt(n).layout_type)),onClick:c[0]||(c[0]=t=>{return n=t,void e.cube.float.float_node_layout.show(n,e.cube);var n})},null,2)):Go("v-if",!0),Wt(n).attrs.outbox?(zo(),Po("div",{key:2,class:"iconfont icon-background",onClick:l})):Go("v-if",!0),Wt(n).has_layout_ability&&Wt(n).downstream_nodes_count>0?(zo(),Po(yo,{key:3},[Wt(n).attrs.fold?(zo(),Po("div",{key:0,class:"status-fold",onClick:c[1]||(c[1]=e=>s(!1))},xe(Wt(n).downstream_nodes_count),1)):(zo(),Po("div",{key:1,class:"iconfont icon-minussquare",onClick:c[2]||(c[2]=e=>s(!0))}))],64)):Go("v-if",!0)])],8,Vu)],12,Gu))],14,Fu))}}),Wu=(0,Ls.A)(Ku,[["__scopeId","data-v-70d9594b"]]);class Yu extends ed{constructor(e){super(e)}get cube(){return this._cube}}class Xu extends td{constructor(e){super(e)}}class Ju extends Zc{_status=new Xu(this);_map2d=new Yu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get map2d(){return this._map2d}get status(){return this._status}get meta(){return Ju.meta}get component(){return Wu}build_child(e){rd.build_cubes(e.info,this,this._children)}update_data(e,t){return Ju.update_data(e,t)}gc(){this.base_gc()}export(){const e=this.base_export();e.info=[],e.attrs=structuredClone(jt(this.attrs)),e.attrs.matrix2d=this.matrix2d_real;const{width:t,height:n}=this.map2d.rect_cbox;e.attrs.size={width:t,height:n};for(let t of this._children)e.info.push(t.export());return e}replace_id(e,t,n={}){return Ju.replace_id(this.root,e,t,n)}static get meta(){return{cubename:"图形节点",type:k.Cubes.node,block:!0,version:1,show:!1}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,rd.replace_id(e,t,n.info,r),n}static get_default(e,t=[],n="rect"){const r=t.length>0?t:[bu.get_default()];return{id:rd.get_id(),type:k.Cubes.node,info:r,attrs:{root:!1,matrix2d:{a:1,b:0,c:0,d:1,e:e.x,f:e.y},shape:n,layout:null},css:{}}}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{usable:!0,data:t}}}Ju=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([ki],Ju);class Zu{static get_shaple(e,t=8){const n=e.shape_type;return"rect"===n?this.rect(e,t):"circle"===n?this.circle(e,t):this.rect(e)}static rect(e,t=8,n=8){const{width:r,height:o}=e.rect_cbox,i=0,s=0,a=r+2*t,l=0,c=r+2*t,d=o+2*t,u=0,h=o+2*t;return`M${i+n} ${s}H${a-n}Q${a} ${l} ${a} ${l+n}V${d-n}Q${c} ${d} ${c-n} ${d}H ${u+n}Q${u} ${h} ${u} ${h-n}V${s+n}Q${i} ${s} ${i+n} ${s}Z`}static circle(e,t=8){const{width:n,height:r}=e.rect_cbox,o=Math.sqrt(n*n+r*r)/2,i=0;return`M${o} ${i} A ${o} ${o} 0 1 0 ${o} ${2*o}A${o} ${o} 0 1 0 ${o} ${i}`}}class Qu{_row;_col;_nodes=new Set;constructor(e,t){this._row=e,this._col=t}get pos(){return{row:this._row,col:this._col}}get row(){return this._row}get col(){return this._col}get nodes(){return new Set(this._nodes)}add_node(e){this._nodes.add(e)}remove_node(e){this._nodes.delete(e)}}class eh{_map;_nodes=new Map;_grider=[];_grid_width;_grid_height;constructor(e){this._map=e,this._grid_width=window.innerWidth,this._grid_height=window.innerHeight}get map(){return this._map}get grid_size(){return{width:this._grid_width,height:this._grid_height}}get row(){return this._grider.length}get col(){let e=1;for(let t of this._grider)t.length>e&&(e=t.length);return e}update_nodes(e){for(let t of e)this.update_node(t)}update_node(e){const t=this.get_node_griders(e),n=e.id;if(this._nodes.has(n)){const t=this._nodes.get(n);for(let n of t)n.remove_node(e)}const r=[];for(let e of t){const t=e.row,n=e.col;if(this._grider[t]||(this._grider[t]=[]),!this._grider[t][n]){const e=new Qu(t,n);this._grider[t][n]=e}r.push(this._grider[t][n])}this._nodes.set(n,r);for(let t of r)t.add_node(e)}remove_node(e){const t=e.id;if(this._nodes.has(t)){const n=this._nodes.get(t);for(let t of n)t.remove_node(e);this._nodes.delete(t)}}get_node_griders(e){const t=[],n=e.map2d.rect_raw,r=Math.floor(n.y/this._grid_height),o=Math.floor((n.y+n.height)/this._grid_height),i=Math.floor(n.x/this._grid_width),s=Math.floor((n.x+n.width)/this._grid_width);for(let e=r;e<=o;e++)for(let n=i;n<=s;n++)t.push({row:e,col:n});return t}get_viewport_griders(){const e=this._map.get_view_rect(),t=[],n=Math.floor(e.y/this._grid_height),r=Math.floor((e.y+e.height)/this._grid_height),o=Math.floor(e.x/this._grid_width),i=Math.floor((e.x+e.width)/this._grid_width);for(let e=n;e<=r;e++)for(let n=o;n<=i;n++)this._grider[e]&&this._grider[e][n]&&t.push(this._grider[e][n]);return t}get_intersection_griders(e){const t=[],n=Math.floor(e.y/this._grid_height),r=Math.floor((e.y+e.height)/this._grid_height),o=Math.floor(e.x/this._grid_width),i=Math.floor((e.x+e.width)/this._grid_width);for(let e=n;e<=r;e++)for(let n=o;n<=i;n++)this._grider[e]&&this._grider[e][n]&&t.push(this._grider[e][n]);return t}get_intersection_nodes(e,t=!0){const n=new Set,r=this.get_intersection_griders(e),o=this.grid_size;for(let i of r){const r={x:i.col*o.width,y:i.row*o.height,width:o.width,height:o.height};if($i.MathRect.is_include(e,r))for(let e of i.nodes)!t&&e.env.folded_upstream||n.add(e);else for(let r of i.nodes)!t&&r.env.folded_upstream||$i.MathRect.check_intersection(e,r.map2d.rect)&&n.add(r)}return n}}class th extends Rs{_nodes_count=Gt(0);_view_rect=Rt({x:0,y:0,width:0,height:0});_nodes_view=Pt(new Set);_linkers_view=Pt(new Set);_nodes_selected=Pt(new Set);_nodes_editing=Pt(new Set);_nodes_outbox=Pt(new Set);_line_delete_selected=Pt(new Set);_nodes_dragging=Pt(new Set);_placeholder_linkers=Rt([]);_placeholder_box_selector=Gt("");_placeholder_line_delete=Gt("");constructor(e){super(e)}get attrs(){return this._data.attrs}get matrix2d(){return{...this.attrs.matrix2d}}get line_delete_selected(){return new Set(this._line_delete_selected)}get nodes_count(){return this._nodes_count.value}get nodes_view_count(){return this._nodes_view.size}get view_rect(){return{...this._view_rect}}get view_center(){const e=this._view_rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}get map(){return this._cube}get matrix2d_dom_string(){return Ji.get_dom_string(this.matrix2d)}get placeholder_linkers(){return[...this._placeholder_linkers]}get placeholder_box_selector(){return this._placeholder_box_selector.value}get placeholder_line_delete(){return this._placeholder_line_delete.value}get nodes_view(){return new Set(this._nodes_view)}get linkers_view(){return new Set(this._linkers_view)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_outbox(){return new Set(this._nodes_outbox)}reset_nodes_view(e){this._nodes_view.clear();for(let t of e)this._nodes_view.add(t)}reset_nodes_outbox(e){this._nodes_outbox.clear();for(let t of e)this._nodes_outbox.add(t)}reset_linkers_view(e){this._linkers_view.clear();for(let t of e)this._linkers_view.add(t)}remove_linker(e){this._linkers_view.delete(e),this._line_delete_selected.delete(e)}remove_node(e){this._nodes_view.delete(e),this._nodes_selected.delete(e),this._nodes_editing.delete(e),this._nodes_outbox.delete(e),this._line_delete_selected.delete(e),this._nodes_dragging.delete(e),this._nodes_count.value--}set_node_visible(e,t){t?this._nodes_view.add(e):this._nodes_view.delete(e)}set_linker_visible(e,t){t?this._linkers_view.add(e):this._linkers_view.delete(e)}set_node_editing(e,t){t?this._nodes_editing.add(e):this._nodes_editing.delete(e)}set_node_selected(e,t){t?this._nodes_selected.add(e):this._nodes_selected.delete(e)}set_node_outbox(e,t){t?this._nodes_outbox.add(e):this._nodes_outbox.delete(e)}set_line_deleted(e,t){t?this._line_delete_selected.add(e):this._line_delete_selected.delete(e)}is_node_visible(e){return this._nodes_view.has(e)}is_linker_visible(e){return this._linkers_view.has(e)}is_node_editing(e){return this._nodes_editing.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}clear_line_deleted(){this._line_delete_selected.clear()}clear_node_editing(){for(let e of this.nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear()}clear_node_outbox(){this._nodes_outbox.clear()}update_nodes_count(e){this._nodes_count.value=e}update_matrix2d(e){Object.assign(this.attrs.matrix2d,e||this.map.matrix2d)}update_view_rect(e){Object.assign(this._view_rect,e)}update_placeholder_box_selector(e){this._placeholder_box_selector.value=e}update_placeholder_line_delete(e){this._placeholder_line_delete.value=e}update_placeholder_linkers(e){this._placeholder_linkers.length=0,this._placeholder_linkers.push(...e)}add_placeholder_linker(e){this._placeholder_linkers.push(e)}get nodes_dragging(){return new Set(this._nodes_dragging)}set_node_dragging(e,t){t?this._nodes_dragging.add(e):this._nodes_dragging.delete(e)}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_nodes_dragging(){this._nodes_dragging.clear()}}class nh extends bi{_ui_visible=Gt(!1);_canvas;_ui_scale=Gt(1);constructor(e){super(e)}get ui_scale(){return this._ui_scale.value}set ui_scale(e){this._ui_scale.value=e}get ui_width(){return this.grider.grid_size.width/4*this.ui_scale}get ui_height(){return this.grider.grid_size.height/4*this.ui_scale}get canvas(){return this._canvas}init(e){this._canvas=e}get grider(){return this.map.grider}get map(){return this._root}get ui_visible(){return this._ui_visible.value}get size_map(){const e=this.grider.row,t=this.grider.col,n=this.grider.grid_size;return{width:t*n.width,height:e*n.height}}get_scale(){const e=this.ui_width,t=this.ui_height,n=this.size_map,r=e/n.width,o=t/n.height;return Math.min(r,o)}get mini_nodes(){const e=getComputedStyle(document.documentElement).getPropertyValue("--node-bg").trim()||"#d1faf580",t=[];for(const[,n]of this.map.nodes){if(n.env.folded_upstream)continue;const r=n.map2d.rect;t.push({x:r.x,y:r.y,width:r.width,height:r.height,fill:n.map2d.node_fill||e})}return t}get content_rect(){const e=this.map.view_rect,t=this.mini_nodes;let n=e.x,r=e.y,o=e.x+e.width,i=e.y+e.height;for(const e of t)n=Math.min(n,e.x),r=Math.min(r,e.y),o=Math.max(o,e.x+e.width),i=Math.max(i,e.y+e.height);return{x:n,y:r,width:Math.max(o-n,1),height:Math.max(i-r,1)}}get_render_state(){const e=this.content_rect,t=this.ui_width,n=this.ui_height,r=t/e.width,o=n/e.height,i=Math.min(r,o);return{bounds:e,nodes:this.mini_nodes,scale:i}}toggle_visible(){this._ui_visible.value=!this._ui_visible.value,this._ui_visible.value&&this.refresh()}translate_delta(e,t){const{scale:n}=this.get_render_state();if(!Number.isFinite(n)||n<=0)return;const r=t/n,o=-(e/n)*this.map.matrix2d.a,i=-r*this.map.matrix2d.d;this.map.translate(o,i),this.refresh()}refresh_viewport(e,t){if(!this._ui_visible.value||!this._canvas)return;const n=this._canvas.getContext("2d");if(!n)return;const r=this.map.view_rect,o=getComputedStyle(document.documentElement),i=o.getPropertyValue("--placeholder-box-selector-fill").trim()||"#a5f3fc33",s=o.getPropertyValue("--placeholder-box-selector-stroke").trim()||"#0891b2";n.strokeStyle=s,n.fillStyle=i,n.lineWidth=1;const a=(r.x-e.x)*t,l=(r.y-e.y)*t,c=r.width*t,d=r.height*t;n.fillRect(a,l,c,d),n.strokeRect(a,l,c,d)}refresh(){if(!this.ui_visible||!this._canvas)return;const e=Date.now(),t=this._canvas.getContext("2d");if(!t)return;t.resetTransform();const n=this.ui_width,r=this.ui_height,{bounds:o,nodes:i,scale:s}=this.get_render_state();t.clearRect(0,0,n,r);for(const e of i){t.fillStyle=e.fill;const n=(e.x-o.x)*s,r=(e.y-o.y)*s,i=e.width*s,a=e.height*s;t.fillRect(n,r,i,a)}this.refresh_viewport(o,s),console.log("🐋minimap-refresh",Date.now()-e)}}function rh(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class oh extends As{_status=new th(this);_map_interaction=new ys(this);_grider=new eh(this);_canvas=new nh(this);_app;_has_layout=!1;_nodes=new Map;_linkers=new Map;_node_from=this.data.info.node_from;_node_to=this.data.info.node_to;_nodes_editing=new Set;_nodes_outbox=new Set;_nodes_selected=new Set;_line_delete_selected=new Set;_nodes_dragging=new Set;_view_nodes=new Set;_view_linkers=new Set;_view_rect={x:0,y:0,width:0,height:0};constructor(e){super(e),this.setup(),this.status.init(),this._app=Ta(Uc,{cube:this}),this.stats.view="map"}get nodes(){return new Map(this._nodes)}get linkers(){return new Map(this._linkers)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_outbox(){return new Set(this._nodes_outbox)}get nodes_view(){return new Set(this._view_nodes)}get linkers_view(){return new Set(this._view_linkers)}get line_deleted(){return new Set(this._line_delete_selected)}get id(){return this.data.id}get type(){return this.data.type}get status(){return this._status}get grider(){return this._grider}get canvas(){return this._canvas}get map_interaction(){return this._map_interaction}get matrix2d(){return this.attrs.matrix2d}get matrix2d_dom_string(){return Ji.get_dom_string(this.matrix2d)}get attrs(){return this.data.attrs}get has_layout(){return this._has_layout}get dom_rect(){const e=this.dom;return e?e.getBoundingClientRect():new DOMRect(0,0,0,0)}get dom_svg_rect(){const e=this.dom?.getElementsByTagName("svg");return e?e[0].getBoundingClientRect():new DOMRect(0,0,0,0)}get app(){return this._app}get component(){return Uc}get meta(){return oh.meta}get children(){return[...this._children]}get view_rect(){return{...this._view_rect}}wait_nodes_render(e){return Zi.wait_nodes_render(e)}find_cube(e){return this.cubes.find_cube(e)}filter(e){const t=[];for(let n of this._linkers.values())e(n)&&t.push(n),t.push(...n.filter(e));for(let n of this._nodes.values())e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this._linkers.values())e(t),t.each(e);for(let t of this._nodes.values())e(t),t.each(e)}find_child_cube(e){return this._nodes.get(e)||this._linkers.get(e)}pick(...e){for(let t of e)t instanceof Zc?(this._nodes.set(t.id,t),this._view_nodes.add(t),this.status.set_node_visible(t,!0)):t instanceof Du&&(this._linkers.set(t.id,t),this._view_linkers.add(t),this.status.set_linker_visible(t,!0));this.status.update_nodes_count(this._nodes.size)}remove_node(e){this._nodes.delete(e.id),this._view_nodes.delete(e),this._nodes_outbox.delete(e),this.grider.remove_node(e),this.status.remove_node(e),e.gc(),this.status.update_nodes_count(this._nodes.size)}remove_linker(e){const t=this.get_node_to(e.from_id),n=this.get_node_from(e.to_id);let r;if(t&&n){const o=t.indexOf(e.to_id),i=n.indexOf(e.from_id);t.splice(o,1),n.splice(i,1),r={linker:e.export(),index_to:o,index_from:i}}return this._linkers.delete(e.id),this._view_linkers.delete(e),this._status.remove_linker(e),e.gc(),r}async build_child(e){const{nodes:t,linkers:n}=e.info;console.time("🍋build-nodes");for(let e of t){let t=new Ju(e,this);this._nodes.set(t.id,t),t.attrs.outbox&&this._nodes_outbox.add(t),t.layouted||this._view_nodes.add(t)}this.status.reset_nodes_view(this._view_nodes),this.status.reset_nodes_outbox(this._nodes_outbox),this.status.update_nodes_count(this._nodes.size),console.timeEnd("🍋build-nodes");for(let e of n){const{from:t,to:n}=e.attrs,r=this.get_node(e.attrs.from),o=this.get_node(e.attrs.to);if(!r||!o){const e=this._node_to[t],r=e.indexOf(n);e.splice(r,0);const o=this._node_from[n],i=o.indexOf(t);o.splice(i,1);continue}const i=new Du(e,this);this._linkers.set(i.id,i)}this.init_env()}init_env(){const e=[];for(let t of this._nodes.values())t.is_layout_root&&e.push(t);for(let t of e)t.env.flow("downstream")}init_map2d(){console.time("🍋wait-size-tree");const e=[];for(let t of this._nodes.values())t.is_layout_root&&t.attrs.layout&&e.push(t);for(let t of e)t.map2d.flow();console.timeEnd("🍋wait-size-tree")}init_grider(){const e=Date.now();this._grider.update_nodes(this._nodes.values()),console.log("🍋init-grider:",Date.now()-e)}gc(){}export(){const e={nodes:[],linkers:[],node_from:structuredClone(this._node_from),node_to:structuredClone(this._node_to)},t=structuredClone({...this.data,info:e});t.attrs.theme=Ci.note_theme,t.versions=Ci.export_versions();for(let e of this._nodes.values())t.info.nodes.push(e.export());for(let e of this._linkers.values())t.info.linkers.push(e.export());return t}update_data(e,t){return oh.update_data(e,t)}async render(e){this._dom=e,this.app.mount(e),console.time("🍋wait-svg & nodes"),await Ua.ps,await Zi.wait_nodes_render(this._view_nodes),await rd.sleep(100),console.timeEnd("🍋wait-svg & nodes"),this.init_map2d(),this.init_grider(),this.check_show(),this._has_layout=!0;const t=this.dom?.querySelector(".note");this.event.emit_status_update(),t&&(this.hotkeys.listen(t),this.map_interaction.register(t))}is_noop_sibling_move(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;return o===("prev"===r?i:i+1)}reorder_siblings(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;e.splice(o,1);const s=e.indexOf(n),a="prev"===r?s:s+1;return e.splice(a,0,t),!0}on_node_add(e){const{data:t}=e,{cursor:n,courier:r,history:o}=this,i=r.get_recorder();i.add_cmd(e);const s=rd.build_cubes(t,this);this.pick(...s);const a=t.map(e=>e.id);return i.add_recover(Qi.node_remove(this.id,a)),Promise.resolve().then(async()=>{const e=s.map(e=>e.wait_layout_self());await Promise.all(e),this.grider.update_nodes(s)}),i}on_node_remove(e){const{data:t}=e,{courier:n,cursor:r,history:o}=this;if(0===t.length)return;const i=n.get_recorder();i.add_cmd(e);const s=[],a=new Set,l=new Set,c=new Set;for(let e of t){const t=this.get_node(e);if(t){a.add(t);for(let e of t.env.downstream_nodes)a.add(e)}}for(let e of a){for(const t of e.linkers_from)c.add(t.id);for(const t of e.linkers_to)c.add(t.id)}let d=new Set;for(let e of a){s.push(e.export());const t=e.env.layout_root;t&&t!==e&&l.add(e.env.layout_root);e.env.upstream&&d.add(e.env.upstream),this.remove_node(e)}for(let e of d)e.env.flow("self");return i.tell(this,Qi.linker_remove(this.id,[...c],!1)),i.add_recover(Qi.node_add(this.id,s)),i}on_linker_add(e){const{data:t}=e,n=e.to_root??!0,{courier:r,cursor:o,history:i}=this,s=r.get_recorder();if(0===t.length)return;let a=Promise.resolve();s.add_cmd(e);const l=[],c=[],d=new Set;for(let e of t){const{index_to:t,index_from:n,linker:r}=e,o=new Du(r,this),i=o.from_node,s=o.to_node;if(!i||!s)continue;this.pick(o);let a=this.get_node_from(o.to_id),u=this.get_node_to(o.from_id);a?a.indexOf(o.from_id)<0&&a.splice(n,0,o.from_id):this._node_from[o.to_id]=[o.from_id],u?u.indexOf(o.to_id)<0&&u.splice(t,0,o.to_id):this._node_to[o.from_id]=[o.to_id],l.unshift(o.id),c.push(s.wait_layout_self()),d.add(i)}const u=new Set;for(let e of d){e.env.flow("downstream"),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&u.add(t)}return s.add_recover(Qi.linker_remove(this.id,l,n)),a.then(async()=>Promise.all(c)).then(()=>{for(let e of u)e.layout_throttle();0===u.size&&this.check_show()}),s}on_linker_remove(e){const{data:t}=e,n=e.to_root,{courier:r,cursor:o,history:i}=this;if(0===t.length)return;const s=r.get_recorder();s.add_cmd(e);const a=[],l=new Set,c=new Set,d=new Set;for(let e of t){const t=this.get_linker(e);if(!t)continue;const n=t.from_node,r=t.to_node;n&&l.add(n),r&&c.add(r);const o=this.remove_linker(t);o&&a.unshift(o)}if(0!==a.length){if(n)for(let e of c){if(!e.env.check_env(!1).has_root){const t=es.layout_change(e.id,{root:!0});s.tell(e,t)}}else for(let e of c){const t=e.env.check_env();if(!t.has_root)continue;const n=t.line[1];n.env.flow("downstream"),n.map2d.flow("downstream"),n.map2d.flow("upstream");const r=n.env.layout_root;r&&d.add(r)}for(let e of l){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&d.add(t)}for(let e of d)e.layout_throttle();return this.check_show_throttle(),s.add_recover(Qi.linker_add(this.id,a)),s}}on_node_drag(e){const{data:t}=e;if(0===t.length)return;const n=this.courier.get_recorder();n.add_cmd(e);const r=new Set,o=new Set;for(let e of t){const t=this.get_node(e.node_id);if(t)if(e.intention){const i=this.get_node(e.intention.target_id);if(!i)continue;const{type:s}=e.intention,a=t.env.upstream,l=t.env.layout_root,c="child"===s?i:i.env.upstream;if(!c)continue;if(c===t)continue;if(t.env.downstream_nodes.has(c))continue;if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[];if(a===c&&this.is_noop_sibling_move(e,t.id,i.id,s))continue}if(a&&r.add(a),r.add(c),r.add(t),l&&o.add(l),a?.env.layout_root&&o.add(a.env.layout_root),c.env.layout_root&&o.add(c.env.layout_root),("prev"===s||"next"===s)&&a===c){const e=this.get_node_to(c.id)||[];this.reorder_siblings(e,t.id,i.id,s);continue}if(a&&a!==c){const e=this.get_linker_id(a.id,t.id);n.tell(this,Qi.linker_remove(this.id,[e],!1))}if(t.is_layout_root&&n.tell(t,es.layout_change(t.id,{root:!1})),"child"===s){const e=Zi.create_linker_info(this,i.id,t.id);n.tell(this,Qi.linker_add(this.id,[e],!1))}else if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[],r=e.indexOf(i.id),o="prev"===s?r:r+1,a={linker:Du.get_default(c.id,t.id),index_to:o<0?e.length:o,index_from:this.get_node_from(t.id)?.length||0};n.tell(this,Qi.linker_add(this.id,[a],!1))}}else if(e.matrix2d){const r=es.layout_change(t.id,{matrix2d:e.matrix2d});n.tell(t,r)}}for(let e of r){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&o.add(t)}for(let e of o)e.layout_throttle();return this.check_show_throttle(),n}replace_id(e,t,n={}){return oh.replace_id(this.root,e,t,n)}get_nodes_intersection(e){const t=this.grider.get_intersection_nodes(e);return Array.from(t)}get_linker_id(e,t){return Zi.get_linker_id(e,t)}get_linker(e){return this._linkers.get(e)}get_node(e){return this._nodes.get(e)}get_node_from(e){return this._node_from[e]}get_node_to(e){return this._node_to[e]}get_view_rect(){const{clientHeight:e,clientWidth:t}=document.documentElement,n=this.dom_rect,r=Math.max(n.left,0),o=Math.min(n.right,t),i={x:r,y:Math.max(0,n.top)},s={x:o,y:Math.min(n.bottom,e)},a=this.view_point_to_real(i),l=this.view_point_to_real(s),c=l.x-a.x,d=l.y-a.y,u={x:Math.trunc(a.x),y:Math.trunc(a.y),width:Math.trunc(c),height:Math.trunc(d)};return Object.assign(this._view_rect,u),this.status.update_view_rect(u),u}get_view_center(){const e=this.view_rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}get_view_cube(e=!0){const t=this.view_rect,n=[],r=this.grider.get_intersection_nodes(t,e);for(let e of r)n.push(e),n.push(...e.linkers_from),n.push(...e.linkers_to);return n}set_node_outbox(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_outbox.add(n):this._nodes_outbox.delete(n),this.status.set_node_outbox(n,t))}set_node_visible(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._view_nodes.add(n):this._view_nodes.delete(n))}set_linker_visible(e,t){const n="string"==typeof e?this.get_linker(e):e;n&&(t?this._view_linkers.add(n):this._view_linkers.delete(n))}set_node_editing(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_editing.add(n):this._nodes_editing.delete(n),this.status.set_node_editing(n,t))}set_node_selected(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_selected.add(n):this._nodes_selected.delete(n),this.status.set_node_selected(n,t))}set_line_deleted(e,t){const n="string"==typeof e?this.get_node(e)||this.get_linker(e):e;n&&(t?this._line_delete_selected.add(n):this._line_delete_selected.delete(n),this.status.set_line_deleted(n,t))}is_node_visible(e){return this._view_nodes.has(e)}is_linker_visible(e){return this._view_linkers.has(e)}is_node_editing(e){return this._nodes_editing.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}clear_node_outbox(){this._nodes_outbox.clear()}clear_node_editing(){for(let e of this._nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear(),this.status.clear_node_selected()}clear_line_deleted(){this._line_delete_selected.clear(),this.status.clear_line_deleted()}set_node_dragging(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_dragging.add(n):this._nodes_dragging.delete(n),this.status.set_node_dragging(n,t))}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_node_dragging(){this._nodes_dragging.clear(),this.status.clear_nodes_dragging()}get_farest_node_selected(e){if(0!==this._nodes_selected.size){if(e===S.Keys.left){let e;for(let t of this._nodes_selected){const n=t.map2d.rect;(!e||n.x<e.map2d.pos.x)&&(e=t)}return e}if(e===S.Keys.right){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.x+n.width>r.x+r.width)&&(e=t)}return e}if(e===S.Keys.down){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y+n.height>r.y+r.height)&&(e=t)}return e}if(e===S.Keys.up){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y<r.y)&&(e=t)}return e}}}get_nearest_node(e,t){const n=e.map2d.rect;let r=e,o=1/0;if(t===S.Keys.left)for(let t of this._nodes.values()){if(!t.show||e===t)continue;const i=t.map2d.rect;if(i.x>n.x||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===S.Keys.right)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.x+i.width<n.x+n.width||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===S.Keys.up)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y>n.y||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===S.Keys.down)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y+i.height<n.y+n.height||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}return r}move_select(e){if(0===this._nodes_selected.size)return;const t=this.get_farest_node_selected(e);if(!t)return;const n=this.get_nearest_node(t,e);this.clear_node_selected(),this.set_node_selected(n,!0),n.move_in_fig_view()}reset_matrix(e){e.a,this.matrix2d.a,Object.assign(this.matrix2d,e),this.get_view_rect(),this.status.update_matrix2d(e),this.event.emit_status_update()}translate(e,t){const n=Ji.multiply(this.matrix2d,Ji.get_matrix_translate(e,t));this.reset_matrix(n)}scale_diff(e,t){this.matrix2d.a+=e,this.matrix2d.d+=t}scale_by_point(e,t,n){const{map_scale_max:r,map_scale_min:o}=this.config.data,i=this.matrix2d.a+t;if(i>r||i<o)return;const s=this.view_point_to_fig(e),a=this.untransform_point(s);this.matrix2d.a+=t,this.matrix2d.d+=n;const l=this.transform_point(a),c=s.x-l.x,d=s.y-l.y,u=Ji.multiply(this.matrix2d,Ji.get_matrix_translate(c,d));this.reset_matrix(u)}get_upstream_sum_scale(){return{sx:1,sy:1}}view_point_to_fig(e){const t=this.dom_svg_rect,{sx:n,sy:r}=this.get_upstream_sum_scale();let{x:o,y:i}=e;return{x:Math.trunc((o-t.x)/n),y:Math.trunc((i-t.y)/r)}}view_point_to_real(e){const t=this.view_point_to_fig(e);return this.untransform_point(t)}fig_point_to_view(e){const t=this.dom_svg_rect;return{x:e.x+t.x,y:e.y+t.y}}fig_point_to_real(e){return this.untransform_point(e)}real_point_to_fig(e){return this.transform_point(e)}real_point_to_view(e){const t=this.real_point_to_fig(e);return this.fig_point_to_view(t)}transform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:t*a+r*l+i,y:n*a+o*l+s}}untransform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:Math.trunc((a-i-r*l)/t),y:Math.trunc((l-s-n*a)/o)}}find_layout_root(e){const t=new Set;for(let n of e){n.is_layout_root&&t.add(n)}return t}async layout(){console.time("🍋layout-nodes");const e=[];for(let t of this.nodes.values())t.is_layout_root&&t.attrs.layout&&e.push(t);for(let t of e)t.layout();console.timeEnd("🍋layout-nodes")}check_show(){console.time("🍋动态显示检查"),this.check_show_node(),this.check_show_line(),console.timeEnd("🍋动态显示检查"),this.canvas.refresh()}check_show_node(){this._view_nodes.clear();const e=this._grider.get_viewport_griders();for(let t of e)for(let e of t.nodes)if(!e.env.folded_upstream){this._view_nodes.add(e);e.map2d.sync_rect()}this.status.reset_nodes_view(this._view_nodes)}check_show_line(){this._view_linkers.clear();for(let e of this._view_nodes)e.check_show_line();this.status.reset_linkers_view(this._view_linkers);for(let e of this._view_linkers)e.map2d.update_path()}layout_throttle=$i.Notice.throttle(this.layout.bind(this),10);check_show_throttle=$i.Notice.throttle(this.check_show.bind(this),10);static get meta(){return{type:k.Cubes.map,cubename:"图形笔记",version:1,block:!0,show:!1}}static get_default(){return{id:rd.get_id(),type:k.Cubes.map,versions:Ci.export_versions(),info:{nodes:[],linkers:[],node_from:{},node_to:{}},css:{},attrs:{matrix2d:Ji.get_default()}}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,rd.replace_id(e,t,n.info.nodes,r),rd.replace_id(e,t,n.info.linkers,r),n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}rh([Ti(b.Names.node_add)],oh.prototype,"on_node_add",null),rh([Ti(b.Names.node_remove)],oh.prototype,"on_node_remove",null),rh([Ti(b.Names.linker_add)],oh.prototype,"on_linker_add",null),rh([Ti(b.Names.linker_remove)],oh.prototype,"on_linker_remove",null),rh([Ti(b.Names.node_drag)],oh.prototype,"on_node_drag",null),oh=rh([ki],oh);const ih=["id","data-type"],sh={class:"cube-api-functions"},ah={key:0,class:"cube-api-arguments"},lh={key:1,class:"cube-api-exceptions"},ch=On({__name:"cube-api",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(zo(),Po("div",{class:"cube-api",id:e.cube.id,"data-type":e.cube.type,style:ce(Wt(t).css),ref:"root",onContextmenu:n[0]||(n[0]=t=>Wt(rc)(t,e.cube))},[Bo("div",sh,[n[1]||(n[1]=Bo("div",{class:"legend"},"api",-1)),jo(Ps,{cube:e.cube.functions},null,8,["cube"])]),Wt(t).arguments?(zo(),Po("div",ah,[n[2]||(n[2]=Bo("div",{class:"legend"},"arguments",-1)),jo(Ps,{cube:Wt(t).arguments},null,8,["cube"])])):Go("v-if",!0),Wt(t).exceptions?(zo(),Po("div",lh,[n[3]||(n[3]=Bo("div",{class:"legend"},"exceptions",-1)),jo(Ps,{cube:Wt(t).exceptions},null,8,["cube"])])):Go("v-if",!0)],44,ih))}}),dh=(0,Ls.A)(ch,[["__scopeId","data-v-b83f9c48"]]);class uh extends nd{_status=new ph(this);_functions;_arguments=void 0;_exceptions=void 0;_temp_funcnames=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get functions(){return this._functions}get arguments(){return this._arguments}set arguments(e){this._arguments=e,this.status.update_arguments(e)}get exceptions(){return this._exceptions}set exceptions(e){this._exceptions=e,this.status.update_exceptions(e)}get component(){return dh}get children(){const e=[this._functions];return this.arguments&&e.push(this.arguments),this.exceptions&&e.push(this.exceptions),e}get meta(){return uh.meta}add_arguments(){if(this.arguments)return;const e=Ih.get_default();this.arguments=new Ih(e,this)}add_exceptions(){if(this.exceptions)return;const e=Ih.get_default();this.exceptions=new Ih(e,this)}replace_id(e,t,n={}){return uh.replace_id(this.root,e,t,n)}build_child(e){this._functions=new Ih(e.info.functions,this),e.info.arguments&&(this.arguments=new Ih(e.info.arguments,this)),e.info.exceptions&&(this.exceptions=new Ih(e.info.exceptions,this))}event_bubble(t){const{recorder:n,cube:r,cmds:o,line_bubble:i}=t,a=[e.Names.reset,s.Names.remove,s.Names.reset];t.check_in_line(this.functions)&&o.find(e=>a.includes(e.name))&&this.parse(n);const l=o.find(e=>e.name===s.Names.add);if(r===this.functions&&l)for(let e of l.data){const t=e.data.id,o=r.find_cube(t),i=o?.child_first_line;if(!i)continue;const s=Zd.get_default("",uh.type_funciton),a=Mi.insert_child(i.id,[s],1);n.exe(i,a)}return"pass"}parse(e){const t=[];for(let e of this.functions.items){const{indent:n,data:r}=e,o=r.child_first_line?.children.find(e=>e instanceof Zd);o&&t.push(o)}if(t.length===this._temp_funcnames.length){let e=!0;for(let n=0;n<t.length;n++){if(this._temp_funcnames[n]!==t[n].info){e=!1;break}}if(e)return}this._temp_funcnames=t.map(e=>e.info);const n=new Map;if(this.arguments)for(let e of this.arguments.items){const{indent:t,data:r}=e,o=r.child_first_line?.children.find(e=>e instanceof Zd);o&&n.set(o.info,{item:e,text:o})}const r=new Set;for(let e of t){let t=e.data.info,n=t.indexOf("("),o=t.lastIndexOf(")");if(n>=o)continue;let i=t.slice(n+1,o).split(",").map(e=>e.trim()).filter(e=>e);for(let e of i)r.add(e)}r.size>0&&this.add_arguments();const o=[...n.values()];if(r.size===o.length){for(let[t,n]of $i.Iteration.zip([...r],o))if(t!==n.text.info.trim()){const r=Yd.reset(n.text.id,t);e.exe(n.text,r)}}else{const t=[];for(let e of r){const n=o.find(t=>t.text.info===e);if(n)t.push({indent:n.item.indent,data:Cu.replace_id(this.root,Ci.versions_cube,n.item.data.export())});else{const n=uu.get_default([uh.get_text_argument(e),uh.get_text_argument_type()]);t.push(Ih.get_list_item([n]))}}if(this.arguments){const n=gl.reset(this.arguments.id,t);e.exe(this.arguments,n)}}}gc(){super.base_gc()}export(){const e=this.base_export();return e.info.functions=this.functions.export(),this.arguments&&(e.info.arguments=this.arguments.export()),this.exceptions&&(e.info.exceptions=this.exceptions.export()),e}update_data(e,t){return uh.update_data(e,t)}static update_data(e,t){let n=e[this.meta.type];if(n>this.meta.version)return{data:t,usable:!1};if(!n){const e=t;n=e.info.names||e.info.funcs||e.info.args?1:2}if(n<2){const e=t,n=uh.get_default(e.css||{},e.attrs||{}),r=[],o=[],i=n.info.functions,s=Ih.get_default(),a=e.info;for(let e of a.names.info)if(e.type===k.Cubes.line){const t=e.info.find(e=>e.type===k.Cubes.text);r.push({name:t,type:void 0,desc:[]})}for(let t=0;t<e.info.funcs.length;t++){const n=e.info.funcs[t],o=n.desc.info[0],i=r[t];if(i){if(o.type===k.Cubes.line){const e=o,t=e.info[0];if(t&&t.type===k.Cubes.text&&(i.type=t),o.info.length>1){const t=uu.get_default(e.info.slice(1));i.desc.push(t)}}i.desc.push(...n.desc.info.slice(1))}}for(let t=0;t<e.info.args.length;t++){const n=e.info.args[t],{name:r,desc:i}=n,s=n.desc.info[0],a={name:uh.get_text_argument(r),type:void 0,desc:[]};if(s.type===k.Cubes.line){const e=s,t=e.info[0];if(t&&t.type===k.Cubes.text&&(a.type=t),s.info.length>1){const t=uu.get_default(e.info.slice(1));a.desc.push(t)}}a.desc.push(...n.desc.info.slice(1)),o.push(a)}if(r.length>0){i.info.length=0;for(let e=0;e<r.length;e++){const t=r[e],n=uu.get_default([t.name,Zd.get_default(" ")]),o=t.type||Zd.get_default();Object.assign(o.css,this.type_funciton);const s=o.info.trim();s&&""!==s||(o.info="type"),n.info.push(o);const a=Ih.get_list_item([n,...t.desc]);i.info.push(a)}}if(o.length>0){s.info.length=0;for(let e=0;e<o.length;e++){const t=o[e],n=uu.get_default([t.name,Zd.get_default(" ")]),r=t.type||Zd.get_default();Object.assign(r.css,this.type_argument);const i=r.info.trim();i&&""!==i||(r.info="type"),n.info.push(r);const a=Ih.get_list_item([n,...t.desc]);s.info.push(a)}n.info.arguments=s}return{data:n,usable:!0}}return{data:t,usable:!0}}static get_default(e={},t={}){const n=this.get_line_function();return{id:rd.get_id(),type:k.Cubes.api,info:{functions:Ih.get_default([n])},css:e,attrs:t}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n.info.functions=Ih.replace_id(e,t,n.info.functions,r),n.info.arguments&&(n.info.arguments=Ih.replace_id(e,t,n.info.arguments,r)),n.info.exceptions&&(n.info.exceptions=Ih.replace_id(e,t,n.info.exceptions,r)),n}static get meta(){return{type:k.Cubes.api,version:2,cubename:"Api",block:!0,show:!0}}static get_line_function(e=""){return uu.get_default([uh.get_text_function(e),uh.get_text_function_type()])}static get_text_function_type(){return Zd.get_default("",uh.type_funciton)}static get_text_function(e=""){return Zd.get_default(e,{padding:"0px 6px"})}static get_text_argument(e=""){return Zd.get_default(e,{padding:"0px 6px"})}static get_text_argument_type(){return Zd.get_default("",uh.type_argument)}static get type_argument(){return{padding:"0px 4px",background:"var(--api-arguments-type-bg)",color:"var(--api-arguments-type-color)"}}static get type_funciton(){return{padding:"0px 4px",background:"var(--api-functions-type-bg)",color:"var(--api-functions-type-color)"}}}uh=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([ki],uh);class hh{}class ph extends Ts{_arguments=Vt(void 0);_exceptions=Vt(void 0);constructor(e){super(e)}get arguments(){return this._arguments.value}get exceptions(){return this._exceptions.value}update_arguments(e){return Promise.resolve().then(()=>{this._arguments.value=e})}update_exceptions(e){return Promise.resolve().then(()=>{this._exceptions.value=e})}}function fh(e,t="tail"){const{courier:n,history:r}=e,o=new ad(n),i=[Cu.get_default(),Cu.get_default()],s=_h.insert_row(e.id,t,[i]);o.tell(e,s),r.record(o)}var mh;!function(e){var t;(t=e.Names||(e.Names={})).insert_row="cube-detail-list:insert-row",t.remove_row="cube-detail-list:remove-row",t.change_width_col1="cube-detail-list:change-width-col1"}(mh||(mh={}));class _h{static insert_row(e,t,n){return{id:e,name:mh.Names.insert_row,pos:t,rows:n}}static remove_row(e,t,n=!1){return{id:e,name:mh.Names.remove_row,range:t,reserve:n}}static change_width_col1(e,t){return{id:e,width:t,name:mh.Names.change_width_col1}}}const gh=["id","data-type"],bh=On({__name:"cube-detail-list",props:{cube:{}},setup(e){const{status:t}=e.cube,n=e.cube.root,r=Ln("root"),o=Gt();Jn(()=>{const t=o.value,i=r.value;if(!t)return;const s=new $i.DragDiff(t);let a=e.cube.attrs.width_col1,l=a,c={sx:1,sy:1};s.register_down(()=>{c=e.cube.get_upstream_sum_scale(),a=e.cube.attrs.width_col1}),s.register_move((e,t)=>{n.stats.is_read_mode||(l=Math.round(e/c.sx+a),i?.style.setProperty("--width-col1",l+"px"))}),s.register_up((t,r)=>{if(n.stats.is_read_mode)return;if(a===l)return;const o=e.cube.courier.get_recorder(),i=Math.round(t/c.sx+a);o.tell(e.cube,_h.change_width_col1(e.cube.id,i)),e.cube.history.record(o)}),s.register_cancel(()=>{e.cube.attrs.width=a,t.style.left=a-2+"px"})});_i(()=>({...e.cube.css,"--width-col1":e.cube.attrs.width_col1+"px"}));return(n,i)=>(zo(),Po("div",{class:"cube-detail-list",id:n.cube.id,"data-type":n.cube.type,ref_key:"root",ref:r,style:ce(Wt(t).css),onContextmenu:i[1]||(i[1]=e=>Wt(rc)(e,n.cube))},[(zo(!0),Po(yo,null,ur(Wt(t).children,t=>(zo(),Oo(Ps,{key:t.id,cube:t,onKeydown:n=>function(t,n){t.ctrlKey&&!t.shiftKey&&"Enter"===t.key?(t.stopPropagation(),fh(e.cube,Math.floor(n.index/2)+1)):t.ctrlKey&&t.shiftKey&&"Enter"===t.key&&(t.stopPropagation(),fh(e.cube,Math.floor(n.index/2)))}(n,t)},null,8,["cube","onKeydown"]))),128)),Bo("div",{class:"adder-wrap",onClick:i[0]||(i[0]=()=>Wt(fh)(n.cube))},[...i[2]||(i[2]=[Bo("div",{class:"adder"},null,-1)])]),Bo("div",{class:"adjuster",ref_key:"adjuster",ref:o},null,512)],44,gh))}}),xh=(0,Ls.A)(bh,[["__scopeId","data-v-2f9144d8"]]);class vh extends Ts{_rows=Pt([]);constructor(e){super(e)}get children(){const e=[];for(let t of this.rows)e.push(...t);return e}get cube(){return this._cube}get rows(){return[...this._rows]}get css(){return{...super.css,"--width-col1":this.attrs.width_col1+"px"}}init(){super.init(),this.update_rows()}update_rows(){this._rows.splice(0,this._rows.length,...this.cube.rows)}}function yh(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class wh extends nd{_status=new vh(this);_rows=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get rows(){return[...this._rows]}get component(){return xh}get children(){const e=[];for(let t of this.rows)e.push(...t);return e}get attrs(){return this.data.attrs}get css_col1(){return this.attrs.width_col1||(this.attrs.width_col1=150),{width:this.attrs.width_col1+"px"}}get is_empty(){return!1}get row_count(){return this.rows.length}get col1(){return this.rows.map(e=>e[0])}get col2(){return this.rows.map(e=>e[1])}get meta(){return wh.meta}update_data(e,t){return wh.update_data(e,t)}build_child(e){for(let t of e.info){const e=new Cu(t[0],this),n=new Cu(t[1],this);this._rows.push([e,n])}}copy(e,t){if(e===t)return[this.children[e].export()];const n=Math.floor(e/2),r=Math.floor((t-1)/2),o=wh.get_default();o.info=[];for(let e=n;e<=r;e++){const t=this.rows[e];if(!t)continue;const n=[t[0].export(),t[1].export()];o.info.push(n)}return 0===o.info.length?[]:[o]}gc(){super.base_gc()}export(){const e=this.base_export();e.css=structuredClone(jt(this.css)),e.attrs=structuredClone(jt(this.attrs)),e.info=[];for(let[t,n]of this.rows){const r=t.export(),o=n.export();e.info.push([r,o])}return e}replace_id(e,t,n={}){return wh.replace_id(this.root,e,t,n)}splice_rows(e,t,...n){const r=this._rows.splice(e,t,...n);for(let[e,t]of r)e.gc(),t.gc();return this.status.update_rows(),r}check_delete_edge(e){return 0===e.index%2&&!!e.is_empty}insert_row(e){const{courier:t}=this,{pos:n,rows:r}=e,o=t.get_recorder();o.add_cmd(e);const i=[];for(let[e,t]of r)i.push([new Cu(e,this),new Cu(t,this)]);let s=[0,0];return"tail"===n?(s=[this.row_count,this.row_count+i.length],this._rows.push(...i)):"head"===n?(s=[0,0+i.length],this._rows.unshift(...i)):(s=[n,n+i.length],this.splice_rows(n,0,...i)),this.status.update_rows(),o.add_recover(_h.remove_row(this.id,s)),o}remove_row(e){const{courier:t,cursor:n}=this,{range:r,reserve:o}=e,i=new ad(t);let[s,a]=r;if(s<0&&(s=0),a>this.row_count&&(a=this.row_count),0===s&&a>=this.row_count)if(o){if(this.is_empty)return;i.tell(this,_h.remove_row(this.id,[1,this.child_count]));const e=this.child_first,t=e.next_cube;t&&i.tell(t,Mi.delete_child(t.id,"backward",[0,t.child_count],!0)),e&&i.tell(e,Mi.delete_child(e.id,"backward",[0,e.child_count],!0))}else i.merge(this.remove_self());else{const e=this._rows[s-1]?.[1],t=this._rows[a+1]?.[1],n=this.splice_rows(s,a-s),r=[];for(let[e,t]of n)r.push([e.export(),t.export()]);i.add_recover(_h.insert_row(this.id,s,r)),e?i.tell(e,zi.in_tail(e.id)):t&&i.tell(t,zi.in_head(t.id))}return this.status.update_rows(),i}change_width_col1(e){const{width:t}=e,{courier:n,id:r}=this,o=n.get_recorder();o.add_cmd(e);const i=this.attrs.width_col1;return this.attrs.width_col1=t,this.dom?.style.setProperty("--width-col1",t+"px"),o.add_recover(_h.change_width_col1(r,i)),this.status.update_attrs(),o}delete_cube(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const[l,c]=s,d=Math.floor(l/2),u=Math.floor((c-1)/2),h=_h.remove_row(this.id,[d,u+1],a);return this.remove_row(h)}static get meta(){return{type:k.Cubes.detail_list,version:2,cubename:"清单",block:!0,show:!0}}static get_default(e=[],t={},n={}){const r=0===e.length?[[Cu.get_default(),Cu.get_default()]]:e;return{id:vi(),type:k.Cubes.detail_list,info:r,css:t,attrs:{width_col1:150}}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info)s.push([Cu.replace_id(e,t,o[0],r),Cu.replace_id(e,t,o[1],r)]);return n.info=s,n}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(n<2&&(t.attrs.width_col1||(t.attrs.width_col1=150)),{data:t,usable:!0})}}yh([Ti(mh.Names.insert_row)],wh.prototype,"insert_row",null),yh([Ti(mh.Names.remove_row)],wh.prototype,"remove_row",null),yh([Ti(mh.Names.change_width_col1)],wh.prototype,"change_width_col1",null),yh([Ti(_.Names.cube_delete_child)],wh.prototype,"delete_cube",null),wh=yh([ki],wh);class kh{static reset(e,t){return{id:e,data:t,name:c.Names.reset}}static add(e,t,n){return{id:e,name:c.Names.add,data:t,pos:n}}static remove(e,t){return{id:e,name:c.Names.remove,range:t}}static indent(e,t){return{id:e,name:c.Names.indent,items:t}}static status(e,t,n){return{id:e,name:c.Names.status,index:t,done:n}}}const Sh=["id","data-type"],Ch=["onClick"],Mh=On({__name:"cube-todo",props:{cube:{}},setup(e){const{root:t,status:n}=e.cube,{config:r}=t;return(t,o)=>(zo(),Po("div",{class:"cube-todo",id:t.cube.id,style:ce(Wt(n).css),"data-type":t.cube.type,onContextmenu:o[0]||(o[0]=e=>Wt(rc)(e,t.cube))},[(zo(!0),Po(yo,null,ur(Wt(n).items,(n,o)=>(zo(),Po("div",{key:n.data.id,class:"todoitem",style:ce({"margin-left":n.indent*Wt(r).data.line_indent+"px"})},[Bo("div",{class:fe(["todoitem-status",{active:n.done}]),onClick:()=>function(t,n){const r=kh.status(e.cube.id,n,!t.done),o=e.cube.courier.get_recorder();o.tell(e.cube,r),e.cube.history.record(o)}(n,o)},null,10,Ch),jo(Ps,{class:"todoitem-box",cube:n.data,onKeydown:e=>function(e,t,n,r){const{courier:o,history:i,cursor:s}=t,{indent:a}=n,l=n.data;if(e.ctrlKey&&!e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(a);n.tell(t,kh.add(t.id,[s],r+1)),i.record(n)}else if(e.ctrlKey&&e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(a);n.tell(t,kh.add(t.id,[s],r)),i.record(n)}else if("Tab"!==e.key||e.shiftKey){if("Tab"===e.key&&e.shiftKey){e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!1});a.tell(t,kh.indent(t.id,l)),i.record(a)}else{const e=[{id:l.id,indent:!1}];a.tell(t,kh.indent(t.id,e)),i.record(a)}}}else{e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!0});a.tell(t,kh.indent(t.id,l)),i.record(a)}else{const e=[{id:l.id,indent:!0}];a.tell(t,kh.indent(t.id,e)),i.record(a)}}}(e,t.cube,n,o)},null,8,["cube","onKeydown"])],4))),128))],44,Sh))}}),zh=(0,Ls.A)(Mh,[["__scopeId","data-v-2a0cb5b4"]]);class Nh extends Ts{_items=Rt([]);constructor(e){super(e)}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}get cube(){return this._cube}init(){super.init(),this.update_items()}update_items(e){const t=e||this.cube.items;this._items.length=0;for(let e of t)this._items.push({...e})}update_item(e){const t=this._items.findIndex(t=>t.data.id===e.data.id),n=this._items[t];n&&Object.assign(n,e)}update_indent(e,t){const n=this._items.find(t=>t.data.id===e);n&&(n.indent=t)}}function Ah(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Th extends nd{_status=new Nh(this);_items=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get items(){return[...this._items]}get component(){return zh}get children(){return[...this._items.map(e=>e.data)]}get meta(){return Th.meta}get info(){return this.data.info}update_data(e,t){return Th.update_data(e,t)}build_child(e){this._items.push(...this.build_items(e.info))}build_items(e){const t=[];for(let n of e){let e=new Cu(n.data,this),r={done:n.done,indent:n.indent,data:Ht(e)};t.push(r)}return t}export(){const e=this.base_export();return e.info=[...this.export_items()],e}export_items(){const e=[];for(let t of this._items)e.push({done:t.done,indent:t.indent,data:t.data.export()});return e}gc(){return super.base_gc()}copy(e,t){const n=super.base_export();n.info=[];const r=this._items.slice(e,t);for(let e of r)n.info.push({done:e.done,indent:e.indent,data:e.data.export()});return[n]}splice_items(e,t,...n){const r=this._items.splice(e,t,...n),o=[];for(let e of r)e.data.gc(),o.push({done:e.done,indent:e.indent,data:e.data.export()});return this.status.update_items(),{children:r,data:o}}replace_id(e,t,n={}){return Th.replace_id(this.root,e,t,n)}create(e){const t=[];for(let n of e){let e=new Cu(n.data,this);t.push({done:n.done,indent:n.indent,data:e})}return t}create_item_data(e=0){return{done:!1,indent:e,data:Cu.get_default()}}on_reset(e){const{data:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=kh.reset(this.id,this.export_items());return this.splice_items(0,this._items.length,...this.build_items(t)),r.add_recover(o),r}add_item(e){const{data:t,pos:n}=e,{courier:r,pcube:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.get_valid_index(n),a=[];for(let e of t){const t=new Cu(e.data,this);let n={done:e.done,indent:e.indent,data:Ht(t)};a.push(n)}this.splice_items(s,0,...a);const l=a[a.length-1]?.data;return l&&i.tell(l,zi.in_tail(l.id)),i.add_recover(kh.remove(this.id,[s,s+a.length])),i}remove_item(e){const{range:t}=e,{courier:n,pcube:r}=this,o=n.get_recorder();o.add_cmd(e);const[i,s]=t;if(i<=0&&s>=this.child_count)return this.remove_self();const a=t[1]-t[0],l=this._items[i-1]?.data,c=this._items[s+1]?.data,d=this.splice_items(i,a);return o.add_recover(kh.add(this.id,d.data,i)),l?o.tell(l,zi.in_tail(l.id)):c&&o.tell(c,zi.in_head(c.id)),o}indent_todoitem(e){const{items:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=[];for(let e of t){let t=this._items.find(t=>t.data.id===e.id);t&&(t.indent=e.indent?t.indent+1:t.indent-1,t.indent<0&&(t.indent=0),o.push({id:e.id,indent:!e.indent}),this.status.update_indent(e.id,t.indent))}return r.add_recover(kh.indent(this.id,o)),r}update_status(e){const{courier:t}=this,{index:n,done:r}=e,o=t.get_recorder();o.add_cmd(e);const i=this._items[n];if(i)return i.done=r,this.status.update_item(i),o.add_recover(kh.status(this.id,n,!r)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s}=e;if(!this.is_valid_range(s))return;const a=kh.remove(this.id,s);return this.remove_item(a)}static get_default(){let e=Cu.get_default();return{id:vi(),type:k.Cubes.todo,info:[{done:!1,indent:0,data:e}],attrs:{},css:{}}}static get_todo_item(e,t=!1){const n=rd.pick(e).list;return{done:t,indent:0,data:Cu.get_default(n)}}static get meta(){return{cubename:"待办列表",type:k.Cubes.todo,block:!0,version:1,show:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;for(let o of n.info)o.data=Cu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Ah([Ti(c.Names.reset)],Th.prototype,"on_reset",null),Ah([Ti(c.Names.add)],Th.prototype,"add_item",null),Ah([Ti(c.Names.remove)],Th.prototype,"remove_item",null),Ah([Ti(c.Names.indent)],Th.prototype,"indent_todoitem",null),Ah([Ti(c.Names.status)],Th.prototype,"update_status",null),Ah([Ti(_.Names.cube_delete_child)],Th.prototype,"on_delete_child",null),Th=Ah([ki],Th);const Rh=["id","data-type"],Ph=On({__name:"cube-list",props:{cube:{}},setup(e){const{status:t,config:n}=e.cube;return(e,r)=>(zo(),Po("div",{class:"cube-list",id:e.cube.id,style:ce(Wt(t).css),"data-type":e.cube.type,onContextmenu:r[0]||(r[0]=t=>Wt(rc)(t,e.cube))},[(zo(!0),Po(yo,null,ur(Wt(t).items,(t,o)=>(zo(),Po("div",{key:t.data.id,class:"listitem",style:ce({"margin-left":t.indent*Wt(n).data.line_indent+"px"})},[r[1]||(r[1]=Bo("div",{class:"listitem-symbol"},null,-1)),jo(Ps,{class:"listitem-box",cube:t.data,onKeydown:n=>function(e,t,n,r){const{courier:o,history:i,cursor:s}=t,{data:a,indent:l}=n,c=a;if(e.ctrlKey&&!e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,gl.add(t.id,[s],r+1)),i.record(n)}else if(e.ctrlKey&&e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,gl.add(t.id,[s],r)),i.record(n)}else if("Tab"!==e.key||e.shiftKey){if("Tab"===e.key&&e.shiftKey){e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!1});a.tell(t,gl.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!1}];a.tell(t,gl.indent(t.id,e)),i.record(a)}}}else{e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!0});a.tell(t,gl.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!0}];a.tell(t,gl.indent(t.id,e)),i.record(a)}}}(n,e.cube,t,o)},null,8,["cube","onKeydown"])],4))),128))],44,Rh))}}),Oh=(0,Ls.A)(Ph,[["__scopeId","data-v-35620212"]]);class Eh extends Ts{_items=Rt([]);constructor(e){super(e)}get cube(){return this._cube}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}init(){super.init(),this.update_items()}update_items(e){const t=e||this.cube.items;this._items.splice(0,this._items.length,...t)}update_indent(e,t){const n=this._items.find(t=>t.data.id===e);n&&(n.indent=t)}}function Lh(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Ih extends nd{_status=new Eh(this);_items=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Oh}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}get meta(){return Ih.meta}get info(){return this.data.info}update_data(e,t){return Ih.update_data(e,t)}build_child(e){this._items.push(...this.build_items(e.info))}build_items(e){const t=[];for(let n of e){let e=new Cu(n.data,this),r={indent:n.indent,data:Ht(e)};t.push(r)}return t}export(){const e=this.base_export();return e.info.length=0,e.info.push(...this.export_items()),e}export_items(){const e=[];for(let t of this._items)e.push({indent:t.indent,data:t.data.export()});return e}gc(){return super.base_gc()}copy(e,t){const n=super.base_export();n.info=[];const r=this._items.slice(e,t);for(let e of r)n.info.push({indent:e.indent,data:e.data.export()});return[n]}splice_items(e,t,...n){const r=this._items.splice(e,t,...n),o=[];for(let e of r)e.data.gc(),o.push({indent:e.indent,data:e.data.export()});return this.status.update_items(),{children:r,data:o}}replace_id(e,t,n={}){return Ih.replace_id(this.root,e,t,n)}create(e){const t=[];for(let n of e){let e=new Cu(n.data,this);t.push({indent:n.indent,data:e})}return t}create_item_data(e=0){return{indent:e,data:Cu.get_default()}}on_reset(e){const{data:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=gl.reset(this.id,this.export_items());return this.splice_items(0,this._items.length,...this.build_items(t)),r.add_recover(o),r}add_item(e){const{data:t,pos:n}=e,{courier:r,pcube:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.get_valid_index(n),a=[];for(let e of t){const t=new Cu(e.data,this);let n={indent:e.indent,data:Ht(t)};a.push(n)}this.splice_items(s,0,...a);const l=a[a.length-1]?.data;return l&&i.tell(l,zi.in_tail(l.id)),i.add_recover(gl.remove(this.id,[s,s+a.length])),i}remove_item(e){const{range:t}=e,{courier:n,pcube:r}=this,o=n.get_recorder();o.add_cmd(e);const[i,s]=t;if(0===i&&s>=this.child_count)return this.remove_self();const a=t[1]-t[0],l=this._items[i-1]?.data,c=this._items[s+1]?.data,d=this.splice_items(i,a);return o.add_recover(gl.add(this.id,d.data,i)),l?o.tell(l,zi.in_tail(l.id)):c&&o.tell(c,zi.in_head(c.id)),o}indent_item(e){const{items:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=[];for(let e of t){let t=this._items.find(t=>t.data.id===e.id);t&&(t.indent=e.indent?t.indent+1:t.indent-1,t.indent<0&&(t.indent=0),o.push({id:e.id,indent:!e.indent}),this.status.update_indent(e.id,t.indent))}return r.add_recover(gl.indent(this.id,o)),r}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s}=e;if(!this.is_valid_range(s))return;const a=gl.remove(this.id,s);return this.remove_item(a)}static get_default(e=[]){let t=Cu.get_default(e);return{id:vi(),type:k.Cubes.list,info:[{indent:0,data:t}],attrs:{},css:{}}}static get_list_item(e){return{indent:0,data:Cu.get_default(rd.pick(e).list)}}static get meta(){return{cubename:"列表",type:k.Cubes.list,block:!0,version:1,show:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;for(let o of n.info)o.data=Cu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Lh([Ti(s.Names.reset)],Ih.prototype,"on_reset",null),Lh([Ti(s.Names.add)],Ih.prototype,"add_item",null),Lh([Ti(s.Names.remove)],Ih.prototype,"remove_item",null),Lh([Ti(s.Names.indent)],Ih.prototype,"indent_item",null),Lh([Ti(_.Names.cube_delete_child)],Ih.prototype,"on_delete_child",null),Ih=Lh([ki],Ih);class Dh{static reset(e,t){return{id:e,data:t,name:a.Names.reset}}static add(e,t,n){return{id:e,name:a.Names.add,data:t,pos:n}}static remove(e,t){return{id:e,name:a.Names.remove,range:t}}static indent(e,t){return{id:e,name:a.Names.indent,items:t}}}const Bh=["id","data-type"],jh={class:"listitem-symbol"},Hh=On({__name:"cube-list-ordered",props:{cube:{}},setup(e){const{root:t,config:n,status:r}=e.cube;return(e,t)=>(zo(),Po("div",{class:"cube-list-ordered",id:e.cube.id,style:ce(Wt(r).css),"data-type":e.cube.type,onContextmenu:t[0]||(t[0]=t=>Wt(rc)(t,e.cube))},[(zo(!0),Po(yo,null,ur(Wt(r).items,(t,r)=>(zo(),Po("div",{key:t.data.id,class:"listitem",style:ce({"margin-left":t.indent*Wt(n).data.line_indent+"px"})},[Bo("div",jh,xe(r+1),1),jo(Ps,{class:"listitem-box",cube:t.data,onKeydown:n=>function(e,t,n,r){const{courier:o,history:i,cursor:s}=t,{data:a,indent:l}=n,c=a;if(e.ctrlKey&&!e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,Dh.add(t.id,[s],r+1)),i.record(n)}else if(e.ctrlKey&&e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,Dh.add(t.id,[s],r)),i.record(n)}else if("Tab"!==e.key||e.shiftKey){if("Tab"===e.key&&e.shiftKey){e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!1});a.tell(t,Dh.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!1}];a.tell(t,Dh.indent(t.id,e)),i.record(a)}}}else{e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!0});a.tell(t,Dh.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!0}];a.tell(t,Dh.indent(t.id,e)),i.record(a)}}}(n,e.cube,t,r)},null,8,["cube","onKeydown"])],4))),128))],44,Bh))}}),qh=(0,Ls.A)(Hh,[["__scopeId","data-v-cf6a0580"]]);class Fh extends Ts{_items=Rt([]);constructor(e){super(e)}get cube(){return super.cube}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}init(){super.init(),this.update_items()}update_items(e){const t=e||this.cube.items;this._items.splice(0,this._items.length,...t)}update_indent(e,t){const n=this._items.find(t=>t.data.id===e);n&&(n.indent=t)}}function $h(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Gh extends nd{_status=new Fh(this);_items=Rt([]);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return qh}get children(){return[...this._items.map(e=>e.data)]}get items(){return[...this._items]}get meta(){return Gh.meta}get info(){return this.data.info}update_data(e,t){return Gh.update_data(e,t)}build_child(e){this._items.push(...this.build_items(e.info))}build_items(e){const t=[];for(let n of e){let e=new Cu(n.data,this),r={indent:n.indent,data:Ht(e)};t.push(r)}return t}export(){const e=super.base_export();e.info=[];for(let t of this._items)e.info.push({indent:t.indent,data:t.data.export()});return e}export_items(){const e=[];for(let t of this._items)e.push({indent:t.indent,data:t.data.export()});return e}gc(){return super.base_gc()}copy(e,t){const n=super.base_export();n.info=[];const r=this._items.slice(e,t);for(let e of r)n.info.push({indent:e.indent,data:e.data.export()});return[n]}splice_items(e,t,...n){const r=this._items.splice(e,t,...n),o=[];for(let e of r)e.data.gc(),o.push({indent:e.indent,data:e.data.export()});return this.status.update_items(),{children:r,data:o}}replace_id(e,t,n={}){return Gh.replace_id(this.root,e,t,n)}create(e){const t=[];for(let n of e){let e=new Cu(n.data,this);t.push({indent:n.indent,data:e})}return t}create_item_data(e=0){return{indent:e,data:Cu.get_default()}}on_reset(e){const{data:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=Dh.reset(this.id,this.export_items());return this.splice_items(0,this._items.length,...this.build_items(t)),r.add_recover(o),r}add_item(e){const{data:t,pos:n}=e,{courier:r,pcube:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.get_valid_index(n),a=[];for(let e of t){const t=new Cu(e.data,this);let n={indent:e.indent,data:Ht(t)};a.push(n)}this.splice_items(s,0,...a);const l=a[a.length-1]?.data;return l&&i.tell(l,zi.in_tail(l.id)),i.add_recover(Dh.remove(this.id,[s,s+a.length])),i}remove_item(e){const{range:t}=e,{courier:n,pcube:r}=this,o=n.get_recorder();o.add_cmd(e);const[i,s]=t;if(0===i&&s>=this.child_count)return this.remove_self();const a=t[1]-t[0],l=this._items[i-1]?.data,c=this._items[s+1]?.data,d=this.splice_items(i,a);return o.add_recover(Dh.add(this.id,d.data,i)),l?o.tell(l,zi.in_tail(l.id)):c&&o.tell(c,zi.in_head(c.id)),o}indent_item(e){const{items:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=[];for(let e of t){let t=this._items.find(t=>t.data.id===e.id);t&&(t.indent=e.indent?t.indent+1:t.indent-1,t.indent<0&&(t.indent=0),o.push({id:e.id,indent:!e.indent}),this.status.update_indent(e.id,t.indent))}return r.add_recover(Dh.indent(this.id,o)),r}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s}=e;if(!this.is_valid_range(s))return;const a=Dh.remove(this.id,s);return this.remove_item(a)}static get_default(){let e=Cu.get_default();return{id:rd.get_id(),type:k.Cubes.list_ordered,info:[{indent:0,data:e}],attrs:{},css:{}}}static get_list_item(e){return{indent:0,data:Cu.get_default(rd.pick(e).list)}}static get meta(){return{cubename:"有序列表",type:k.Cubes.list_ordered,block:!0,version:1,show:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i;for(let o of n.info)o.data=Cu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}$h([Ti(a.Names.reset)],Gh.prototype,"on_reset",null),$h([Ti(a.Names.add)],Gh.prototype,"add_item",null),$h([Ti(a.Names.remove)],Gh.prototype,"remove_item",null),$h([Ti(a.Names.indent)],Gh.prototype,"indent_item",null),$h([Ti(_.Names.cube_delete_child)],Gh.prototype,"on_delete_child",null),Gh=$h([ki],Gh);class Vh{static update(e,t,n){return{id:e,name:l.Names.code_update,code:n,tabid:t}}static add(e,t,n=!0){return{id:e,name:l.Names.code_add,item:jt(t),focus:n}}static remove(e,t){return{id:e,name:l.Names.code_remove,tabid:t}}static rename(e,t,n){return{id:e,name:l.Names.code_rename,tabid:t,filename:n}}static change_lang(e,t,n){return{id:e,name:l.Names.change_lang,tabid:t,lang:n}}static change_active(e,t){return{id:e,name:l.Names.change_active,tabid:t}}static change_theme(e,t,n){return{id:e,tabid:t,theme:n,name:l.Names.change_theme}}}const Uh=[{id:"abap",name:"ABAP",import:()=>o.e(8617).then(o.bind(o,8617))},{id:"actionscript-3",name:"ActionScript",import:()=>o.e(3516).then(o.bind(o,3516))},{id:"ada",name:"Ada",import:()=>o.e(7561).then(o.bind(o,7561))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(535)]).then(o.bind(o,535))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(7611),o.e(535),o.e(4886)]).then(o.bind(o,4886))},{id:"apache",name:"Apache Conf",import:()=>o.e(7625).then(o.bind(o,7625))},{id:"apex",name:"Apex",import:()=>o.e(9819).then(o.bind(o,9819))},{id:"apl",name:"APL",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(7504)]).then(o.bind(o,7504))},{id:"applescript",name:"AppleScript",import:()=>o.e(2108).then(o.bind(o,2108))},{id:"ara",name:"Ara",import:()=>o.e(5611).then(o.bind(o,5611))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>o.e(4354).then(o.bind(o,4354))},{id:"asm",name:"Assembly",import:()=>o.e(6324).then(o.bind(o,6324))},{id:"astro",name:"Astro",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4714),o.e(6940),o.e(4408)]).then(o.bind(o,4408))},{id:"awk",name:"AWK",import:()=>o.e(4862).then(o.bind(o,4862))},{id:"ballerina",name:"Ballerina",import:()=>o.e(5141).then(o.bind(o,5141))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>o.e(2068).then(o.bind(o,2068))},{id:"beancount",name:"Beancount",import:()=>o.e(5026).then(o.bind(o,5026))},{id:"berry",name:"Berry",aliases:["be"],import:()=>o.e(8753).then(o.bind(o,8753))},{id:"bibtex",name:"BibTeX",import:()=>o.e(4009).then(o.bind(o,4009))},{id:"bicep",name:"Bicep",import:()=>o.e(7688).then(o.bind(o,7688))},{id:"blade",name:"Blade",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(1230),o.e(5283)]).then(o.bind(o,5283))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>o.e(5314).then(o.bind(o,5314))},{id:"c",name:"C",import:()=>o.e(5814).then(o.bind(o,5814))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>o.e(5728).then(o.bind(o,5728))},{id:"cairo",name:"Cairo",import:()=>Promise.all([o.e(2473),o.e(8237)]).then(o.bind(o,8237))},{id:"clarity",name:"Clarity",import:()=>o.e(6677).then(o.bind(o,6677))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>o.e(7681).then(o.bind(o,7681))},{id:"cmake",name:"CMake",import:()=>o.e(5936).then(o.bind(o,5936))},{id:"cobol",name:"COBOL",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(780)]).then(o.bind(o,780))},{id:"codeowners",name:"CODEOWNERS",import:()=>o.e(9096).then(o.bind(o,9096))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>o.e(6283).then(o.bind(o,6283))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([o.e(7258),o.e(6563)]).then(o.bind(o,6563))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>o.e(489).then(o.bind(o,489))},{id:"coq",name:"Coq",import:()=>o.e(8418).then(o.bind(o,8418))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([o.e(1230),o.e(5814),o.e(4914)]).then(o.bind(o,4914))},{id:"crystal",name:"Crystal",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(1230),o.e(5814),o.e(3894),o.e(3403)]).then(o.bind(o,3403))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>o.e(2354).then(o.bind(o,2354))},{id:"css",name:"CSS",import:()=>o.e(1708).then(o.bind(o,1708))},{id:"csv",name:"CSV",import:()=>o.e(8849).then(o.bind(o,1230))},{id:"cue",name:"CUE",import:()=>o.e(172).then(o.bind(o,172))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>o.e(9806).then(o.bind(o,9806))},{id:"d",name:"D",import:()=>o.e(5177).then(o.bind(o,5177))},{id:"dart",name:"Dart",import:()=>o.e(9728).then(o.bind(o,9728))},{id:"dax",name:"DAX",import:()=>o.e(874).then(o.bind(o,874))},{id:"desktop",name:"Desktop",import:()=>o.e(6173).then(o.bind(o,6173))},{id:"diff",name:"Diff",import:()=>o.e(7670).then(o.bind(o,7670))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>o.e(415).then(o.bind(o,415))},{id:"dotenv",name:"dotEnv",import:()=>o.e(2173).then(o.bind(o,2173))},{id:"dream-maker",name:"Dream Maker",import:()=>o.e(3227).then(o.bind(o,3227))},{id:"edge",name:"Edge",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(3052)]).then(o.bind(o,3052))},{id:"elixir",name:"Elixir",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(3330)]).then(o.bind(o,3330))},{id:"elm",name:"Elm",import:()=>Promise.all([o.e(5814),o.e(9641)]).then(o.bind(o,9641))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>o.e(2505).then(o.bind(o,2505))},{id:"erb",name:"ERB",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(4007),o.e(9524)]).then(o.bind(o,9524))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([o.e(7900),o.e(2266)]).then(o.bind(o,2266))},{id:"fennel",name:"Fennel",import:()=>o.e(1631).then(o.bind(o,1631))},{id:"fish",name:"Fish",import:()=>o.e(9661).then(o.bind(o,9661))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>o.e(9077).then(o.bind(o,9077))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([o.e(8553),o.e(7549)]).then(o.bind(o,7549))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>o.e(8553).then(o.bind(o,8553))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([o.e(7900),o.e(9689)]).then(o.bind(o,9689))},{id:"gdresource",name:"GDResource",import:()=>o.e(7434).then(o.bind(o,7434))},{id:"gdscript",name:"GDScript",import:()=>o.e(4311).then(o.bind(o,4311))},{id:"gdshader",name:"GDShader",import:()=>o.e(6405).then(o.bind(o,6405))},{id:"genie",name:"Genie",import:()=>o.e(9017).then(o.bind(o,9017))},{id:"gherkin",name:"Gherkin",import:()=>o.e(4451).then(o.bind(o,4451))},{id:"git-commit",name:"Git Commit Message",import:()=>o.e(2861).then(o.bind(o,2861))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([o.e(3894),o.e(638)]).then(o.bind(o,638))},{id:"gleam",name:"Gleam",import:()=>o.e(8201).then(o.bind(o,8201))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(8700)]).then(o.bind(o,8700))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(5050)]).then(o.bind(o,5050))},{id:"glsl",name:"GLSL",import:()=>Promise.all([o.e(5814),o.e(2723)]).then(o.bind(o,2723))},{id:"gnuplot",name:"Gnuplot",import:()=>o.e(396).then(o.bind(o,396))},{id:"go",name:"Go",import:()=>o.e(3941).then(o.bind(o,3941))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([o.e(7258),o.e(4714),o.e(6940),o.e(6262),o.e(3170)]).then(o.bind(o,3170))},{id:"groovy",name:"Groovy",import:()=>o.e(1037).then(o.bind(o,1037))},{id:"hack",name:"Hack",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(1230),o.e(6356)]).then(o.bind(o,6356))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(3949)]).then(o.bind(o,3949))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(1655)]).then(o.bind(o,1655))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>o.e(9045).then(o.bind(o,9045))},{id:"haxe",name:"Haxe",import:()=>o.e(8107).then(o.bind(o,8107))},{id:"hcl",name:"HashiCorp HCL",import:()=>o.e(6124).then(o.bind(o,6124))},{id:"hjson",name:"Hjson",import:()=>o.e(5203).then(o.bind(o,5203))},{id:"hlsl",name:"HLSL",import:()=>o.e(4598).then(o.bind(o,4598))},{id:"html",name:"HTML",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940)]).then(o.bind(o,4940))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(914)]).then(o.bind(o,914))},{id:"http",name:"HTTP",import:()=>Promise.all([o.e(7258),o.e(4714),o.e(6967),o.e(3894),o.e(6940),o.e(6262),o.e(3170),o.e(5119)]).then(o.bind(o,5119))},{id:"hxml",name:"HXML",import:()=>o.e(8320).then(o.bind(o,8320))},{id:"hy",name:"Hy",import:()=>o.e(7470).then(o.bind(o,7470))},{id:"imba",name:"Imba",import:()=>o.e(3702).then(o.bind(o,3702))},{id:"ini",name:"INI",aliases:["properties"],import:()=>o.e(6343).then(o.bind(o,6343))},{id:"java",name:"Java",import:()=>o.e(6967).then(o.bind(o,6967))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>o.e(7258).then(o.bind(o,7258))},{id:"jinja",name:"Jinja",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(3837)]).then(o.bind(o,3837))},{id:"jison",name:"Jison",import:()=>Promise.all([o.e(7258),o.e(5536)]).then(o.bind(o,5536))},{id:"json",name:"JSON",import:()=>o.e(5709).then(o.bind(o,5709))},{id:"json5",name:"JSON5",import:()=>o.e(6010).then(o.bind(o,6010))},{id:"jsonc",name:"JSON with Comments",import:()=>o.e(212).then(o.bind(o,212))},{id:"jsonl",name:"JSON Lines",import:()=>o.e(4843).then(o.bind(o,4843))},{id:"jsonnet",name:"Jsonnet",import:()=>o.e(4962).then(o.bind(o,4962))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>o.e(7922).then(o.bind(o,7922))},{id:"jsx",name:"JSX",import:()=>o.e(6262).then(o.bind(o,6262))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([o.e(7258),o.e(1230),o.e(5814),o.e(4914),o.e(2473),o.e(9983),o.e(9910)]).then(o.bind(o,9910))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>o.e(2660).then(o.bind(o,2660))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>o.e(6297).then(o.bind(o,6297))},{id:"latex",name:"LaTeX",import:()=>Promise.all([o.e(9983),o.e(7817)]).then(o.bind(o,7817))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>o.e(8003).then(o.bind(o,8003))},{id:"less",name:"Less",import:()=>o.e(6964).then(o.bind(o,6964))},{id:"liquid",name:"Liquid",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(327)]).then(o.bind(o,327))},{id:"llvm",name:"LLVM IR",import:()=>o.e(3972).then(o.bind(o,3972))},{id:"log",name:"Log file",import:()=>o.e(3247).then(o.bind(o,3247))},{id:"logo",name:"Logo",import:()=>o.e(9730).then(o.bind(o,9730))},{id:"lua",name:"Lua",import:()=>Promise.all([o.e(5814),o.e(4199)]).then(o.bind(o,4199))},{id:"luau",name:"Luau",import:()=>o.e(5744).then(o.bind(o,5744))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>o.e(1757).then(o.bind(o,1757))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>o.e(7900).then(o.bind(o,7900))},{id:"marko",name:"Marko",import:()=>Promise.all([o.e(1708),o.e(4714),o.e(7611),o.e(6964),o.e(9175)]).then(o.bind(o,9175))},{id:"matlab",name:"MATLAB",import:()=>o.e(2492).then(o.bind(o,2492))},{id:"mdc",name:"MDC",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(7900),o.e(2215)]).then(o.bind(o,2215))},{id:"mdx",name:"MDX",import:()=>o.e(4452).then(o.bind(o,4452))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>o.e(2860).then(o.bind(o,2860))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>o.e(8499).then(o.bind(o,8499))},{id:"mojo",name:"Mojo",import:()=>o.e(9526).then(o.bind(o,9526))},{id:"move",name:"Move",import:()=>o.e(9104).then(o.bind(o,9104))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>o.e(6239).then(o.bind(o,6239))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>o.e(9876).then(o.bind(o,9876))},{id:"nginx",name:"Nginx",import:()=>Promise.all([o.e(5814),o.e(697)]).then(o.bind(o,697))},{id:"nim",name:"Nim",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(5814),o.e(7900),o.e(4697)]).then(o.bind(o,4697))},{id:"nix",name:"Nix",import:()=>o.e(8212).then(o.bind(o,8212))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>o.e(7374).then(o.bind(o,7374))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>o.e(7148).then(o.bind(o,7148))},{id:"objective-cpp",name:"Objective-C++",import:()=>o.e(9788).then(o.bind(o,9788))},{id:"ocaml",name:"OCaml",import:()=>o.e(9057).then(o.bind(o,9057))},{id:"pascal",name:"Pascal",import:()=>o.e(9079).then(o.bind(o,9079))},{id:"perl",name:"Perl",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(1230),o.e(9984)]).then(o.bind(o,9984))},{id:"php",name:"PHP",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(1230),o.e(7765),o.e(7966)]).then(o.bind(o,7765))},{id:"plsql",name:"PL/SQL",import:()=>o.e(8389).then(o.bind(o,8389))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>o.e(4520).then(o.bind(o,4520))},{id:"polar",name:"Polar",import:()=>o.e(9845).then(o.bind(o,9845))},{id:"postcss",name:"PostCSS",import:()=>o.e(9270).then(o.bind(o,9270))},{id:"powerquery",name:"PowerQuery",import:()=>o.e(454).then(o.bind(o,454))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>o.e(1476).then(o.bind(o,1476))},{id:"prisma",name:"Prisma",import:()=>o.e(5731).then(o.bind(o,5731))},{id:"prolog",name:"Prolog",import:()=>o.e(9206).then(o.bind(o,9206))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>o.e(5891).then(o.bind(o,5891))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6757)]).then(o.bind(o,6757))},{id:"puppet",name:"Puppet",import:()=>o.e(3593).then(o.bind(o,3593))},{id:"purescript",name:"PureScript",import:()=>o.e(9904).then(o.bind(o,9904))},{id:"python",name:"Python",aliases:["py"],import:()=>o.e(2473).then(o.bind(o,2473))},{id:"qml",name:"QML",import:()=>Promise.all([o.e(7258),o.e(1803)]).then(o.bind(o,1803))},{id:"qmldir",name:"QML Directory",import:()=>o.e(4292).then(o.bind(o,4292))},{id:"qss",name:"Qt Style Sheets",import:()=>o.e(402).then(o.bind(o,402))},{id:"r",name:"R",import:()=>o.e(9983).then(o.bind(o,9983))},{id:"racket",name:"Racket",import:()=>o.e(9281).then(o.bind(o,9281))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>o.e(9780).then(o.bind(o,9780))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(2354),o.e(245)]).then(o.bind(o,245))},{id:"reg",name:"Windows Registry Script",import:()=>o.e(5827).then(o.bind(o,5827))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>o.e(3124).then(o.bind(o,3124))},{id:"rel",name:"Rel",import:()=>o.e(3043).then(o.bind(o,5424))},{id:"riscv",name:"RISC-V",import:()=>o.e(8684).then(o.bind(o,8684))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(2473),o.e(4007),o.e(8234)]).then(o.bind(o,8234))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(4007)]).then(o.bind(o,4007))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>o.e(7145).then(o.bind(o,7145))},{id:"sas",name:"SAS",import:()=>Promise.all([o.e(1230),o.e(9478)]).then(o.bind(o,9478))},{id:"sass",name:"Sass",import:()=>o.e(8709).then(o.bind(o,8709))},{id:"scala",name:"Scala",import:()=>o.e(3947).then(o.bind(o,3947))},{id:"scheme",name:"Scheme",import:()=>o.e(9982).then(o.bind(o,9982))},{id:"scss",name:"SCSS",import:()=>Promise.all([o.e(1708),o.e(7611)]).then(o.bind(o,7611))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>o.e(1624).then(o.bind(o,1624))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>o.e(8249).then(o.bind(o,8249))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>o.e(3894).then(o.bind(o,3894))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([o.e(3894),o.e(9965)]).then(o.bind(o,9965))},{id:"smalltalk",name:"Smalltalk",import:()=>o.e(1066).then(o.bind(o,1066))},{id:"solidity",name:"Solidity",import:()=>o.e(4780).then(o.bind(o,4780))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(7642)]).then(o.bind(o,7642))},{id:"sparql",name:"SPARQL",import:()=>o.e(4108).then(o.bind(o,4108))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>o.e(6514).then(o.bind(o,6514))},{id:"sql",name:"SQL",import:()=>o.e(1230).then(o.bind(o,8849))},{id:"ssh-config",name:"SSH Config",import:()=>o.e(3874).then(o.bind(o,3874))},{id:"stata",name:"Stata",import:()=>Promise.all([o.e(1230),o.e(542)]).then(o.bind(o,542))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>o.e(41).then(o.bind(o,41))},{id:"svelte",name:"Svelte",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4714),o.e(3454)]).then(o.bind(o,3454))},{id:"swift",name:"Swift",import:()=>o.e(8436).then(o.bind(o,8436))},{id:"system-verilog",name:"SystemVerilog",import:()=>o.e(6577).then(o.bind(o,6577))},{id:"systemd",name:"Systemd Units",import:()=>o.e(16).then(o.bind(o,16))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>o.e(4660).then(o.bind(o,4660))},{id:"tasl",name:"Tasl",import:()=>o.e(1839).then(o.bind(o,1839))},{id:"tcl",name:"Tcl",import:()=>o.e(7328).then(o.bind(o,7328))},{id:"templ",name:"Templ",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(3941),o.e(7095)]).then(o.bind(o,7095))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>o.e(4385).then(o.bind(o,4385))},{id:"tex",name:"TeX",import:()=>Promise.all([o.e(9983),o.e(9198)]).then(o.bind(o,9198))},{id:"toml",name:"TOML",import:()=>o.e(5363).then(o.bind(o,5363))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(9556)]).then(o.bind(o,9556))},{id:"tsv",name:"TSV",import:()=>o.e(6045).then(o.bind(o,8426))},{id:"tsx",name:"TSX",import:()=>o.e(6940).then(o.bind(o,6940))},{id:"turtle",name:"Turtle",import:()=>o.e(4877).then(o.bind(o,4877))},{id:"twig",name:"Twig",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(2473),o.e(7611),o.e(4007),o.e(7765),o.e(4236)]).then(o.bind(o,4236))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>o.e(4714).then(o.bind(o,4714))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>o.e(794).then(o.bind(o,794))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>o.e(8711).then(o.bind(o,8711))},{id:"v",name:"V",import:()=>o.e(5443).then(o.bind(o,5443))},{id:"vala",name:"Vala",import:()=>o.e(7141).then(o.bind(o,7141))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>o.e(8235).then(o.bind(o,8235))},{id:"verilog",name:"Verilog",import:()=>o.e(4283).then(o.bind(o,4283))},{id:"vhdl",name:"VHDL",import:()=>o.e(5521).then(o.bind(o,5521))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>o.e(7567).then(o.bind(o,7567))},{id:"vue",name:"Vue",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(1432)]).then(o.bind(o,1432))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(1432),o.e(7789)]).then(o.bind(o,7789))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(7611),o.e(6964),o.e(1432),o.e(41),o.e(5954)]).then(o.bind(o,5954))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>o.e(845).then(o.bind(o,845))},{id:"wasm",name:"WebAssembly",import:()=>o.e(7615).then(o.bind(o,7615))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>o.e(8393).then(o.bind(o,8393))},{id:"wgsl",name:"WGSL",import:()=>o.e(5884).then(o.bind(o,5884))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>o.e(2062).then(o.bind(o,2062))},{id:"wit",name:"WebAssembly Interface Types",import:()=>o.e(6957).then(o.bind(o,6957))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>o.e(5589).then(o.bind(o,5589))},{id:"xml",name:"XML",import:()=>Promise.all([o.e(6967),o.e(5585)]).then(o.bind(o,7966))},{id:"xsl",name:"XSL",import:()=>Promise.all([o.e(6967),o.e(5628)]).then(o.bind(o,5628))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>o.e(4546).then(o.bind(o,4546))},{id:"zenscript",name:"ZenScript",import:()=>o.e(5099).then(o.bind(o,5099))},{id:"zig",name:"Zig",import:()=>o.e(3279).then(o.bind(o,3279))}],Kh=Object.fromEntries(Uh.map(e=>[e.id,e.import])),Wh=Object.fromEntries(Uh.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Yh={...Kh,...Wh},Xh=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>o.e(2691).then(o.bind(o,2691))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>o.e(7768).then(o.bind(o,7768))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>o.e(7927).then(o.bind(o,7927))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>o.e(1216).then(o.bind(o,1216))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>o.e(7788).then(o.bind(o,7788))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>o.e(2071).then(o.bind(o,2071))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>o.e(9692).then(o.bind(o,9692))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>o.e(3032).then(o.bind(o,3032))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>o.e(8485).then(o.bind(o,8485))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>o.e(284).then(o.bind(o,284))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>o.e(1545).then(o.bind(o,1545))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>o.e(6083).then(o.bind(o,6083))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>o.e(5647).then(o.bind(o,5647))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>o.e(9179).then(o.bind(o,9179))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>o.e(9976).then(o.bind(o,9976))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>o.e(9831).then(o.bind(o,9831))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>o.e(9809).then(o.bind(o,9809))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>o.e(9681).then(o.bind(o,9681))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>o.e(1425).then(o.bind(o,1425))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>o.e(6865).then(o.bind(o,6865))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>o.e(7824).then(o.bind(o,7824))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>o.e(3646).then(o.bind(o,3646))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>o.e(2419).then(o.bind(o,2419))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>o.e(9225).then(o.bind(o,9225))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>o.e(4112).then(o.bind(o,4112))},{id:"houston",displayName:"Houston",type:"dark",import:()=>o.e(8931).then(o.bind(o,8931))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>o.e(2184).then(o.bind(o,2184))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>o.e(2142).then(o.bind(o,2142))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>o.e(5638).then(o.bind(o,5638))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>o.e(7831).then(o.bind(o,7831))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>o.e(8426).then(o.bind(o,6045))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>o.e(3492).then(o.bind(o,3492))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>o.e(3720).then(o.bind(o,3720))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>o.e(9294).then(o.bind(o,9294))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>o.e(4081).then(o.bind(o,4081))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>o.e(1729).then(o.bind(o,1729))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>o.e(4614).then(o.bind(o,4614))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>o.e(2934).then(o.bind(o,2934))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>o.e(2535).then(o.bind(o,2535))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>o.e(4214).then(o.bind(o,4214))},{id:"nord",displayName:"Nord",type:"dark",import:()=>o.e(4552).then(o.bind(o,4552))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>o.e(6736).then(o.bind(o,6736))},{id:"one-light",displayName:"One Light",type:"light",import:()=>o.e(3906).then(o.bind(o,3906))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>o.e(4445).then(o.bind(o,4445))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>o.e(4465).then(o.bind(o,4465))},{id:"red",displayName:"Red",type:"dark",import:()=>o.e(6980).then(o.bind(o,6980))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>o.e(753).then(o.bind(o,753))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>o.e(5424).then(o.bind(o,3043))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>o.e(8093).then(o.bind(o,8093))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>o.e(4838).then(o.bind(o,4838))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>o.e(5601).then(o.bind(o,5601))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>o.e(1857).then(o.bind(o,1857))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>o.e(7217).then(o.bind(o,7217))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>o.e(1931).then(o.bind(o,1931))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>o.e(321).then(o.bind(o,321))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>o.e(5034).then(o.bind(o,5034))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>o.e(224).then(o.bind(o,224))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>o.e(5542).then(o.bind(o,5542))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>o.e(6517).then(o.bind(o,6517))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>o.e(5143).then(o.bind(o,5143))}],Jh=Object.fromEntries(Xh.map(e=>[e.id,e.import]));class Zh extends Error{constructor(e){super(e),this.name="ShikiError"}}function Qh(e){return Array.isArray(e)?function(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Qh(e[n]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let n in e)t[n]=Qh(e[n]);return t}(e):e}function ep(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function tp(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?tp(e.substring(0,e.length-1)):e.substr(1+~t)}var np=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,rp=class{static hasCaptures(e){return null!==e&&(np.lastIndex=0,np.test(e))}static replaceCaptures(e,t,n){return e.replace(np,(e,r,o,i)=>{let s=n[parseInt(r||o,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(i){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function op(e,t){return e<t?-1:e>t?1:0}function ip(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=op(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function sp(e){return!!/^#[0-9a-f]{6}$/i.test(e)||(!!/^#[0-9a-f]{8}$/i.test(e)||(!!/^#[0-9a-f]{3}$/i.test(e)||!!/^#[0-9a-f]{4}$/i.test(e)))}function ap(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var lp=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},cp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,o=t.length;e<o;e++){let o,i=t[e];if(!i.settings)continue;if("string"==typeof i.scope){let e=i.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),o=e.split(",")}else o=Array.isArray(i.scope)?i.scope:[""];let s=-1;if("string"==typeof i.settings.fontStyle){s=0;let e=i.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}}let a=null;"string"==typeof i.settings.foreground&&sp(i.settings.foreground)&&(a=i.settings.foreground);let l=null;"string"==typeof i.settings.background&&sp(i.settings.background)&&(l=i.settings.background);for(let t=0,i=o.length;t<i;t++){let i=o[t].trim().split(" "),c=i[i.length-1],d=null;i.length>1&&(d=i.slice(0,i.length-1),d.reverse()),n[r++]=new pp(c,d,e,s,a,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=op(e.scope,t.scope);return 0!==n?n:(n=ip(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let i=new mp(t),s=new hp(n,i.getId(r),i.getId(o)),a=new bp(new gp(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];a.insert(0,n.scope,n.parentScopes,n.fontStyle,i.getId(n.foreground),i.getId(n.background))}return new cp(i,s,a)}(e,t)}_cachedMatchRoot=new lp(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!up(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes));return n?new hp(n.fontStyle,n.foreground,n.background):null}},dp=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(const r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function up(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var hp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};var pp=class{constructor(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i}},fp=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(fp||{});var mp=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},_p=Object.freeze([]),gp=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,o){this.scopeDepth=e,this.parentScopes=t||_p,this.fontStyle=n,this.foreground=r,this.background=o}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},bp=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){const o=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==o)return o;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,o,i,s){if(""===n)return void this._doInsertHere(t,r,o,i,s);let a,l,c,d=n.indexOf(".");-1===d?(a=n,l=""):(a=n.substring(0,d),l=n.substring(d+1)),this._children.hasOwnProperty(a)?c=this._children[a]:(c=new e(this._mainRule.clone(),gp.cloneArr(this._rulesWithParentScopes)),this._children[a]=c),c.insert(t+1,l,r,o,i,s)}_doInsertHere(e,t,n,r,o){if(null!==t){for(let i=0,s=this._rulesWithParentScopes.length;i<s;i++){let s=this._rulesWithParentScopes[i];if(0===ip(s.parentScopes,t))return void s.acceptOverwrite(e,n,r,o)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new gp(e,t,n,r,o))}else this._mainRule.acceptOverwrite(e,n,r,o)}},xp=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const n=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),i=e.getForeground(t),s=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,background:s})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,r,o,i,s,a){let l=e.getLanguageId(t),c=e.getTokenType(t),d=e.containsBalancedBrackets(t)?1:0,u=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=r),null!==o&&(d=o?1:0),-1!==i&&(u=i),0!==s&&(h=s),0!==a&&(p=a),(l|c<<8|d<<10|u<<11|h<<15|p<<24)>>>0}};function vp(e){return e}function yp(e,t){const n=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}(e);let o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=s();if(n.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return n;function i(){if("-"===o){o=r.next();const e=i();return t=>!!e&&!e(t)}if("("===o){o=r.next();const e=function(){const e=[];let t=s();for(;t&&(e.push(t),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);t=s()}return t=>e.some(e=>e(t))}();return")"===o&&(o=r.next()),e}if(wp(o)){const e=[];do{e.push(o),o=r.next()}while(wp(o));return n=>t(e,n)}return null}function s(){const e=[];let t=i();for(;t;)e.push(t),t=i();return t=>e.every(e=>e(t))}}function wp(e){return!!e&&!!e.match(/[\w\.:]+/)}function kp(e){"function"==typeof e.dispose&&e.dispose()}var Sp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Cp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Mp=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},zp=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Sp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Mp;for(const n of e)Np(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof Sp){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Np(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof Sp?Tp({baseGrammar:i,selfGrammar:o},r):Ap(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const s=n.injections(e.scopeName);if(s)for(const e of s)r.add(new Sp(e))}function Ap(e,t,n){if(t.repository&&t.repository[e]){Rp([t.repository[e]],t,n)}}function Tp(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Rp(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Rp(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Rp(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const e=r.repository?ep({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Rp(r.patterns,{...t,repository:e},n);const o=r.include;if(!o)continue;const i=Dp(o);switch(i.kind){case 0:Tp({...t,selfGrammar:t.baseGrammar},n);break;case 1:Tp(t,n);break;case 2:Ap(i.ruleName,{...t,repository:e},n);break;case 3:case 4:const r=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===i.kind?Ap(i.ruleName,o,n):Tp(o,n)}else 4===i.kind?n.add(new Cp(i.scopeName,i.ruleName)):n.add(new Sp(i.scopeName))}}}var Pp=class{kind=0},Op=class{kind=1},Ep=class{constructor(e){this.ruleName=e}kind=2},Lp=class{constructor(e){this.scopeName=e}kind=3},Ip=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Dp(e){if("$base"===e)return new Pp;if("$self"===e)return new Op;const t=e.indexOf("#");if(-1===t)return new Lp(e);if(0===t)return new Ep(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new Ip(n,r)}}var Bp=/\\(\d+)/,jp=/\\(\d+)/g;Symbol("RuleId");var Hp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=rp.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=rp.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${tp(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?rp.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?rp.replaceCaptures(this._contentName,e,t):this._contentName}},qp=class extends Hp{retokenizeCapturedWithRuleId;constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Fp=class extends Hp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,null),this._match=new Kp(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Wp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},$p=class extends Hp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns){e.getRule(n).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Wp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Gp=class extends Hp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o,i,s,a,l,c){super(e,t,n,r),this._begin=new Kp(o,this.id),this.beginCaptures=i,this._end=new Kp(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Wp;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Vp=class extends Hp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,o,i,s,a,l){super(e,t,n,r),this._begin=new Kp(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Kp(s,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Wp;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Wp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Up=class e{static createCaptureRule(e,t,n,r,o){return e.registerRule(e=>new qp(t,e,n,r,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new Fp(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=ep({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new $p(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new Vp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Gp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let i=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>i&&(i=t)}for(let e=0;e<=i;e++)o[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const s=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],n,r)),o[s]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let i=0,s=t.length;i<s;i++){const s=t[i];let a=-1;if(s.include){const t=Dp(s.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(r[s.include],n,r);break;case 2:let o=r[t.ruleName];o&&(a=e.getCompiledRuleId(o,n,r));break;case 3:case 4:const i=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(i,r);if(c)if(l){let t=c.repository[l];t&&(a=e.getCompiledRuleId(t,n,c.repository))}else a=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else a=e.getCompiledRuleId(s,n,r);if(-1!==a){const e=n.getRule(a);let t=!1;if((e instanceof $p||e instanceof Gp||e instanceof Vp)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Kp=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],o=!1;for(let i=0;i<t;i++){if("\\"===e.charAt(i)&&i+1<t){const t=e.charAt(i+1);"z"===t?(r.push(e.substring(n,i)),r.push("$(?!\\n)(?<!\\n)"),n=i+2):"A"!==t&&"G"!==t||(o=!0),i++}}this.hasAnchor=o,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=Bp.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return jp.lastIndex=0,this.source.replace(jp,(e,t)=>ap(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,n,r,o=[],i=[],s=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),o[e]=n,i[e]=n,s[e]=n,a[e]=n,"\\"===n&&e+1<t&&(r=this.source.charAt(e+1),"A"===r?(o[e+1]="",i[e+1]="",s[e+1]="A",a[e+1]="A"):"G"===r?(o[e+1]="",i[e+1]="G",s[e+1]="",a[e+1]="G"):(o[e+1]=r,i[e+1]=r,s[e+1]=r,a[e+1]=r),e++);return{A0_G0:o.join(""),A0_G1:i.join(""),A1_G0:s.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},Wp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Yp(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(e=>e.resolveAnchors(t,n));return new Yp(e,r,this._items.map(e=>e.ruleId))}},Yp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Xp=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Jp=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Xp(e,8),this._embeddedLanguagesMatcher=new Zp(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Xp(0,0);_getBasicScopeAttributes=new lp(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Xp(t,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Zp=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>ap(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}},Qp=("undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG,class{constructor(e,t){this.stack=e,this.stoppedEarly=t}});function ef(e,t,n,r,o,i,s,a){const l=t.content.length;let c=!1,d=-1;if(s){const s=function(e,t,n,r,o,i){let s=o.beginRuleCapturedEOL?0:-1;const a=[];for(let t=o;t;t=t.pop()){const n=t.getRule(e);n instanceof Vp&&a.push({rule:n,stack:t})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:a,findOptions:c}=nf(l.rule,e,l.stack.endRule,n,r===s),d=a.findNextMatchSync(t,r,c);if(!d){0,o=l.stack.pop();break}if(-2!==d.ruleId){o=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(l.stack,d.captureIndices[0].start),rf(e,t,n,l.stack,i,l.rule.whileCaptures,d.captureIndices),i.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:s,isFirstLine:n}}(e,t,n,r,o,i);o=s.stack,r=s.linePos,n=s.isFirstLine,d=s.anchorPosition}const u=Date.now();for(;!c;){if(0!==a){if(Date.now()-u>a)return new Qp(o,!0)}h()}return new Qp(o,!1);function h(){const s=function(e,t,n,r,o,i){const s=function(e,t,n,r,o,i){const s=o.getRule(e),{ruleScanner:a,findOptions:l}=tf(s,e,o.endRule,n,r===i),c=a.findNextMatchSync(t,r,l);if(c)return{captureIndices:c.captureIndices,matchedRuleId:c.ruleId};return null}(e,t,n,r,o,i),a=e.getInjections();if(0===a.length)return s;const l=function(e,t,n,r,o,i,s){let a,l=Number.MAX_VALUE,c=null,d=0;const u=i.contentNameScopesList.getScopeNames();for(let i=0,h=e.length;i<h;i++){const h=e[i];if(!h.matcher(u))continue;const p=t.getRule(h.ruleId),{ruleScanner:f,findOptions:m}=tf(p,t,null,r,o===s),_=f.findNextMatchSync(n,o,m);if(!_)continue;0;const g=_.captureIndices[0].start;if(!(g>=l)&&(l=g,c=_.captureIndices,a=_.ruleId,d=h.priority,l===o))break}if(c)return{priorityMatch:-1===d,captureIndices:c,matchedRuleId:a};return null}(a,e,t,n,r,o,i);if(!l)return s;if(!s)return l;const c=s.captureIndices[0].start,d=l.captureIndices[0].start;if(d<c||l.priorityMatch&&d===c)return l;return s}(e,t,n,r,o,d);if(!s)return i.produce(o,l),void(c=!0);const a=s.captureIndices,u=s.matchedRuleId,h=!!(a&&a.length>0)&&a[0].end>r;if(-1===u){const s=o.getRule(e);0,i.produce(o,a[0].start),o=o.withContentNameScopesList(o.nameScopesList),rf(e,t,n,o,i,s.endCaptures,a),i.produce(o,a[0].end);const u=o;if(o=o.parent,d=u.getAnchorPos(),!h&&u.getEnterPos()===r)return o=u,i.produce(o,l),void(c=!0)}else{const s=e.getRule(u);i.produce(o,a[0].start);const p=o,f=s.getName(t.content,a),m=o.contentNameScopesList.pushAttributed(f,e);if(o=o.push(u,r,d,a[0].end===l,null,m,m),s instanceof Gp){const r=s;0,rf(e,t,n,o,i,r.beginCaptures,a),i.produce(o,a[0].end),d=a[0].end;const u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(o=o.withContentNameScopesList(f),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(o))return o=o.pop(),i.produce(o,l),void(c=!0)}else if(s instanceof Vp){const r=s;0,rf(e,t,n,o,i,r.beginCaptures,a),i.produce(o,a[0].end),d=a[0].end;const u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(o=o.withContentNameScopesList(f),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(o))return o=o.pop(),i.produce(o,l),void(c=!0)}else{if(rf(e,t,n,o,i,s.captures,a),i.produce(o,a[0].end),o=o.pop(),!h)return o=o.safePop(),i.produce(o,l),void(c=!0)}}a[0].end>r&&(r=a[0].end,n=!1)}}function tf(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function nf(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function rf(e,t,n,r,o,i,s){if(0===i.length)return;const a=t.content,l=Math.min(i.length,s.length),c=[],d=s[0].end;for(let t=0;t<l;t++){const l=i[t];if(null===l)continue;const u=s[t];if(0===u.length)continue;if(u.start>d)break;for(;c.length>0&&c[c.length-1].endPos<=u.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,u.start):o.produce(r,u.start),l.retokenizeCapturedWithRuleId){const t=l.getName(a,s),i=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(a,s),d=i.pushAttributed(c,e),h=r.push(l.retokenizeCapturedWithRuleId,u.start,-1,!1,null,i,d),p=e.createOnigString(a.substring(0,u.end));ef(e,p,n&&0===u.start,u.start,h,o,!1,0),kp(p);continue}const h=l.getName(a,s);if(null!==h){const t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,e);c.push(new of(t,u.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var of=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function sf(e,t,n,r,o){const i=yp(t,af),s=Up.getCompiledRuleId(n,r,o.repository);for(const n of i)e.push({debugSelector:t,matcher:n.matcher,ruleId:s,grammar:o,priority:n.priority})}function af(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(lf(t[r],e))return n=r+1,!0;return!1})}function lf(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var cf=class{constructor(e,t,n,r,o,i,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new Jp(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=df(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=yp(e,af);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:o[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,r=e(n);if(r){const e=r.injections;if(e)for(let n in e)sf(t,n,e[n],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(e=>{const n=this.getExternalGrammar(e);if(n){const e=n.injectionSelector;e&&sf(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=df(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let o;if(-1===this._rootId&&(this._rootId=Up.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==hf.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=xp.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),i=this.getRule(this._rootId).getName(null,null);let s;s=i?uf.createRootAndLookUpScopeName(i,r,this):uf.createRoot("unknown",r),t=new hf(null,this._rootId,-1,-1,!1,null,s,s)}e+="\n";const i=this.createOnigString(e),s=i.content.length,a=new ff(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ef(this,i,o,0,t,a,!0,r);return kp(i),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function df(e,t){return(e=Qh(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var uf=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(const t of n)o=dp.push(o,t.scopeNames),r=new e(r,o,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new dp(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),i=new dp(null,t),s=r.themeProvider.themeMatch(i),a=e.mergeAttributes(n,o,s);return new e(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,o=0,i=0;return null!==n&&(r=n.fontStyle,o=n.foregroundId,i=n.backgroundId),xp.set(e,t.languageId,t.tokenType,null,r,o,i)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const t of r)o=e._pushAttributed(o,t,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),i=t.scopePath.push(n),s=r.themeProvider.themeMatch(i),a=e.mergeAttributes(t.tokenAttributes,o,s);return new e(t,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},hf=class e{constructor(e,t,n,r,o,i,s,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=s,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&uf.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,i,s,a){return new e(this,t,n,r,o,i,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=uf.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,uf.fromExtension(r,n.contentNameScopesList))}},pf=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):yp(e,af).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>yp(e,af).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ff=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=xp.set(n,0,vp(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}return r&&(n=xp.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},mf=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,function(e,t,n,r,o,i,s,a){return new cf(e,t,n,r,o,i,s,a)}(e,i,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},_f=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new mf(cp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(cp.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new pf(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,o){const i=new zp(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(e=>this._loadSingleGrammar(e.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,n,r,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,o)}},gf=hf.NULL;const bf=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class xf{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function vf(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new xf(n,r,t)}function yf(e){return e.toLowerCase()}xf.prototype.normal={},xf.prototype.property={},xf.prototype.space=void 0;class wf{constructor(e,t){this.attribute=t,this.property=e}}wf.prototype.attribute="",wf.prototype.booleanish=!1,wf.prototype.boolean=!1,wf.prototype.commaOrSpaceSeparated=!1,wf.prototype.commaSeparated=!1,wf.prototype.defined=!1,wf.prototype.mustUseProperty=!1,wf.prototype.number=!1,wf.prototype.overloadedBoolean=!1,wf.prototype.property="",wf.prototype.spaceSeparated=!1,wf.prototype.space=void 0;let kf=0;const Sf=Rf(),Cf=Rf(),Mf=Rf(),zf=Rf(),Nf=Rf(),Af=Rf(),Tf=Rf();function Rf(){return 2**++kf}const Pf=Object.keys(t);class Of extends wf{constructor(e,n,r,o){let i=-1;if(super(e,n),Ef(this,"space",o),"number"==typeof r)for(;++i<Pf.length;){const e=Pf[i];Ef(this,Pf[i],(r&t[e])===t[e])}}}function Ef(e,t,n){n&&(e[t]=n)}function Lf(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Of(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[yf(r)]=r,n[yf(i.attribute)]=r}return new xf(t,n,e.space)}Of.prototype.defined=!0;const If=Lf({properties:{ariaActiveDescendant:null,ariaAtomic:Cf,ariaAutoComplete:null,ariaBusy:Cf,ariaChecked:Cf,ariaColCount:zf,ariaColIndex:zf,ariaColSpan:zf,ariaControls:Nf,ariaCurrent:null,ariaDescribedBy:Nf,ariaDetails:null,ariaDisabled:Cf,ariaDropEffect:Nf,ariaErrorMessage:null,ariaExpanded:Cf,ariaFlowTo:Nf,ariaGrabbed:Cf,ariaHasPopup:null,ariaHidden:Cf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nf,ariaLevel:zf,ariaLive:null,ariaModal:Cf,ariaMultiLine:Cf,ariaMultiSelectable:Cf,ariaOrientation:null,ariaOwns:Nf,ariaPlaceholder:null,ariaPosInSet:zf,ariaPressed:Cf,ariaReadOnly:Cf,ariaRelevant:null,ariaRequired:Cf,ariaRoleDescription:Nf,ariaRowCount:zf,ariaRowIndex:zf,ariaRowSpan:zf,ariaSelected:Cf,ariaSetSize:zf,ariaSort:null,ariaValueMax:zf,ariaValueMin:zf,ariaValueNow:zf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Df(e,t){return t in e?e[t]:t}function Bf(e,t){return Df(e,t.toLowerCase())}const jf=Lf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Af,acceptCharset:Nf,accessKey:Nf,action:null,allow:null,allowFullScreen:Sf,allowPaymentRequest:Sf,allowUserMedia:Sf,alt:null,as:null,async:Sf,autoCapitalize:null,autoComplete:Nf,autoFocus:Sf,autoPlay:Sf,blocking:Nf,capture:null,charSet:null,checked:Sf,cite:null,className:Nf,cols:zf,colSpan:null,content:null,contentEditable:Cf,controls:Sf,controlsList:Nf,coords:zf|Af,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Sf,defer:Sf,dir:null,dirName:null,disabled:Sf,download:Mf,draggable:Cf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Sf,formTarget:null,headers:Nf,height:zf,hidden:Mf,high:zf,href:null,hrefLang:null,htmlFor:Nf,httpEquiv:Nf,id:null,imageSizes:null,imageSrcSet:null,inert:Sf,inputMode:null,integrity:null,is:null,isMap:Sf,itemId:null,itemProp:Nf,itemRef:Nf,itemScope:Sf,itemType:Nf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Sf,low:zf,manifest:null,max:null,maxLength:zf,media:null,method:null,min:null,minLength:zf,multiple:Sf,muted:Sf,name:null,nonce:null,noModule:Sf,noValidate:Sf,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Sf,optimum:zf,pattern:null,ping:Nf,placeholder:null,playsInline:Sf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Sf,referrerPolicy:null,rel:Nf,required:Sf,reversed:Sf,rows:zf,rowSpan:zf,sandbox:Nf,scope:null,scoped:Sf,seamless:Sf,selected:Sf,shadowRootClonable:Sf,shadowRootDelegatesFocus:Sf,shadowRootMode:null,shape:null,size:zf,sizes:null,slot:null,span:zf,spellCheck:Cf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:zf,step:null,style:null,tabIndex:zf,target:null,title:null,translate:null,type:null,typeMustMatch:Sf,useMap:null,value:Cf,width:zf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nf,axis:null,background:null,bgColor:null,border:zf,borderColor:null,bottomMargin:zf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Sf,declare:Sf,event:null,face:null,frame:null,frameBorder:null,hSpace:zf,leftMargin:zf,link:null,longDesc:null,lowSrc:null,marginHeight:zf,marginWidth:zf,noResize:Sf,noHref:Sf,noShade:Sf,noWrap:Sf,object:null,profile:null,prompt:null,rev:null,rightMargin:zf,rules:null,scheme:null,scrolling:Cf,standby:null,summary:null,text:null,topMargin:zf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:zf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Sf,disableRemotePlayback:Sf,prefix:null,property:null,results:zf,security:null,unselectable:null},space:"html",transform:Bf}),Hf=Lf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Tf,accentHeight:zf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:zf,amplitude:zf,arabicForm:null,ascent:zf,attributeName:null,attributeType:null,azimuth:zf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:zf,by:null,calcMode:null,capHeight:zf,className:Nf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:zf,diffuseConstant:zf,direction:null,display:null,dur:null,divisor:zf,dominantBaseline:null,download:Sf,dx:null,dy:null,edgeMode:null,editable:null,elevation:zf,enableBackground:null,end:null,event:null,exponent:zf,externalResourcesRequired:null,fill:null,fillOpacity:zf,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Af,g2:Af,glyphName:Af,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:zf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:zf,horizOriginX:zf,horizOriginY:zf,id:null,ideographic:zf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:zf,k:zf,k1:zf,k2:zf,k3:zf,k4:zf,kernelMatrix:Tf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:zf,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:zf,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:zf,overlineThickness:zf,paintOrder:null,panose1:null,path:null,pathLength:zf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:zf,pointsAtY:zf,pointsAtZ:zf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tf,rev:Tf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tf,requiredFeatures:Tf,requiredFonts:Tf,requiredFormats:Tf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:zf,specularExponent:zf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:zf,strikethroughThickness:zf,string:null,stroke:null,strokeDashArray:Tf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:zf,strokeOpacity:zf,strokeWidth:null,style:null,surfaceScale:zf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tf,tabIndex:zf,tableValues:null,target:null,targetX:zf,targetY:zf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:zf,underlineThickness:zf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:zf,values:null,vAlphabetic:zf,vMathematical:zf,vectorEffect:null,vHanging:zf,vIdeographic:zf,version:null,vertAdvY:zf,vertOriginX:zf,vertOriginY:zf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:zf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Df}),qf=Lf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Ff=Lf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Bf}),$f=Lf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Gf=vf([If,jf,qf,Ff,$f],"html"),Vf=vf([If,Hf,qf,Ff,$f],"svg"),Uf={}.hasOwnProperty;const Kf=/["&'<>`]/g,Wf=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yf=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Xf=/[|\\{}()[\]^$+*?.]/g,Jf=new WeakMap;function Zf(e,t){return e=e.replace(t.subset?function(e){let t=Jf.get(e);t||(t=function(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Xf,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(e),Jf.set(e,t));return t}(t.subset):Kf,n),t.subset||t.escapeOnly?e:e.replace(Wf,function(e,n,r){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}).replace(Yf,n);function n(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}const Qf=/[\dA-Fa-f]/;const em=/\d/;const tm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],nm={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},rm=["cent","copy","divide","gt","lt","not","para","times"],om={}.hasOwnProperty,im={};let sm;for(sm in nm)om.call(nm,sm)&&(im[nm[sm]]=sm);const am=/[^\dA-Za-z]/;function lm(e,t,n){let r,o=function(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Qf.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=function(e,t,n,r){const o=String.fromCharCode(e);if(om.call(im,o)){const e=im[o],i="&"+e;return n&&tm.includes(e)&&!rm.includes(e)&&(!r||t&&61!==t&&am.test(String.fromCharCode(t)))?i:i+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const r=function(e,t,n){const r="&#"+String(e);return n&&t&&!em.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);r.length<o.length&&(o=r)}return r&&(!n.useShortestReferences||r.length<o.length)?r:o}function cm(e,t){return Zf(e,Object.assign({format:lm},t))}const dm=/^>|^->|<!--|-->|--!>|<!-$/g,um=[">"],hm=["<",">"];function pm(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function fm(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}const mm=/[A-Z]/g,_m=/-[a-z]/g,gm=/^data[-\w.:]+$/i;function bm(e){return"-"+e.toLowerCase()}function xm(e){return e.charAt(1).toUpperCase()}function vm(e){return e.join(" ").trim()}const ym=/[ \t\n\f\r]/g;function wm(e){return"object"==typeof e?"text"===e.type&&km(e.value):km(e)}function km(e){return""===e.replace(ym,"")}const Sm=zm(1),Cm=zm(-1),Mm=[];function zm(e){return function(t,n,r){const o=t?t.children:Mm;let i=(n||0)+e,s=o[i];if(!r)for(;s&&wm(s);)i+=e,s=o[i];return s}}const Nm={}.hasOwnProperty;function Am(e){return function(t,n,r){return Nm.call(e,t.tagName)&&e[t.tagName](t,n,r)}}const Tm=Am({body:function(e,t,n){const r=Sm(n,t);return!r||"comment"!==r.type},caption:Rm,colgroup:Rm,dd:function(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){const r=Sm(n,t);return Boolean(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:Rm,html:function(e,t,n){const r=Sm(n,t);return!r||"comment"!==r.type},li:function(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){const r=Sm(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))},rp:Pm,rt:Pm,tbody:function(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:Om,tfoot:function(e,t,n){return!Sm(n,t)},th:Om,thead:function(e,t,n){const r=Sm(n,t);return Boolean(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function Rm(e,t,n){const r=Sm(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&wm(r.value.charAt(0)))}function Pm(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function Om(e,t,n){const r=Sm(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}const Em=Am({body:function(e){const t=Sm(e,-1,!0);return!(t&&("comment"===t.type||"text"===t.type&&wm(t.value.charAt(0))||"element"===t.type&&("meta"===t.tagName||"link"===t.tagName||"script"===t.tagName||"style"===t.tagName||"template"===t.tagName)))},colgroup:function(e,t,n){const r=Cm(n,t),o=Sm(e,-1,!0);if(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&Tm(r,n.children.indexOf(r),n))return!1;return Boolean(o&&"element"===o.type&&"col"===o.tagName)},head:function(e){const t=new Set;for(const n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}const n=e.children[0];return!n||"element"===n.type},html:function(e){const t=Sm(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){const r=Cm(n,t),o=Sm(e,-1);if(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&Tm(r,n.children.indexOf(r),n))return!1;return Boolean(o&&"element"===o.type&&"tr"===o.tagName)}});const Lm={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Im(e,t,n){const r=function(e,t){const n=yf(t);let r=t,o=wf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&gm.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(_m,xm);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!_m.test(e)){let n=e.replace(mm,bm);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Of}return new o(r,t)}(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,i=e.settings.allowDangerousCharacters?0:1;let s,a=e.quote;if(!r.overloadedBoolean||n!==r.attribute&&""!==n?!r.boolean&&!r.overloadedBoolean||"string"==typeof n&&n!==r.attribute&&""!==n||(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";const l=cm(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Lm.name[o][i]}));return!0===n?l:(n=Array.isArray(n)?(r.commaSeparated?fm:vm)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n?l:(e.settings.preferUnquoted&&(s=cm(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Lm.unquoted[o][i]}))),s!==n&&(e.settings.quoteSmart&&pm(n,a)>pm(n,e.alternative)&&(a=e.alternative),s=a+cm(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?Lm.single:Lm.double)[o][i],attribute:!0}))+a),l+(s?"="+s:s)))}const Dm=["<","&"];function Bm(e,t,n,r){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?cm(e.value,Object.assign({},r.settings.characterReferences,{subset:Dm})):e.value}const jm=function(e,t){const n=t||{};function r(t,...n){let o=r.invalid;const i=r.handlers;if(t&&Uf.call(t,e)){const n=String(t[e]);o=Uf.call(i,n)?i[n]:r.unknown}if(o)return o.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:function(e){throw new Error("Expected node, not `"+e+"`")},unknown:function(e){throw new Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+cm(e.value,Object.assign({},r.settings.characterReferences,{subset:um}))+">":"\x3c!--"+e.value.replace(dm,function(e){return cm(e,Object.assign({},r.settings.characterReferences,{subset:hm}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){const o=r.schema,i="svg"!==o.space&&r.settings.omitOptionalTags;let s="svg"===o.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;"html"===o.space&&"svg"===e.tagName&&(r.schema=Vf);const c=function(e,t){const n=[];let r,o=-1;if(t)for(r in t)if(null!==t[r]&&void 0!==t[r]){const o=Im(e,r,t[r]);o&&n.push(o)}for(;++o<n.length;){const t=e.settings.tightAttributes?n[o].charAt(n[o].length-1):void 0;o!==n.length-1&&'"'!==t&&"'"!==t&&(n[o]+=" ")}return n.join("")}(r,e.properties),d=r.all("html"===o.space&&"template"===e.tagName?e.content:e);return r.schema=o,d&&(s=!1),!c&&i&&Em(e,t,n)||(a.push("<",e.tagName,c?" "+c:""),s&&("svg"===o.space||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===l||l&&'"'!==l&&"'"!==l)&&a.push(" "),a.push("/")),a.push(">")),a.push(d),s||i&&Tm(e,t,n)||a.push("</"+e.tagName+">"),a.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Bm(e,0,n,r)},root:function(e,t,n,r){return r.all(e)},text:Bm}});const Hm={},qm={},Fm=[];function $m(e,t,n){return jm(e,t,n,this)}function Gm(e){const t=[],n=e&&e.children||Fm;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Vm(e,t){const n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(const[e,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[e]=o:e===r&&Object.assign(n,o);return n}function Um(e,t){return e&&t?.[e?.toLowerCase()]||e}async function Km(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function Wm(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Ym(e){return"ansi"===e||Wm(e)}function Xm(e){return"none"===e}function Jm(e){return Xm(e)}function Zm(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function Qm(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let e=0;e<n.length;e+=2){const i=t?n[e]+(n[e+1]||""):n[e];o.push([i,r]),r+=n[e].length,r+=n[e+1]?.length||0}return o}const e_="light-dark()",t_=["color","background-color"];function n_(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&fp.Italic&&(t["font-style"]="italic"),e.fontStyle&fp.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&fp.Underline&&n.push("underline"),e.fontStyle&fp.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function r_(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}const o_=new WeakMap;function i_(e,t){o_.set(e,t)}function s_(e){return o_.get(e)}class a_{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new a_(Object.fromEntries((n=t,Array.isArray(n)?n:[n]).map(e=>[e,gf])),e);var n}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){const t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);const o=e?.nameScopesList?.scopeName;o&&t.push(o),e.parent&&r(e.parent)}return r(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function l_(){const e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new Zh(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{const t=r.lines[e.line];if(void 0===t)throw new Zh(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new Zh(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}};const r=function(e){const t=Qm(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,o=0;for(const e of t){if(r<e.length)break;r-=e.length,o++}return{line:o,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}}}(t.source),o=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));!function(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Zh(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const t=e[r],o=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,i=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,s=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,a=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(o||i||s||a){if(o&&i)continue;if(s&&a)continue;if(s&&n.start.offset===n.end.offset)continue;if(i&&t.start.offset===t.end.offset)continue;throw new Zh(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}(o),e.set(t.meta,{decorations:o,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(!this.options.decorations?.length)return;const n=function(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{const t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?function(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}(e,t):e})):e}(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]));return n},code(e){if(!this.options.decorations?.length)return;const n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new Zh(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function o(e,t,n,o){const i=r[e];let a="",l=-1,c=-1;if(0===t&&(l=0),0===n&&(c=0),n===Number.POSITIVE_INFINITY&&(c=i.children.length),-1===l||-1===c)for(let e=0;e<i.children.length;e++)a+=c_(i.children[e]),-1===l&&a.length===t&&(l=e+1),-1===c&&a.length===n&&(c=e+1);if(-1===l)throw new Zh(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===c)throw new Zh(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);const d=i.children.slice(l,c);if(o.alwaysWrap||d.length!==i.children.length)if(o.alwaysWrap||1!==d.length||"element"!==d[0].type){const e={type:"element",tagName:"span",properties:{},children:d};s(e,o,"wrapper"),i.children.splice(l,d.length,e)}else s(d[0],o,"token");else s(i,o,"line")}function i(e,t){r[e]=s(r[e],t,"line")}function s(e,t,n){const r=t.properties||{},o=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Zm(e,t.properties.class),e=o(e,n)||e}const a=[],l=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(const e of l){const{start:t,end:n}=e;if(t.line===n.line)o(t.line,t.character,n.character,e);else if(t.line<n.line){o(t.line,t.character,Number.POSITIVE_INFINITY,e);for(let r=t.line+1;r<n.line;r++)a.unshift(()=>i(r,e));o(n.line,0,n.character,e)}}a.forEach(e=>e())}}}function c_(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(c_).join(""):""}const d_=[l_()];function u_(e){const t=function(e){const t=[],n=[],r=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:r.push(o)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...d_]}var h_=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],p_={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function f_(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function m_(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function __(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9){p_[r]&&t.push({type:"setDecoration",value:p_[r]})}else if(r<=29){const e=p_[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:h_[r-30]}});else if(38===r){const n=m_(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:h_[r-40]}});else if(48===r){const n=m_(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:h_[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:h_[r-100+8]}})}return t}var g_={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function b_(e=g_){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(e){return function(){if(r)return r;r=[];for(let e=0;e<h_.length;e++)r.push(t(h_[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let o=0;o<6;o++)for(let i=0;i<6;i++)r.push(n([e[t],e[o],e[i]]));let o=8;for(let e=0;e<24;e++,o+=10)r.push(n([o,o,o]));return r}()[e]}return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return o(e.index)}}}}function x_(e,t,n){const r=Vm(e,n),o=Qm(t),i=b_(Object.fromEntries(h_.map(t=>[t,e.colors?.[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]]))),s=function(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let i=0;do{const s=f_(r,i),a=s.sequence?r.substring(i,s.startPosition):r.substring(i);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(n)}),s.sequence){const r=__(s.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,n.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&n.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&n.add(o.value)}i=s.position}while(i<r.length);return o}}}();return o.map(t=>s.parse(t[0]).map(n=>{let o,s;n.decorations.has("reverse")?(o=n.background?i.value(n.background):e.bg,s=n.foreground?i.value(n.foreground):e.fg):(o=n.foreground?i.value(n.foreground):e.fg,s=n.background?i.value(n.background):void 0),o=Um(o,r),s=Um(s,r),n.decorations.has("dim")&&(o=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(o));let a=fp.None;return n.decorations.has("bold")&&(a|=fp.Bold),n.decorations.has("italic")&&(a|=fp.Italic),n.decorations.has("underline")&&(a|=fp.Underline),n.decorations.has("strikethrough")&&(a|=fp.Strikethrough),{content:n.value,offset:t[1],color:o,bgColor:s,fontStyle:a}}))}function v_(e,t,n={}){const{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(Wm(r)||Xm(o))return Qm(t).map(e=>[{content:e[0],offset:e[1]}]);const{theme:i,colorMap:s}=e.setTheme(o);if("ansi"===r)return x_(i,t,n);const a=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Zh(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Zh(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return function(e,t,n,r,o){const i=w_(e,t,n,r,o),s=new a_(w_(e,t,n,r,o).stateStack,t.name,n.name);return i_(i.tokens,s),i.tokens}(t,a,i,s,n)}function y_(...e){if(2===e.length)return s_(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=r;if(Wm(o)||Xm(i))throw new Zh("Plain language does not have grammar state");if("ansi"===o)throw new Zh("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(i),l=t.getLanguage(o);return new a_(w_(n,l,s,a,r).stateStack,l.name,s.name)}function w_(e,t,n,r,o){const i=Vm(n,o),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500}=o,l=Qm(e);let c=o.grammarState?function(e,t){if(!(e instanceof a_))throw new Zh("Invalid grammar state");return e.getInternalStack(t)}(o.grammarState,n.name)??gf:null!=o.grammarContextCode?w_(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:gf,d=[];const u=[];for(let e=0,h=l.length;e<h;e++){const[h,p]=l[e];if(""===h){d=[],u.push([]);continue}if(s>0&&h.length>=s){d=[],u.push([{content:h,offset:p,color:"",fontStyle:0}]);continue}let f,m,_;o.includeExplanation&&(f=t.tokenizeLine(h,c,a),m=f.tokens,_=0);const g=t.tokenizeLine2(h,c,a),b=g.tokens.length/2;for(let e=0;e<b;e++){const t=g.tokens[2*e],s=e+1<b?g.tokens[2*e+2]:h.length;if(t===s)continue;const a=g.tokens[2*e+1],l=Um(r[xp.getForeground(a)],i),c=xp.getFontStyle(a),u={content:h.substring(t,s),offset:p+t,color:l,fontStyle:c};if(o.includeExplanation){const e=[];if("scopeName"!==o.includeExplanation)for(const t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}u.explanation=[];let r=0;for(;t+r<s;){const t=m[_],n=h.substring(t.startIndex,t.endIndex);r+=n.length,u.explanation.push({content:n,scopes:"scopeName"===o.includeExplanation?k_(t.scopes):S_(e,t.scopes)}),_+=1}}d.push(u)}u.push(d),d=[],c=g.ruleStack}return{tokens:u,stateStack:c}}function k_(e){return e.map(e=>({scopeName:e}))}function S_(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const o=t[r];n[r]={scopeName:o,themeMatches:z_(e,o,t.slice(0,r))}}return n}function C_(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function M_(e,t,n){if(!C_(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)C_(e[r],n[o])&&(r-=1),o-=1;return-1===r}function z_(e,t,n){const r=[];for(const{selectors:o,settings:i}of e)for(const e of o)if(M_(e,t,n)){r.push(i);break}return r}function N_(e,t,n){const r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),o=r.map(r=>{const o=v_(e,t,{...n,theme:r.theme});return{tokens:o,state:s_(o),theme:"string"==typeof r.theme?r.theme:r.theme.name}}),i=function(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(e=>e[r]),i=t.map(()=>[]);t.forEach((e,t)=>e.push(i[t]));const s=o.map(()=>0),a=o.map(e=>e[0]);for(;a.every(e=>e);){const e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){const n=a[t];n.content.length===e?(i[t].push(n),s[t]+=1,a[t]=o[t][s[t]]):(i[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...o.map(e=>e.tokens)),s=i[0].map((e,t)=>e.map((e,o)=>{const s={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(s.explanation=e.explanation),i.forEach((e,n)=>{const{content:i,explanation:a,offset:l,...c}=e[t][o];s.variants[r[n].color]=c}),s})),a=o[0].state?new a_(Object.fromEntries(o.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),o[0].state.lang):void 0;return a&&i_(s,a),s}function A_(e,t,n){let r,o,i,s,a,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:d="--shiki-",colorsRendering:u="css-vars"}=n,h=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:t.color===c?1:0);if(0===h.length)throw new Zh("`themes` option must not be empty");const p=N_(e,t,n);if(l=s_(p),c&&e_!==c&&!h.find(e=>e.color===c))throw new Zh(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=h.map(t=>e.getTheme(t.theme)),m=h.map(e=>e.color);i=p.map(e=>e.map(e=>function(e,t,n,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(t=>n_(e.variants[t])),a=new Set(s.flatMap(e=>Object.keys(e))),l={},c=(e,r)=>{const o="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":o)};return s.forEach((e,n)=>{for(const i of a){const a=e[i]||"inherit";if(0===n&&r&&t_.includes(i))if(r===e_&&s.length>1){const e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new Zh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=s[e][i]||"inherit",u=s[r][i]||"inherit";l[i]=`light-dark(${d}, ${u})`,"css-vars"===o&&(l[c(n,i)]=a)}else l[i]=a;else"css-vars"===o&&(l[c(n,i)]=a)}}),i.htmlStyle=l,i}(e,m,d,c,u))),l&&i_(i,l);const _=h.map(e=>Vm(e.theme,n));o=T_(h,f,_,d,c,"fg",u),r=T_(h,f,_,d,c,"bg",u),s=`shiki-themes ${f.map(e=>e.name).join(" ")}`,a=c?void 0:[o,r].join(";")}else{if(!("theme"in n))throw new Zh("Invalid options, either `theme` or `themes` must be provided");{const a=Vm(n.theme,n);i=v_(e,t,n);const c=e.getTheme(n.theme);r=Um(c.bg,a),o=Um(c.fg,a),s=c.name,l=s_(i)}}return{tokens:i,fg:o,bg:r,themeName:s,rootStyle:a,grammarState:l}}function T_(e,t,n,r,o,i,s){return e.map((a,l)=>{const c=Um(t[l][i],n[l])||"inherit",d=`${r+a.color}${"bg"===i?"-bg":""}:${c}`;if(0===l&&o){if(o===e_&&e.length>1){const r=e.findIndex(e=>"light"===e.color),o=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===o)throw new Zh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Um(t[r][i],n[r])||"inherit"}, ${Um(t[o][i],n[o])||"inherit"});${d}`}return c}return"css-vars"===s?d:null}).filter(e=>!!e).join(";")}function R_(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>R_(e,t,n),codeToTokens:(t,n)=>A_(e,t,n)}){let o=t;for(const e of u_(n))o=e.preprocess?.call(r,o,n)||o;let{tokens:i,fg:s,bg:a,themeName:l,rootStyle:c,grammarState:d}=A_(e,o,n);const{mergeWhitespaces:u=!0,mergeSameStyleTokens:h=!1}=n;!0===u?i=function(e){return e.map(e=>{const t=[];let n="",r=0;return e.forEach((o,i)=>{const s=!(o.fontStyle&&(o.fontStyle&fp.Underline||o.fontStyle&fp.Strikethrough));s&&o.content.match(/^\s+$/)&&e[i+1]?(r||(r=o.offset),n+=o.content):n?(s?t.push({...o,offset:r,content:n+o.content}):t.push({content:n,offset:r},o),r=0,n=""):t.push(o)}),t})}(i):"never"===u&&(i=function(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;const t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;const[,n,r,o]=t;if(!n&&!o)return e;const i=[{...e,offset:e.offset+n.length,content:r}];return n&&i.unshift({content:n,offset:e.offset}),o&&i.push({content:o,offset:e.offset+n.length+r.length}),i}))}(i)),h&&(i=function(e){return e.map(e=>{const t=[];for(const n of e){if(0===t.length){t.push({...n});continue}const e=t[t.length-1],r=r_(e.htmlStyle||n_(e)),o=r_(n.htmlStyle||n_(n)),i=e.fontStyle&&(e.fontStyle&fp.Underline||e.fontStyle&fp.Strikethrough),s=n.fontStyle&&(n.fontStyle&fp.Underline||n.fontStyle&fp.Strikethrough);i||s||r!==o?t.push({...n}):e.content+=n.content}return t})}(i));const p={...r,get source(){return o}};for(const e of u_(n))i=e.tokens?.call(p,i)||i;return function(e,t,n,r=s_(e)){const o=u_(t),i=[],s={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t;let c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==l&&null!=l?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:i};const u=[],h={...n,structure:a,addClassToHast:Zm,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return c},get code(){return d},get lines(){return u}};if(e.forEach((e,t)=>{t&&("inline"===a?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&i.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(const i of e){let e={type:"element",tagName:"span",properties:{...i.htmlAttrs},children:[{type:"text",value:i.content}]};const l=r_(i.htmlStyle||n_(i));l&&(e.properties.style=l);for(const s of o)e=s?.span?.call(h,e,t+1,r,n,i)||e;"inline"===a?s.children.push(e):"classic"===a&&n.children.push(e),r+=i.content.length}if("classic"===a){for(const e of o)n=e?.line?.call(h,n,t+1)||n;u.push(n),i.push(n)}}),"classic"===a){for(const e of o)d=e?.code?.call(h,d)||d;c.children.push(d);for(const e of o)c=e?.pre?.call(h,c)||c;s.children.push(c)}let p=s;for(const e of o)p=e?.root?.call(h,p)||p;r&&i_(p,r);return p}(i,{...n,fg:s,bg:a,themeName:l,rootStyle:c},p,d)}const P_=function(e,t){const n=t||Hm,r=n.quote||'"',o='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:$m,all:Gm,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||bf,characterReferences:n.characterReferences||qm,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?Vf:Gf,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)};function O_(e,t,n){const r={meta:{},options:n,codeToHast:(t,n)=>R_(e,t,n),codeToTokens:(t,n)=>A_(e,t,n)};let o=P_(R_(e,t,n,r));for(const e of u_(n))o=e.postprocess?.call(r,o,n)||o;return o}const E_="#333333",L_="#bbbbbb",I_="#fffffe",D_="#1e1e1e",B_="__shiki_resolved";function j_(e){if(e?.[B_])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?E_:L_),n||(n="light"===t.type?I_:D_),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const i=new Map;function s(e){if(i.has(e))return i.get(e);o+=1;const n=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?s(e):(i.set(e,n),n)}t.settings=t.settings.map(e=>{const n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;const o={...e,settings:{...e.settings}};if(n){const n=s(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,o.settings.foreground=n}if(r){const n=s(e.settings.background);t.colorReplacements[n]=e.settings.background,o.settings.background=n}return o});for(const e of Object.keys(t.colors||{}))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){const n=s(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,B_,{enumerable:!1,writable:!1,value:!0}),t}async function H_(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Ym(e)).map(async e=>await Km(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function q_(e){return(await Promise.all(e.map(async e=>Jm(e)?null:j_(await Km(e))))).filter(e=>!!e)}let F_=3,$_=!1;class G_ extends Error{constructor(e){super(e),this.name="ShikiError"}}class V_ extends _f{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=j_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=cp.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){const t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new G_(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(const e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){const e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new G_(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(const[e,n]of t)this._resolver.addLanguage(n);for(const[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class U_{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let e=1;e<=t.length;e++){const r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let K_=0;function W_(e){K_+=1,!1!==e.warnings&&K_>=10&&K_%10==0&&console.warn(`[Shiki] ${K_} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new G_("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(j_),o=new U_(e.engine,n),i=new V_(o,r,n,e.langAlias);let s;function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};d();const t=i.getTheme(e);if(!t)throw new G_(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(...e){d(),i.loadLanguages(e.flat(1))}function c(...e){d();for(const t of e.flat(1))i.loadTheme(t)}function d(){if(t)throw new G_("Shiki instance has been disposed")}function u(){t||(t=!0,i.dispose(),K_-=1)}return{setTheme:function(e){d();const t=a(e);return s!==e&&(i.setTheme(t),s=e),{theme:t,colorMap:i.getColorMap()}},getTheme:a,getLanguage:function(e){d();const t=i.getGrammar("string"==typeof e?e:e.name);if(!t)throw new G_(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return d(),i.getLoadedThemes()},getLoadedLanguages:function(){return d(),i.getLoadedLanguages()},loadLanguage:async function(...e){return l(await H_(e))},loadLanguageSync:l,loadTheme:async function(...e){return d(),c(await q_(e))},loadThemeSync:c,dispose:u,[Symbol.dispose]:u}}async function Y_(e){e.engine||function(e,t=3){if(F_&&!("number"==typeof F_&&t>F_)){if($_)throw new Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([q_(e.themes||[]),H_(e.langs||[]),e.engine]);return W_({...e,themes:t,langs:n,engine:r})}async function X_(e){const t=await Y_(e);return{getLastGrammarState:(...e)=>y_(t,...e),codeToTokensBase:(e,n)=>v_(t,e,n),codeToTokensWithThemes:(e,n)=>N_(t,e,n),codeToTokens:(e,n)=>A_(t,e,n),codeToHast:(e,n)=>R_(t,e,n),codeToHtml:(e,n)=>O_(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function J_(e){const t=e.langs,n=e.themes,r=e.engine;return async function(e){function o(n){if("string"==typeof n){if(Ym(n))return[];n=e.langAlias?.[n]||n;const r=t[n];if(!r)throw new Zh(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function i(e){if(Jm(e))return"none";if("string"==typeof e){const t=n[e];if(!t)throw new Zh(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}const s=(e.themes??[]).map(e=>i(e)),a=(e.langs??[]).map(e=>o(e)),l=await X_({engine:e.engine??r(),...e,themes:s,langs:a});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(o)),loadTheme:(...e)=>l.loadTheme(...e.map(i)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}function Z_(e,t){const n=function(e){let t;return async function(n={}){if(t){const e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}return t=e({...n,themes:n.themes||[],langs:n.langs||[]}),t}}(e);async function r(e,r){const o=await n({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)}),i=await(t?.guessEmbeddedLanguages?.(e,r.lang,o));return i&&await o.loadLanguage(...i),o}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await r(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await r(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await r(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await r(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await r(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}class Q_ extends Error{constructor(e){super(e),this.name="ShikiError"}}function eg(){return"undefined"!=typeof performance?performance.now():Date.now()}const tg=(e,t)=>e+(t-e%t)%t;async function ng(e){let t,n;const r={};function o(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function i(e){try{return t.grow(e-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}const s="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(e,t){return e?function(e,t,n=1024){const r=t+n;let o=t;for(;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&s)return s.decode(e.subarray(t,o));let i="";for(;t<o;){let n=e[t++];if(!(128&n)){i+=String.fromCharCode(n);continue}const r=63&e[t++];if(192==(224&n)){i+=String.fromCharCode((31&n)<<6|r);continue}const o=63&e[t++];if(n=224==(240&n)?(15&n)<<12|r<<6|o:(7&n)<<18|r<<12|o<<6|63&e[t++],n<65536)i+=String.fromCharCode(n);else{const e=n-65536;i+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return i}(r.HEAPU8,e,t):""}const l={emscripten_get_now:eg,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){const t=r.HEAPU8.length,n=2147483648;if((e>>>=0)>n)return!1;for(let r=1;r<=4;r*=2){let o=t*(1+.2/r);o=Math.min(o,e+100663296);if(i(Math.min(n,tg(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const n={env:l,wasi_snapshot_preview1:l},i=await e(n);t=i.memory,o(t.buffer),Object.assign(r,i),r.UTF8ToString=a}(),r}var rg=Object.defineProperty,og=(e,t,n)=>((e,t,n)=>t in e?rg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);let ig=null;class sg{constructor(e){og(this,"utf16Length"),og(this,"utf8Length"),og(this,"utf16Value"),og(this,"utf8Value"),og(this,"utf16OffsetToUtf8"),og(this,"utf8OffsetToUtf16");const t=e.length,n=sg._utf8ByteLength(e),r=n!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=n);const i=r?new Uint32Array(n+1):null;r&&(i[n]=t);const s=new Uint8Array(n);let a=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let c=l,d=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(l-55296<<10)|t-56320,d=!0)}r&&(o[n]=a,d&&(o[n+1]=a),c<=127?i[a+0]=n:c<=2047?(i[a+0]=n,i[a+1]=n):c<=65535?(i[a+0]=n,i[a+1]=n,i[a+2]=n):(i[a+0]=n,i[a+1]=n,i[a+2]=n,i[a+3]=n)),c<=127?s[a++]=c:c<=2047?(s[a++]=192|(1984&c)>>>6,s[a++]=128|(63&c)>>>0):c<=65535?(s[a++]=224|(61440&c)>>>12,s[a++]=128|(4032&c)>>>6,s[a++]=128|(63&c)>>>0):(s[a++]=240|(1835008&c)>>>18,s[a++]=128|(258048&c)>>>12,s[a++]=128|(4032&c)>>>6,s[a++]=128|(63&c)>>>0),d&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){const o=e.charCodeAt(n);let i=o,s=!1;if(o>=55296&&o<=56319&&n+1<r){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(i=65536+(o-55296<<10)|t-56320,s=!0)}t+=i<=127?1:i<=2047?2:i<=65535?3:4,s&&n++}return t}createString(e){const t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}const ag=class e{constructor(t){if(og(this,"id",++e.LAST_ID),og(this,"_onigBinding"),og(this,"content"),og(this,"utf16Length"),og(this,"utf8Length"),og(this,"utf16OffsetToUtf8"),og(this,"utf8OffsetToUtf16"),og(this,"ptr"),!ig)throw new Q_("Must invoke loadWasm first.");this._onigBinding=ig,this.content=t;const n=new sg(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=ig.omalloc(1e4)),e._sharedPtrInUse=!0,ig.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(ig)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};og(ag,"LAST_ID",0),og(ag,"_sharedPtr",0),og(ag,"_sharedPtrInUse",!1);let lg,cg=ag;class dg{constructor(e){if(og(this,"_onigBinding"),og(this,"_ptr"),!ig)throw new Q_("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,o=e.length;r<o;r++){const o=new sg(e[r]);t[r]=o.createString(ig),n[r]=o.utf8Length}const r=ig.omalloc(4*e.length);ig.HEAPU32.set(t,r/4);const o=ig.omalloc(4*e.length);ig.HEAPU32.set(n,o/4);const i=ig.createOnigScanner(r,o,e.length);for(let n=0,r=e.length;n<r;n++)ig.ofree(t[n]);ig.ofree(o),ig.ofree(r),0===i&&function(e){throw new Q_(e.UTF8ToString(e.getLastOnigError()))}(ig),this._onigBinding=ig,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new cg(e);const n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){const o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===i)return null;const s=o.HEAPU32;let a=i/4;const l=s[a++],c=s[a++],d=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(s[a++]),r=e.convertUtf8OffsetToUtf16(s[a++]);d[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:d}}}function ug(e){if(lg)return lg;return lg=async function(){ig=await ng(async t=>{let n=e;var r;return n=await n,"function"==typeof n&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator?n=await n.instantiator(t):!function(e){return"function"==typeof e.default}(n)?(function(e){return void 0!==e.data}(n)&&(n=n.data),!function(e){return"undefined"!=typeof Response&&e instanceof Response}(n)?!function(e){return"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(e)||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&e instanceof Uint32Array}(n)?n instanceof WebAssembly.Module?n=await hg(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await hg(n.default)(t)):n=await hg(n)(t):n="function"==typeof WebAssembly.instantiateStreaming?await(r=n,e=>WebAssembly.instantiateStreaming(r,e))(t):await function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(n)(t)):n=await n.default(t),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}(),lg}function hg(e){return t=>WebAssembly.instantiate(e,t)}const pg=J_({langs:Yh,themes:Jh,engine:()=>async function(e){return e&&await ug(e),{createScanner:e=>new dg(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new cg(e)}}(o.e(4709).then(o.bind(o,4709)))}),{codeToHtml:fg,codeToHast:mg,codeToTokens:_g,codeToTokensBase:gg,codeToTokensWithThemes:bg,getSingletonHighlighter:xg,getLastGrammarState:vg}=Z_(pg,{guessEmbeddedLanguages:function(e,t,n){const r=new Set;for(const t of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(t[1]);for(const t of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(t[1]);for(const t of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(t[1]);if(!n)return Array.from(r);const o=n.getBundledLanguages();return Array.from(r).filter(e=>e&&o[e])}}),yg=["id","data-type"],wg=["data-id","onClick"],kg=["innerHTML"],Sg=["disabled"],Cg=On({__name:"cube-code",props:{cube:{}},setup(e){const{root:t,status:n}=e.cube,{stats:r}=t,o=Gt(),i=Gt(),s=Gt(),a=Gt();function l(e){if(!e._draglist)return;const t=e._draglist.init();return e.tabs.length>0&&t<=0?requestAnimationFrame(()=>l(e)):void 0}function c(){const t=e.cube._draglist;if(!t)return;const n=e.cube.get_upstream_sum_scale();t.scale_h=n.sx,t.scale_v=n.sy}function d(){const t=o.value,n=s.value;t&&n&&(e.cube._draglist=new $i.DragList(t,"horizental","data-id","insert"),c(),e.cube._draglist.register_start(c),l(e.cube))}let u;Jn(()=>{e.cube.update_code_html()}),oo(()=>[n.active_tab_id,n.active_tab?.code],()=>{const t=e.cube.active_tab,n=a.value;t&&n&&(n.value=t.code)},{immediate:!0}),oo(()=>[n.code_html],()=>{const t=e.cube.active_tab,n=a.value,r=n?.previousElementSibling;if(!t||!n||!r)return;const o=n.parentElement;fn(()=>{const t=r.nextElementSibling,n=r.firstElementChild;if(t&&n){if(o){const t=n.style.backgroundColor;if(t.startsWith("rgb")){const n=t.replace("rgb","rgba").replace(")",", 0.85)");e.cube.attrs.codebg=n}else e.cube.attrs.codebg=t;e.cube.attrs.caret=n.style.color}n.style.border="none",n.style.outline="none"}})}),Jn(()=>{d(),function(){const t=s.value,n=a.value;if(!t)return;n&&(n.value=e.cube.active_tab?.code||"");const r=i.value;if(!r)return;u=new $i.DragDiff(r);let o=e.cube.attrs.width,l=e.cube.attrs.height,c=o,d=l,h={sx:1,sy:1};u.register_down(()=>{h=e.cube.get_upstream_sum_scale(),o=e.cube.attrs.width,l=e.cube.attrs.height}),u.register_move((e,n)=>{c=Math.round(e/h.sx+o),d=Math.round(n/h.sy+l),t.style.width=c+"px",t.style.height=d+"px"}),u.register_up((t,n)=>{if(o===c&&l===d)return;const r=e.cube.courier.get_recorder(),i=Math.round(t/h.sx+o),s=Math.round(n/h.sy+l);r.tell(e.cube,Mi.resize(e.cube.id,i,s)),e.cube.history.record(r)}),u.register_cancel(()=>{Object.assign(e.cube.data.attrs,{width:o,height:l})})}()}),tr(()=>{u?.off()});const h=_i(()=>({"caret-color":e.cube.attrs.caret}));function p(e){e.stopPropagation()}function f(t){if(!t.previousElementSibling)return;const n=t.value,{id:r,courier:o,history:i}=e.cube,s=e.cube.tabbar_height,a=e.cube.max_height_auto,l=o.get_recorder(),c=Vh.update(r,e.cube.active_tab_id,n);l.tell(e.cube,c),fn(()=>{const n=t.scrollHeight+s,o=Math.min(a,n),c=Mi.set_attr(r,{height:o});l.tell(e.cube,c),i.record(l)})}function m(e){f(e.currentTarget)}function _(e){const{hotkeys:n,clipboard:r,history:o}=t,i=e.key.toLowerCase();if([n.data[w.HotKeys["scope-add"]]].some(t=>n.validate(e,t)))return e.preventDefault();if(t.status.scope_count_normal>0&&["backspace","delete"].includes(i)){e.preventDefault(),e.stopPropagation();const t=r.delete_scope();return void(t&&o.record(t))}const s=e.currentTarget;if("tab"===i){e.preventDefault(),e.stopPropagation();let t=s.value;const n=s.selectionStart,r=s.selectionEnd;t=t.slice(0,n)+"\t"+t.slice(r),s.value=t,s.selectionStart=n+1,s.selectionEnd=n+1,f(s)}}function g(e){e.preventDefault();const t=e.currentTarget;t.scrollTop=0,t.scrollLeft=0}function b(e,t=50){e.stopPropagation();const n=e.currentTarget;e.deltaY>0?$i.DomAnimation.scroll_element(n,t,"horizental"):$i.DomAnimation.scroll_element(n,-t,"horizental")}function x(e){const t=e.currentTarget,n=t.firstElementChild,r=t.lastElementChild;if(!n||!r)return;const o=e.shiftKey,{scrollLeft:i,scrollTop:s,scrollWidth:a,scrollHeight:l}=t,c=t.getBoundingClientRect();e.deltaY>0?o?i+c.width<a&&(e.preventDefault(),e.stopPropagation(),$i.DomAnimation.scroll_element(t,20,"horizental")):s+c.height<l&&(e.preventDefault(),e.stopPropagation(),$i.DomAnimation.scroll_element(t,20,"vertical")):o?i>0&&(e.preventDefault(),e.stopPropagation(),$i.DomAnimation.scroll_element(t,-20,"horizental")):s>0&&(e.preventDefault(),e.stopPropagation(),$i.DomAnimation.scroll_element(t,-20,"vertical"))}function v(t){rc(t,e.cube)}return(t,l)=>(zo(),Po("div",{class:"cube-code",id:t.cube.id,"data-type":t.cube.type,ref_key:"code",ref:s,style:ce(Wt(n).css),onPointerdown:p,onBeforeinput:p,onCompositionstart:p,onContextmenu:v},[Bo("div",{class:"code-tabbar",onWheel:b},[Bo("div",{class:"code-tabs-box",ref_key:"tabsbox",ref:o},[(zo(!0),Po(yo,null,ur(Wt(n).tabs,n=>(zo(),Po("div",{class:"code-tab","data-id":n.id,key:n.id,onClick:()=>function(t){const{courier:n,history:r}=e.cube,o=n.get_recorder();o.tell(e.cube,Vh.change_active(e.cube.id,t.id)),r.record(o)}(n)},[Bo("div",{class:fe(["code-tab-name",{"code-active-tab":n.id===t.cube.active_tab_id}])},xe(n.name),3)],8,wg))),128))],512)],32),Bo("div",{class:"code-box",onWheel:x},[Bo("div",{class:"code-box-inner",style:ce({background:Wt(n).attrs.codebg})},[Bo("span",{class:"code-highlight",onWheel:l[0]||(l[0]=e=>e.preventDefault()),innerHTML:Wt(n).code_html},null,40,kg),Bo("textarea",{disabled:Wt(r).is_read_mode,ref_key:"textarea",ref:a,style:ce(h.value),onKeyup:g,onKeydown:_,autocapitalize:"false",autocomplete:"false",autocorrect:"false",spellcheck:"false",onInput:m},null,44,Sg)],4)],32),Bo("div",{class:"code-dragger",ref_key:"code_dragger",ref:i},null,512)],44,yg))}}),Mg=(0,Ls.A)(Cg,[["__scopeId","data-v-06afb6b3"]]),zg={".py":"python",".java":"java",".c":"c",".cpp":"c++",".js":"javascript",".html":"html",".css":"css",".php":"php",".rb":"ruby",".go":"go",".swift":"swift",".kt":"kotlin",".rs":"rust",".ts":"typescript",".sh":"shell",".pl":"perl",".cs":"c#",".sql":"sql",".r":"r",".m":"matlab",".adb":"ada",".ads":"ada",".lua":"lua",".scala":"scala",".dart":"dart",".hs":"haskell",".erl":"erlang",".ex":"elixir",".jl":"julia",".groovy":"groovy",".fs":"f#",".clj":"clojure",".scm":"scheme",".ml":"ocaml",".pas":"pascal",".d":"d",".nim":"nim",".zig":"zig",".v":"v",".coffee":"coffeescript",".litcoffee":"coffeescript",".vue":"vue",".svelte":"svelte",".elm":"elm",".purs":"purescript",".exs":"elixir",".eex":"elixir",".heex":"elixir",".tcl":"tcl",".tk":"tcl",".awk":"awk",".ps1":"powershell",".psm1":"powershell",".psd1":"powershell",".bat":"batch",".cmd":"batch",".json":"json",".xml":"xml",".yaml":"yaml",".yml":"yaml",".toml":"toml",".ini":"ini",".md":"markdown",".markdown":"markdown",".tex":"latex",".sty":"latex",".cls":"latex",".bib":"bibtex",".csv":"csv",".tsv":"tsv",".log":"log"};class Ng extends Ts{_code_html=Gt("");constructor(e){super(e)}get cube(){return this._cube}get code_html(){return this._code_html.value}get attrs(){return this._data.attrs}get info(){return this._data.info}get tabs(){return this.info.tabs}get active_tab_id(){return this.info.active_tab_id}get active_tab(){return this.tabs.find(e=>e.id===this.active_tab_id)}init(){super.init(),this.update_code_html()}update_code_html(e){this._code_html.value=e||this.cube.code_html}update_tabs(e){this.info.tabs=e||this.cube.info.tabs}update_tab_name(e,t){const n=this.tabs.find(t=>t.id===e);n&&(n.name=t)}update_active_tab_id(e){this.info.active_tab_id=e}}function Ag(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}const Tg="dracula";class Rg extends nd{static _langs=[...Object.keys(Yh)];static _themes=[...Object.keys(Jh)];_status=new Ng(this);_code_html="";_draglist;constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get tabbar_height(){return 36}get max_height_auto(){return 600}get langs(){return[...Rg._langs]}get themes(){return[...Rg._themes]}get component(){return Mg}get tabs(){return this.info.tabs}get active_tab_id(){return this.info.active_tab_id}set active_tab_id(e){const t=this.tabs.find(t=>t.id===e);t&&(this.info.active_tab_id=t.id)}get active_tab(){return this.tabs.find(e=>e.id===this.active_tab_id)}get info(){return this.data.info}get css(){const e=this.config.data.line_indent,t=this.attrs.indent,n=this.attrs.width,r=this.attrs.height;return{...this.data.css,"margin-left":t>0?t*e+"px":"0px",width:n+"px",height:r+"px"}}get attrs(){return this.data.attrs}get code_html(){return this._code_html}export(){return this.base_export()}gc(){super.base_gc()}build_child(e){}update_data(e,t){return Rg.update_data(e,t)}code_to_html(e){return fg(e.code,{lang:e.lang,theme:e.theme,cssVariablePrefix:"--shiki-"})}update_code_html(){if(0===this.tabs.length)this._code_html="",this.status.update_code_html();else{const e=this.active_tab;if(!e)return;this.code_to_html(e).then(e=>{this._code_html=e,this.status.update_code_html()})}}get meta(){return Rg.meta}create_tab(e,t,n=Tg){return{id:rd.get_id(),name:t,lang:e,code:"",theme:n||Tg}}replace_id(e,t,n={}){return Rg.replace_id(this.root,e,t,n)}copy_code(){const e=this.active_tab;if(!e)return xi.tips?.tip_error("当前没有激活的代码块tab");const t=e.code,n=new Blob([t],{type:"text/plain"}),r=new ClipboardItem({[n.type]:n});this.clipboard.set_clipboard_data(r).then(e=>{xi.tips?.tip_info("复制代码成功👏")})}change_lang(e){const{tabid:t,lang:n}=e,{courier:r,id:o}=this,i=r.get_recorder(),s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.lang;return s.lang=n,i.add_recover(Vh.change_lang(o,t,a)),this.update_code_html(),i}change_theme(e){const{tabid:t,theme:n}=e,{courier:r,id:o}=this,i=r.get_recorder(),s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.theme;return s.theme=n,i.add_recover(Vh.change_theme(o,t,a)),this.update_code_html(),i}code_update(e){const{tabid:t,code:n}=e,{courier:r,id:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.code;return s.code=n,i.add_recover(Vh.update(o,t,a)),this.update_code_html(),i}code_add(e){const{item:t,focus:n}=e,{courier:r,id:o}=this,i=r.get_recorder();return i.add_cmd(e),this.info.tabs.push(t),i.add_recover(Vh.remove(o,t.id)),this.update_code_html(),n&&i.tell(this,Vh.change_active(o,t.id)),fn(()=>{this._draglist?.init()}),this.status.update_tabs(),i}code_remove(e){const{tabid:t}=e,{courier:n,id:r}=this,o=n.get_recorder();o.add_cmd(e);const i=this.tabs.find(e=>e.id===t);if(!i)return;const s=this.tabs.indexOf(i),a=this.tabs[s-1]||this.tabs[s+1];return s>=0&&this.tabs.splice(s,1),o.add_recover(Vh.add(r,i)),a&&(this.active_tab_id=a.id),this.update_code_html(),this.status.update_tabs(),fn(()=>{this._draglist?.init()}),o}code_rename(e){const{tabid:t,filename:n}=e,{courier:r,id:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.name;return s.name=n,i.add_recover(Vh.rename(o,t,a)),this.status.update_tab_name(t,n),i}change_active(e){const{tabid:t}=e,{courier:n,id:r}=this,o=n.get_recorder(),i=this.tabs.find(e=>e.id===t);if(!i)return i;const s=this.active_tab_id;return this.active_tab_id=t,o.add_recover(Vh.change_active(r,s)),this.update_code_html(),this.status.update_active_tab_id(t),o}on_cursor_in_tail(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ad(t),s=this.dom?.querySelector("textarea");return s?.focus(),i}on_cursor_in_head(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ad(t),s=this.dom?.querySelector("textarea");return s?.focus(),i}static get langs(){return[...this._langs]}static get themes(){return[...this._themes]}static get meta(){return{cubename:"代码块",type:k.Cubes.code,block:!0,version:1,show:!0}}static get_default(){return{id:rd.get_id(),type:k.Cubes.code,info:{tabs:[],active_tab_id:""},attrs:{width:560,height:120,codebg:"transparent",caret:"black"},css:{}}}static get_default_by_string(e="typescript",t=""){const n={name:`code${this.get_format_from_lang(e)}`,id:rd.get_id(),code:t,lang:e,theme:"andromeeda"};return{id:rd.get_id(),type:k.Cubes.code,info:{tabs:[n],active_tab_id:n.id},attrs:{width:560,height:120,codebg:"transparent",caret:"black"},css:{}}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n}static get_format_from_lang(e){for(let t in zg)if(zg[t]===e)return t;return""}static get_lang_from_format(e){return zg[e]}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Ag([Ti(l.Names.change_lang)],Rg.prototype,"change_lang",null),Ag([Ti(l.Names.change_theme)],Rg.prototype,"change_theme",null),Ag([Ti(l.Names.code_update)],Rg.prototype,"code_update",null),Ag([Ti(l.Names.code_add)],Rg.prototype,"code_add",null),Ag([Ti(l.Names.code_remove)],Rg.prototype,"code_remove",null),Ag([Ti(l.Names.code_rename)],Rg.prototype,"code_rename",null),Ag([Ti(l.Names.change_active)],Rg.prototype,"change_active",null),Ag([Ti(g.Names.cursor_in_tail)],Rg.prototype,"on_cursor_in_tail",null),Ag([Ti(g.Names.cursor_in_head)],Rg.prototype,"on_cursor_in_head",null),Rg=Ag([ki],Rg);const Pg=["id","data-type","innerHTML"],Og=On({__name:"cube-fomula",props:{cube:{}},setup(e){const{event:t,status:n}=e.cube;function r(){t.emit_show_cube_editor(e.cube)}const o=_i(()=>{let t={...n.css};return e.cube.attrs.block&&(t.display="block",t["text-align"]="center"),t});return(e,t)=>(zo(),Po("span",{class:"cube-fomula",onClick:r,id:e.cube.id,"data-type":e.cube.type,style:ce(o.value),innerHTML:Wt(n).mathml},null,12,Pg))}}),Eg=(0,Ls.A)(Og,[["__scopeId","data-v-7642071d"]]);class Lg{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Lg(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Ig{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Ig(t,Lg.range(this,e))}}class Dg{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,o="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var s=i.lexer.input;n=i.start,r=i.end,n===s.length?o+=" at end of input: ":o+=" at position "+(n+1)+": ";var a=s.slice(n,r).replace(/[^]/g,"$&̲");o+=(n>15?"…"+s.slice(n-15,n):s.slice(0,n))+a+(r+15<s.length?s.slice(r,r+15)+"…":s.slice(r))}var l=new Error(o);return l.name="ParseError",l.__proto__=Dg.prototype,l.position=n,null!=n&&null!=r&&(l.length=r-n),l.rawMessage=e,l}}Dg.prototype.__proto__=Error.prototype;var Bg=/([A-Z])/g,jg={"&":"&",">":">","<":"<",'"':""","'":"'"},Hg=/[&><"']/g;var qg=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Fg={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Hg,e=>jg[e])},hyphenate:function(e){return e.replace(Bg,"-$1").toLowerCase()},getBaseElem:qg,isCharacterBox:function(e){var t=qg(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},$g={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Gg(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Vg{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},$g)if($g.hasOwnProperty(t)){var n=$g[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Gg(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Dg("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Fg.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class Ug{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Kg[Wg[this.id]]}sub(){return Kg[Yg[this.id]]}fracNum(){return Kg[Xg[this.id]]}fracDen(){return Kg[Jg[this.id]]}cramp(){return Kg[Zg[this.id]]}text(){return Kg[Qg[this.id]]}isTight(){return this.size>=2}}var Kg=[new Ug(0,0,!1),new Ug(1,0,!0),new Ug(2,1,!1),new Ug(3,1,!0),new Ug(4,2,!1),new Ug(5,2,!0),new Ug(6,3,!1),new Ug(7,3,!0)],Wg=[4,5,4,5,6,7,6,7],Yg=[5,5,5,5,7,7,7,7],Xg=[2,3,4,5,6,7,6,7],Jg=[3,3,5,5,7,7,7,7],Zg=[1,1,3,3,5,5,7,7],Qg=[0,1,2,3,2,3,2,3],eb={DISPLAY:Kg[0],TEXT:Kg[2],SCRIPT:Kg[4],SCRIPTSCRIPT:Kg[6]},tb=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var nb=[];function rb(e){for(var t=0;t<nb.length;t+=2)if(e>=nb[t]&&e<=nb[t+1])return!0;return!1}tb.forEach(e=>e.blocks.forEach(e=>nb.push(...e)));var ob=80,ib={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class sb{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Fg.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>e.toText()).join("")}}var ab={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},lb={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},cb={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function db(e,t,n){if(!ab[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),o=ab[t][r];if(!o&&e[0]in cb&&(r=cb[e[0]].charCodeAt(0),o=ab[t][r]),o||"text"!==n||rb(r)&&(o=ab[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var ub={};var hb=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],pb=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],fb=function(e,t){return t.size<2?e:hb[e-1][t.size-1]};class mb{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||mb.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=pb[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new mb(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:fb(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:pb[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=fb(mb.BASESIZE,e);return this.size===t&&this.textSize===mb.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==mb.BASESIZE?["sizing","reset-size"+this.size,"size"+mb.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!ub[t=e>=5?0:e>=3?1:2]){var n=ub[t]={cssEmPerMu:lb.quad[t]/18};for(var r in lb)lb.hasOwnProperty(r)&&(n[r]=lb[r][t])}return ub[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}mb.BASESIZE=6;var _b={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},gb={ex:!0,em:!0,mu:!0},bb=function(e){return"string"!=typeof e&&(e=e.unit),e in _b||e in gb||"ex"===e},xb=function(e,t){var n;if(e.unit in _b)n=_b[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Dg("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},vb=function(e){return+e.toFixed(4)+"em"},yb=function(e){return e.filter(e=>e).join(" ")},wb=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},kb=function(e){var t=document.createElement(e);for(var n in t.className=yb(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},Sb=/[\s"'>/=\x00-\x1f]/,Cb=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Fg.escape(yb(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Fg.hyphenate(r)+":"+this.style[r]+";");for(var o in n&&(t+=' style="'+Fg.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(o)){if(Sb.test(o))throw new Dg("Invalid attribute name '"+o+"'");t+=" "+o+'="'+Fg.escape(this.attributes[o])+'"'}t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"};class Mb{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,wb.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Fg.contains(this.classes,e)}toNode(){return kb.call(this,"span")}toMarkup(){return Cb.call(this,"span")}}class zb{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,wb.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Fg.contains(this.classes,e)}toNode(){return kb.call(this,"a")}toMarkup(){return Cb.call(this,"a")}}class Nb{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Fg.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+Fg.escape(this.src)+'" alt="'+Fg.escape(this.alt)+'"',t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Fg.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Fg.escape(t)+'"'),e+="'/>"}}var Ab={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Tb{constructor(e,t,n,r,o,i,s,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=o||0,this.width=i||0,this.classes=s||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<tb.length;t++)for(var n=tb[t],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(e>=o[0]&&e<=o[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ab[this.text])}hasClass(e){return Fg.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=vb(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=yb(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Fg.escape(yb(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=Fg.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Fg.escape(n)+'"');var o=Fg.escape(this.text);return e?(t+=">",t+=o,t+="</span>"):o}}class Rb{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Fg.escape(this.attributes[t])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}}class Pb{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",ib[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Fg.escape(this.alternate)+'"/>':'<path d="'+Fg.escape(ib[this.pathName])+'"/>'}}class Ob{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Fg.escape(this.attributes[t])+'"');return e+="/>"}}function Eb(e){if(e instanceof Tb)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var Lb={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ib={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Db={math:{},text:{}};function Bb(e,t,n,r,o,i){Db[e][o]={font:t,group:n,replace:r},i&&r&&(Db[e][r]=Db[e][o])}var jb="math",Hb="text",qb="main",Fb="ams",$b="accent-token",Gb="bin",Vb="close",Ub="inner",Kb="mathord",Wb="op-token",Yb="open",Xb="punct",Jb="rel",Zb="spacing",Qb="textord";Bb(jb,qb,Jb,"≡","\\equiv",!0),Bb(jb,qb,Jb,"≺","\\prec",!0),Bb(jb,qb,Jb,"≻","\\succ",!0),Bb(jb,qb,Jb,"∼","\\sim",!0),Bb(jb,qb,Jb,"⊥","\\perp"),Bb(jb,qb,Jb,"⪯","\\preceq",!0),Bb(jb,qb,Jb,"⪰","\\succeq",!0),Bb(jb,qb,Jb,"≃","\\simeq",!0),Bb(jb,qb,Jb,"∣","\\mid",!0),Bb(jb,qb,Jb,"≪","\\ll",!0),Bb(jb,qb,Jb,"≫","\\gg",!0),Bb(jb,qb,Jb,"≍","\\asymp",!0),Bb(jb,qb,Jb,"∥","\\parallel"),Bb(jb,qb,Jb,"⋈","\\bowtie",!0),Bb(jb,qb,Jb,"⌣","\\smile",!0),Bb(jb,qb,Jb,"⊑","\\sqsubseteq",!0),Bb(jb,qb,Jb,"⊒","\\sqsupseteq",!0),Bb(jb,qb,Jb,"≐","\\doteq",!0),Bb(jb,qb,Jb,"⌢","\\frown",!0),Bb(jb,qb,Jb,"∋","\\ni",!0),Bb(jb,qb,Jb,"∝","\\propto",!0),Bb(jb,qb,Jb,"⊢","\\vdash",!0),Bb(jb,qb,Jb,"⊣","\\dashv",!0),Bb(jb,qb,Jb,"∋","\\owns"),Bb(jb,qb,Xb,".","\\ldotp"),Bb(jb,qb,Xb,"⋅","\\cdotp"),Bb(jb,qb,Qb,"#","\\#"),Bb(Hb,qb,Qb,"#","\\#"),Bb(jb,qb,Qb,"&","\\&"),Bb(Hb,qb,Qb,"&","\\&"),Bb(jb,qb,Qb,"ℵ","\\aleph",!0),Bb(jb,qb,Qb,"∀","\\forall",!0),Bb(jb,qb,Qb,"ℏ","\\hbar",!0),Bb(jb,qb,Qb,"∃","\\exists",!0),Bb(jb,qb,Qb,"∇","\\nabla",!0),Bb(jb,qb,Qb,"♭","\\flat",!0),Bb(jb,qb,Qb,"ℓ","\\ell",!0),Bb(jb,qb,Qb,"♮","\\natural",!0),Bb(jb,qb,Qb,"♣","\\clubsuit",!0),Bb(jb,qb,Qb,"℘","\\wp",!0),Bb(jb,qb,Qb,"♯","\\sharp",!0),Bb(jb,qb,Qb,"♢","\\diamondsuit",!0),Bb(jb,qb,Qb,"ℜ","\\Re",!0),Bb(jb,qb,Qb,"♡","\\heartsuit",!0),Bb(jb,qb,Qb,"ℑ","\\Im",!0),Bb(jb,qb,Qb,"♠","\\spadesuit",!0),Bb(jb,qb,Qb,"§","\\S",!0),Bb(Hb,qb,Qb,"§","\\S"),Bb(jb,qb,Qb,"¶","\\P",!0),Bb(Hb,qb,Qb,"¶","\\P"),Bb(jb,qb,Qb,"†","\\dag"),Bb(Hb,qb,Qb,"†","\\dag"),Bb(Hb,qb,Qb,"†","\\textdagger"),Bb(jb,qb,Qb,"‡","\\ddag"),Bb(Hb,qb,Qb,"‡","\\ddag"),Bb(Hb,qb,Qb,"‡","\\textdaggerdbl"),Bb(jb,qb,Vb,"⎱","\\rmoustache",!0),Bb(jb,qb,Yb,"⎰","\\lmoustache",!0),Bb(jb,qb,Vb,"⟯","\\rgroup",!0),Bb(jb,qb,Yb,"⟮","\\lgroup",!0),Bb(jb,qb,Gb,"∓","\\mp",!0),Bb(jb,qb,Gb,"⊖","\\ominus",!0),Bb(jb,qb,Gb,"⊎","\\uplus",!0),Bb(jb,qb,Gb,"⊓","\\sqcap",!0),Bb(jb,qb,Gb,"∗","\\ast"),Bb(jb,qb,Gb,"⊔","\\sqcup",!0),Bb(jb,qb,Gb,"◯","\\bigcirc",!0),Bb(jb,qb,Gb,"∙","\\bullet",!0),Bb(jb,qb,Gb,"‡","\\ddagger"),Bb(jb,qb,Gb,"≀","\\wr",!0),Bb(jb,qb,Gb,"⨿","\\amalg"),Bb(jb,qb,Gb,"&","\\And"),Bb(jb,qb,Jb,"⟵","\\longleftarrow",!0),Bb(jb,qb,Jb,"⇐","\\Leftarrow",!0),Bb(jb,qb,Jb,"⟸","\\Longleftarrow",!0),Bb(jb,qb,Jb,"⟶","\\longrightarrow",!0),Bb(jb,qb,Jb,"⇒","\\Rightarrow",!0),Bb(jb,qb,Jb,"⟹","\\Longrightarrow",!0),Bb(jb,qb,Jb,"↔","\\leftrightarrow",!0),Bb(jb,qb,Jb,"⟷","\\longleftrightarrow",!0),Bb(jb,qb,Jb,"⇔","\\Leftrightarrow",!0),Bb(jb,qb,Jb,"⟺","\\Longleftrightarrow",!0),Bb(jb,qb,Jb,"↦","\\mapsto",!0),Bb(jb,qb,Jb,"⟼","\\longmapsto",!0),Bb(jb,qb,Jb,"↗","\\nearrow",!0),Bb(jb,qb,Jb,"↩","\\hookleftarrow",!0),Bb(jb,qb,Jb,"↪","\\hookrightarrow",!0),Bb(jb,qb,Jb,"↘","\\searrow",!0),Bb(jb,qb,Jb,"↼","\\leftharpoonup",!0),Bb(jb,qb,Jb,"⇀","\\rightharpoonup",!0),Bb(jb,qb,Jb,"↙","\\swarrow",!0),Bb(jb,qb,Jb,"↽","\\leftharpoondown",!0),Bb(jb,qb,Jb,"⇁","\\rightharpoondown",!0),Bb(jb,qb,Jb,"↖","\\nwarrow",!0),Bb(jb,qb,Jb,"⇌","\\rightleftharpoons",!0),Bb(jb,Fb,Jb,"≮","\\nless",!0),Bb(jb,Fb,Jb,"","\\@nleqslant"),Bb(jb,Fb,Jb,"","\\@nleqq"),Bb(jb,Fb,Jb,"⪇","\\lneq",!0),Bb(jb,Fb,Jb,"≨","\\lneqq",!0),Bb(jb,Fb,Jb,"","\\@lvertneqq"),Bb(jb,Fb,Jb,"⋦","\\lnsim",!0),Bb(jb,Fb,Jb,"⪉","\\lnapprox",!0),Bb(jb,Fb,Jb,"⊀","\\nprec",!0),Bb(jb,Fb,Jb,"⋠","\\npreceq",!0),Bb(jb,Fb,Jb,"⋨","\\precnsim",!0),Bb(jb,Fb,Jb,"⪹","\\precnapprox",!0),Bb(jb,Fb,Jb,"≁","\\nsim",!0),Bb(jb,Fb,Jb,"","\\@nshortmid"),Bb(jb,Fb,Jb,"∤","\\nmid",!0),Bb(jb,Fb,Jb,"⊬","\\nvdash",!0),Bb(jb,Fb,Jb,"⊭","\\nvDash",!0),Bb(jb,Fb,Jb,"⋪","\\ntriangleleft"),Bb(jb,Fb,Jb,"⋬","\\ntrianglelefteq",!0),Bb(jb,Fb,Jb,"⊊","\\subsetneq",!0),Bb(jb,Fb,Jb,"","\\@varsubsetneq"),Bb(jb,Fb,Jb,"⫋","\\subsetneqq",!0),Bb(jb,Fb,Jb,"","\\@varsubsetneqq"),Bb(jb,Fb,Jb,"≯","\\ngtr",!0),Bb(jb,Fb,Jb,"","\\@ngeqslant"),Bb(jb,Fb,Jb,"","\\@ngeqq"),Bb(jb,Fb,Jb,"⪈","\\gneq",!0),Bb(jb,Fb,Jb,"≩","\\gneqq",!0),Bb(jb,Fb,Jb,"","\\@gvertneqq"),Bb(jb,Fb,Jb,"⋧","\\gnsim",!0),Bb(jb,Fb,Jb,"⪊","\\gnapprox",!0),Bb(jb,Fb,Jb,"⊁","\\nsucc",!0),Bb(jb,Fb,Jb,"⋡","\\nsucceq",!0),Bb(jb,Fb,Jb,"⋩","\\succnsim",!0),Bb(jb,Fb,Jb,"⪺","\\succnapprox",!0),Bb(jb,Fb,Jb,"≆","\\ncong",!0),Bb(jb,Fb,Jb,"","\\@nshortparallel"),Bb(jb,Fb,Jb,"∦","\\nparallel",!0),Bb(jb,Fb,Jb,"⊯","\\nVDash",!0),Bb(jb,Fb,Jb,"⋫","\\ntriangleright"),Bb(jb,Fb,Jb,"⋭","\\ntrianglerighteq",!0),Bb(jb,Fb,Jb,"","\\@nsupseteqq"),Bb(jb,Fb,Jb,"⊋","\\supsetneq",!0),Bb(jb,Fb,Jb,"","\\@varsupsetneq"),Bb(jb,Fb,Jb,"⫌","\\supsetneqq",!0),Bb(jb,Fb,Jb,"","\\@varsupsetneqq"),Bb(jb,Fb,Jb,"⊮","\\nVdash",!0),Bb(jb,Fb,Jb,"⪵","\\precneqq",!0),Bb(jb,Fb,Jb,"⪶","\\succneqq",!0),Bb(jb,Fb,Jb,"","\\@nsubseteqq"),Bb(jb,Fb,Gb,"⊴","\\unlhd"),Bb(jb,Fb,Gb,"⊵","\\unrhd"),Bb(jb,Fb,Jb,"↚","\\nleftarrow",!0),Bb(jb,Fb,Jb,"↛","\\nrightarrow",!0),Bb(jb,Fb,Jb,"⇍","\\nLeftarrow",!0),Bb(jb,Fb,Jb,"⇏","\\nRightarrow",!0),Bb(jb,Fb,Jb,"↮","\\nleftrightarrow",!0),Bb(jb,Fb,Jb,"⇎","\\nLeftrightarrow",!0),Bb(jb,Fb,Jb,"△","\\vartriangle"),Bb(jb,Fb,Qb,"ℏ","\\hslash"),Bb(jb,Fb,Qb,"▽","\\triangledown"),Bb(jb,Fb,Qb,"◊","\\lozenge"),Bb(jb,Fb,Qb,"Ⓢ","\\circledS"),Bb(jb,Fb,Qb,"®","\\circledR"),Bb(Hb,Fb,Qb,"®","\\circledR"),Bb(jb,Fb,Qb,"∡","\\measuredangle",!0),Bb(jb,Fb,Qb,"∄","\\nexists"),Bb(jb,Fb,Qb,"℧","\\mho"),Bb(jb,Fb,Qb,"Ⅎ","\\Finv",!0),Bb(jb,Fb,Qb,"⅁","\\Game",!0),Bb(jb,Fb,Qb,"‵","\\backprime"),Bb(jb,Fb,Qb,"▲","\\blacktriangle"),Bb(jb,Fb,Qb,"▼","\\blacktriangledown"),Bb(jb,Fb,Qb,"■","\\blacksquare"),Bb(jb,Fb,Qb,"⧫","\\blacklozenge"),Bb(jb,Fb,Qb,"★","\\bigstar"),Bb(jb,Fb,Qb,"∢","\\sphericalangle",!0),Bb(jb,Fb,Qb,"∁","\\complement",!0),Bb(jb,Fb,Qb,"ð","\\eth",!0),Bb(Hb,qb,Qb,"ð","ð"),Bb(jb,Fb,Qb,"╱","\\diagup"),Bb(jb,Fb,Qb,"╲","\\diagdown"),Bb(jb,Fb,Qb,"□","\\square"),Bb(jb,Fb,Qb,"□","\\Box"),Bb(jb,Fb,Qb,"◊","\\Diamond"),Bb(jb,Fb,Qb,"¥","\\yen",!0),Bb(Hb,Fb,Qb,"¥","\\yen",!0),Bb(jb,Fb,Qb,"✓","\\checkmark",!0),Bb(Hb,Fb,Qb,"✓","\\checkmark"),Bb(jb,Fb,Qb,"ℶ","\\beth",!0),Bb(jb,Fb,Qb,"ℸ","\\daleth",!0),Bb(jb,Fb,Qb,"ℷ","\\gimel",!0),Bb(jb,Fb,Qb,"ϝ","\\digamma",!0),Bb(jb,Fb,Qb,"ϰ","\\varkappa"),Bb(jb,Fb,Yb,"┌","\\@ulcorner",!0),Bb(jb,Fb,Vb,"┐","\\@urcorner",!0),Bb(jb,Fb,Yb,"└","\\@llcorner",!0),Bb(jb,Fb,Vb,"┘","\\@lrcorner",!0),Bb(jb,Fb,Jb,"≦","\\leqq",!0),Bb(jb,Fb,Jb,"⩽","\\leqslant",!0),Bb(jb,Fb,Jb,"⪕","\\eqslantless",!0),Bb(jb,Fb,Jb,"≲","\\lesssim",!0),Bb(jb,Fb,Jb,"⪅","\\lessapprox",!0),Bb(jb,Fb,Jb,"≊","\\approxeq",!0),Bb(jb,Fb,Gb,"⋖","\\lessdot"),Bb(jb,Fb,Jb,"⋘","\\lll",!0),Bb(jb,Fb,Jb,"≶","\\lessgtr",!0),Bb(jb,Fb,Jb,"⋚","\\lesseqgtr",!0),Bb(jb,Fb,Jb,"⪋","\\lesseqqgtr",!0),Bb(jb,Fb,Jb,"≑","\\doteqdot"),Bb(jb,Fb,Jb,"≓","\\risingdotseq",!0),Bb(jb,Fb,Jb,"≒","\\fallingdotseq",!0),Bb(jb,Fb,Jb,"∽","\\backsim",!0),Bb(jb,Fb,Jb,"⋍","\\backsimeq",!0),Bb(jb,Fb,Jb,"⫅","\\subseteqq",!0),Bb(jb,Fb,Jb,"⋐","\\Subset",!0),Bb(jb,Fb,Jb,"⊏","\\sqsubset",!0),Bb(jb,Fb,Jb,"≼","\\preccurlyeq",!0),Bb(jb,Fb,Jb,"⋞","\\curlyeqprec",!0),Bb(jb,Fb,Jb,"≾","\\precsim",!0),Bb(jb,Fb,Jb,"⪷","\\precapprox",!0),Bb(jb,Fb,Jb,"⊲","\\vartriangleleft"),Bb(jb,Fb,Jb,"⊴","\\trianglelefteq"),Bb(jb,Fb,Jb,"⊨","\\vDash",!0),Bb(jb,Fb,Jb,"⊪","\\Vvdash",!0),Bb(jb,Fb,Jb,"⌣","\\smallsmile"),Bb(jb,Fb,Jb,"⌢","\\smallfrown"),Bb(jb,Fb,Jb,"≏","\\bumpeq",!0),Bb(jb,Fb,Jb,"≎","\\Bumpeq",!0),Bb(jb,Fb,Jb,"≧","\\geqq",!0),Bb(jb,Fb,Jb,"⩾","\\geqslant",!0),Bb(jb,Fb,Jb,"⪖","\\eqslantgtr",!0),Bb(jb,Fb,Jb,"≳","\\gtrsim",!0),Bb(jb,Fb,Jb,"⪆","\\gtrapprox",!0),Bb(jb,Fb,Gb,"⋗","\\gtrdot"),Bb(jb,Fb,Jb,"⋙","\\ggg",!0),Bb(jb,Fb,Jb,"≷","\\gtrless",!0),Bb(jb,Fb,Jb,"⋛","\\gtreqless",!0),Bb(jb,Fb,Jb,"⪌","\\gtreqqless",!0),Bb(jb,Fb,Jb,"≖","\\eqcirc",!0),Bb(jb,Fb,Jb,"≗","\\circeq",!0),Bb(jb,Fb,Jb,"≜","\\triangleq",!0),Bb(jb,Fb,Jb,"∼","\\thicksim"),Bb(jb,Fb,Jb,"≈","\\thickapprox"),Bb(jb,Fb,Jb,"⫆","\\supseteqq",!0),Bb(jb,Fb,Jb,"⋑","\\Supset",!0),Bb(jb,Fb,Jb,"⊐","\\sqsupset",!0),Bb(jb,Fb,Jb,"≽","\\succcurlyeq",!0),Bb(jb,Fb,Jb,"⋟","\\curlyeqsucc",!0),Bb(jb,Fb,Jb,"≿","\\succsim",!0),Bb(jb,Fb,Jb,"⪸","\\succapprox",!0),Bb(jb,Fb,Jb,"⊳","\\vartriangleright"),Bb(jb,Fb,Jb,"⊵","\\trianglerighteq"),Bb(jb,Fb,Jb,"⊩","\\Vdash",!0),Bb(jb,Fb,Jb,"∣","\\shortmid"),Bb(jb,Fb,Jb,"∥","\\shortparallel"),Bb(jb,Fb,Jb,"≬","\\between",!0),Bb(jb,Fb,Jb,"⋔","\\pitchfork",!0),Bb(jb,Fb,Jb,"∝","\\varpropto"),Bb(jb,Fb,Jb,"◀","\\blacktriangleleft"),Bb(jb,Fb,Jb,"∴","\\therefore",!0),Bb(jb,Fb,Jb,"∍","\\backepsilon"),Bb(jb,Fb,Jb,"▶","\\blacktriangleright"),Bb(jb,Fb,Jb,"∵","\\because",!0),Bb(jb,Fb,Jb,"⋘","\\llless"),Bb(jb,Fb,Jb,"⋙","\\gggtr"),Bb(jb,Fb,Gb,"⊲","\\lhd"),Bb(jb,Fb,Gb,"⊳","\\rhd"),Bb(jb,Fb,Jb,"≂","\\eqsim",!0),Bb(jb,qb,Jb,"⋈","\\Join"),Bb(jb,Fb,Jb,"≑","\\Doteq",!0),Bb(jb,Fb,Gb,"∔","\\dotplus",!0),Bb(jb,Fb,Gb,"∖","\\smallsetminus"),Bb(jb,Fb,Gb,"⋒","\\Cap",!0),Bb(jb,Fb,Gb,"⋓","\\Cup",!0),Bb(jb,Fb,Gb,"⩞","\\doublebarwedge",!0),Bb(jb,Fb,Gb,"⊟","\\boxminus",!0),Bb(jb,Fb,Gb,"⊞","\\boxplus",!0),Bb(jb,Fb,Gb,"⋇","\\divideontimes",!0),Bb(jb,Fb,Gb,"⋉","\\ltimes",!0),Bb(jb,Fb,Gb,"⋊","\\rtimes",!0),Bb(jb,Fb,Gb,"⋋","\\leftthreetimes",!0),Bb(jb,Fb,Gb,"⋌","\\rightthreetimes",!0),Bb(jb,Fb,Gb,"⋏","\\curlywedge",!0),Bb(jb,Fb,Gb,"⋎","\\curlyvee",!0),Bb(jb,Fb,Gb,"⊝","\\circleddash",!0),Bb(jb,Fb,Gb,"⊛","\\circledast",!0),Bb(jb,Fb,Gb,"⋅","\\centerdot"),Bb(jb,Fb,Gb,"⊺","\\intercal",!0),Bb(jb,Fb,Gb,"⋒","\\doublecap"),Bb(jb,Fb,Gb,"⋓","\\doublecup"),Bb(jb,Fb,Gb,"⊠","\\boxtimes",!0),Bb(jb,Fb,Jb,"⇢","\\dashrightarrow",!0),Bb(jb,Fb,Jb,"⇠","\\dashleftarrow",!0),Bb(jb,Fb,Jb,"⇇","\\leftleftarrows",!0),Bb(jb,Fb,Jb,"⇆","\\leftrightarrows",!0),Bb(jb,Fb,Jb,"⇚","\\Lleftarrow",!0),Bb(jb,Fb,Jb,"↞","\\twoheadleftarrow",!0),Bb(jb,Fb,Jb,"↢","\\leftarrowtail",!0),Bb(jb,Fb,Jb,"↫","\\looparrowleft",!0),Bb(jb,Fb,Jb,"⇋","\\leftrightharpoons",!0),Bb(jb,Fb,Jb,"↶","\\curvearrowleft",!0),Bb(jb,Fb,Jb,"↺","\\circlearrowleft",!0),Bb(jb,Fb,Jb,"↰","\\Lsh",!0),Bb(jb,Fb,Jb,"⇈","\\upuparrows",!0),Bb(jb,Fb,Jb,"↿","\\upharpoonleft",!0),Bb(jb,Fb,Jb,"⇃","\\downharpoonleft",!0),Bb(jb,qb,Jb,"⊶","\\origof",!0),Bb(jb,qb,Jb,"⊷","\\imageof",!0),Bb(jb,Fb,Jb,"⊸","\\multimap",!0),Bb(jb,Fb,Jb,"↭","\\leftrightsquigarrow",!0),Bb(jb,Fb,Jb,"⇉","\\rightrightarrows",!0),Bb(jb,Fb,Jb,"⇄","\\rightleftarrows",!0),Bb(jb,Fb,Jb,"↠","\\twoheadrightarrow",!0),Bb(jb,Fb,Jb,"↣","\\rightarrowtail",!0),Bb(jb,Fb,Jb,"↬","\\looparrowright",!0),Bb(jb,Fb,Jb,"↷","\\curvearrowright",!0),Bb(jb,Fb,Jb,"↻","\\circlearrowright",!0),Bb(jb,Fb,Jb,"↱","\\Rsh",!0),Bb(jb,Fb,Jb,"⇊","\\downdownarrows",!0),Bb(jb,Fb,Jb,"↾","\\upharpoonright",!0),Bb(jb,Fb,Jb,"⇂","\\downharpoonright",!0),Bb(jb,Fb,Jb,"⇝","\\rightsquigarrow",!0),Bb(jb,Fb,Jb,"⇝","\\leadsto"),Bb(jb,Fb,Jb,"⇛","\\Rrightarrow",!0),Bb(jb,Fb,Jb,"↾","\\restriction"),Bb(jb,qb,Qb,"‘","`"),Bb(jb,qb,Qb,"$","\\$"),Bb(Hb,qb,Qb,"$","\\$"),Bb(Hb,qb,Qb,"$","\\textdollar"),Bb(jb,qb,Qb,"%","\\%"),Bb(Hb,qb,Qb,"%","\\%"),Bb(jb,qb,Qb,"_","\\_"),Bb(Hb,qb,Qb,"_","\\_"),Bb(Hb,qb,Qb,"_","\\textunderscore"),Bb(jb,qb,Qb,"∠","\\angle",!0),Bb(jb,qb,Qb,"∞","\\infty",!0),Bb(jb,qb,Qb,"′","\\prime"),Bb(jb,qb,Qb,"△","\\triangle"),Bb(jb,qb,Qb,"Γ","\\Gamma",!0),Bb(jb,qb,Qb,"Δ","\\Delta",!0),Bb(jb,qb,Qb,"Θ","\\Theta",!0),Bb(jb,qb,Qb,"Λ","\\Lambda",!0),Bb(jb,qb,Qb,"Ξ","\\Xi",!0),Bb(jb,qb,Qb,"Π","\\Pi",!0),Bb(jb,qb,Qb,"Σ","\\Sigma",!0),Bb(jb,qb,Qb,"Υ","\\Upsilon",!0),Bb(jb,qb,Qb,"Φ","\\Phi",!0),Bb(jb,qb,Qb,"Ψ","\\Psi",!0),Bb(jb,qb,Qb,"Ω","\\Omega",!0),Bb(jb,qb,Qb,"A","Α"),Bb(jb,qb,Qb,"B","Β"),Bb(jb,qb,Qb,"E","Ε"),Bb(jb,qb,Qb,"Z","Ζ"),Bb(jb,qb,Qb,"H","Η"),Bb(jb,qb,Qb,"I","Ι"),Bb(jb,qb,Qb,"K","Κ"),Bb(jb,qb,Qb,"M","Μ"),Bb(jb,qb,Qb,"N","Ν"),Bb(jb,qb,Qb,"O","Ο"),Bb(jb,qb,Qb,"P","Ρ"),Bb(jb,qb,Qb,"T","Τ"),Bb(jb,qb,Qb,"X","Χ"),Bb(jb,qb,Qb,"¬","\\neg",!0),Bb(jb,qb,Qb,"¬","\\lnot"),Bb(jb,qb,Qb,"⊤","\\top"),Bb(jb,qb,Qb,"⊥","\\bot"),Bb(jb,qb,Qb,"∅","\\emptyset"),Bb(jb,Fb,Qb,"∅","\\varnothing"),Bb(jb,qb,Kb,"α","\\alpha",!0),Bb(jb,qb,Kb,"β","\\beta",!0),Bb(jb,qb,Kb,"γ","\\gamma",!0),Bb(jb,qb,Kb,"δ","\\delta",!0),Bb(jb,qb,Kb,"ϵ","\\epsilon",!0),Bb(jb,qb,Kb,"ζ","\\zeta",!0),Bb(jb,qb,Kb,"η","\\eta",!0),Bb(jb,qb,Kb,"θ","\\theta",!0),Bb(jb,qb,Kb,"ι","\\iota",!0),Bb(jb,qb,Kb,"κ","\\kappa",!0),Bb(jb,qb,Kb,"λ","\\lambda",!0),Bb(jb,qb,Kb,"μ","\\mu",!0),Bb(jb,qb,Kb,"ν","\\nu",!0),Bb(jb,qb,Kb,"ξ","\\xi",!0),Bb(jb,qb,Kb,"ο","\\omicron",!0),Bb(jb,qb,Kb,"π","\\pi",!0),Bb(jb,qb,Kb,"ρ","\\rho",!0),Bb(jb,qb,Kb,"σ","\\sigma",!0),Bb(jb,qb,Kb,"τ","\\tau",!0),Bb(jb,qb,Kb,"υ","\\upsilon",!0),Bb(jb,qb,Kb,"ϕ","\\phi",!0),Bb(jb,qb,Kb,"χ","\\chi",!0),Bb(jb,qb,Kb,"ψ","\\psi",!0),Bb(jb,qb,Kb,"ω","\\omega",!0),Bb(jb,qb,Kb,"ε","\\varepsilon",!0),Bb(jb,qb,Kb,"ϑ","\\vartheta",!0),Bb(jb,qb,Kb,"ϖ","\\varpi",!0),Bb(jb,qb,Kb,"ϱ","\\varrho",!0),Bb(jb,qb,Kb,"ς","\\varsigma",!0),Bb(jb,qb,Kb,"φ","\\varphi",!0),Bb(jb,qb,Gb,"∗","*",!0),Bb(jb,qb,Gb,"+","+"),Bb(jb,qb,Gb,"−","-",!0),Bb(jb,qb,Gb,"⋅","\\cdot",!0),Bb(jb,qb,Gb,"∘","\\circ",!0),Bb(jb,qb,Gb,"÷","\\div",!0),Bb(jb,qb,Gb,"±","\\pm",!0),Bb(jb,qb,Gb,"×","\\times",!0),Bb(jb,qb,Gb,"∩","\\cap",!0),Bb(jb,qb,Gb,"∪","\\cup",!0),Bb(jb,qb,Gb,"∖","\\setminus",!0),Bb(jb,qb,Gb,"∧","\\land"),Bb(jb,qb,Gb,"∨","\\lor"),Bb(jb,qb,Gb,"∧","\\wedge",!0),Bb(jb,qb,Gb,"∨","\\vee",!0),Bb(jb,qb,Qb,"√","\\surd"),Bb(jb,qb,Yb,"⟨","\\langle",!0),Bb(jb,qb,Yb,"∣","\\lvert"),Bb(jb,qb,Yb,"∥","\\lVert"),Bb(jb,qb,Vb,"?","?"),Bb(jb,qb,Vb,"!","!"),Bb(jb,qb,Vb,"⟩","\\rangle",!0),Bb(jb,qb,Vb,"∣","\\rvert"),Bb(jb,qb,Vb,"∥","\\rVert"),Bb(jb,qb,Jb,"=","="),Bb(jb,qb,Jb,":",":"),Bb(jb,qb,Jb,"≈","\\approx",!0),Bb(jb,qb,Jb,"≅","\\cong",!0),Bb(jb,qb,Jb,"≥","\\ge"),Bb(jb,qb,Jb,"≥","\\geq",!0),Bb(jb,qb,Jb,"←","\\gets"),Bb(jb,qb,Jb,">","\\gt",!0),Bb(jb,qb,Jb,"∈","\\in",!0),Bb(jb,qb,Jb,"","\\@not"),Bb(jb,qb,Jb,"⊂","\\subset",!0),Bb(jb,qb,Jb,"⊃","\\supset",!0),Bb(jb,qb,Jb,"⊆","\\subseteq",!0),Bb(jb,qb,Jb,"⊇","\\supseteq",!0),Bb(jb,Fb,Jb,"⊈","\\nsubseteq",!0),Bb(jb,Fb,Jb,"⊉","\\nsupseteq",!0),Bb(jb,qb,Jb,"⊨","\\models"),Bb(jb,qb,Jb,"←","\\leftarrow",!0),Bb(jb,qb,Jb,"≤","\\le"),Bb(jb,qb,Jb,"≤","\\leq",!0),Bb(jb,qb,Jb,"<","\\lt",!0),Bb(jb,qb,Jb,"→","\\rightarrow",!0),Bb(jb,qb,Jb,"→","\\to"),Bb(jb,Fb,Jb,"≱","\\ngeq",!0),Bb(jb,Fb,Jb,"≰","\\nleq",!0),Bb(jb,qb,Zb," ","\\ "),Bb(jb,qb,Zb," ","\\space"),Bb(jb,qb,Zb," ","\\nobreakspace"),Bb(Hb,qb,Zb," ","\\ "),Bb(Hb,qb,Zb," "," "),Bb(Hb,qb,Zb," ","\\space"),Bb(Hb,qb,Zb," ","\\nobreakspace"),Bb(jb,qb,Zb,null,"\\nobreak"),Bb(jb,qb,Zb,null,"\\allowbreak"),Bb(jb,qb,Xb,",",","),Bb(jb,qb,Xb,";",";"),Bb(jb,Fb,Gb,"⊼","\\barwedge",!0),Bb(jb,Fb,Gb,"⊻","\\veebar",!0),Bb(jb,qb,Gb,"⊙","\\odot",!0),Bb(jb,qb,Gb,"⊕","\\oplus",!0),Bb(jb,qb,Gb,"⊗","\\otimes",!0),Bb(jb,qb,Qb,"∂","\\partial",!0),Bb(jb,qb,Gb,"⊘","\\oslash",!0),Bb(jb,Fb,Gb,"⊚","\\circledcirc",!0),Bb(jb,Fb,Gb,"⊡","\\boxdot",!0),Bb(jb,qb,Gb,"△","\\bigtriangleup"),Bb(jb,qb,Gb,"▽","\\bigtriangledown"),Bb(jb,qb,Gb,"†","\\dagger"),Bb(jb,qb,Gb,"⋄","\\diamond"),Bb(jb,qb,Gb,"⋆","\\star"),Bb(jb,qb,Gb,"◃","\\triangleleft"),Bb(jb,qb,Gb,"▹","\\triangleright"),Bb(jb,qb,Yb,"{","\\{"),Bb(Hb,qb,Qb,"{","\\{"),Bb(Hb,qb,Qb,"{","\\textbraceleft"),Bb(jb,qb,Vb,"}","\\}"),Bb(Hb,qb,Qb,"}","\\}"),Bb(Hb,qb,Qb,"}","\\textbraceright"),Bb(jb,qb,Yb,"{","\\lbrace"),Bb(jb,qb,Vb,"}","\\rbrace"),Bb(jb,qb,Yb,"[","\\lbrack",!0),Bb(Hb,qb,Qb,"[","\\lbrack",!0),Bb(jb,qb,Vb,"]","\\rbrack",!0),Bb(Hb,qb,Qb,"]","\\rbrack",!0),Bb(jb,qb,Yb,"(","\\lparen",!0),Bb(jb,qb,Vb,")","\\rparen",!0),Bb(Hb,qb,Qb,"<","\\textless",!0),Bb(Hb,qb,Qb,">","\\textgreater",!0),Bb(jb,qb,Yb,"⌊","\\lfloor",!0),Bb(jb,qb,Vb,"⌋","\\rfloor",!0),Bb(jb,qb,Yb,"⌈","\\lceil",!0),Bb(jb,qb,Vb,"⌉","\\rceil",!0),Bb(jb,qb,Qb,"\\","\\backslash"),Bb(jb,qb,Qb,"∣","|"),Bb(jb,qb,Qb,"∣","\\vert"),Bb(Hb,qb,Qb,"|","\\textbar",!0),Bb(jb,qb,Qb,"∥","\\|"),Bb(jb,qb,Qb,"∥","\\Vert"),Bb(Hb,qb,Qb,"∥","\\textbardbl"),Bb(Hb,qb,Qb,"~","\\textasciitilde"),Bb(Hb,qb,Qb,"\\","\\textbackslash"),Bb(Hb,qb,Qb,"^","\\textasciicircum"),Bb(jb,qb,Jb,"↑","\\uparrow",!0),Bb(jb,qb,Jb,"⇑","\\Uparrow",!0),Bb(jb,qb,Jb,"↓","\\downarrow",!0),Bb(jb,qb,Jb,"⇓","\\Downarrow",!0),Bb(jb,qb,Jb,"↕","\\updownarrow",!0),Bb(jb,qb,Jb,"⇕","\\Updownarrow",!0),Bb(jb,qb,Wb,"∐","\\coprod"),Bb(jb,qb,Wb,"⋁","\\bigvee"),Bb(jb,qb,Wb,"⋀","\\bigwedge"),Bb(jb,qb,Wb,"⨄","\\biguplus"),Bb(jb,qb,Wb,"⋂","\\bigcap"),Bb(jb,qb,Wb,"⋃","\\bigcup"),Bb(jb,qb,Wb,"∫","\\int"),Bb(jb,qb,Wb,"∫","\\intop"),Bb(jb,qb,Wb,"∬","\\iint"),Bb(jb,qb,Wb,"∭","\\iiint"),Bb(jb,qb,Wb,"∏","\\prod"),Bb(jb,qb,Wb,"∑","\\sum"),Bb(jb,qb,Wb,"⨂","\\bigotimes"),Bb(jb,qb,Wb,"⨁","\\bigoplus"),Bb(jb,qb,Wb,"⨀","\\bigodot"),Bb(jb,qb,Wb,"∮","\\oint"),Bb(jb,qb,Wb,"∯","\\oiint"),Bb(jb,qb,Wb,"∰","\\oiiint"),Bb(jb,qb,Wb,"⨆","\\bigsqcup"),Bb(jb,qb,Wb,"∫","\\smallint"),Bb(Hb,qb,Ub,"…","\\textellipsis"),Bb(jb,qb,Ub,"…","\\mathellipsis"),Bb(Hb,qb,Ub,"…","\\ldots",!0),Bb(jb,qb,Ub,"…","\\ldots",!0),Bb(jb,qb,Ub,"⋯","\\@cdots",!0),Bb(jb,qb,Ub,"⋱","\\ddots",!0),Bb(jb,qb,Qb,"⋮","\\varvdots"),Bb(Hb,qb,Qb,"⋮","\\varvdots"),Bb(jb,qb,$b,"ˊ","\\acute"),Bb(jb,qb,$b,"ˋ","\\grave"),Bb(jb,qb,$b,"¨","\\ddot"),Bb(jb,qb,$b,"~","\\tilde"),Bb(jb,qb,$b,"ˉ","\\bar"),Bb(jb,qb,$b,"˘","\\breve"),Bb(jb,qb,$b,"ˇ","\\check"),Bb(jb,qb,$b,"^","\\hat"),Bb(jb,qb,$b,"⃗","\\vec"),Bb(jb,qb,$b,"˙","\\dot"),Bb(jb,qb,$b,"˚","\\mathring"),Bb(jb,qb,Kb,"","\\@imath"),Bb(jb,qb,Kb,"","\\@jmath"),Bb(jb,qb,Qb,"ı","ı"),Bb(jb,qb,Qb,"ȷ","ȷ"),Bb(Hb,qb,Qb,"ı","\\i",!0),Bb(Hb,qb,Qb,"ȷ","\\j",!0),Bb(Hb,qb,Qb,"ß","\\ss",!0),Bb(Hb,qb,Qb,"æ","\\ae",!0),Bb(Hb,qb,Qb,"œ","\\oe",!0),Bb(Hb,qb,Qb,"ø","\\o",!0),Bb(Hb,qb,Qb,"Æ","\\AE",!0),Bb(Hb,qb,Qb,"Œ","\\OE",!0),Bb(Hb,qb,Qb,"Ø","\\O",!0),Bb(Hb,qb,$b,"ˊ","\\'"),Bb(Hb,qb,$b,"ˋ","\\`"),Bb(Hb,qb,$b,"ˆ","\\^"),Bb(Hb,qb,$b,"˜","\\~"),Bb(Hb,qb,$b,"ˉ","\\="),Bb(Hb,qb,$b,"˘","\\u"),Bb(Hb,qb,$b,"˙","\\."),Bb(Hb,qb,$b,"¸","\\c"),Bb(Hb,qb,$b,"˚","\\r"),Bb(Hb,qb,$b,"ˇ","\\v"),Bb(Hb,qb,$b,"¨",'\\"'),Bb(Hb,qb,$b,"˝","\\H"),Bb(Hb,qb,$b,"◯","\\textcircled");var ex={"--":!0,"---":!0,"``":!0,"''":!0};Bb(Hb,qb,Qb,"–","--",!0),Bb(Hb,qb,Qb,"–","\\textendash"),Bb(Hb,qb,Qb,"—","---",!0),Bb(Hb,qb,Qb,"—","\\textemdash"),Bb(Hb,qb,Qb,"‘","`",!0),Bb(Hb,qb,Qb,"‘","\\textquoteleft"),Bb(Hb,qb,Qb,"’","'",!0),Bb(Hb,qb,Qb,"’","\\textquoteright"),Bb(Hb,qb,Qb,"“","``",!0),Bb(Hb,qb,Qb,"“","\\textquotedblleft"),Bb(Hb,qb,Qb,"”","''",!0),Bb(Hb,qb,Qb,"”","\\textquotedblright"),Bb(jb,qb,Qb,"°","\\degree",!0),Bb(Hb,qb,Qb,"°","\\degree"),Bb(Hb,qb,Qb,"°","\\textdegree",!0),Bb(jb,qb,Qb,"£","\\pounds"),Bb(jb,qb,Qb,"£","\\mathsterling",!0),Bb(Hb,qb,Qb,"£","\\pounds"),Bb(Hb,qb,Qb,"£","\\textsterling",!0),Bb(jb,Fb,Qb,"✠","\\maltese"),Bb(Hb,Fb,Qb,"✠","\\maltese");for(var tx='0123456789/@."',nx=0;nx<14;nx++){var rx=tx.charAt(nx);Bb(jb,qb,Qb,rx,rx)}for(var ox='0123456789!@*()-=+";:?/.,',ix=0;ix<25;ix++){var sx=ox.charAt(ix);Bb(Hb,qb,Qb,sx,sx)}for(var ax="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",lx=0;lx<52;lx++){var cx=ax.charAt(lx);Bb(jb,qb,Kb,cx,cx),Bb(Hb,qb,Qb,cx,cx)}Bb(jb,Fb,Qb,"C","ℂ"),Bb(Hb,Fb,Qb,"C","ℂ"),Bb(jb,Fb,Qb,"H","ℍ"),Bb(Hb,Fb,Qb,"H","ℍ"),Bb(jb,Fb,Qb,"N","ℕ"),Bb(Hb,Fb,Qb,"N","ℕ"),Bb(jb,Fb,Qb,"P","ℙ"),Bb(Hb,Fb,Qb,"P","ℙ"),Bb(jb,Fb,Qb,"Q","ℚ"),Bb(Hb,Fb,Qb,"Q","ℚ"),Bb(jb,Fb,Qb,"R","ℝ"),Bb(Hb,Fb,Qb,"R","ℝ"),Bb(jb,Fb,Qb,"Z","ℤ"),Bb(Hb,Fb,Qb,"Z","ℤ"),Bb(jb,qb,Kb,"h","ℎ"),Bb(Hb,qb,Kb,"h","ℎ");for(var dx="",ux=0;ux<52;ux++){var hx=ax.charAt(ux);Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56320+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56372+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56424+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56580+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56684+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56736+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56788+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56840+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56944+ux)),Bb(Hb,qb,Qb,hx,dx),ux<26&&(Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56632+ux)),Bb(Hb,qb,Qb,hx,dx),Bb(jb,qb,Kb,hx,dx=String.fromCharCode(55349,56476+ux)),Bb(Hb,qb,Qb,hx,dx))}Bb(jb,qb,Kb,"k",dx=String.fromCharCode(55349,56668)),Bb(Hb,qb,Qb,"k",dx);for(var px=0;px<10;px++){var fx=px.toString();Bb(jb,qb,Kb,fx,dx=String.fromCharCode(55349,57294+px)),Bb(Hb,qb,Qb,fx,dx),Bb(jb,qb,Kb,fx,dx=String.fromCharCode(55349,57314+px)),Bb(Hb,qb,Qb,fx,dx),Bb(jb,qb,Kb,fx,dx=String.fromCharCode(55349,57324+px)),Bb(Hb,qb,Qb,fx,dx),Bb(jb,qb,Kb,fx,dx=String.fromCharCode(55349,57334+px)),Bb(Hb,qb,Qb,fx,dx)}for(var mx="ÐÞþ",_x=0;_x<3;_x++){var gx=mx.charAt(_x);Bb(jb,qb,Kb,gx,gx),Bb(Hb,qb,Qb,gx,gx)}var bx=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],xx=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],vx=function(e,t,n){return Db[n][e]&&Db[n][e].replace&&(e=Db[n][e].replace),{value:e,metrics:db(e,t,n)}},yx=function(e,t,n,r,o){var i,s=vx(e,t,n),a=s.metrics;if(e=s.value,a){var l=a.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),i=new Tb(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),i=new Tb(e,0,0,0,0,0,o);if(r){i.maxFontSize=r.sizeMultiplier,r.style.isTight()&&i.classes.push("mtight");var c=r.getColor();c&&(i.style.color=c)}return i},wx=(e,t)=>{if(yb(e.classes)!==yb(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var o in t.style)if(t.style.hasOwnProperty(o)&&e.style[o]!==t.style[o])return!1;return!0},kx=function(e){for(var t=0,n=0,r=0,o=0;o<e.children.length;o++){var i=e.children[o];i.height>t&&(t=i.height),i.depth>n&&(n=i.depth),i.maxFontSize>r&&(r=i.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Sx=function(e,t,n,r){var o=new Mb(e,t,n,r);return kx(o),o},Cx=(e,t,n,r)=>new Mb(e,t,n,r),Mx=function(e){var t=new sb(e);return kx(t),t},zx=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Nx={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ax={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Tx={fontMap:Nx,makeSymbol:yx,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&vx(e,"Main-Bold",t).metrics?yx(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Db[t][e].font?yx(e,"Main-Regular",t,n,r):yx(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Sx,makeSvgSpan:Cx,makeLineSpan:function(e,t,n){var r=Sx([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=vb(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var o=new zb(e,t,n,r);return kx(o),o},makeFragment:Mx,wrapFragment:function(e,t){return e instanceof sb?Sx([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,i=1;i<t.length;i++){var s=-t[i].shift-o-t[i].elem.depth,a=s-(t[i-1].elem.height+t[i-1].elem.depth);o+=s,n.push({type:"kern",size:a}),n.push(t[i])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,d=0;d<e.children.length;d++){var u=e.children[d];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),o=0,i=0;i<n.length;i++){var s=n[i];if("elem"===s.type){var a=s.elem;o=Math.max(o,a.maxFontSize,a.height)}}o+=2;var l=Sx(["pstrut"],[]);l.style.height=vb(o);for(var c=[],d=r,u=r,h=r,p=0;p<n.length;p++){var f=n[p];if("kern"===f.type)h+=f.size;else{var m=f.elem,_=f.wrapperClasses||[],g=f.wrapperStyle||{},b=Sx(_,[l,m],void 0,g);b.style.top=vb(-o-h-m.depth),f.marginLeft&&(b.style.marginLeft=f.marginLeft),f.marginRight&&(b.style.marginRight=f.marginRight),c.push(b),h+=m.height+m.depth}d=Math.min(d,h),u=Math.max(u,h)}var x,v=Sx(["vlist"],c);if(v.style.height=vb(u),d<0){var y=Sx([],[]),w=Sx(["vlist"],[y]);w.style.height=vb(-d);var k=Sx(["vlist-s"],[new Tb("")]);x=[Sx(["vlist-r"],[v,k]),Sx(["vlist-r"],[w])]}else x=[Sx(["vlist-r"],[v])];var S=Sx(["vlist-t"],x);return 2===x.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},makeOrd:function(e,t,n){var r=e.mode,o=e.text,i=["mord"],s="math"===r||"text"===r&&t.font,a=s?t.font:t.fontFamily,l="",c="";if(55349===o.charCodeAt(0)&&([l,c]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var o=Math.floor((n-119808)/26);return[bx[o][2],bx[o][r]]}if(120782<=n&&n<=120831){var i=Math.floor((n-120782)/10);return[xx[i][2],xx[i][r]]}if(120485===n||120486===n)return[bx[0][2],bx[0][r]];if(120486<n&&n<120782)return["",""];throw new Dg("Unsupported character: "+e)}(o,r)),l.length>0)return yx(o,l,r,t,i.concat(c));if(a){var d,u;if("boldsymbol"===a){var h=function(e,t,n,r,o){return"textord"!==o&&vx(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,r,0,0,n);d=h.fontName,u=[h.fontClass]}else s?(d=Nx[a].fontName,u=[a]):(d=zx(a,t.fontWeight,t.fontShape),u=[a,t.fontWeight,t.fontShape]);if(vx(o,d,r).metrics)return yx(o,d,r,t,i.concat(u));if(ex.hasOwnProperty(o)&&"Typewriter"===d.slice(0,10)){for(var p=[],f=0;f<o.length;f++)p.push(yx(o[f],d,r,t,i.concat(u)));return Mx(p)}}if("mathord"===n)return yx(o,"Math-Italic",r,t,i.concat(["mathnormal"]));if("textord"===n){var m=Db[r][o]&&Db[r][o].font;if("ams"===m){var _=zx("amsrm",t.fontWeight,t.fontShape);return yx(o,_,r,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==m&&m){var g=zx(m,t.fontWeight,t.fontShape);return yx(o,g,r,t,i.concat(g,t.fontWeight,t.fontShape))}var b=zx("textrm",t.fontWeight,t.fontShape);return yx(o,b,r,t,i.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:(e,t)=>{var n=Sx(["mspace"],[],t),r=xb(e,t);return n.style.marginRight=vb(r),n},staticSvg:function(e,t){var[n,r,o]=Ax[e],i=new Pb(n),s=new Rb([i],{width:vb(r),height:vb(o),style:"width:"+vb(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=Cx(["overlay"],[s],t);return a.height=o,a.style.height=vb(o),a.style.width=vb(r),a},svgData:Ax,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Tb&&r instanceof Tb&&wx(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},Rx={number:3,unit:"mu"},Px={number:4,unit:"mu"},Ox={number:5,unit:"mu"},Ex={mord:{mop:Rx,mbin:Px,mrel:Ox,minner:Rx},mop:{mord:Rx,mop:Rx,mrel:Ox,minner:Rx},mbin:{mord:Px,mop:Px,mopen:Px,minner:Px},mrel:{mord:Ox,mop:Ox,mopen:Ox,minner:Ox},mopen:{},mclose:{mop:Rx,mbin:Px,mrel:Ox,minner:Rx},mpunct:{mord:Rx,mop:Rx,mrel:Ox,mopen:Rx,mclose:Rx,mpunct:Rx,minner:Rx},minner:{mord:Rx,mop:Rx,mbin:Px,mrel:Ox,mopen:Rx,mpunct:Rx,minner:Rx}},Lx={mord:{mop:Rx},mop:{mord:Rx,mop:Rx},mbin:{},mrel:{},mopen:{},mclose:{mop:Rx},mpunct:{},minner:{mop:Rx}},Ix={},Dx={},Bx={};function jx(e){for(var{type:t,names:n,props:r,handler:o,htmlBuilder:i,mathmlBuilder:s}=e,a={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},l=0;l<n.length;++l)Ix[n[l]]=a;t&&(i&&(Dx[t]=i),s&&(Bx[t]=s))}function Hx(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;jx({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var qx=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Fx=function(e){return"ordgroup"===e.type?e.body:[e]},$x=Tx.makeSpan,Gx=["leftmost","mbin","mopen","mrel","mop","mpunct"],Vx=["rightmost","mrel","mclose","mpunct"],Ux={display:eb.DISPLAY,text:eb.TEXT,script:eb.SCRIPT,scriptscript:eb.SCRIPTSCRIPT},Kx={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Wx=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var o=[],i=0;i<e.length;i++){var s=ev(e[i],t);if(s instanceof sb){var a=s.children;o.push(...a)}else o.push(s)}if(Tx.tryCombineChars(o),!n)return o;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(Ux[c.style]))}var d=$x([r[0]||"leftmost"],[],t),u=$x([r[1]||"rightmost"],[],t),h="root"===n;return Yx(o,(e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&Fg.contains(Vx,r)?t.classes[0]="mord":"mbin"===r&&Fg.contains(Gx,n)&&(e.classes[0]="mord")},{node:d},u,h),Yx(o,(e,t)=>{var n=Zx(t),r=Zx(e),o=n&&r?e.hasClass("mtight")?Lx[n][r]:Ex[n][r]:null;if(o)return Tx.makeGlue(o,l)},{node:d},u,h),o},Yx=function e(t,n,r,o,i){o&&t.push(o);for(var s=0;s<t.length;s++){var a=t[s],l=Xx(a);if(l)e(l.children,n,r,null,i);else{var c=!a.hasClass("mspace");if(c){var d=n(a,r.node);d&&(r.insertAfter?r.insertAfter(d):(t.unshift(d),s++))}c?r.node=a:i&&a.hasClass("newline")&&(r.node=$x(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),s++})(s)}}o&&t.pop()},Xx=function(e){return e instanceof sb||e instanceof zb||e instanceof Mb&&e.hasClass("enclosing")?e:null},Jx=function e(t,n){var r=Xx(t);if(r){var o=r.children;if(o.length){if("right"===n)return e(o[o.length-1],"right");if("left"===n)return e(o[0],"left")}}return t},Zx=function(e,t){return e?(t&&(e=Jx(e,t)),Kx[e.classes[0]]||null):null},Qx=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return $x(t.concat(n))},ev=function(e,t,n){if(!e)return $x();if(Dx[e.type]){var r=Dx[e.type](e,t);if(n&&t.size!==n.size){r=$x(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}throw new Dg("Got group of unknown type: '"+e.type+"'")};function tv(e,t){var n=$x(["base"],e,t),r=$x(["strut"]);return r.style.height=vb(n.height+n.depth),n.depth&&(r.style.verticalAlign=vb(-n.depth)),n.children.unshift(r),n}function nv(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,o=Wx(e,t,"root");2===o.length&&o[1].hasClass("tag")&&(r=o.pop());for(var i,s=[],a=[],l=0;l<o.length;l++)if(a.push(o[l]),o[l].hasClass("mbin")||o[l].hasClass("mrel")||o[l].hasClass("allowbreak")){for(var c=!1;l<o.length-1&&o[l+1].hasClass("mspace")&&!o[l+1].hasClass("newline");)l++,a.push(o[l]),o[l].hasClass("nobreak")&&(c=!0);c||(s.push(tv(a,t)),a=[])}else o[l].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(tv(a,t)),a=[]),s.push(o[l]));a.length>0&&s.push(tv(a,t)),n?((i=tv(Wx(n,t,!0))).classes=["tag"],s.push(i)):r&&s.push(r);var d=$x(["katex-html"],s);if(d.setAttribute("aria-hidden","true"),i){var u=i.children[0];u.style.height=vb(d.height+d.depth),d.depth&&(u.style.verticalAlign=vb(-d.depth))}return d}function rv(e){return new sb(e)}class ov{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=yb(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof iv&&this.children[n+1]instanceof iv){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof iv;)r+=this.children[++n].toText();e.appendChild(new iv(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Fg.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Fg.escape(yb(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class iv{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Fg.escape(this.toText())}toText(){return this.text}}var sv={MathNode:ov,TextNode:iv,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",vb(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+vb(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:rv},av=function(e,t,n){return!Db[t][e]||!Db[t][e].replace||55349===e.charCodeAt(0)||ex.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Db[t][e].replace),new sv.TextNode(e)},lv=function(e){return 1===e.length?e[0]:new sv.MathNode("mrow",e)},cv=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var o=e.text;return Fg.contains(["\\imath","\\jmath"],o)?null:(Db[r][o]&&Db[r][o].replace&&(o=Db[r][o].replace),db(o,Tx.fontMap[n].fontName,r)?Tx.fontMap[n].variant:null)};function dv(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof iv&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof iv&&","===n.text}return!1}var uv=function(e,t,n){if(1===e.length){var r=pv(e[0],t);return n&&r instanceof ov&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o,i=[],s=0;s<e.length;s++){var a=pv(e[s],t);if(a instanceof ov&&o instanceof ov){if("mtext"===a.type&&"mtext"===o.type&&a.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...a.children);continue}if("mn"===a.type&&"mn"===o.type){o.children.push(...a.children);continue}if(dv(a)&&"mn"===o.type){o.children.push(...a.children);continue}if("mn"===a.type&&dv(o))a.children=[...o.children,...a.children],i.pop();else if(("msup"===a.type||"msub"===a.type)&&a.children.length>=1&&("mn"===o.type||dv(o))){var l=a.children[0];l instanceof ov&&"mn"===l.type&&(l.children=[...o.children,...l.children],i.pop())}else if("mi"===o.type&&1===o.children.length){var c=o.children[0];if(c instanceof iv&&"̸"===c.text&&("mo"===a.type||"mi"===a.type||"mn"===a.type)){var d=a.children[0];d instanceof iv&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),i.pop())}}}i.push(a),o=a}return i},hv=function(e,t,n){return lv(uv(e,t,n))},pv=function(e,t){if(!e)return new sv.MathNode("mrow");if(Bx[e.type])return Bx[e.type](e,t);throw new Dg("Got group of unknown type: '"+e.type+"'")};function fv(e,t,n,r,o){var i,s=uv(e,n);i=1===s.length&&s[0]instanceof ov&&Fg.contains(["mrow","mtable"],s[0].type)?s[0]:new sv.MathNode("mrow",s);var a=new sv.MathNode("annotation",[new sv.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var l=new sv.MathNode("semantics",[i,a]),c=new sv.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=o?"katex":"katex-mathml";return Tx.makeSpan([d],[c])}var mv=function(e){return new mb({style:e.displayMode?eb.DISPLAY:eb.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},_v=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Tx.makeSpan(n,[e])}return e},gv={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},bv={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},xv=function(e,t,n,r,o){var i,s=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(i=Tx.makeSpan(["stretchy",t],[],o),"fbox"===t){var a=o.color&&o.getColor();a&&(i.style.borderColor=a)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Ob({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Ob({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Rb(l,{width:"100%",height:vb(s)});i=Tx.makeSvgSpan([],[c],o)}return i.height=s,i.style.height=vb(s),i},vv=function(e){var t=new sv.MathNode("mo",[new sv.TextNode(gv[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},yv=function(e,t){var{span:n,minWidth:r,height:o}=function(){var n=4e5,r=e.label.slice(1);if(Fg.contains(["widehat","widecheck","widetilde","utilde"],r)){var o,i,s,a="ordgroup"===(p=e.base).type?p.body.length:1;if(a>5)"widehat"===r||"widecheck"===r?(o=420,n=2364,s=.42,i=r+"4"):(o=312,n=2340,s=.34,i="tilde4");else{var l=[1,1,2,2,3,3][a];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],i=r+l):(n=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],i="tilde"+l)}var c=new Pb(i),d=new Rb([c],{width:"100%",height:vb(s),viewBox:"0 0 "+n+" "+o,preserveAspectRatio:"none"});return{span:Tx.makeSvgSpan([],[d],t),minWidth:0,height:s}}var u,h,p,f=[],m=bv[r],[_,g,b]=m,x=b/1e3,v=_.length;if(1===v)u=["hide-tail"],h=[m[3]];else if(2===v)u=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{if(3!==v)throw new Error("Correct katexImagesData or update code here to support\n "+v+" children.");u=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var y=0;y<v;y++){var w=new Pb(_[y]),k=new Rb([w],{width:"400em",height:vb(x),viewBox:"0 0 "+n+" "+b,preserveAspectRatio:h[y]+" slice"}),S=Tx.makeSvgSpan([u[y]],[k],t);if(1===v)return{span:S,minWidth:g,height:x};S.style.height=vb(x),f.push(S)}return{span:Tx.makeSpan(["stretchy"],f,t),minWidth:g,height:x}}();return n.height=o,n.style.height=vb(o),r>0&&(n.style.minWidth=vb(r)),n};function wv(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function kv(e){var t=Sv(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Sv(e){return e&&("atom"===e.type||Ib.hasOwnProperty(e.type))?e:null}var Cv=(e,t)=>{var n,r,o;e&&"supsub"===e.type?(n=(r=wv(e.base,"accent")).base,e.base=n,o=function(e){if(e instanceof Mb)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(ev(e,t)),e.base=r):n=(r=wv(e,"accent")).base;var i=ev(n,t.havingCrampedStyle()),s=0;if(r.isShifty&&Fg.isCharacterBox(n)){var a=Fg.getBaseElem(n);s=Eb(ev(a,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,d=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(r.isStretchy)l=yv(r,t),l=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+vb(2*s)+")",marginLeft:vb(2*s)}:void 0}]},t);else{var u,h;"\\vec"===r.label?(u=Tx.staticSvg("vec",t),h=Tx.svgData.vec[1]):((u=Eb(u=Tx.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,h=u.width,c&&(d+=u.depth)),l=Tx.makeSpan(["accent-body"],[u]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),d=i.height);var f=s;p||(f-=h/2),l.style.left=vb(f),"\\textcircled"===r.label&&(l.style.top=".2em"),l=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-d},{type:"elem",elem:l}]},t)}var m=Tx.makeSpan(["mord","accent"],[l],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Mv=(e,t)=>{var n=e.isStretchy?vv(e.label):new sv.MathNode("mo",[av(e.label,e.mode)]),r=new sv.MathNode("mover",[pv(e.base,t),n]);return r.setAttribute("accent","true"),r},zv=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));jx({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=qx(t[0]),r=!zv.test(e.funcName),o=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:Cv,mathmlBuilder:Mv}),jx({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Cv,mathmlBuilder:Mv}),jx({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(e,t)=>{var n=ev(e.base,t),r=yv(e,t),o="\\utilde"===e.label?.12:0,i=Tx.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},t);return Tx.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=vv(e.label),r=new sv.MathNode("munder",[pv(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Nv=e=>{var t=new sv.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};jx({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:o}=e;return{type:"xArrow",mode:r.mode,label:o,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,o=t.havingStyle(r.sup()),i=Tx.wrapFragment(ev(e.body,o,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(s+"-arrow-pad"),e.below&&(o=t.havingStyle(r.sub()),(n=Tx.wrapFragment(ev(e.below,o,t),t)).classes.push(s+"-arrow-pad"));var a,l=yv(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,d=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(d-=i.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;a=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:d},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:u}]},t)}else a=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:d},{type:"elem",elem:l,shift:c}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),Tx.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var n,r=vv(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=Nv(pv(e.body,t));if(e.below){var i=Nv(pv(e.below,t));n=new sv.MathNode("munderover",[r,i,o])}else n=new sv.MathNode("mover",[r,o])}else if(e.below){var s=Nv(pv(e.below,t));n=new sv.MathNode("munder",[r,s])}else n=Nv(),n=new sv.MathNode("mover",[r,n]);return n}});var Av=Tx.makeSpan;function Tv(e,t){var n=Wx(e.body,t,!0);return Av([e.mclass],n,t)}function Rv(e,t){var n,r=uv(e.body,t);return"minner"===e.mclass?n=new sv.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new sv.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new sv.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}jx({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Fx(o),isCharacterBox:Fg.isCharacterBox(o)}},htmlBuilder:Tv,mathmlBuilder:Rv});var Pv=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};jx({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Pv(t[0]),body:Fx(t[1]),isCharacterBox:Fg.isCharacterBox(t[1])}}}),jx({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:o}=e,i=t[1],s=t[0];n="\\stackrel"!==o?Pv(i):"mrel";var a={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:Fx(i)},l={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===o?null:s,sub:"\\underset"===o?s:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:Fg.isCharacterBox(l)}},htmlBuilder:Tv,mathmlBuilder:Rv}),jx({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Pv(t[0]),body:Fx(t[0])}},htmlBuilder(e,t){var n=Wx(e.body,t,!0),r=Tx.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=uv(e.body,t),r=new sv.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Ov={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ev=()=>({type:"styling",body:[],mode:"math",style:"display"}),Lv=e=>"textord"===e.type&&"@"===e.text,Iv=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function Dv(e,t,n){var r=Ov[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:r,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[o],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}jx({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Tx.wrapFragment(ev(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=vb(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new sv.MathNode("mrow",[pv(e.label,t)]);return(n=new sv.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new sv.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),jx({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Tx.wrapFragment(ev(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new sv.MathNode("mrow",[pv(e.fragment,t)])}),jx({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=wv(t[0],"ordgroup").body,o="",i=0;i<r.length;i++){o+=wv(r[i],"textord").text}var s,a=parseInt(o);if(isNaN(a))throw new Dg("\\@char has non-numeric argument "+o);if(a<0||a>=1114111)throw new Dg("\\@char with invalid code point "+o);return a<=65535?s=String.fromCharCode(a):(a-=65536,s=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:n.mode,text:s}}});var Bv=(e,t)=>{var n=Wx(e.body,t.withColor(e.color),!1);return Tx.makeFragment(n)},jv=(e,t)=>{var n=uv(e.body,t.withColor(e.color)),r=new sv.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};jx({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=wv(t[0],"color-token").color,o=t[1];return{type:"color",mode:n.mode,color:r,body:Fx(o)}},htmlBuilder:Bv,mathmlBuilder:jv}),jx({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,o=wv(t[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:i}},htmlBuilder:Bv,mathmlBuilder:jv}),jx({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,o="["===r.gullet.future().text?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:o&&wv(o,"size").value}},htmlBuilder(e,t){var n=Tx.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=vb(xb(e.size,t)))),n},mathmlBuilder(e,t){var n=new sv.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",vb(xb(e.size,t)))),n}});var Hv={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},qv=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Dg("Expected a control sequence",e);return t},Fv=(e,t,n,r)=>{var o=e.gullet.macros.get(n.text);null==o&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,o,r)};jx({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Hv[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=Hv[r.text]),wv(t.parseFunction(),"internal");throw new Dg("Invalid token after macro prefix",r)}}),jx({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new Dg("Expected a control sequence",r);for(var i,s=0,a=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=t.gullet.future(),a[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Dg('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Dg('Argument number "'+r.text+'" out of order');s++,a.push([])}else{if("EOF"===r.text)throw new Dg("Expected a macro definition");a[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return i&&l.unshift(i),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(o,{tokens:l,numArgs:s,delimiters:a},n===Hv[n]),{type:"internal",mode:t.mode}}}),jx({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=qv(t.gullet.popToken());t.gullet.consumeSpaces();var o=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Fv(t,r,o,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),jx({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=qv(t.gullet.popToken()),o=t.gullet.popToken(),i=t.gullet.popToken();return Fv(t,r,i,"\\\\globalfuture"===n),t.gullet.pushToken(i),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var $v=function(e,t,n){var r=db(Db.math[e]&&Db.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Gv=function(e,t,n,r){var o=n.havingBaseStyle(t),i=Tx.makeSpan(r.concat(o.sizingClasses(n)),[e],n),s=o.sizeMultiplier/n.sizeMultiplier;return i.height*=s,i.depth*=s,i.maxFontSize=o.sizeMultiplier,i},Vv=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=vb(o),e.height-=o,e.depth+=o},Uv=function(e,t,n,r,o,i){var s=function(e,t,n,r){return Tx.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,o,r),a=Gv(Tx.makeSpan(["delimsizing","size"+t],[s],r),eb.TEXT,r,i);return n&&Vv(a,r,eb.TEXT),a},Kv=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Tx.makeSpan(["delimsizinginner",r],[Tx.makeSpan([],[Tx.makeSymbol(e,t,n)])])}},Wv=function(e,t,n){var r=ab["Size4-Regular"][e.charCodeAt(0)]?ab["Size4-Regular"][e.charCodeAt(0)][4]:ab["Size1-Regular"][e.charCodeAt(0)][4],o=new Pb("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new Rb([o],{width:vb(r),height:vb(t),style:"width:"+vb(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),s=Tx.makeSvgSpan([],[i],n);return s.height=t,s.style.height=vb(t),s.style.width=vb(r),{type:"elem",elem:s}},Yv={type:"kern",size:-.008},Xv=["|","\\lvert","\\rvert","\\vert"],Jv=["\\|","\\lVert","\\rVert","\\Vert"],Zv=function(e,t,n,r,o,i){var s,a,l,c,d="",u=0;s=l=c=e,a=null;var h="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?s=l="⏐":"\\Downarrow"===e?s=l="‖":"\\updownarrow"===e?(s="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(s="\\Uparrow",l="‖",c="\\Downarrow"):Fg.contains(Xv,e)?(l="∣",d="vert",u=333):Fg.contains(Jv,e)?(l="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(s="⎡",l="⎢",c="⎣",h="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(s="⎤",l="⎥",c="⎦",h="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=s="⎢",c="⎣",h="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(s="⎡",l=c="⎢",h="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=s="⎥",c="⎦",h="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(s="⎤",l=c="⎥",h="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(s="⎛",l="⎜",c="⎝",h="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(s="⎞",l="⎟",c="⎠",h="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(s="⎧",a="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(s="⎫",a="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(s="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(s="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(s="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(s="⎫",c="⎩",l="⎪",h="Size4-Regular");var p=$v(s,h,o),f=p.height+p.depth,m=$v(l,h,o),_=m.height+m.depth,g=$v(c,h,o),b=g.height+g.depth,x=0,v=1;if(null!==a){var y=$v(a,h,o);x=y.height+y.depth,v=2}var w=f+b+x,k=w+Math.max(0,Math.ceil((t-w)/(v*_)))*v*_,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);var C=k/2-S,M=[];if(d.length>0){var z=k-f-b,N=Math.round(1e3*k),A=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*z)),T=new Pb(d,A),R=(u/1e3).toFixed(3)+"em",P=(N/1e3).toFixed(3)+"em",O=new Rb([T],{width:R,height:P,viewBox:"0 0 "+u+" "+N}),E=Tx.makeSvgSpan([],[O],r);E.height=N/1e3,E.style.width=R,E.style.height=P,M.push({type:"elem",elem:E})}else{if(M.push(Kv(c,h,o)),M.push(Yv),null===a){var L=k-f-b+.016;M.push(Wv(l,L,r))}else{var I=(k-f-b-x)/2+.016;M.push(Wv(l,I,r)),M.push(Yv),M.push(Kv(a,h,o)),M.push(Yv),M.push(Wv(l,I,r))}M.push(Yv),M.push(Kv(s,h,o))}var D=r.havingBaseStyle(eb.TEXT),B=Tx.makeVList({positionType:"bottom",positionData:C,children:M},D);return Gv(Tx.makeSpan(["delimsizing","mult"],[B],D),eb.TEXT,r,i)},Qv=.08,ey=function(e,t,n,r,o){var i=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ob);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ob);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ob);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,ob);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,ob);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,ob,n)}return r}(e,r,n),s=new Pb(e,i),a=new Rb([s],{width:"400em",height:vb(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Tx.makeSvgSpan(["hide-tail"],[a],o)},ty=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],ny=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ry=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],oy=[0,1.2,1.8,2.4,3],iy=[{type:"small",style:eb.SCRIPTSCRIPT},{type:"small",style:eb.SCRIPT},{type:"small",style:eb.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],sy=[{type:"small",style:eb.SCRIPTSCRIPT},{type:"small",style:eb.SCRIPT},{type:"small",style:eb.TEXT},{type:"stack"}],ay=[{type:"small",style:eb.SCRIPTSCRIPT},{type:"small",style:eb.SCRIPT},{type:"small",style:eb.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ly=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},cy=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size);o<n.length&&"stack"!==n[o].type;o++){var i=$v(e,ly(n[o]),"math"),s=i.height+i.depth;if("small"===n[o].type&&(s*=r.havingBaseStyle(n[o].style).sizeMultiplier),s>t)return n[o]}return n[n.length-1]},dy=function(e,t,n,r,o,i){var s;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),s=Fg.contains(ry,e)?iy:Fg.contains(ty,e)?ay:sy;var a=cy(e,t,s,r);return"small"===a.type?function(e,t,n,r,o,i){var s=Tx.makeSymbol(e,"Main-Regular",o,r),a=Gv(s,t,r,i);return n&&Vv(a,r,t),a}(e,a.style,n,r,o,i):"large"===a.type?Uv(e,a.size,n,r,o,i):Zv(e,t,n,r,o,i)},uy={sqrtImage:function(e,t){var n,r,o=t.havingBaseSizing(),i=cy("\\surd",e*o.sizeMultiplier,ay,o),s=o.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,d=0;return"small"===i.type?(e<1?s=1:e<1.4&&(s=.7),c=(1+a)/s,(n=ey("sqrtMain",l=(1+a+Qv)/s,d=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",r=.833/s):"large"===i.type?(d=1080*oy[i.size],c=(oy[i.size]+a)/s,l=(oy[i.size]+a+Qv)/s,(n=ey("sqrtSize"+i.size,l,d,a,t)).style.minWidth="1.02em",r=1/s):(l=e+a+Qv,c=e+a,d=Math.floor(1e3*e+a)+80,(n=ey("sqrtTall",l,d,a,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=vb(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*s}},sizedDelim:function(e,t,n,r,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Fg.contains(ty,e)||Fg.contains(ry,e))return Uv(e,t,!1,n,r,o);if(Fg.contains(ny,e))return Zv(e,oy[t],!1,n,r,o);throw new Dg("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:oy,customSizedDelim:dy,leftRightDelim:function(e,t,n,r,o,i){var s=r.fontMetrics().axisHeight*r.sizeMultiplier,a=5/r.fontMetrics().ptPerEm,l=Math.max(t-s,n+s),c=Math.max(l/500*901,2*l-a);return dy(e,c,!0,r,o,i)}},hy={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},py=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function fy(e,t){var n=Sv(e);if(n&&Fg.contains(py,n.text))return n;throw new Dg(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function my(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}jx({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=fy(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hy[e.funcName].size,mclass:hy[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Tx.makeSpan([e.mclass]):uy.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(av(e.delim,e.mode));var n=new sv.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=vb(uy.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),jx({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Dg("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:fy(t[0],e).text,color:n}}}),jx({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=fy(t[0],e),r=e.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=wv(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{my(e);for(var n,r,o=Wx(e.body,t,!0,["mopen","mclose"]),i=0,s=0,a=!1,l=0;l<o.length;l++)o[l].isMiddle?a=!0:(i=Math.max(o[l].height,i),s=Math.max(o[l].depth,s));if(i*=t.sizeMultiplier,s*=t.sizeMultiplier,n="."===e.left?Qx(t,["mopen"]):uy.leftRightDelim(e.left,i,s,t,e.mode,["mopen"]),o.unshift(n),a)for(var c=1;c<o.length;c++){var d=o[c].isMiddle;d&&(o[c]=uy.leftRightDelim(d.delim,i,s,d.options,e.mode,[]))}if("."===e.right)r=Qx(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;r=uy.leftRightDelim(e.right,i,s,u,e.mode,["mclose"])}return o.push(r),Tx.makeSpan(["minner"],o,t)},mathmlBuilder:(e,t)=>{my(e);var n=uv(e.body,t);if("."!==e.left){var r=new sv.MathNode("mo",[av(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var o=new sv.MathNode("mo",[av(e.right,e.mode)]);o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),n.push(o)}return lv(n)}}),jx({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=fy(t[0],e);if(!e.parser.leftrightDepth)throw new Dg("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=Qx(t,[]);else{n=uy.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?av("|","text"):av(e.delim,e.mode),r=new sv.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var _y=(e,t)=>{var n,r,o,i=Tx.wrapFragment(ev(e.body,t),t),s=e.label.slice(1),a=t.sizeMultiplier,l=0,c=Fg.isCharacterBox(e.body);if("sout"===s)(n=Tx.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/a,l=-.5*t.fontMetrics().xHeight;else if("phase"===s){var d=xb({number:.6,unit:"pt"},t),u=xb({number:.35,unit:"ex"},t);a/=t.havingBaseSizing().sizeMultiplier;var h=i.height+i.depth+d+u;i.style.paddingLeft=vb(h/2+d);var p=Math.floor(1e3*h*a),f="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",m=new Rb([new Pb("phase",f)],{width:"400em",height:vb(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(n=Tx.makeSvgSpan(["hide-tail"],[m],t)).style.height=vb(h),l=i.depth+d+u}else{/cancel/.test(s)?c||i.classes.push("cancel-pad"):"angl"===s?i.classes.push("anglpad"):i.classes.push("boxpad");var _=0,g=0,b=0;/box/.test(s)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),g=_=t.fontMetrics().fboxsep+("colorbox"===s?0:b)):"angl"===s?(_=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),g=Math.max(0,.25-i.depth)):g=_=c?.2:0,n=xv(i,s,_,g,t),/fbox|boxed|fcolorbox/.test(s)?(n.style.borderStyle="solid",n.style.borderWidth=vb(b)):"angl"===s&&.049!==b&&(n.style.borderTopWidth=vb(b),n.style.borderRightWidth=vb(b)),l=i.depth+g,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)o=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(s)?["svg-align"]:[];o=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:x}]},t)}return/cancel/.test(s)&&(o.height=i.height,o.depth=i.depth),/cancel/.test(s)&&!c?Tx.makeSpan(["mord","cancel-lap"],[o],t):Tx.makeSpan(["mord"],[o],t)},gy=(e,t)=>{var n=0,r=new sv.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[pv(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};jx({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:o}=e,i=wv(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:i,body:s}},htmlBuilder:_y,mathmlBuilder:gy}),jx({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:o}=e,i=wv(t[0],"color-token").color,s=wv(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:s,borderColor:i,body:a}},htmlBuilder:_y,mathmlBuilder:gy}),jx({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),jx({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:_y,mathmlBuilder:gy}),jx({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var by={};function xy(e){for(var{type:t,names:n,props:r,handler:o,htmlBuilder:i,mathmlBuilder:s}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l<n.length;++l)by[n[l]]=a;i&&(Dx[t]=i),s&&(Bx[t]=s)}var vy={};function yy(e,t){vy[e]=t}function wy(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var ky=e=>{if(!e.parser.settings.displayMode)throw new Dg("{"+e.envName+"} can be used only in display mode.")};function Sy(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Cy(e,t,n){var{hskipBeforeAndAfter:r,addJot:o,cols:i,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)s=1;else if(!(s=parseFloat(p))||s<0)throw new Dg("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var f=[],m=[f],_=[],g=[],b=null!=l?[]:void 0;function x(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function v(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new Ig("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),g.push(wy(e));;){var y=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),y={type:"ordgroup",mode:e.mode,body:y},n&&(y={type:"styling",mode:e.mode,style:n,body:[y]}),f.push(y);var w=e.fetch().text;if("&"===w){if(u&&f.length===u){if(c||a)throw new Dg("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===w){v(),1===f.length&&"styling"===y.type&&0===y.body[0].body.length&&(m.length>1||!d)&&m.pop(),g.length<m.length+1&&g.push([]);break}if("\\\\"!==w)throw new Dg("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),_.push(k?k.value:null),v(),g.push(wy(e)),f=[],m.push(f),x()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:m,cols:i,rowGaps:_,hskipBeforeAndAfter:r,hLinesBeforeRow:g,colSeparationType:a,tags:b,leqno:h}}function My(e){return"d"===e.slice(0,1)?"display":"text"}var zy=function(e,t){var n,r,o=e.body.length,i=e.hLinesBeforeRow,s=0,a=new Array(o),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,u=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(eb.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?xb({number:3,unit:"ex"},t):12*d,p=3*d,f=e.arraystretch*h,m=.7*f,_=.3*f,g=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(g+=.25),l.push({pos:g,isDashed:e[t]})}for(b(i[0]),n=0;n<e.body.length;++n){var x=e.body[n],v=m,y=_;s<x.length&&(s=x.length);var w=new Array(x.length);for(r=0;r<x.length;++r){var k=ev(x[r],t);y<k.depth&&(y=k.depth),v<k.height&&(v=k.height),w[r]=k}var S=e.rowGaps[n],C=0;S&&(C=xb(S,t))>0&&(y<(C+=_)&&(y=C),C=0),e.addJot&&(y+=p),w.height=v,w.depth=y,g+=v,w.pos=g,g+=y+C,a[n]=w,b(i[n+1])}var M,z,N=g/2+t.fontMetrics().axisHeight,A=e.cols||[],T=[],R=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<o;++n){var P=a[n],O=P.pos-N,E=e.tags[n],L=void 0;(L=!0===E?Tx.makeSpan(["eqn-num"],[],t):!1===E?Tx.makeSpan([],[],t):Tx.makeSpan([],Wx(E,t,!0),t)).depth=P.depth,L.height=P.height,R.push({type:"elem",elem:L,shift:O})}for(r=0,z=0;r<s||z<A.length;++r,++z){for(var I=A[z]||{},D=!0;"separator"===I.type;){if(D||((M=Tx.makeSpan(["arraycolsep"],[])).style.width=vb(t.fontMetrics().doubleRuleSep),T.push(M)),"|"!==I.separator&&":"!==I.separator)throw new Dg("Invalid separator type: "+I.separator);var B="|"===I.separator?"solid":"dashed",j=Tx.makeSpan(["vertical-separator"],[],t);j.style.height=vb(g),j.style.borderRightWidth=vb(c),j.style.borderRightStyle=B,j.style.margin="0 "+vb(-c/2);var H=g-N;H&&(j.style.verticalAlign=vb(-H)),T.push(j),I=A[++z]||{},D=!1}if(!(r>=s)){var q=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(q=Fg.deflt(I.pregap,u))&&((M=Tx.makeSpan(["arraycolsep"],[])).style.width=vb(q),T.push(M));var F=[];for(n=0;n<o;++n){var $=a[n],G=$[r];if(G){var V=$.pos-N;G.depth=$.depth,G.height=$.height,F.push({type:"elem",elem:G,shift:V})}}F=Tx.makeVList({positionType:"individualShift",children:F},t),F=Tx.makeSpan(["col-align-"+(I.align||"c")],[F]),T.push(F),(r<s-1||e.hskipBeforeAndAfter)&&0!==(q=Fg.deflt(I.postgap,u))&&((M=Tx.makeSpan(["arraycolsep"],[])).style.width=vb(q),T.push(M))}}if(a=Tx.makeSpan(["mtable"],T),l.length>0){for(var U=Tx.makeLineSpan("hline",t,c),K=Tx.makeLineSpan("hdashline",t,c),W=[{type:"elem",elem:a,shift:0}];l.length>0;){var Y=l.pop(),X=Y.pos-N;Y.isDashed?W.push({type:"elem",elem:K,shift:X}):W.push({type:"elem",elem:U,shift:X})}a=Tx.makeVList({positionType:"individualShift",children:W},t)}if(0===R.length)return Tx.makeSpan(["mord"],[a],t);var J=Tx.makeVList({positionType:"individualShift",children:R},t);return J=Tx.makeSpan(["tag"],[J],t),Tx.makeFragment([a,J])},Ny={c:"center ",l:"left ",r:"right "},Ay=function(e,t){for(var n=[],r=new sv.MathNode("mtd",[],["mtr-glue"]),o=new sv.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var s=e.body[i],a=[],l=0;l<s.length;l++)a.push(new sv.MathNode("mtd",[pv(s[l],t)]));e.tags&&e.tags[i]&&(a.unshift(r),a.push(r),e.leqno?a.unshift(o):a.push(o)),n.push(new sv.MathNode("mtr",a))}var c=new sv.MathNode("mtable",n),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",vb(d));var u="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,f="",m=!1,_=0,g=p.length;"separator"===p[0].type&&(u+="top ",_=1),"separator"===p[p.length-1].type&&(u+="bottom ",g-=1);for(var b=_;b<g;b++)"align"===p[b].type?(h+=Ny[p[b].align],m&&(f+="none "),m=!0):"separator"===p[b].type&&m&&(f+="|"===p[b].separator?"solid ":"dashed ",m=!1);c.setAttribute("columnalign",h.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===e.colSeparationType){for(var x=e.cols||[],v="",y=1;y<x.length;y++)v+=y%2?"0em ":"1em ";c.setAttribute("columnspacing",v.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var w="",k=e.hLinesBeforeRow;u+=k[0].length>0?"left ":"",u+=k[k.length-1].length>0?"right ":"";for(var S=1;S<k.length-1;S++)w+=0===k[S].length?"none ":k[S][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==u&&(c=new sv.MathNode("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new sv.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Ty=function(e,t){-1===e.envName.indexOf("ed")&&ky(e);var n,r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",i="split"===e.envName,s=Cy(e.parser,{cols:r,addJot:!0,autoTag:i?void 0:Sy(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",d=0;d<t[0].body.length;d++){c+=wv(t[0].body[d],"textord").text}n=Number(c),a=2*n}var u=!a;s.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=wv(e[t],"styling");wv(r.body[0],"ordgroup").body.unshift(l)}if(u)a<e.length&&(a=e.length);else{var o=e.length/2;if(n<o)throw new Dg("Too many math in a row: expected "+n+", but got "+o,e[0])}});for(var h=0;h<a;++h){var p="r",f=0;h%2==1?p="l":h>0&&u&&(f=1),r[h]={type:"align",align:p,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};xy({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(Sv(t[0])?[t[0]]:wv(t[0],"ordgroup").body).map(function(e){var t=kv(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Dg("Unknown column alignment: "+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Cy(e.parser,r,My(e.envName))},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,-1==="lcr".indexOf(n))throw new Dg("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var i=Cy(e.parser,r,My(e.envName)),s=Math.max(0,...i.body.map(e=>e.length));return i.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Cy(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(Sv(t[0])?[t[0]]:wv(t[0],"ordgroup").body).map(function(e){var t=kv(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Dg("Unknown column alignment: "+t,e)});if(n.length>1)throw new Dg("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=Cy(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new Dg("{subarray} can contain only one column");return r},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Cy(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},My(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ty,htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Fg.contains(["gather","gather*"],e.envName)&&ky(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Sy(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Cy(e.parser,t,"display")},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ty,htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ky(e);var t={autoTag:Sy(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Cy(e.parser,t,"display")},htmlBuilder:zy,mathmlBuilder:Ay}),xy({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(ky(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Dg("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r=[],o=[r],i=0;i<t.length;i++){for(var s=t[i],a=Ev(),l=0;l<s.length;l++)if(Lv(s[l])){r.push(a);var c=kv(s[l+=1]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(c)>-1);else{if(!("<>AV".indexOf(c)>-1))throw new Dg('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var h=!0,p=l+1;p<s.length;p++){if(Iv(s[p],c)){h=!1,l=p;break}if(Lv(s[p]))throw new Dg("Missing a "+c+" character to complete a CD arrow.",s[p]);d[u].body.push(s[p])}if(h)throw new Dg("Missing a "+c+" character to complete a CD arrow.",s[l])}}var f={type:"styling",body:[Dv(c,d,e)],mode:"math",style:"display"};r.push(f),a=Ev()}else a.body.push(s[l]);i%2==0?r.push(a):r.shift(),r=[],o.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)),htmlBuilder:zy,mathmlBuilder:Ay}),yy("\\nonumber","\\gdef\\@eqnsw{0}"),yy("\\notag","\\nonumber"),jx({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Dg(e.funcName+" valid only within array environment")}});var Ry=by;jx({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];if("ordgroup"!==o.type)throw new Dg("Invalid environment name",o);for(var i="",s=0;s<o.body.length;++s)i+=wv(o.body[s],"textord").text;if("\\begin"===r){if(!Ry.hasOwnProperty(i))throw new Dg("No such environment: "+i,o);var a=Ry[i],{args:l,optArgs:c}=n.parseArguments("\\begin{"+i+"}",a),d={mode:n.mode,envName:i,parser:n},u=a.handler(d,l,c);n.expect("\\end",!1);var h=n.nextToken,p=wv(n.parseFunction(),"environment");if(p.name!==i)throw new Dg("Mismatch: \\begin{"+i+"} matched by \\end{"+p.name+"}",h);return u}return{type:"environment",mode:n.mode,name:i,nameGroup:o}}});var Py=(e,t)=>{var n=e.font,r=t.withFont(n);return ev(e.body,r)},Oy=(e,t)=>{var n=e.font,r=t.withFont(n);return pv(e.body,r)},Ey={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};jx({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=qx(t[0]),i=r;return i in Ey&&(i=Ey[i]),{type:"font",mode:n.mode,font:i.slice(1),body:o}},htmlBuilder:Py,mathmlBuilder:Oy}),jx({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],o=Fg.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Pv(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}}),jx({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:o}=e,{mode:i}=n,s=n.parseExpression(!0,o);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:s}}},htmlBuilder:Py,mathmlBuilder:Oy});var Ly=(e,t)=>{var n=t;return"display"===e?n=n.id>=eb.SCRIPT.id?n.text():eb.DISPLAY:"text"===e&&n.size===eb.DISPLAY.size?n=eb.TEXT:"script"===e?n=eb.SCRIPT:"scriptscript"===e&&(n=eb.SCRIPTSCRIPT),n},Iy=(e,t)=>{var n,r=Ly(e.size,t.style),o=r.fracNum(),i=r.fracDen();n=t.havingStyle(o);var s=ev(e.numer,n,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}n=t.havingStyle(i);var c,d,u,h,p,f,m,_,g,b,x=ev(e.denom,n,t);if(e.hasBarLine?(e.barSize?(d=xb(e.barSize,t),c=Tx.makeLineSpan("frac-line",t,d)):c=Tx.makeLineSpan("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),r.size===eb.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,p=d>0?3*u:7*u,f=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,p=u):(h=t.fontMetrics().num3,p=3*u),f=t.fontMetrics().denom2),c){var v=t.fontMetrics().axisHeight;h-s.depth-(v+.5*d)<p&&(h+=p-(h-s.depth-(v+.5*d))),v-.5*d-(x.height-f)<p&&(f+=p-(v-.5*d-(x.height-f)));var y=-(v-.5*d);m=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:x,shift:f},{type:"elem",elem:c,shift:y},{type:"elem",elem:s,shift:-h}]},t)}else{var w=h-s.depth-(x.height-f);w<p&&(h+=.5*(p-w),f+=.5*(p-w)),m=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:x,shift:f},{type:"elem",elem:s,shift:-h}]},t)}return n=t.havingStyle(r),m.height*=n.sizeMultiplier/t.sizeMultiplier,m.depth*=n.sizeMultiplier/t.sizeMultiplier,_=r.size===eb.DISPLAY.size?t.fontMetrics().delim1:r.size===eb.SCRIPTSCRIPT.size?t.havingStyle(eb.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,g=null==e.leftDelim?Qx(t,["mopen"]):uy.customSizedDelim(e.leftDelim,_,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?Tx.makeSpan([]):null==e.rightDelim?Qx(t,["mclose"]):uy.customSizedDelim(e.rightDelim,_,!0,t.havingStyle(r),e.mode,["mclose"]),Tx.makeSpan(["mord"].concat(n.sizingClasses(t)),[g,Tx.makeSpan(["mfrac"],[m]),b],t)},Dy=(e,t)=>{var n=new sv.MathNode("mfrac",[pv(e.numer,t),pv(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=xb(e.barSize,t);n.setAttribute("linethickness",vb(r))}}else n.setAttribute("linethickness","0px");var o=Ly(e.size,t.style);if(o.size!==t.style.size){n=new sv.MathNode("mstyle",[n]);var i=o.size===eb.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",i),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var s=[];if(null!=e.leftDelim){var a=new sv.MathNode("mo",[new sv.TextNode(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(n),null!=e.rightDelim){var l=new sv.MathNode("mo",[new sv.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return lv(s)}return n};jx({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:o}=e,i=t[0],s=t[1],a=null,l=null,c="auto";switch(o){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,a="(",l=")";break;case"\\\\bracefrac":n=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(o){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:s,hasBarLine:n,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:Iy,mathmlBuilder:Dy}),jx({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0],i=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),jx({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:o}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:o}}});var By=["display","text","script","scriptscript"],jy=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};jx({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,o=t[4],i=t[5],s=qx(t[0]),a="atom"===s.type&&"open"===s.family?jy(s.text):null,l=qx(t[1]),c="atom"===l.type&&"close"===l.family?jy(l.text):null,d=wv(t[2],"size"),u=null;n=!!d.isBlank||(u=d.value).number>0;var h="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var f=wv(p.body[0],"textord");h=By[Number(f.text)]}}else p=wv(p,"textord"),h=By[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:n,barSize:u,leftDelim:a,rightDelim:c,size:h}},htmlBuilder:Iy,mathmlBuilder:Dy}),jx({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:o}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:wv(t[0],"size").value,token:o}}}),jx({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(wv(t[1],"infix").size),s=t[2],a=i.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:s,continued:!1,hasBarLine:a,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Iy,mathmlBuilder:Dy});var Hy=(e,t)=>{var n,r,o=t.style;"supsub"===e.type?(n=e.sup?ev(e.sup,t.havingStyle(o.sup()),t):ev(e.sub,t.havingStyle(o.sub()),t),r=wv(e.base,"horizBrace")):r=wv(e,"horizBrace");var i,s=ev(r.base,t.havingBaseStyle(eb.DISPLAY)),a=yv(r,t);if(r.isOver?(i=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Tx.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=Tx.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t);i=r.isOver?Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Tx.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Tx.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t)};jx({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Hy,mathmlBuilder:(e,t)=>{var n=vv(e.label);return new sv.MathNode(e.isOver?"mover":"munder",[pv(e.base,t),n])}}),jx({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],o=wv(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:Fx(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Wx(e.body,t,!1);return Tx.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=hv(e.body,t);return n instanceof ov||(n=new ov("mrow",[n])),n.setAttribute("href",e.href),n}}),jx({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=wv(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],i=0;i<r.length;i++){var s=r[i];"~"===s&&(s="\\textasciitilde"),o.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:Fx(a)}}}),jx({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Fx(t[0])}},htmlBuilder(e,t){var n=Wx(e.body,t,!1);return Tx.makeFragment(n)},mathmlBuilder:(e,t)=>new sv.MathNode("mrow",uv(e.body,t))}),jx({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:o,token:i}=e,s=wv(t[0],"raw").string,a=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=s,n={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,n={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,n={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var c=s.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(2!==u.length)throw new Dg("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[1].trim()}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:Fx(a)}:r.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{var n=Wx(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var o=Tx.makeSpan(r,n,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&o.setAttribute(i,e.attributes[i]);return o},mathmlBuilder:(e,t)=>hv(e.body,t)}),jx({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Fx(t[0]),mathml:Fx(t[1])}},htmlBuilder:(e,t)=>{var n=Wx(e.html,t,!1);return Tx.makeFragment(n)},mathmlBuilder:(e,t)=>hv(e.mathml,t)});var qy=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Dg("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!bb(n))throw new Dg("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};jx({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,o={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(n[0])for(var l=wv(n[0],"raw").string.split(","),c=0;c<l.length;c++){var d=l[c].split("=");if(2===d.length){var u=d[1].trim();switch(d[0].trim()){case"alt":a=u;break;case"width":o=qy(u);break;case"height":i=qy(u);break;case"totalheight":s=qy(u);break;default:throw new Dg("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var h=wv(t[0],"url").url;return""===a&&(a=(a=(a=h).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:a,width:o,height:i,totalheight:s,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=xb(e.height,t),r=0;e.totalheight.number>0&&(r=xb(e.totalheight,t)-n);var o=0;e.width.number>0&&(o=xb(e.width,t));var i={height:vb(n+r)};o>0&&(i.width=vb(o)),r>0&&(i.verticalAlign=vb(-r));var s=new Nb(e.src,e.alt,i);return s.height=n,s.depth=r,s},mathmlBuilder:(e,t)=>{var n=new sv.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=xb(e.height,t),o=0;if(e.totalheight.number>0&&(o=xb(e.totalheight,t)-r,n.setAttribute("valign",vb(-o))),n.setAttribute("height",vb(r+o)),e.width.number>0){var i=xb(e.width,t);n.setAttribute("width",vb(i))}return n.setAttribute("src",e.src),n}}),jx({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,o=wv(t[0],"size");if(n.settings.strict){var i="m"===r[1],s="mu"===o.value.unit;i?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+o.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder:(e,t)=>Tx.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=xb(e.dimension,t);return new sv.SpaceNode(n)}}),jx({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Tx.makeSpan([],[ev(e.body,t)]),n=Tx.makeSpan(["inner"],[n],t)):n=Tx.makeSpan(["inner"],[ev(e.body,t)]);var r=Tx.makeSpan(["fix"],[]),o=Tx.makeSpan([e.alignment],[n,r],t),i=Tx.makeSpan(["strut"]);return i.style.height=vb(o.height+o.depth),o.depth&&(i.style.verticalAlign=vb(-o.depth)),o.children.unshift(i),o=Tx.makeSpan(["thinbox"],[o],t),Tx.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{var n=new sv.MathNode("mpadded",[pv(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),jx({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,o=r.mode;r.switchMode("math");var i="\\("===n?"\\)":"$",s=r.parseExpression(!1,i);return r.expect(i),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:s}}}),jx({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Dg("Mismatched "+e.funcName)}});var Fy=(e,t)=>{switch(t.style.size){case eb.DISPLAY.size:return e.display;case eb.TEXT.size:return e.text;case eb.SCRIPT.size:return e.script;case eb.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};jx({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Fx(t[0]),text:Fx(t[1]),script:Fx(t[2]),scriptscript:Fx(t[3])}},htmlBuilder:(e,t)=>{var n=Fy(e,t),r=Wx(n,t,!1);return Tx.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=Fy(e,t);return hv(n,t)}});var $y=(e,t,n,r,o,i,s)=>{e=Tx.makeSpan([],[e]);var a,l,c,d=n&&Fg.isCharacterBox(n);if(t){var u=ev(t,r.havingStyle(o.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var h=ev(n,r.havingStyle(o.sub()),r);a={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&a){var p=r.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+s;c=Tx.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:vb(-i)},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:vb(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(a){var f=e.height-s;c=Tx.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:vb(-i)},{type:"kern",size:a.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var m=e.depth+s;c=Tx.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:vb(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var _=[c];if(a&&0!==i&&!d){var g=Tx.makeSpan(["mspace"],[],r);g.style.marginRight=vb(i),_.unshift(g)}return Tx.makeSpan(["mop","op-limits"],_,r)},Gy=["\\smallint"],Vy=(e,t)=>{var n,r,o,i=!1;"supsub"===e.type?(n=e.sup,r=e.sub,o=wv(e.base,"op"),i=!0):o=wv(e,"op");var s,a=t.style,l=!1;if(a.size===eb.DISPLAY.size&&o.symbol&&!Fg.contains(Gy,o.name)&&(l=!0),o.symbol){var c=l?"Size2-Regular":"Size1-Regular",d="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(d=o.name.slice(1),o.name="oiint"===d?"\\iint":"\\iiint"),s=Tx.makeSymbol(o.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),d.length>0){var u=s.italic,h=Tx.staticSvg(d+"Size"+(l?"2":"1"),t);s=Tx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:h,shift:l?.08:0}]},t),o.name="\\"+d,s.classes.unshift("mop"),s.italic=u}}else if(o.body){var p=Wx(o.body,t,!0);1===p.length&&p[0]instanceof Tb?(s=p[0]).classes[0]="mop":s=Tx.makeSpan(["mop"],p,t)}else{for(var f=[],m=1;m<o.name.length;m++)f.push(Tx.mathsym(o.name[m],o.mode,t));s=Tx.makeSpan(["mop"],f,t)}var _=0,g=0;return(s instanceof Tb||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(_=(s.height-s.depth)/2-t.fontMetrics().axisHeight,g=s.italic),i?$y(s,n,r,t,a,g,_):(_&&(s.style.position="relative",s.style.top=vb(_)),s)},Uy=(e,t)=>{var n;if(e.symbol)n=new ov("mo",[av(e.name,e.mode)]),Fg.contains(Gy,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ov("mo",uv(e.body,t));else{n=new ov("mi",[new iv(e.name.slice(1))]);var r=new ov("mo",[av("","text")]);n=e.parentIsSupSub?new ov("mrow",[n,r]):rv([n,r])}return n},Ky={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};jx({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=r;return 1===o.length&&(o=Ky[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:Vy,mathmlBuilder:Uy}),jx({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Fx(r)}},htmlBuilder:Vy,mathmlBuilder:Uy});var Wy={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};jx({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Vy,mathmlBuilder:Uy}),jx({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Vy,mathmlBuilder:Uy}),jx({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=Wy[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Vy,mathmlBuilder:Uy});var Yy=(e,t)=>{var n,r,o,i,s=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,o=wv(e.base,"operatorname"),s=!0):o=wv(e,"operatorname"),o.body.length>0){for(var a=o.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),l=Wx(a,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof Tb&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Tx.makeSpan(["mop"],l,t)}else i=Tx.makeSpan(["mop"],[],t);return s?$y(i,n,r,t,t.style,0,0):i};function Xy(e,t,n){for(var r=Wx(e,t,!1),o=t.sizeMultiplier/n.sizeMultiplier,i=0;i<r.length;i++){var s=r[i].classes.indexOf("sizing");s<0?Array.prototype.push.apply(r[i].classes,t.sizingClasses(n)):r[i].classes[s+1]==="reset-size"+t.size&&(r[i].classes[s+1]="reset-size"+n.size),r[i].height*=o,r[i].depth*=o}return Tx.makeFragment(r)}jx({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"operatorname",mode:n.mode,body:Fx(o),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Yy,mathmlBuilder:(e,t)=>{for(var n=uv(e.body,t.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var i=n[o];if(i instanceof sv.SpaceNode);else if(i instanceof sv.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=i.children[0];1===i.children.length&&s instanceof sv.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var a=n.map(e=>e.toText()).join("");n=[new sv.TextNode(a)]}var l=new sv.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new sv.MathNode("mo",[av("","text")]);return e.parentIsSupSub?new sv.MathNode("mrow",[l,c]):sv.newDocumentFragment([l,c])}}),yy("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Hx({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Tx.makeFragment(Wx(e.body,t,!1)):Tx.makeSpan(["mord"],Wx(e.body,t,!0),t),mathmlBuilder:(e,t)=>hv(e.body,t,!0)}),jx({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=ev(e.body,t.havingCrampedStyle()),r=Tx.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,i=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},t);return Tx.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var n=new sv.MathNode("mo",[new sv.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new sv.MathNode("mover",[pv(e.body,t),n]);return r.setAttribute("accent","true"),r}}),jx({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Fx(r)}},htmlBuilder:(e,t)=>{var n=Wx(e.body,t.withPhantom(),!1);return Tx.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=uv(e.body,t);return new sv.MathNode("mphantom",n)}}),jx({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Tx.makeSpan([],[ev(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),Tx.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=uv(Fx(e.body),t),r=new sv.MathNode("mphantom",n),o=new sv.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),jx({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Tx.makeSpan(["inner"],[ev(e.body,t.withPhantom())]),r=Tx.makeSpan(["fix"],[]);return Tx.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=uv(Fx(e.body),t),r=new sv.MathNode("mphantom",n),o=new sv.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}}),jx({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=wv(t[0],"size").value,o=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(e,t){var n=ev(e.body,t),r=xb(e.dy,t);return Tx.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new sv.MathNode("mpadded",[pv(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),jx({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),jx({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,o=n[0],i=wv(t[0],"size"),s=wv(t[1],"size");return{type:"rule",mode:r.mode,shift:o&&wv(o,"size").value,width:i.value,height:s.value}},htmlBuilder(e,t){var n=Tx.makeSpan(["mord","rule"],[],t),r=xb(e.width,t),o=xb(e.height,t),i=e.shift?xb(e.shift,t):0;return n.style.borderRightWidth=vb(r),n.style.borderTopWidth=vb(o),n.style.bottom=vb(i),n.width=r,n.height=o+i,n.depth=-i,n.maxFontSize=1.125*o*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=xb(e.width,t),r=xb(e.height,t),o=e.shift?xb(e.shift,t):0,i=t.color&&t.getColor()||"black",s=new sv.MathNode("mspace");s.setAttribute("mathbackground",i),s.setAttribute("width",vb(n)),s.setAttribute("height",vb(r));var a=new sv.MathNode("mpadded",[s]);return o>=0?a.setAttribute("height",vb(o)):(a.setAttribute("height",vb(o)),a.setAttribute("depth",vb(-o))),a.setAttribute("voffset",vb(o)),a}});var Jy=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];jx({type:"sizing",names:Jy,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:o}=e,i=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:Jy.indexOf(r)+1,body:i}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Xy(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=uv(e.body,n),o=new sv.MathNode("mstyle",r);return o.setAttribute("mathsize",vb(n.sizeMultiplier)),o}}),jx({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,o=!1,i=!1,s=n[0]&&wv(n[0],"ordgroup");if(s)for(var a="",l=0;l<s.body.length;++l){if("t"===(a=s.body[l].text))o=!0;else{if("b"!==a){o=!1,i=!1;break}i=!0}}else o=!0,i=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:o,smashDepth:i}},htmlBuilder:(e,t)=>{var n=Tx.makeSpan([],[ev(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var i=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return Tx.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var n=new sv.MathNode("mpadded",[pv(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),jx({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,o=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:o}},htmlBuilder(e,t){var n=ev(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Tx.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,o=r;t.style.id<eb.TEXT.id&&(o=t.fontMetrics().xHeight);var i=r+o/4,s=n.height+n.depth+i+r,{span:a,ruleWidth:l,advanceWidth:c}=uy.sqrtImage(s,t),d=a.height-l;d>n.height+n.depth+i&&(i=(i+d-n.height-n.depth)/2);var u=a.height-n.height-i-l;n.style.paddingLeft=vb(c);var h=Tx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(eb.SCRIPTSCRIPT),f=ev(e.index,p,t),m=.6*(h.height-h.depth),_=Tx.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:f}]},t),g=Tx.makeSpan(["root"],[_]);return Tx.makeSpan(["mord","sqrt"],[g,h],t)}return Tx.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new sv.MathNode("mroot",[pv(n,t),pv(r,t)]):new sv.MathNode("msqrt",[pv(n,t)])}});var Zy={display:eb.DISPLAY,text:eb.TEXT,script:eb.SCRIPT,scriptscript:eb.SCRIPTSCRIPT};jx({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:o}=e,i=o.parseExpression(!0,n),s=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:s,body:i}},htmlBuilder(e,t){var n=Zy[e.style],r=t.havingStyle(n).withFont("");return Xy(e.body,r,t)},mathmlBuilder(e,t){var n=Zy[e.style],r=t.havingStyle(n),o=uv(e.body,r),i=new sv.MathNode("mstyle",o),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",s[0]),i.setAttribute("displaystyle",s[1]),i}});Hx({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===eb.DISPLAY.size||n.alwaysHandleSupSub)?Vy:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===eb.DISPLAY.size||n.limits)?Yy:null:"accent"===n.type?Fg.isCharacterBox(n.base)?Cv:null:"horizBrace"===n.type&&!e.sub===n.isOver?Hy:null:null}(e,t);if(n)return n(e,t);var r,o,i,{base:s,sup:a,sub:l}=e,c=ev(s,t),d=t.fontMetrics(),u=0,h=0,p=s&&Fg.isCharacterBox(s);if(a){var f=t.havingStyle(t.style.sup());r=ev(a,f,t),p||(u=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());o=ev(l,m,t),p||(h=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}i=t.style===eb.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var _,g=t.sizeMultiplier,b=vb(.5/d.ptPerEm/g),x=null;if(o){var v=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Tb||v)&&(x=vb(-c.italic))}if(r&&o){u=Math.max(u,i,r.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var y=4*d.defaultRuleThickness;if(u-r.depth-(o.height-h)<y){h=y-(u-r.depth)+o.height;var w=.8*d.xHeight-(u-r.depth);w>0&&(u+=w,h-=w)}var k=[{type:"elem",elem:o,shift:h,marginRight:b,marginLeft:x},{type:"elem",elem:r,shift:-u,marginRight:b}];_=Tx.makeVList({positionType:"individualShift",children:k},t)}else if(o){h=Math.max(h,d.sub1,o.height-.8*d.xHeight);var S=[{type:"elem",elem:o,marginLeft:x,marginRight:b}];_=Tx.makeVList({positionType:"shift",positionData:h,children:S},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,r.depth+.25*d.xHeight),_=Tx.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:b}]},t)}var C=Zx(c,"right")||"mord";return Tx.makeSpan([C],[c,Tx.makeSpan(["msupsub"],[_])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,i=[pv(e.base,t)];if(e.sub&&i.push(pv(e.sub,t)),e.sup&&i.push(pv(e.sup,t)),r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===eb.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===eb.DISPLAY||s.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===eb.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===eb.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===eb.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===eb.DISPLAY)?"mover":"msup"}return new sv.MathNode(o,i)}}),Hx({type:"atom",htmlBuilder:(e,t)=>Tx.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new sv.MathNode("mo",[av(e.text,e.mode)]);if("bin"===e.family){var r=cv(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var Qy={mi:"italic",mn:"normal",mtext:"normal"};Hx({type:"mathord",htmlBuilder:(e,t)=>Tx.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new sv.MathNode("mi",[av(e.text,e.mode,t)]),r=cv(e,t)||"italic";return r!==Qy[n.type]&&n.setAttribute("mathvariant",r),n}}),Hx({type:"textord",htmlBuilder:(e,t)=>Tx.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=av(e.text,e.mode,t),o=cv(e,t)||"normal";return n="text"===e.mode?new sv.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new sv.MathNode("mn",[r]):"\\prime"===e.text?new sv.MathNode("mo",[r]):new sv.MathNode("mi",[r]),o!==Qy[n.type]&&n.setAttribute("mathvariant",o),n}});var ew={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},tw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Hx({type:"spacing",htmlBuilder(e,t){if(tw.hasOwnProperty(e.text)){var n=tw[e.text].className||"";if("text"===e.mode){var r=Tx.makeOrd(e,t,"textord");return r.classes.push(n),r}return Tx.makeSpan(["mspace",n],[Tx.mathsym(e.text,e.mode,t)],t)}if(ew.hasOwnProperty(e.text))return Tx.makeSpan(["mspace",ew[e.text]],[],t);throw new Dg('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!tw.hasOwnProperty(e.text)){if(ew.hasOwnProperty(e.text))return new sv.MathNode("mspace");throw new Dg('Unknown type of space "'+e.text+'"')}return new sv.MathNode("mtext",[new sv.TextNode(" ")])}});var nw=()=>{var e=new sv.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Hx({type:"tag",mathmlBuilder(e,t){var n=new sv.MathNode("mtable",[new sv.MathNode("mtr",[nw(),new sv.MathNode("mtd",[hv(e.body,t)]),nw(),new sv.MathNode("mtd",[hv(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var rw={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ow={"\\textbf":"textbf","\\textmd":"textmd"},iw={"\\textit":"textit","\\textup":"textup"},sw=(e,t)=>{var n=e.font;return n?rw[n]?t.withTextFontFamily(rw[n]):ow[n]?t.withTextFontWeight(ow[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(iw[n]):t};jx({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"text",mode:n.mode,body:Fx(o),font:r}},htmlBuilder(e,t){var n=sw(e,t),r=Wx(e.body,n,!0);return Tx.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=sw(e,t);return hv(e.body,n)}}),jx({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ev(e.body,t),r=Tx.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,i=Tx.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},t);return Tx.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var n=new sv.MathNode("mo",[new sv.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new sv.MathNode("munder",[pv(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),jx({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ev(e.body,t),r=t.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return Tx.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new sv.MathNode("mpadded",[pv(e.body,t)],["vcenter"])}),jx({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Dg("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=aw(e),r=[],o=t.havingStyle(t.style.text()),i=0;i<n.length;i++){var s=n[i];"~"===s&&(s="\\textasciitilde"),r.push(Tx.makeSymbol(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return Tx.makeSpan(["mord","text"].concat(o.sizingClasses(t)),Tx.tryCombineChars(r),o)},mathmlBuilder(e,t){var n=new sv.TextNode(aw(e)),r=new sv.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var aw=e=>e.body.replace(/ /g,e.star?"␣":" "),lw=Ix,cw="[ \r\n\t]",dw="(\\\\[a-zA-Z@]+)"+cw+"*",uw="[̀-ͯ]",hw=new RegExp(uw+"+$"),pw="("+cw+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+uw+"*|[\ud800-\udbff][\udc00-\udfff]"+uw+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+dw+"|\\\\[^\ud800-\udfff])";class fw{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(pw,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Ig("EOF",new Lg(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Dg("Unexpected character: '"+e[t]+"'",new Ig(e[t],new Lg(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Ig(r,new Lg(this,t,this.tokenRegex.lastIndex))}}class mw{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Dg("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var _w=vy;yy("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),yy("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),yy("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),yy("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),yy("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),yy("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),yy("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var gw={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};yy("\\char",function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Dg("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=gw[n.text])||r>=t)throw new Dg("Invalid base-"+t+" digit "+n.text);for(var o;null!=(o=gw[e.future().text])&&o<t;)r*=t,r+=o,e.popToken()}return"\\@char{"+r+"}"});var bw=(e,t,n,r)=>{var o=e.consumeArg().tokens;if(1!==o.length)throw new Dg("\\newcommand's first argument must be a macro name");var i=o[0].text,s=e.isDefined(i);if(s&&!t)throw new Dg("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!s&&!n)throw new Dg("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(1===(o=e.consumeArg().tokens).length&&"["===o[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Dg("Invalid number of arguments: "+l);a=parseInt(l),o=e.consumeArg().tokens}return s&&r||e.macros.set(i,{tokens:o,numArgs:a}),""};yy("\\newcommand",e=>bw(e,!1,!0,!1)),yy("\\renewcommand",e=>bw(e,!0,!1,!1)),yy("\\providecommand",e=>bw(e,!0,!0,!0)),yy("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),yy("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),yy("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),lw[n],Db.math[n],Db.text[n]),""}),yy("\\bgroup","{"),yy("\\egroup","}"),yy("~","\\nobreakspace"),yy("\\lq","`"),yy("\\rq","'"),yy("\\aa","\\r a"),yy("\\AA","\\r A"),yy("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),yy("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),yy("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),yy("ℬ","\\mathscr{B}"),yy("ℰ","\\mathscr{E}"),yy("ℱ","\\mathscr{F}"),yy("ℋ","\\mathscr{H}"),yy("ℐ","\\mathscr{I}"),yy("ℒ","\\mathscr{L}"),yy("ℳ","\\mathscr{M}"),yy("ℛ","\\mathscr{R}"),yy("ℭ","\\mathfrak{C}"),yy("ℌ","\\mathfrak{H}"),yy("ℨ","\\mathfrak{Z}"),yy("\\Bbbk","\\Bbb{k}"),yy("·","\\cdotp"),yy("\\llap","\\mathllap{\\textrm{#1}}"),yy("\\rlap","\\mathrlap{\\textrm{#1}}"),yy("\\clap","\\mathclap{\\textrm{#1}}"),yy("\\mathstrut","\\vphantom{(}"),yy("\\underbar","\\underline{\\text{#1}}"),yy("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),yy("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),yy("\\ne","\\neq"),yy("≠","\\neq"),yy("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),yy("∉","\\notin"),yy("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),yy("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),yy("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),yy("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),yy("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),yy("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),yy("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),yy("⟂","\\perp"),yy("‼","\\mathclose{!\\mkern-0.8mu!}"),yy("∌","\\notni"),yy("⌜","\\ulcorner"),yy("⌝","\\urcorner"),yy("⌞","\\llcorner"),yy("⌟","\\lrcorner"),yy("©","\\copyright"),yy("®","\\textregistered"),yy("️","\\textregistered"),yy("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),yy("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),yy("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),yy("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),yy("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),yy("⋮","\\vdots"),yy("\\varGamma","\\mathit{\\Gamma}"),yy("\\varDelta","\\mathit{\\Delta}"),yy("\\varTheta","\\mathit{\\Theta}"),yy("\\varLambda","\\mathit{\\Lambda}"),yy("\\varXi","\\mathit{\\Xi}"),yy("\\varPi","\\mathit{\\Pi}"),yy("\\varSigma","\\mathit{\\Sigma}"),yy("\\varUpsilon","\\mathit{\\Upsilon}"),yy("\\varPhi","\\mathit{\\Phi}"),yy("\\varPsi","\\mathit{\\Psi}"),yy("\\varOmega","\\mathit{\\Omega}"),yy("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),yy("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),yy("\\boxed","\\fbox{$\\displaystyle{#1}$}"),yy("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),yy("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),yy("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),yy("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),yy("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var xw={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};yy("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in xw?t=xw[n]:("\\not"===n.slice(0,4)||n in Db.math&&Fg.contains(["bin","rel"],Db.math[n].group))&&(t="\\dotsb"),t});var vw={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};yy("\\dotso",function(e){return e.future().text in vw?"\\ldots\\,":"\\ldots"}),yy("\\dotsc",function(e){var t=e.future().text;return t in vw&&","!==t?"\\ldots\\,":"\\ldots"}),yy("\\cdots",function(e){return e.future().text in vw?"\\@cdots\\,":"\\@cdots"}),yy("\\dotsb","\\cdots"),yy("\\dotsm","\\cdots"),yy("\\dotsi","\\!\\cdots"),yy("\\dotsx","\\ldots\\,"),yy("\\DOTSI","\\relax"),yy("\\DOTSB","\\relax"),yy("\\DOTSX","\\relax"),yy("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),yy("\\,","\\tmspace+{3mu}{.1667em}"),yy("\\thinspace","\\,"),yy("\\>","\\mskip{4mu}"),yy("\\:","\\tmspace+{4mu}{.2222em}"),yy("\\medspace","\\:"),yy("\\;","\\tmspace+{5mu}{.2777em}"),yy("\\thickspace","\\;"),yy("\\!","\\tmspace-{3mu}{.1667em}"),yy("\\negthinspace","\\!"),yy("\\negmedspace","\\tmspace-{4mu}{.2222em}"),yy("\\negthickspace","\\tmspace-{5mu}{.277em}"),yy("\\enspace","\\kern.5em "),yy("\\enskip","\\hskip.5em\\relax"),yy("\\quad","\\hskip1em\\relax"),yy("\\qquad","\\hskip2em\\relax"),yy("\\tag","\\@ifstar\\tag@literal\\tag@paren"),yy("\\tag@paren","\\tag@literal{({#1})}"),yy("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Dg("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),yy("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),yy("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),yy("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),yy("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),yy("\\newline","\\\\\\relax"),yy("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var yw=vb(ab["Main-Regular"]["T".charCodeAt(0)][1]-.7*ab["Main-Regular"]["A".charCodeAt(0)][1]);yy("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+yw+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),yy("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+yw+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),yy("\\hspace","\\@ifstar\\@hspacer\\@hspace"),yy("\\@hspace","\\hskip #1\\relax"),yy("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),yy("\\ordinarycolon",":"),yy("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),yy("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),yy("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),yy("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),yy("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),yy("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),yy("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),yy("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),yy("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),yy("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),yy("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),yy("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),yy("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),yy("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),yy("∷","\\dblcolon"),yy("∹","\\eqcolon"),yy("≔","\\coloneqq"),yy("≕","\\eqqcolon"),yy("⩴","\\Coloneqq"),yy("\\ratio","\\vcentcolon"),yy("\\coloncolon","\\dblcolon"),yy("\\colonequals","\\coloneqq"),yy("\\coloncolonequals","\\Coloneqq"),yy("\\equalscolon","\\eqqcolon"),yy("\\equalscoloncolon","\\Eqqcolon"),yy("\\colonminus","\\coloneq"),yy("\\coloncolonminus","\\Coloneq"),yy("\\minuscolon","\\eqcolon"),yy("\\minuscoloncolon","\\Eqcolon"),yy("\\coloncolonapprox","\\Colonapprox"),yy("\\coloncolonsim","\\Colonsim"),yy("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),yy("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),yy("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),yy("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),yy("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),yy("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),yy("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),yy("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),yy("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),yy("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),yy("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),yy("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),yy("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),yy("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),yy("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),yy("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),yy("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),yy("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),yy("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),yy("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),yy("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),yy("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),yy("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),yy("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),yy("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),yy("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),yy("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),yy("\\imath","\\html@mathml{\\@imath}{ı}"),yy("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),yy("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),yy("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),yy("⟦","\\llbracket"),yy("⟧","\\rrbracket"),yy("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),yy("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),yy("⦃","\\lBrace"),yy("⦄","\\rBrace"),yy("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),yy("⦵","\\minuso"),yy("\\darr","\\downarrow"),yy("\\dArr","\\Downarrow"),yy("\\Darr","\\Downarrow"),yy("\\lang","\\langle"),yy("\\rang","\\rangle"),yy("\\uarr","\\uparrow"),yy("\\uArr","\\Uparrow"),yy("\\Uarr","\\Uparrow"),yy("\\N","\\mathbb{N}"),yy("\\R","\\mathbb{R}"),yy("\\Z","\\mathbb{Z}"),yy("\\alef","\\aleph"),yy("\\alefsym","\\aleph"),yy("\\Alpha","\\mathrm{A}"),yy("\\Beta","\\mathrm{B}"),yy("\\bull","\\bullet"),yy("\\Chi","\\mathrm{X}"),yy("\\clubs","\\clubsuit"),yy("\\cnums","\\mathbb{C}"),yy("\\Complex","\\mathbb{C}"),yy("\\Dagger","\\ddagger"),yy("\\diamonds","\\diamondsuit"),yy("\\empty","\\emptyset"),yy("\\Epsilon","\\mathrm{E}"),yy("\\Eta","\\mathrm{H}"),yy("\\exist","\\exists"),yy("\\harr","\\leftrightarrow"),yy("\\hArr","\\Leftrightarrow"),yy("\\Harr","\\Leftrightarrow"),yy("\\hearts","\\heartsuit"),yy("\\image","\\Im"),yy("\\infin","\\infty"),yy("\\Iota","\\mathrm{I}"),yy("\\isin","\\in"),yy("\\Kappa","\\mathrm{K}"),yy("\\larr","\\leftarrow"),yy("\\lArr","\\Leftarrow"),yy("\\Larr","\\Leftarrow"),yy("\\lrarr","\\leftrightarrow"),yy("\\lrArr","\\Leftrightarrow"),yy("\\Lrarr","\\Leftrightarrow"),yy("\\Mu","\\mathrm{M}"),yy("\\natnums","\\mathbb{N}"),yy("\\Nu","\\mathrm{N}"),yy("\\Omicron","\\mathrm{O}"),yy("\\plusmn","\\pm"),yy("\\rarr","\\rightarrow"),yy("\\rArr","\\Rightarrow"),yy("\\Rarr","\\Rightarrow"),yy("\\real","\\Re"),yy("\\reals","\\mathbb{R}"),yy("\\Reals","\\mathbb{R}"),yy("\\Rho","\\mathrm{P}"),yy("\\sdot","\\cdot"),yy("\\sect","\\S"),yy("\\spades","\\spadesuit"),yy("\\sub","\\subset"),yy("\\sube","\\subseteq"),yy("\\supe","\\supseteq"),yy("\\Tau","\\mathrm{T}"),yy("\\thetasym","\\vartheta"),yy("\\weierp","\\wp"),yy("\\Zeta","\\mathrm{Z}"),yy("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),yy("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),yy("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),yy("\\bra","\\mathinner{\\langle{#1}|}"),yy("\\ket","\\mathinner{|{#1}\\rangle}"),yy("\\braket","\\mathinner{\\langle{#1}\\rangle}"),yy("\\Bra","\\left\\langle#1\\right|"),yy("\\Ket","\\left|#1\\right\\rangle");var ww=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",s),o.length&&n.macros.set("\\|",a));var i=t;!t&&o.length&&("|"===n.future().text&&(n.popToken(),i=!0));return{tokens:i?o:r,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...i,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};yy("\\bra@ket",ww(!1)),yy("\\bra@set",ww(!0)),yy("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),yy("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),yy("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),yy("\\angln","{\\angl n}"),yy("\\blue","\\textcolor{##6495ed}{#1}"),yy("\\orange","\\textcolor{##ffa500}{#1}"),yy("\\pink","\\textcolor{##ff00af}{#1}"),yy("\\red","\\textcolor{##df0030}{#1}"),yy("\\green","\\textcolor{##28ae7b}{#1}"),yy("\\gray","\\textcolor{gray}{#1}"),yy("\\purple","\\textcolor{##9d38bd}{#1}"),yy("\\blueA","\\textcolor{##ccfaff}{#1}"),yy("\\blueB","\\textcolor{##80f6ff}{#1}"),yy("\\blueC","\\textcolor{##63d9ea}{#1}"),yy("\\blueD","\\textcolor{##11accd}{#1}"),yy("\\blueE","\\textcolor{##0c7f99}{#1}"),yy("\\tealA","\\textcolor{##94fff5}{#1}"),yy("\\tealB","\\textcolor{##26edd5}{#1}"),yy("\\tealC","\\textcolor{##01d1c1}{#1}"),yy("\\tealD","\\textcolor{##01a995}{#1}"),yy("\\tealE","\\textcolor{##208170}{#1}"),yy("\\greenA","\\textcolor{##b6ffb0}{#1}"),yy("\\greenB","\\textcolor{##8af281}{#1}"),yy("\\greenC","\\textcolor{##74cf70}{#1}"),yy("\\greenD","\\textcolor{##1fab54}{#1}"),yy("\\greenE","\\textcolor{##0d923f}{#1}"),yy("\\goldA","\\textcolor{##ffd0a9}{#1}"),yy("\\goldB","\\textcolor{##ffbb71}{#1}"),yy("\\goldC","\\textcolor{##ff9c39}{#1}"),yy("\\goldD","\\textcolor{##e07d10}{#1}"),yy("\\goldE","\\textcolor{##a75a05}{#1}"),yy("\\redA","\\textcolor{##fca9a9}{#1}"),yy("\\redB","\\textcolor{##ff8482}{#1}"),yy("\\redC","\\textcolor{##f9685d}{#1}"),yy("\\redD","\\textcolor{##e84d39}{#1}"),yy("\\redE","\\textcolor{##bc2612}{#1}"),yy("\\maroonA","\\textcolor{##ffbde0}{#1}"),yy("\\maroonB","\\textcolor{##ff92c6}{#1}"),yy("\\maroonC","\\textcolor{##ed5fa6}{#1}"),yy("\\maroonD","\\textcolor{##ca337c}{#1}"),yy("\\maroonE","\\textcolor{##9e034e}{#1}"),yy("\\purpleA","\\textcolor{##ddd7ff}{#1}"),yy("\\purpleB","\\textcolor{##c6b9fc}{#1}"),yy("\\purpleC","\\textcolor{##aa87ff}{#1}"),yy("\\purpleD","\\textcolor{##7854ab}{#1}"),yy("\\purpleE","\\textcolor{##543b78}{#1}"),yy("\\mintA","\\textcolor{##f5f9e8}{#1}"),yy("\\mintB","\\textcolor{##edf2df}{#1}"),yy("\\mintC","\\textcolor{##e0e5cc}{#1}"),yy("\\grayA","\\textcolor{##f6f7f7}{#1}"),yy("\\grayB","\\textcolor{##f0f1f2}{#1}"),yy("\\grayC","\\textcolor{##e3e5e6}{#1}"),yy("\\grayD","\\textcolor{##d6d8da}{#1}"),yy("\\grayE","\\textcolor{##babec2}{#1}"),yy("\\grayF","\\textcolor{##888d93}{#1}"),yy("\\grayG","\\textcolor{##626569}{#1}"),yy("\\grayH","\\textcolor{##3b3e40}{#1}"),yy("\\grayI","\\textcolor{##21242c}{#1}"),yy("\\kaBlue","\\textcolor{##314453}{#1}"),yy("\\kaGreen","\\textcolor{##71B307}{#1}");var kw={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Sw{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new mw(_w,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new fw(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new Ig("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,o=this.future(),i=0,s=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++i;else if("}"===r.text){if(-1===--i)throw new Dg("Extra }",r)}else if("EOF"===r.text)throw new Dg("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",r);if(e&&n)if((0===i||1===i&&"{"===e[s])&&r.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==i||n);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Dg("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var o=this.popToken();if(n[r]!==o.text)throw new Dg("Use of the macro doesn't match its definition",o)}}for(var i=[],s=0;s<e;s++)i.push(this.consumeArg(t&&t[s+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Dg("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Dg("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var o=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var a=o[s];if("#"===a.text){if(0===s)throw new Dg("Incomplete placeholder at end of macro body",a);if("#"===(a=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(a.text))throw new Dg("Not a valid argument number",a);o.splice(s,2,...i[+a.text-1])}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ig(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var o=0;if(-1!==r.indexOf("#"))for(var i=r.replace(/##/g,"");-1!==i.indexOf("#"+(o+1));)++o;for(var s=new fw(r,this.settings),a=[],l=s.lex();"EOF"!==l.text;)a.push(l),l=s.lex();return a.reverse(),{tokens:a,numArgs:o}}return r}isDefined(e){return this.macros.has(e)||lw.hasOwnProperty(e)||Db.math.hasOwnProperty(e)||Db.text.hasOwnProperty(e)||kw.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:lw.hasOwnProperty(e)&&!lw[e].primitive}}var Cw=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Mw=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),zw={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Nw={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Aw{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Sw(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Dg("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Ig("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==Aw.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&lw[r.text]&&lw[r.text].infix)break;var o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&n.push(o)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new Dg("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var o,i,s=e.slice(0,n),a=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},i=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],i],[]):this.callFunction(t,[o,i],[])]}return e}handleSupSubscript(e){var t,n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();do{var o;t=this.parseGroup(e)}while("internal"===(null==(o=t)?void 0:o.type));if(!t)throw new Dg("Expected group after '"+r+"'",n);return t}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(r&&"op"===r.type){var i="\\limits"===o.text;r.limits=i,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new Dg("Limit controls must follow a math operator",o);r.alwaysHandleSupSub&&(r.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new Dg("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(n)throw new Dg("Double subscript",o);n=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new Dg("Double superscript",o);var s={type:"textord",mode:this.mode,text:"\\prime"},a=[s];for(this.consume();"'"===this.fetch().text;)a.push(s),this.consume();"^"===this.fetch().text&&a.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:a}}else{if(!Mw[o.text])break;var l=Cw.test(o.text),c=[];for(c.push(new Ig(Mw[o.text])),this.consume();;){var d=this.fetch().text;if(!Mw[d])break;if(Cw.test(d)!==l)break;c.unshift(new Ig(Mw[d])),this.consume()}var u=this.subparse(c);l?n={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,o=lw[r];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new Dg("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!o.allowedInText)throw new Dg("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===o.allowedInMath)throw new Dg("Can't use function '"+r+"' in math mode",n);var{args:i,optArgs:s}=this.parseArguments(r,o);return this.callFunction(r,i,s,n,e)}callFunction(e,t,n,r,o){var i={funcName:e,parser:this,token:r,breakOnTokenText:o},s=lw[e];if(s&&s.handler)return s.handler(i,t,n);throw new Dg("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],o=[],i=0;i<n;i++){var s=t.argTypes&&t.argTypes[i],a=i<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===i&&null==o[0])&&(s="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",s,a);if(a)o.push(l);else{if(null==l)throw new Dg("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var o=this.parseStringGroup("raw",n);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(n)throw new Dg("A primitive argument cannot be optional");var i=this.parseGroup(e);if(null==i)throw new Dg("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Dg("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,o="";"EOF"!==(r=this.fetch()).text;)o+=r.text,this.consume();return this.consume(),n.text=o,n}parseRegexGroup(e,t){for(var n,r=this.fetch(),o=r,i="";"EOF"!==(n=this.fetch()).text&&e.test(i+n.text);)i+=(o=n).text,this.consume();if(""===i)throw new Dg("Invalid "+t+": '"+r.text+"'",r);return r.range(o,i)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Dg("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Dg("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!bb(o))throw new Dg("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:o};return t&&this.switchMode(r),i}parseGroup(e,t){var n,r=this.fetch(),o=r.text;if("{"===o||"\\begingroup"===o){this.consume();var i="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,i),a=this.fetch();this.expect(i),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:Lg.range(r,a),body:s,semisimple:"\\begingroup"===o||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!kw.hasOwnProperty(o)){if(this.settings.throwOnError)throw new Dg("Undefined control sequence: "+o,r);n=this.formatUnsupportedCmd(o),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],o=r.text;"-"===o&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:Lg.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Lg.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[n+1].text!==o||(e.splice(n,2,{type:"textord",mode:"text",loc:Lg.range(r,e[n+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Dg("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}Nw.hasOwnProperty(t[0])&&!Db[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Nw[t[0]]+t.slice(1));var o,i=hw.exec(t);if(i&&("i"===(t=t.substring(0,i.index))?t="ı":"j"===t&&(t="ȷ")),Db[this.mode][t]){this.settings.strict&&"math"===this.mode&&mx.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,a=Db[this.mode][t].group,l=Lg.range(e);if(Lb.hasOwnProperty(a)){var c=a;s={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else s={type:a,mode:this.mode,loc:l,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(rb(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:Lg.range(e),text:t}}if(this.consume(),i)for(var d=0;d<i[0].length;d++){var u=i[0][d];if(!zw[u])throw new Dg("Unknown accent ' "+u+"'",e);var h=zw[u][this.mode]||zw[u].text;if(!h)throw new Dg("Accent "+u+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:Lg.range(e),label:h,isStretchy:!1,isShifty:!0,base:o}}return o}}Aw.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Tw=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Aw(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Dg("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new Ig("\\df@tag")])}]}return r};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var Rw=function(e,t,n){if(n.throwOnError||!(e instanceof Dg))throw e;var r=Tx.makeSpan(["katex-error"],[new Tb(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Pw=function(e,t){var n=new Vg(t);try{return function(e,t,n){var r,o=mv(n);if("mathml"===n.output)return fv(e,t,o,n.displayMode,!0);if("html"===n.output){var i=nv(e,o);r=Tx.makeSpan(["katex"],[i])}else{var s=fv(e,t,o,n.displayMode,!1),a=nv(e,o);r=Tx.makeSpan(["katex"],[s,a])}return _v(r,n)}(Tw(e,n),e,n)}catch(t){return Rw(t,e,n)}},Ow=function(e,t){return Pw(e,t).toMarkup()};class Ew{static update(e,t,n,r=!1){return{id:e,name:u.Names.update,size:n,latex:t,block:r}}}class Lw extends Ts{constructor(e){super(e)}_mathml=_i(()=>{const e=this.attrs.size+this.latex;return Dw.render(e,{displayMode:this.attrs.block})});get cube(){return this._cube}get latex(){return this.info}get mathml(){return this._mathml.value}update_latex(){Promise.resolve().then(()=>{this._data.info=this.cube.info})}}function Iw(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Dw extends nd{_status=new Lw(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Eg}get attrs(){return this.data.attrs}get meta(){return Dw.meta}get mathml(){const e=this.attrs.size+this.info.latex;return Dw.render(e,{displayMode:this.attrs.block})}build_child(e){}export(){return this.base_export()}gc(){super.base_gc()}update_data(e,t){return Dw.update_data(e,t)}replace_id(e,t,n={}){return Dw.replace_id(this.root,e,t,n)}update(e){const{latex:t,block:n,size:r}=e,{courier:o,id:i}=this,s=o.get_recorder();s.add_cmd(e);const a=this.info,l=this.attrs.block,c=this.attrs.size;return this.data.info=t,this.data.attrs.block=n,this.data.attrs.size=r,this.status.update_attrs(),this.status.update_latex(),s.add_recover(Ew.update(i,a,c,l)),s}static render(e,t={}){const n={...t,throwOnError:!1,output:"html"};try{return Ow(e,{...n})}catch(e){return""}}static get meta(){return{cubename:"公式",type:k.Cubes.fomula,block:!1,version:1,show:!0}}static get_default(e="",t={},n={}){return{id:rd.get_id(),type:k.Cubes.fomula,info:e,attrs:{block:!1,size:d.Size.h4,...n},css:t}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Iw([Ti(u.Names.update)],Dw.prototype,"update",null),Dw=Iw([ki],Dw);class Bw{static add_title(e,t){return{id:e,name:h.Names.add_title,data:t}}static remove_title(e){return{id:e,name:h.Names.remove_title}}static add_cell(e,t){return{id:e,name:h.Names.add_cell,data:t}}static remove_cell(e,t){return{id:e,name:h.Names.remove_cell,cid:t}}static add_row(e,t,n){return{id:e,name:h.Names.add_row,index:t,rows:n}}static remove_row(e,t){return{id:e,name:h.Names.remove_row,index:t}}static add_col(e,t,n){return{id:e,name:h.Names.add_col,index:t,cols:n}}static remove_col(e,t){return{id:e,name:h.Names.remove_col,index:t}}static moveto(e,t,n){return{id:e,name:h.Names.moveto,tid:t,cells:n}}static merge(e,t){return{id:e,name:h.Names.merge,area:t}}static update_cell_area(e,t,n){return{id:e,name:h.Names.update_area,tid:t,area:n}}static add_grid_col(e,t,n){return{id:e,name:h.Names.add_grid_col,index:t,width:n}}static remove_grid_col(e,t){return{id:e,name:h.Names.remove_grid_col,index:t}}static col_resize(e,t,n){return{id:e,name:h.Names.col_resize,cols:t,step:n}}}function jw(e,t){const{hotkeys:n,courier:r,id:o,history:i}=t,s=xi.tips;if(n.validate_hotkeys(e))return;if(!e.ctrlKey)return;e.stopPropagation();const a=e.key.toLowerCase(),l=e.shiftKey,c=t.get_active_cell();if(!c)return s?.tip_info("未发现激活单元格");if(a===S.Keys.up)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_row_top(e.top))return s?.tip_info("上方不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[1];e++)o.push(Cu.get_default());n.tell(t,Bw.add_row(t.id,c.row,o)),i.record(n)}else{if(t.get_cell(c.row-1,c.col))return s?.tip_info("上方已存在单元格");if(c.row-1<0)return s?.tip_info("上方已达边界");{const e=r.get_recorder(),n={row:c.row-1,col:c.col,rowspan:1,colspan:1,data:Cu.get_default()};e.tell(t,Bw.add_cell(t.id,n)),i.record(e)}}else if(a===S.Keys.down)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_row_bottom(e.bottom))return s?.tip_info("下方不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[1];e++)o.push(Cu.get_default());n.tell(t,Bw.add_row(t.id,c.row+c.rowspan,o)),i.record(n)}else{if(t.get_cell(c.row+1,c.col))return s?.tip_info("下方已存在单元格");if(c.row+1>=t.size[0])return s?.tip_info("下方已达边界");{const e=r.get_recorder(),n={row:c.row+1,col:c.col,rowspan:1,colspan:1,data:Cu.get_default()};e.tell(t,Bw.add_cell(t.id,n)),i.record(e)}}else if(a===S.Keys.left)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_col_left(e.left))return s?.tip_info("左侧不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[0];e++)o.push(Cu.get_default());n.tell(t,Bw.add_col(t.id,c.col,o)),i.record(n)}else{if(t.get_cell(c.row,c.col-1))return s?.tip_info("左侧已存在单元格");if(c.col-1<0)return s?.tip_info("左侧已达边界");{const e=r.get_recorder(),n={row:c.row,col:c.col-1,rowspan:1,colspan:1,data:Cu.get_default()};e.tell(t,Bw.add_cell(t.id,n)),i.record(e)}}else if(a===S.Keys.right)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_col_right(e.right))return s?.tip_info("右侧不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[0];e++)o.push(Cu.get_default());n.tell(t,Bw.add_col(t.id,c.col+c.colspan,o)),i.record(n)}else{if(t.get_cell(c.row,c.col+1))return s?.tip_info("右侧已存在单元格");if(c.col+1>=t.size[1])return s?.tip_info("右侧已达边界");{const e=r.get_recorder(),n={row:c.row,col:c.col+1,rowspan:1,colspan:1,data:Cu.get_default()};e.tell(t,Bw.add_cell(t.id,n)),i.record(e)}}}const Hw={drag_cell:void 0,hover:void 0};function qw(e,t){const n=e.currentTarget;n.parentElement?.style.setProperty("--drag-pointer-events","none"),e.stopPropagation(),Hw.drag_cell=t}function Fw(e,t){if(Hw.drag_cell===t)return;const n=e.currentTarget;n.classList.add("cube-cell-selection"),Hw.hover=n}function $w(e,t){e.currentTarget.classList.remove("cube-cell-selection")}function Gw(e,t){const{drag_cell:n,hover:r}=Hw,{pcube:o,courier:i,history:s}=t.box;if(!n)return;const a=e.currentTarget;a.parentElement?.style.setProperty("--drag-pointer-events","auto"),r&&r.classList.remove("cube-cell-selection");const l=i.get_recorder();l.tell(o,Bw.moveto(o.id,t.box.id,[n.box.id])),s.record(l)}const Vw={anchor:void 0,hover:void 0,down_point:void 0,has_down:!1,has_move:!1};function Uw(e,t){const{root:n,cursor:r}=t;if(e.ctrlKey)e.stopPropagation();else{rd.check_mouse_key(e,"left")&&t.clear_selection();const n=e.target;if(!(n instanceof Node))return;const r=t.find_dom_cube(n),o=r?.find_upstream_untill(t);if(!o)return;const i=t.cells.find(e=>e.box===o);if(!i)return;Vw.down_point={x:e.clientX,y:e.clientY},Vw.has_down=!0,Vw.anchor=i}}function Kw(e,t){const{cursor:n}=t,{down_point:r,has_down:o,anchor:i,has_move:s}=Vw;if(!r)return;if(Vw.has_move=Math.sqrt((e.clientX-r.x)**2+(e.clientY-r.y)**2)>5,!o||!i||!s||e.buttons<=0)return;const a=e.target;if(!(a instanceof Node))return;const l=t.find_dom_cube(a),c=l?.find_upstream_untill(t),d=t.cells.find(e=>e.box===c);if(!d||d===i)return void t.clear_selection();const u={left:Math.min(i.col,d.col),right:Math.max(i.col+i.colspan-1,d.col+d.colspan-1),top:Math.min(i.row,d.row),bottom:Math.max(i.row+i.rowspan-1,d.row+d.rowspan-1)},h=t.get_rectarea_cell(u);t.clear_selection();for(let e of h.cells)e.selection=!0;h.cells.length>1&&e.stopPropagation()}function Ww(e,t){const{cursor:n}=t;Vw.has_down=!1,Vw.anchor=void 0}const Yw=["id","data-type"],Xw=On({__name:"cube-table",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Ln("dragger"),r=Ln("box");function o(e){return{"grid-row":`${e.row+1}/span ${e.rowspan}`,"grid-column":`${e.col+1}/span ${e.colspan}`}}function i(e){return{"cube-cell-selection":e.selection}}const s=_i(()=>({"grid-template-columns":t.cols.map(e=>e>0?e+"fr":"1fr").join(" ")}));return Jn(()=>{const t=n.value,o=r.value;if(!t||!o)return;let i=e.cube.data.attrs.width,s=i,a={sx:1,sy:1};const l=new $i.DragDiff(t);l.register_down(()=>{a=e.cube.get_upstream_sum_scale(),i=e.cube.data.attrs.width}),l.register_move((t,n)=>{const r=t/a.sx;i+r<e.cube.min_width||(s=i+r,o.style.width=s+"px")}),l.register_up((t,n)=>{if(s===i)return;const{courier:r,history:o}=e.cube,a=r.get_recorder();a.tell(e.cube,Mi.resize(e.cube.id,s)),o.record(a)}),l.register_cancel(()=>{o.style.width=i+"px"})}),(e,a)=>(zo(),Po("div",{ref_key:"box",ref:r,class:"cube-table",style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type,onPointerdown:a[0]||(a[0]=t=>Wt(Uw)(t,e.cube)),onPointermove:a[1]||(a[1]=t=>Wt(Kw)(t,e.cube)),onPointerup:a[2]||(a[2]=t=>Wt(Ww)(t,e.cube)),onPointercancel:a[3]||(a[3]=t=>Wt(Ww)(t,e.cube)),onKeyup:a[4]||(a[4]=t=>Wt(jw)(t,e.cube)),onContextmenu:a[5]||(a[5]=t=>Wt(rc)(t,e.cube))},[e.cube.title?(zo(),Oo(Ps,{key:0,class:"cube-table-title",cube:Ht(e.cube.title)},null,8,["cube"])):Go("v-if",!0),Bo("div",{class:"cube-table-container",style:ce(s.value)},[(zo(!0),Po(yo,null,ur(Wt(t).cells,(e,t)=>(zo(),Oo(Ps,{key:e.box.id,cube:Ht(e.box),style:ce(o(e)),class:fe(i(e)),draggable:"true",onDragstart:t=>Wt(qw)(t,e),onDragenter:t=>Wt(Fw)(t,e),onDragleave:t=>Wt($w)(t,e),onDrop:t=>Wt(Gw)(t,e)},null,8,["cube","style","class","onDragstart","onDragenter","onDragleave","onDrop"]))),128))],4),Bo("div",{class:"cube-table-dragger",ref_key:"dragger",ref:n},null,512)],44,Yw))}}),Jw=(0,Ls.A)(Xw,[["__scopeId","data-v-3ea8d380"]]);class Zw extends Ts{_cells=Rt([]);_title=Vt(void 0);constructor(e){super(e)}get cube(){return this._cube}get title(){return this._title.value}get cells(){return[...this._cells]}get info(){return this._data.info}get cols(){return this.info.cols}init(){super.init(),this.update_cells()}update_cells(){return Promise.resolve().then(()=>{this._cells.splice(0,this._cells.length,...this.cube.cells)})}update_title(){return Promise.resolve().then(()=>{this._title.value=this.cube.title})}}function Qw(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class ek extends nd{_status=new Zw(this);_cells=[];_title;constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get title(){return this._title}set title(e){this._title=e,this.status.update_title()}get component(){return Jw}get cells(){return[...this._cells]}get meta(){return ek.meta}get children(){const e=[],t=this._cells;return t.sort((e,t)=>e.row!==t.row?e.row-t.row:e.col-t.col),this.title&&e.unshift(this.title),e.push(...t.map(e=>e.box)),e}get cells_sorted(){const e=[],t=this._cells;return t.sort((e,t)=>e.row!==t.row?e.row-t.row:e.col-t.col),e.push(...t),e}get css(){const e=this.attrs;return{...super.css,width:e.width+"px"}}get attrs(){return this.data.attrs}get cols(){return this.data.info.cols}get size(){return this.data.info.size}get selection_cells(){const e=[];for(let t of this.cells_sorted)t.selection&&e.push(t);return e}get min_width(){return 500}build_child(e){e.info.title&&(this.title=Ht(new Cu(e.info.title,this)));for(let t of e.info.cells){const e=new Cu(t.data,this),n={row:t.row,col:t.col,rowspan:t.rowspan,colspan:t.colspan,box:Ht(e),selection:!1};this._cells.push(n)}}export(){const e=this.base_export();this.title&&(e.info.title=this.title.export()),e.info.cells=[];for(let t of this._cells)e.info.cells.push(this.get_cell_data(t));return e}update_data(e,t){return ek.update_data(e,t)}gc(){this.base_gc()}get_cell_data(e){return{row:e.row,col:e.col,rowspan:e.rowspan,colspan:e.colspan,data:e.box.export()}}replace_id(e,t,n={}){return ek.replace_id(this.root,e,t,n)}get_rows(e){const t=[];for(let n of this.cells_sorted)e>=n.row&&e<n.row+n.rowspan&&t.push(n);return t}get_cols(e){const t=[];for(let n of this.cells_sorted)e>=n.col&&e<n.col+n.colspan&&t.push(n);return t}check_orderly_col(e){const t=this.get_cols(e),n=[];for(let e of t)n.push(this.get_cell_area(e));const r=1===new Set(n.map(e=>e.right)).size,o=1===new Set(n.map(e=>e.left)).size;return r&&o}check_orderly_col_left(e){const t=this.get_cols(e),n=[];for(let e of t)n.push(this.get_cell_area(e));return 1===new Set(n.map(e=>e.left)).size}check_orderly_col_right(e){const t=this.get_cols(e),n=[];for(let e of t)n.push(this.get_cell_area(e));return 1===new Set(n.map(e=>e.right)).size}check_orderly_row(e){const t=this.get_rows(e),n=[];for(let e of t)n.push(this.get_cell_area(e));const r=1===new Set(n.map(e=>e.bottom)).size,o=1===new Set(n.map(e=>e.top)).size;return r&&o}check_orderly_row_top(e){const t=this.get_rows(e),n=[];for(let e of t)n.push(this.get_cell_area(e));new Set(n.map(e=>e.bottom)).size;return 1===new Set(n.map(e=>e.top)).size}check_orderly_row_bottom(e){const t=this.get_rows(e),n=[];for(let e of t)n.push(this.get_cell_area(e));return 1===new Set(n.map(e=>e.bottom)).size}get_cell_area(e){return{left:e.col,right:e.col+e.colspan-1,top:e.row,bottom:e.row+e.rowspan-1}}get_cell(e,t){for(let n of this._cells){const r=e>=n.row&&e<n.row+n.rowspan,o=t>=n.col&&t<n.col+n.colspan;if(r&&o)return n}}get_rectarea_cell(e){let t=!1;for(;!t;){const{left:n,right:r,top:o,bottom:i}=e;for(let s of this._cells){let{row:a,rowspan:l,col:c,colspan:d}=s,u=a,h=a+l-1,p=c,f=c+d-1;if(n>=p&&n<=f||n<=p&&f<=r||r>=p&&r<=f){if(u<o&&h>=o){e.top=a;break}if(u<=i&&h>i){e.bottom=a+l-1;break}}if(o>=u&&o<=h||o<u&&i>=h||i>=u&&i<=h){if(p<n&&f>=n){e.left=c;break}if(p<=r&&f>r){e.right=c+d-1;break}}s===this._cells[this._cells.length-1]&&(t=!0)}}const n=[];for(let t of this.cells_sorted){let{row:r,col:o,rowspan:i,colspan:s}=t;o>=e.left&&o+s-1<=e.right&&r>=e.top&&r+i-1<=e.bottom&&n.push(t)}return{...e,cells:n}}clear_selection(){for(let e of this._cells)e.selection=!1}get_active_cell(){const{cursor:e}=this,{cube_end:t}=e;if(!t)return;const n=t?.find_upstream_untill(this);return this._cells.find(e=>e.box===n)}set_selection_area(e){this.get_rectarea_cell(e);for(let e of this._cells)e.selection=!1;for(let e of this._cells)e.selection=!0}get_focus_cell(){const{cursor:e}=this,{cube_end:t}=e;if(!t)return;const n=t.find_upstream_untill(this);return n?this._cells.find(e=>e.box.id===n.id):void 0}get_selection_area(){let e,t;const n=this.selection_cells;if(0===n.length)return;for(let r of n){const n=this.get_cell_area(r);e||(e=[n.top,n.bottom]),t||(t=[n.left,n.right]),n.top<e[0]&&(e[0]=n.top),n.left<t[0]&&(t[0]=n.left),n.bottom>e[1]&&(e[1]=n.bottom),n.right>t[1]&&(t[1]=n.right)}if(!e||!t)return;return{left:t[0],right:t[1],top:e[0],bottom:e[1]}}get_selection_size(){const e=this.get_selection_area();if(e)return[e.bottom-e.top+1,e.right-e.left+1]}get_selection_text(){const e=this.selection_cells;let t="";if(0===e.length)return t;for(let n of e)t+=n.box.text;return t}copy_selection_table(){const e=this.get_selection_size(),t=this.selection_cells,n=this.get_selection_area();if(!e||!t||!n)return;const r=[];for(let e of t)r.push({row:e.row-n.top,col:e.col-n.left,rowspan:e.rowspan,colspan:e.colspan,data:e.box.export()});const o=ek.get_default_by_data(e,r);return o.attrs=structuredClone(jt(this.attrs)),o}add_title(e){const{data:t}=e,{courier:n,cursor:r,id:o}=this,i=n.get_recorder();i.add_cmd(e);const s=new Cu(t,this);return this.title=Ht(s),i.add_recover(Bw.remove_title(o)),i}remove_title(e){const{id:t,courier:n,cursor:r}=this;if(!this.title)return;const o=this.title.export(),i=n.get_recorder();return i.add_cmd(e),this.title=void 0,i.add_recover(Bw.add_title(t,o)),i}add_cell(e){const{id:t,courier:n,cursor:r}=this,{data:o}=e;this.clear_selection();const i=n.get_recorder();i.add_cmd(e);const s={row:o.row,col:o.col,rowspan:o.rowspan,colspan:o.colspan,box:Ht(new Cu(o.data,this)),selection:!1};return this._cells.push(s),i.add_recover(Bw.remove_cell(t,s.box.id)),this.status.update_cells(),i}remove_cell(e){const{id:t,courier:n,cursor:r}=this,{cid:o}=e,i=n.get_recorder();i.add_cmd(e);const s=this._cells.findIndex(e=>e.box.id===o),a=this._cells[s];if(!a)return;const l={row:a.row,col:a.col,rowspan:a.rowspan,colspan:a.colspan,data:a.box.export()};return s>=0&&(this._cells.splice(s,1),this.status.update_cells()),i.add_recover(Bw.add_cell(t,l)),i}add_row(e){const{courier:t,cursor:n,id:r}=this,{index:o,rows:i}=e,s=t.get_recorder(),a=[];for(let e=0;e<i.length;e++){const t=i[e];a.push({row:o,col:e,rowspan:1,colspan:1,data:t})}this.size[0]++;for(let e of this._cells)e.row<o||s.tell(this,Bw.update_cell_area(r,e.box.id,{row:e.row+1,col:e.col,rowspan:e.rowspan,colspan:e.colspan}));for(let e of a)s.tell(this,Bw.add_cell(r,e));return s}remove_row(e){const{id:t,courier:n,cursor:r}=this,{index:o}=e,i=this.get_rows(o),s=n.get_recorder();for(let e of i)s.tell(this,Bw.remove_cell(t,e.box.id));return this.size[0]--,s}add_col(e){const{id:t,cursor:n,courier:r}=this,{index:o,cols:i}=e,s=r.get_recorder(),a=[];for(let e=0;e<i.length;e++){const t=i[e];a.push({row:e,col:o,rowspan:1,colspan:1,data:t})}s.tell(this,Bw.add_grid_col(t,o,2));for(let e of this._cells)e.col<o||s.tell(this,Bw.update_cell_area(t,e.box.id,{row:e.row,col:e.col+1,rowspan:e.rowspan,colspan:e.colspan}));for(let e of a)s.tell(this,Bw.add_cell(t,e));return s}remove_col(e){const{id:t,cursor:n,courier:r}=this,{index:o}=e;if(!this.check_orderly_col(o))return xi.tips?.tip_info("目标列不整齐");let i;for(let e=0;e<=this.size[0]&&(i||(i=this.get_cell(e,o),!i));e++);if(!i)return;const s=r.get_recorder();for(let e=i.col;e<i.col+i.colspan;e++)s.tell(this,Bw.remove_grid_col(t,e));const a=this.get_cols(o);for(let e of a)s.tell(this,Bw.remove_cell(t,e.box.id));for(let e of this._cells){if(e.col<o)continue;const n={row:e.row,col:e.col-1,rowspan:e.rowspan,colspan:e.colspan};s.tell(this,Bw.update_cell_area(t,e.box.id,n))}return s}moveto(e){const{id:t,courier:n,cursor:r}=this,{tid:o,cells:i}=e,s=n.get_recorder(),a=this._cells.find(e=>e.box.id===o);if(!a)return;const l=a.box,c=this.cells_sorted.filter(e=>e.box.id!==o&&i.includes(e.box.id));for(let e of c){const n=e.box.export();s.tell(this,Bw.remove_cell(t,e.box.id)),s.tell(l,Mi.insert_child(l.id,n.info,l.child_count))}return s}update_area(e){const{id:t,courier:n,cursor:r}=this,{tid:o,area:i}=e,s=n.get_recorder(),a=this._cells.find(e=>e.box.id===o);if(!a)return;s.add_cmd(e);const l={row:a.row,col:a.col,rowspan:a.rowspan,colspan:a.colspan};return a.row=i.row,a.col=i.col,a.rowspan=i.rowspan,a.colspan=i.colspan,s.add_recover(Bw.update_cell_area(t,o,l)),s}merge_cell(e){const{id:t,cursor:n,courier:r}=this,{area:o}=e,i=r.get_recorder(),s=this.get_rectarea_cell(o);let a=s.cells[0];if(!a)return;const l={row:o.top,col:o.left,rowspan:o.bottom-o.top+1,colspan:o.right-o.left+1},c=a.box.id;return i.tell(this,Bw.update_cell_area(t,c,l)),i.tell(this,Bw.moveto(t,c,s.cells.map(e=>e.box.id))),i}add_grid_col(e){const{id:t,courier:n,cursor:r}=this,{index:o,width:i}=e,s=n.get_recorder();return s.add_cmd(e),this.cols.splice(o,0,i),this.size[1]++,s.add_recover(Bw.remove_grid_col(t,o)),s}remove_grid_col(e){const{id:t,courier:n,cursor:r}=this,{index:o}=e,i=n.get_recorder(),s=this.cols.splice(o,1);if(0!==s.length)return this.size[1]--,i.add_recover(Bw.add_grid_col(t,o,s[0])),i}col_resize(e){const{id:t,courier:n,cursor:r}=this,{cols:o,step:i}=e,s=n.get_recorder();s.add_cmd(e);let a=!1;for(let e=o[0];e<=o[1];e++){let t=this.cols[e]+i;t<=0||(a=!0,this.cols[e]=t)}if(a)return s.add_recover(Bw.col_resize(t,o,-i)),s}delete_child(e){const{dir:t,range:n,reserve:r}=e;if(!this.is_valid_range(n))return;const{courier:o,cursor:i,history:s}=this,a=o.get_recorder();let[l,c]=n;if(0===l&&c>=this.child_count)if(r){if(this.is_empty)return;const e=this.child_first;a.tell(this,Mi.delete_child(this.id,"backward",[1,this.child_count],r)),a.tell(e,Mi.delete_child(e.id,"backward",[0,e.child_count],r))}else a.merge(this.remove_self());else{let e=[];for(let t=l;t<c;t++){let n=this.children[t];e.push(n.id)}for(let t of e)a.tell(this,Bw.remove_cell(this.id,t))}return a}static get meta(){return{cubename:"表格",type:k.Cubes.table,block:!0,version:1,show:!0}}static get_default(e=3,t=3){const n=[],r=[];r.length=t,r.fill(2);for(let r=0;r<e;r++)for(let e=0;e<t;e++){const t={row:r,col:e,rowspan:1,colspan:1,data:Cu.get_default()};n.push(t)}return{id:rd.get_id(),type:k.Cubes.table,info:{size:[e,t],cols:r,cells:n},attrs:{width:500},css:{}}}static get_default_by_data(e,t){const[n,r]=e,o=[];return o.length=r,o.fill(2),{id:rd.get_id(),type:k.Cubes.table,info:{size:[n,r],cols:o,cells:t},attrs:{width:500},css:{}}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();r[o]=i,n.id=i,n.info.title&&(n.info.title=Cu.replace_id(e,t,n.info.title,r));for(let o of n.info.cells)o.data=Cu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{usable:!0,data:t}}}Qw([Ti(h.Names.add_title)],ek.prototype,"add_title",null),Qw([Ti(h.Names.remove_title)],ek.prototype,"remove_title",null),Qw([Ti(h.Names.add_cell)],ek.prototype,"add_cell",null),Qw([Ti(h.Names.remove_cell)],ek.prototype,"remove_cell",null),Qw([Ti(h.Names.add_row)],ek.prototype,"add_row",null),Qw([Ti(h.Names.remove_row)],ek.prototype,"remove_row",null),Qw([Ti(h.Names.add_col)],ek.prototype,"add_col",null),Qw([Ti(h.Names.remove_col)],ek.prototype,"remove_col",null),Qw([Ti(h.Names.moveto)],ek.prototype,"moveto",null),Qw([Ti(h.Names.update_area)],ek.prototype,"update_area",null),Qw([Ti(h.Names.merge)],ek.prototype,"merge_cell",null),Qw([Ti(h.Names.add_grid_col)],ek.prototype,"add_grid_col",null),Qw([Ti(h.Names.remove_grid_col)],ek.prototype,"remove_grid_col",null),Qw([Ti(h.Names.col_resize)],ek.prototype,"col_resize",null),Qw([Ti(_.Names.cube_delete_child)],ek.prototype,"delete_child",null),ek=Qw([ki],ek);const tk=["id","data-type"],nk=On({__name:"cube-tip",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(zo(),Po("div",{class:"cube-tip",style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type,onContextmenu:n[0]||(n[0]=t=>Wt(rc)(t,e.cube))},[jo(Ps,{cube:e.cube.box},null,8,["cube"])],44,tk))}}),rk=(0,Ls.A)(nk,[["__scopeId","data-v-525ea373"]]);class ok extends Ts{constructor(e){super(e)}}function ik(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class sk extends nd{_status=new ok(this);_box;constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return rk}get box(){return this._box}set box(e){this._box=e}get children(){return[this.box]}replace_id(e,t,n={}){return sk.replace_id(this.root,e,t,n)}build_child(e){this.box=new Cu(e.info,this)}update_data(e,t){return sk.update_data(e,t)}export(){const e=this.base_export();return e.info=this.box.export(),e}gc(){super.base_gc()}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(Mi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,zi.in_head(a.id)):o.tell(this.child_last,zi.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,i=t.get_recorder();i.add_cmd(e);const{dir:s,range:a}=e;if(!this.is_valid_range(a))return;const[l,c]=a;let d=l<0?0:l,u=c>this.child_count?this.child_count:c;if(d>=u)return;if(d<=0&&u>=this.child_count)return this.is_empty?i.tell(o,Mi.delete_child(n,s,[r,r+1])):i.tell(this,Mi.reset(this.id,[])),i;const h=this.children[d-1],p=this.children[u],f=u-d;let m=this.splice(l,f);return i.add_recover(Mi.insert_child(this.id,m.data,l)),"backward"===s?h?i.tell(h,zi.in_tail(h.id)):p&&i.tell(p,zi.in_head(p.id)):"forward"===s&&(p?i.tell(p,zi.in_head(p.id)):h&&i.tell(h,zi.in_tail(h.id))),i}get meta(){return sk.meta}static get meta(){return{cubename:"提示",type:k.Cubes.tip,block:!0,version:1,show:!0}}static get_default(e,t={},n={}){return{id:rd.get_id(),type:k.Cubes.tip,info:Cu.get_default(e),attrs:n,css:t}}static get_default_by_string(e,t={},n={}){const r=uu.get_default_by_string(e),o=Cu.get_default([r]);return{id:rd.get_id(),type:k.Cubes.tip,info:o,attrs:n,css:t}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,n.info=Cu.replace_id(e,t,n.info,r),n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}ik([Ti(_.Names.cube_insert_child)],sk.prototype,"on_insert_child",null),ik([Ti(_.Names.cube_delete_child)],sk.prototype,"on_delete_child",null),sk=ik([ki],sk);const ak={class:"map-status"},lk=On({__name:"submap-status",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(t){const n=e.cube.dom_rect,r={x:n.x+n.width/2,y:n.y+n.height/2};e.cube.scale_by_point(r,t,t)}return(e,r)=>(zo(),Po("div",ak,[Bo("span",{class:"iconfont icon-icon_window_small_new-copy-copy",onClick:r[0]||(r[0]=e=>n(-.1))}),Bo("span",null,xe((100*t.matrix2d.a).toFixed(0)+"%"),1),Bo("span",{class:"iconfont icon-add",onClick:r[1]||(r[1]=e=>n(.1))})]))}}),ck=(0,Ls.A)(lk,[["__scopeId","data-v-432c737f"]]),dk=["id","data-type"],uk=["transform"],hk=["data-group"],pk=["data-group"],fk=["d"],mk=["data-group"],_k=["data-group"],gk=["data-group"],bk=["d"],xk=["d","marker-start","marker-end"],vk=["d"],yk=On({__name:"cube-submap",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Gt(),r=Gt(),o=new ResizeObserver(t=>{e.cube.get_view_rect()}),i=Gt();let s;function a(){e.cube.dom_svg_rect}return Jn(()=>{const t=r.value;t&&o.observe(t);const a=n.value;a&&e.cube.map_interaction.register(a);const l=i.value;if(!l)return;s=new $i.DragDiff(l);let c=e.cube.attrs.width,d=e.cube.attrs.height,u=c,h=d,p={sx:1,sy:1};s.register_down(()=>{p=e.cube.get_upstream_sum_scale(),c=e.cube.attrs.width,d=e.cube.attrs.height}),s.register_move((e,t)=>{u=Math.round(e/p.sx+c),h=Math.round(t/p.sy+d),a.style.width=u+"px",a.style.height=h+"px"}),s.register_up((t,n)=>{if(c===u&&d===h)return;const r=e.cube.courier.get_recorder();r.tell(e.cube,Mi.resize(e.cube.id,u,h)),e.cube.history.record(r),e.cube.check_show()}),s.register_cancel(()=>{e.cube.attrs.width=c,e.cube.attrs.height=d})}),tr(()=>{s?.off()}),(e,o)=>(zo(),Po("div",{class:"cube-submap",id:e.cube.id,style:ce(Wt(t).css),"data-type":e.cube.type,ref_key:"box",ref:n,onClick:a},[(zo(),Po("svg",{ref_key:"svg",ref:r,onContextmenu:o[0]||(o[0]=t=>Wt(rc)(t,e.cube))},[Bo("g",{transform:Wt(t).matrix2d_dom_string},[Bo("g",{"data-group":Wt(v).markers,class:"group-defs"},[...o[1]||(o[1]=[$o('<defs data-v-7cb94390>\x3c!-- 箭头 --\x3e<marker id="marker-arrow" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-7cb94390><path d="M 0 0 L 6 3 L 0 6 z" data-v-7cb94390></path></marker>\x3c!-- 圆 --\x3e<marker id="marker-point" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-7cb94390><circle cx="3" cy="3" r="3" data-v-7cb94390></circle></marker>\x3c!-- 方块 --\x3e<marker id="marker-square" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-7cb94390><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-7cb94390></rect></marker>\x3c!-- 菱形 --\x3e<marker id="marker-rhomb" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="45" fill="context-stroke" data-v-7cb94390><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-7cb94390></rect></marker></defs>',1)])],8,hk),Bo("g",{"data-group":Wt(v).outbox,class:"group-outbox"},[(zo(!0),Po(yo,null,ur(Wt(t).nodes_outbox,e=>(zo(),Po("path",{key:e.id,class:"node-outbox",d:e.status.outbox},null,8,fk))),128))],8,pk),Bo("g",{"data-group":Wt(v).linkers,class:"group-linkers"},[(zo(!0),Po(yo,null,ur(Wt(t).linkers_view,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],8,mk),Bo("g",{"data-group":Wt(v).nodes,class:"group-nodes"},[(zo(!0),Po(yo,null,ur(Wt(t).nodes_view,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],8,_k),Bo("g",{"data-group":Wt(v).placeholder,class:"group-placeholder"},[Wt(t).placeholder_box_selector?(zo(),Po("path",{key:0,class:"placeholder-box-selector",d:Wt(t).placeholder_box_selector},null,8,bk)):Go("v-if",!0),(zo(!0),Po(yo,null,ur(Wt(t).placeholder_linkers,e=>(zo(),Po(yo,null,[e?(zo(),Po("path",{key:0,class:"placeholder-linker",d:e.path,style:ce({stroke:e.stroke,"stroke-width":e.width}),"marker-start":`url(#${e.anchor_start})`,"marker-end":`url(#${e.anchor_end})`},null,12,xk)):Go("v-if",!0)],64))),256)),Wt(t).placeholder_line_delete?(zo(),Po("path",{key:1,class:"placeholder-line-delete",d:Wt(t).placeholder_line_delete,stroke:"#ff7f7f","marker-start":"url(#marker-point)","marker-end":"url(#marker-arrow)"},null,8,vk)):Go("v-if",!0),jo(Ks,{cube:e.cube},null,8,["cube"])],8,gk)],8,uk)],544)),jo(ck,{cube:e.cube},null,8,["cube"]),Bo("div",{class:"submap-dragger",ref_key:"dragger",ref:i},null,512)],12,dk))}}),wk=(0,Ls.A)(yk,[["__scopeId","data-v-7cb94390"]]);class kk extends Ts{_nodes_count=Gt(0);_view_rect=Rt({x:0,y:0,width:0,height:0});_nodes_view=Pt(new Set);_linkers_view=Pt(new Set);_nodes_selected=Pt(new Set);_nodes_editing=Pt(new Set);_nodes_outbox=Pt(new Set);_line_delete_selected=Pt(new Set);_nodes_dragging=Pt(new Set);_placeholder_linkers=Rt([]);_placeholder_box_selector=Gt("");_placeholder_line_delete=Gt("");constructor(e){super(e)}get css(){return{...super.css,width:this.attrs.width+"px",height:this.attrs.height+"px"}}get attrs(){return this._data.attrs}get matrix2d(){return{...this.attrs.matrix2d}}get line_delete_selected(){return new Set(this._line_delete_selected)}get view_rect(){return{...this._view_rect}}get view_center(){const e=this._view_rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}get nodes_count(){return this._nodes_count.value}get map(){return this._cube}get matrix2d_dom_string(){return Ji.get_dom_string(this.matrix2d)}get placeholder_linkers(){return[...this._placeholder_linkers]}get placeholder_box_selector(){return this._placeholder_box_selector.value}get placeholder_line_delete(){return this._placeholder_line_delete.value}get nodes_view(){return new Set(this._nodes_view)}get linkers_view(){return new Set(this._linkers_view)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_outbox(){return new Set(this._nodes_outbox)}reset_nodes_view(e){this._nodes_view.clear();for(let t of e)this._nodes_view.add(t)}reset_nodes_outbox(e){this._nodes_outbox.clear();for(let t of e)this._nodes_outbox.add(t)}reset_linkers_view(e){this._linkers_view.clear();for(let t of e)this._linkers_view.add(t)}remove_linker(e){this._linkers_view.delete(e),this._line_delete_selected.delete(e)}remove_node(e){this._nodes_view.delete(e),this._nodes_selected.delete(e),this._nodes_editing.delete(e),this._line_delete_selected.delete(e),this._nodes_dragging.delete(e),this._nodes_outbox.delete(e),this._nodes_count.value--}set_node_visible(e,t){t?this._nodes_view.add(e):this._nodes_view.delete(e)}set_linker_visible(e,t){t?this._linkers_view.add(e):this._linkers_view.delete(e)}set_node_editing(e,t){t?this._nodes_editing.add(e):this._nodes_editing.delete(e)}set_node_selected(e,t){t?this._nodes_selected.add(e):this._nodes_selected.delete(e)}set_node_outbox(e,t){t?this._nodes_outbox.add(e):this._nodes_outbox.delete(e)}set_line_deleted(e,t){t?this._line_delete_selected.add(e):this._line_delete_selected.delete(e)}is_node_visible(e){return this._nodes_view.has(e)}is_linker_visible(e){return this._linkers_view.has(e)}is_node_editing(e){return this._nodes_editing.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}clear_line_deleted(){this._line_delete_selected.clear()}clear_node_editing(){for(let e of this.nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear()}clear_node_outbox(){this._nodes_outbox.clear()}update_matrix2d(e){Object.assign(this.attrs.matrix2d,e||this.map.matrix2d)}update_view_rect(e){Object.assign(this._view_rect,e)}update_placeholder_box_selector(e){this._placeholder_box_selector.value=e}update_placeholder_line_delete(e){this._placeholder_line_delete.value=e}update_placeholder_linkers(e){this._placeholder_linkers.length=0,this._placeholder_linkers.push(...e)}add_placeholder_linker(e){this._placeholder_linkers.push(e)}update_nodes_count(e){this._nodes_count.value=e}get nodes_dragging(){return new Set(this._nodes_dragging)}set_node_dragging(e,t){t?this._nodes_dragging.add(e):this._nodes_dragging.delete(e)}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_nodes_dragging(){this._nodes_dragging.clear()}}function Sk(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Ck extends nd{_status=new kk(this);_map_interaction=new ys(this);_grider=new eh(this);_has_layout=!1;_display_success=!1;_nodes=new Map;_linkers=new Map;_node_from=this.data.info.node_from;_node_to=this.data.info.node_to;_nodes_editing=new Set;_nodes_selected=new Set;_nodes_outbox=new Set;_line_delete_selected=new Set;_nodes_dragging=new Set;_view_nodes=new Set;_view_linkers=new Set;_view_rect={x:0,y:0,width:0,height:0};constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get grider(){return this._grider}get nodes(){return new Map(this._nodes)}get linkers(){return new Map(this._linkers)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_outbox(){return new Set(this._nodes_outbox)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_view(){return new Set(this._view_nodes)}get linkers_view(){return new Set(this._view_linkers)}get line_deleted(){return new Set(this._line_delete_selected)}get nodes_count(){return this._nodes.size}get linkers_count(){return this._linkers.size}get attrs(){return this.data.attrs}get has_layout(){return this._has_layout}get view_rect(){return{...this._view_rect}}get matrix2d(){return this.attrs.matrix2d}get dom_rect(){const e=this.dom;return e?e.getBoundingClientRect():new DOMRect(0,0,0,0)}get dom_svg_rect(){const e=this.dom?.getElementsByTagName("svg");return e?e[0].getBoundingClientRect():new DOMRect(0,0,0,0)}get matrix2d_dom_string(){return Ji.get_dom_string(this.matrix2d)}get map_interaction(){return this._map_interaction}get domain(){return"doc"}get meta(){return Ck.meta}get component(){return wk}find_layout_root(e){const t=new Set;for(let n of e){n.is_layout_root&&t.add(n)}return t}wait_nodes_render(e){const t=[];for(let n of e)t.push(n.wait_layout_self());return Promise.all(t)}find_cube(e){const t=this.linkers.get(e);if(t)return t;for(let t of this._nodes.values()){const n=t.find_cube(e);if(n)return n}}filter(e){const t=[];for(let n of this._linkers.values())e(n)&&t.push(n),t.push(...n.filter(e));for(let n of this._nodes.values())e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this._linkers.values())e(t),t.each(e);for(let t of this._nodes.values())e(t),t.each(e)}find_child_cube(e){}check_show(){this.check_show_node(),this.check_show_line()}check_show_node(){this._view_nodes.clear();const e=this._grider.get_viewport_griders();for(let t of e)for(let e of t.nodes)if(!e.env.folded_upstream){this._view_nodes.add(e);e.map2d.sync_rect()}this.status.reset_nodes_view(this._view_nodes)}check_show_line(){this._view_linkers.clear();for(let e of this._view_nodes)e.check_show_line();this.status.reset_linkers_view(this._view_linkers);for(let e of this._view_linkers)e.map2d.update_path()}layout(){for(let e of this._nodes.values())e.is_layout_root&&e.attrs.layout&&e.layout()}layout_throttle=$i.Notice.throttle(this.layout.bind(this),10);check_show_throttle=$i.Notice.throttle(this.check_show.bind(this),10);init_env(){const e=[];for(let t of this._nodes.values())t.is_layout_root&&e.push(t);for(let t of e)t.env.flow()}init_map2d(){const e=[];for(let t of this._nodes.values())t.is_layout_root&&t.attrs.layout&&e.push(t);for(let t of e)t.map2d.flow()}check_in_view(e){const{innerHeight:t,innerWidth:n}=window;return!(e.y>t||e.y+e.height<0)&&!(e.x>n||e.x+e.width<0)}build_child(e){const{nodes:t,linkers:n}=e.info;for(let e of t){let t=new Ju(e,this);this._nodes.set(t.id,t),t.attrs.outbox&&this._nodes_outbox.add(t),t.layouted||this._view_nodes.add(t)}this.status.reset_nodes_view(this._view_nodes),this.status.reset_nodes_outbox(this._nodes_outbox),this.status.update_nodes_count(this._nodes.size);for(let e of n){const t=this.get_node(e.attrs.from),n=this.get_node(e.attrs.to);if(!t||!n)continue;const r=new Du(e,this);this._linkers.set(r.id,r)}this.init_env(),this.wait_nodes_render(this._view_nodes).then(async e=>{await rd.sleep(50),this.init_map2d(),this.init_grider(),this.check_show(),this._has_layout=!0})}init_grider(){this._grider.update_nodes(this._nodes.values())}update_data(e,t){return Ck.update_data(e,t)}export(){const e={nodes:[],linkers:[],node_from:structuredClone(this._node_from),node_to:structuredClone(this._node_to)},t=structuredClone({...this.data,info:e});for(let e of this._nodes.values())t.info.nodes.push(e.export());for(let e of this._linkers.values())t.info.linkers.push(e.export());return t}remove_node(e){this._nodes.delete(e.id),this._view_nodes.delete(e),this._nodes_outbox.delete(e),this.grider.remove_node(e),this.status.remove_node(e),e.gc(),this.status.update_nodes_count(this._nodes.size)}remove_linker(e){const t=this._node_to[e.from_id],n=this._node_from[e.to_id];let r;if(t&&n){const o=t.indexOf(e.to_id),i=n.indexOf(e.from_id);t.splice(o,1),n.splice(i,1),r={linker:e.export(),index_to:o,index_from:i}}return this._linkers.delete(e.id),this._view_linkers.delete(e),this.status.set_linker_visible(e,!1),this.status.remove_linker(e),e.gc(),r}is_noop_sibling_move(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;return o===("prev"===r?i:i+1)}reorder_siblings(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;e.splice(o,1);const s=e.indexOf(n),a="prev"===r?s:s+1;return e.splice(a,0,t),!0}on_node_add(e){const{data:t}=e,{cursor:n,courier:r,history:o}=this,i=r.get_recorder();i.add_cmd(e);const s=rd.build_cubes(t,this);this.pick(...s);const a=t.map(e=>e.id);return i.add_recover(Qi.node_remove(this.id,a)),Promise.resolve().then(async()=>{const e=s.map(e=>e.wait_layout_self());await Promise.all(e),this.grider.update_nodes(s)}),i}on_node_remove(e){const{data:t}=e,{courier:n,cursor:r,history:o}=this;if(0===t.length)return;const i=n.get_recorder();i.add_cmd(e);const s=[],a=new Set,l=new Set,c=new Set;for(let e of t){const t=this.get_node(e);if(t){a.add(t);for(let e of t.env.downstream_nodes)a.add(e)}}for(let e of a){for(const t of e.linkers_from)c.add(t.id);for(const t of e.linkers_to)c.add(t.id)}let d=new Set;for(let e of a){s.push(e.export());const t=e.env.layout_root;t&&t!==e&&l.add(e.env.layout_root);e.env.upstream&&d.add(e.env.upstream),this.remove_node(e)}for(let e of d)e.env.flow("self");return i.tell(this,Qi.linker_remove(this.id,[...c],!1)),i.add_recover(Qi.node_add(this.id,s)),i}on_linker_add(e){const{data:t}=e,n=e.to_root??!0,{courier:r,cursor:o,history:i}=this,s=r.get_recorder();if(0===t.length)return;let a=Promise.resolve();s.add_cmd(e);const l=[],c=[],d=new Set;for(let e of t){const{index_to:t,index_from:n,linker:r}=e,o=new Du(r,this),i=o.from_node,s=o.to_node;if(!i||!s)continue;this.pick(o);let a=this.get_node_from(o.to_id),u=this.get_node_to(o.from_id);a?a.indexOf(o.from_id)<0&&a.splice(n,0,o.from_id):this._node_from[o.to_id]=[o.from_id],u?u.indexOf(o.to_id)<0&&u.splice(t,0,o.to_id):this._node_to[o.from_id]=[o.to_id],l.unshift(o.id),c.push(s.wait_layout_self()),d.add(i)}const u=new Set;for(let e of d){e.env.flow("downstream"),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&u.add(t)}return s.add_recover(Qi.linker_remove(this.id,l,n)),a.then(async()=>{await Promise.all(c);for(let e of u)e.layout_throttle();0===u.size&&this.check_show()}),s}on_linker_remove(e){const{data:t}=e,n=e.to_root??!0,{courier:r,cursor:o,history:i}=this;if(0===t.length)return;const s=r.get_recorder();s.add_cmd(e);const a=[],l=new Set,c=new Set;for(let e of t){const t=this.get_linker(e);if(!t)continue;const n=t.from_node,r=t.to_node;n&&l.add(n),r&&c.add(r);const o=this.remove_linker(t);o&&a.unshift(o)}if(0===a.length)return;if(n)for(let e of c){if(!e.env.check_env(!1).has_root){const t=es.layout_change(e.id,{root:!0});s.tell(e,t)}}const d=new Set;for(let e of l){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&d.add(t)}for(let e of d)e.layout_throttle();return this.check_show_throttle(),s.add_recover(Qi.linker_add(this.id,a)),s}on_node_drag(e){const{data:t}=e;if(0===t.length)return;const n=this.courier.get_recorder();n.add_cmd(e);const r=new Set,o=new Set;for(let e of t){const t=this.get_node(e.node_id);if(t)if(e.intention){const i=this.get_node(e.intention.target_id);if(!i)continue;const{type:s}=e.intention,a=t.env.upstream,l=t.env.layout_root,c="child"===s?i:i.env.upstream;if(!c)continue;if(c===t)continue;if(t.env.downstream_nodes.has(c))continue;if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[];if(a===c&&this.is_noop_sibling_move(e,t.id,i.id,s))continue}if(a&&r.add(a),r.add(c),r.add(t),l&&o.add(l),a?.env.layout_root&&o.add(a.env.layout_root),c.env.layout_root&&o.add(c.env.layout_root),("prev"===s||"next"===s)&&a===c){const e=this.get_node_to(c.id)||[];this.reorder_siblings(e,t.id,i.id,s);continue}if(a&&a!==c){const e=this.get_linker_id(a.id,t.id);n.tell(this,Qi.linker_remove(this.id,[e],!1))}if(t.is_layout_root&&n.tell(t,es.layout_change(t.id,{root:!1})),"child"===s){const e=Zi.create_linker_info(this,i.id,t.id);n.tell(this,Qi.linker_add(this.id,[e],!1))}else if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[],r=e.indexOf(i.id),o="prev"===s?r:r+1,a={linker:Du.get_default(c.id,t.id),index_to:o<0?e.length:o,index_from:this.get_node_from(t.id)?.length||0};n.tell(this,Qi.linker_add(this.id,[a],!1))}}else if(e.matrix2d){const r=es.layout_change(t.id,{matrix2d:e.matrix2d});n.tell(t,r)}}for(let e of r){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&o.add(t)}for(let e of o)e.layout_throttle();return this.check_show_throttle(),n}replace_id(e,t,n={}){return Ck.replace_id(this.root,e,t,n)}pick(...e){for(let t of e)t instanceof Zc?(this._nodes.set(t.id,t),this._view_nodes.add(t),this.status.set_node_visible(t,!0)):t instanceof Du&&(this._linkers.set(t.id,t),this._view_linkers.add(t),this.status.set_linker_visible(t,!0));this.status.update_nodes_count(this._nodes.size)}get_nodes_all(){return{...this._nodes}}get_linkers_all(){return{...this._linkers}}get_nodes_selected(){return new Set(this._nodes_selected)}get_nodes_view(){return new Set(this._view_nodes)}get_nodes_intersection(e){const t=this.grider.get_intersection_nodes(e);return Array.from(t)}get_linkers_view(){return new Set(this._view_linkers)}get_line_deleted(){return new Set(this._line_delete_selected)}get_linker_id(e,t){return Zi.get_linker_id(e,t)}get_linker(e){return this._linkers.get(e)}get_node(e){return this._nodes.get(e)}get_node_from(e){return this._node_from[e]}get_node_to(e){return this._node_to[e]}get_view_rect(){const{clientHeight:e,clientWidth:t}=document.documentElement,n=this.dom_svg_rect,r=Math.max(n.left,0),o=Math.min(n.right,t),i={x:r,y:Math.max(0,n.top)},s={x:o,y:Math.min(n.bottom,e)},a=this.view_point_to_real(i),l=this.view_point_to_real(s),c=l.x-a.x,d=l.y-a.y,u={x:a.x,y:a.y,width:c,height:d};return Object.assign(this._view_rect,u),this.status.update_view_rect(u),u}get_view_center(){const e=this.get_view_rect();return{x:e.x+e.width/2,y:e.y+e.height/2}}get_view_cube(e=!0){const t=this.view_rect,n=[],r=this.grider.get_intersection_nodes(t);for(let t of r)!e&&t.env.folded_upstream||(n.push(t),n.push(...t.linkers_from),n.push(...t.linkers_to));return n}set_node_outbox(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_outbox.add(n):this._nodes_outbox.delete(n),this.status.set_node_outbox(n,t))}set_node_visible(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._view_nodes.add(n):this._view_nodes.delete(n))}set_linker_visible(e,t){const n="string"==typeof e?this.get_linker(e):e;n&&(t?this._view_linkers.add(n):this._view_linkers.delete(n))}set_node_editing(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_editing.add(n):this._nodes_editing.delete(n),this.status.set_node_editing(n,t))}set_node_selected(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_selected.add(n):this._nodes_selected.delete(n),this.status.set_node_selected(n,t))}set_line_deleted(e,t){const n="string"==typeof e?this.get_node(e)||this.get_linker(e):e;n&&(t?this._line_delete_selected.add(n):this._line_delete_selected.delete(n),this.status.set_line_deleted(n,t))}clear_node_outbox(){this._nodes_outbox.clear()}clear_node_editing(){for(let e of this._nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear(),this.status.clear_node_selected()}clear_line_deleted(){this._line_delete_selected.clear(),this.status.clear_line_deleted()}set_node_dragging(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_dragging.add(n):this._nodes_dragging.delete(n),this.status.set_node_dragging(n,t))}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_node_dragging(){this._nodes_dragging.clear(),this.status.clear_nodes_dragging()}is_node_editing(e){return this._nodes_editing.has(e)}is_node_visible(e){return this._view_nodes.has(e)}is_linker_visible(e){return this._view_linkers.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}get_farest_node_selected(e){if(0!==this._nodes_selected.size){if(e===S.Keys.left){let e;for(let t of this._nodes_selected){const n=t.map2d.rect;(!e||n.x<e.map2d.pos.x)&&(e=t)}return e}if(e===S.Keys.right){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.x+n.width>r.x+r.width)&&(e=t)}return e}if(e===S.Keys.down){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y+n.height>r.y+r.height)&&(e=t)}return e}if(e===S.Keys.up){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y<r.y)&&(e=t)}return e}}}get_nearest_node(e,t){const n=e.map2d.rect;let r=e,o=1/0;if(t===S.Keys.left)for(let t of this._nodes.values()){if(!t.show||e===t)continue;const i=t.map2d.rect;if(i.x>n.x||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===S.Keys.right)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.x+i.width<n.x+n.width||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===S.Keys.up)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y>n.y||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===S.Keys.down)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y+i.height<n.y+n.height||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=$i.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}return r}move_select(e){if(0===this._nodes_selected.size)return;const t=this.get_farest_node_selected(e);if(!t)return;const n=this.get_nearest_node(t,e);this.clear_node_selected(),this.set_node_selected(n,!0),n.move_in_fig_view()}reset_matrix(e){Object.assign(this.matrix2d,e),this.status.update_matrix2d(e)}translate(e,t){const n=Ji.multiply(this.matrix2d,Ji.get_matrix_translate(e,t));this.reset_matrix(n)}scale_diff(e,t){this.matrix2d.a+=e,this.matrix2d.d+=t}scale_by_point(e,t,n){const{map_scale_max:r,map_scale_min:o}=this.config.data,i=this.matrix2d.a+t;if(i>r||i<o)return;const s=this.view_point_to_fig(e),a=this.untransform_point(s);this.matrix2d.a+=t,this.matrix2d.d+=n;const l=this.transform_point(a),c=s.x-l.x,d=s.y-l.y,u=Ji.multiply(this.matrix2d,Ji.get_matrix_translate(c,d));this.reset_matrix(u)}view_point_to_fig(e){const t=this.dom_svg_rect,{sx:n,sy:r}=this.get_upstream_sum_scale();let{x:o,y:i}=e;return{x:(o-t.x)/n,y:(i-t.y)/r}}view_point_to_real(e){const t=this.view_point_to_fig(e);return this.untransform_point(t)}fig_point_to_view(e){const t=this.dom_svg_rect;return{x:e.x+t.x,y:e.y+t.y}}fig_point_to_real(e){return this.untransform_point(e)}real_point_to_fig(e){return this.transform_point(e)}real_point_to_view(e){const t=this.real_point_to_fig(e);return this.fig_point_to_view(t)}transform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:t*a+r*l+i,y:n*a+o*l+s}}untransform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:(a-i-r*l)/t,y:(l-s-n*a)/o}}static get meta(){return{type:k.Cubes.submap,cubename:"子图",version:2,block:!0,show:!0}}static get_default(e=400,t=200){return{id:rd.get_id(),type:k.Cubes.submap,info:{nodes:[],linkers:[],node_from:{},node_to:{}},css:{},attrs:{matrix2d:Ji.get_default(),width:e,height:t}}}static replace_id(e,t,n,r={}){const o=n.id,i=rd.get_id();return r[o]=i,n.id=i,rd.replace_id(e,t,n.info.nodes,r),rd.replace_id(e,t,n.info.linkers,r),n}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(n<2&&(t.attrs.matrix2d=Ji.get_default()),{usable:!0,data:t})}}Sk([Ti(b.Names.node_add)],Ck.prototype,"on_node_add",null),Sk([Ti(b.Names.node_remove)],Ck.prototype,"on_node_remove",null),Sk([Ti(b.Names.linker_add)],Ck.prototype,"on_linker_add",null),Sk([Ti(b.Names.linker_remove)],Ck.prototype,"on_linker_remove",null),Sk([Ti(b.Names.node_drag)],Ck.prototype,"on_node_drag",null),Ck=Sk([ki],Ck);const Mk=["id","data-type"],zk=On({__name:"cube-box-columns",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Gt(),r=Gt();let o;function i(){const e=t.attrs;return e.column_count?{"column-count":e.column_count}:e.column_width?{"column-width":e.column_width+"px"}:{}}return Jn(()=>{const t=n.value;if(!t)return;const i=r.value;if(!i)return;o=new $i.DragDiff(i);let s=e.cube.attrs.width,a=e.cube.attrs.height,l=s,c={sx:1,sy:1};o.register_down(()=>{c=e.cube.get_upstream_sum_scale(),s=e.cube.attrs.width,a=e.cube.attrs.height}),o.register_move((n,r)=>{const o=n/c.sx;c.sy;l=Math.round(o+s),l<e.cube.min_width&&(l=e.cube.min_width),t.style.width=l+"px"}),o.register_up((t,n)=>{if(s===l)return;const r=e.cube.courier.get_recorder();r.tell(e.cube,Mi.resize(e.cube.id,l)),e.cube.history.record(r)}),o.register_cancel(()=>{e.cube.attrs.width=s})}),tr(()=>{o?.off()}),(e,o)=>(zo(),Po("div",{class:"cube-box-columns",ref_key:"box",ref:n,style:ce(Wt(t).css),id:e.cube.id,"data-type":e.cube.type,onContextmenu:o[0]||(o[0]=t=>Wt(rc)(t,e.cube))},[Bo("div",{class:"box-columns-content",style:ce(i())},[(zo(!0),Po(yo,null,ur(Wt(t).children,e=>(zo(),Oo(Ps,{key:e.id,cube:e},null,8,["cube"]))),128))],4),Bo("div",{class:"box-columns-dragger",ref_key:"dragger",ref:r},null,512)],44,Mk))}}),Nk=(0,Ls.A)(zk,[["__scopeId","data-v-1ce25866"]]);class Ak extends Ts{constructor(e){super(e)}get css(){const{width:e}=this.attrs;return{...super.css,width:e+"px"}}}function Tk(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Rk extends nd{_status=new Ak(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Nk}get attrs(){return this.data.attrs}get meta(){return Rk.meta}get min_width(){return 200}build_child(e){rd.build_cubes(e.info,this,this._children)}update_data(e,t){return Rk.update_data(e,t)}export(){const e=this.base_export();e.info=[];for(let t of this._children)e.info.push(t.export());return e}gc(){this.base_gc()}replace_id(e,t,n){return Rk.replace_id(this.root,e,t,n)}on_insert_child(e){const{courier:t,history:n}=this,{data:r}=e,o=t.get_recorder();o.add_cmd(e);const i=rd.build_cubes(e.data,this),s=this.child_count;return this.splice(this.child_count,0,...i),o.add_recover(Mi.delete_child(this.id,"backward",[s,this.child_count])),o}on_delete_child(e){const{courier:t,history:n}=this,{dir:r,range:o,reserve:i}=e;if(!this.is_valid_range(o))return;const s=t.get_recorder(),a=this.get_valid_index(o[0]),l=this.get_valid_index(o[1]),c=[],d=this.splice(a,l-a);for(let e of d.children)c.push(e.export());return s.add_recover(Mi.insert_child(this.id,c,a)),this.status.update_children(),s}static replace_id(e,t,n,r){const o=n.id,i=r[o]||rd.get_id();return r[o]=i,n.id=i,rd.replace_id(e,t,n.info,r),n}static get_default(){const e=Cu.get_default(),t=Cu.get_default(),n=Cu.get_default();return{id:rd.get_id(),type:k.Cubes.box_columns,info:[e,t,n],attrs:{width:400,column_count:3},css:{}}}static get meta(){return{cubename:"多列容器",type:k.Cubes.box_columns,block:!0,version:1,show:!0}}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Tk([Ti(_.Names.cube_insert_child)],Rk.prototype,"on_insert_child",null),Tk([Ti(_.Names.cube_delete_child)],Rk.prototype,"on_delete_child",null),Rk=Tk([ki],Rk);class Pk extends Ts{constructor(e){super(e)}}class Ok{static reset(e,t){return{id:e,name:m.Names.reset,explanation:t}}}const Ek=["id","data-type"],Lk=On({__name:"cube-rt",props:{cube:{}},setup(e){const{event:t,status:n}=e.cube;function r(){t.emit_show_cube_editor(e.cube)}return(t,o)=>(zo(),Po("ruby",{class:"cube-rt",id:t.cube.id,style:ce(Wt(n).css),"data-type":t.cube.type,onClick:r},[Fo(xe(Wt(n).info.text)+" ",1),Bo("rt",{style:ce({"font-size":`max(calc(0.6 * ${e.cube.css["font-size"]||"16px"}),${Bk.min_size}px)`})},xe(Wt(n).info.explanation),5),o[0]||(o[0]=Fo(" ",-1))],12,Ek))}}),Ik=Lk;function Dk(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Bk extends nd{_status=new Pk(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get info(){return this.data.info}get component(){return Ik}get meta(){return Bk.meta}build_child(e){}update_data(e,t){return Bk.update_data(e,t)}export(){return this.base_export()}gc(){this.base_gc()}replace_id(e,t,n){return Bk.replace_id(this.root,e,t,n)}reset(e){const{explanation:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=this.info.explanation;this.info.explanation=t;const i=Ok.reset(this.id,o);return r.add_recover(i),this.status.update_info(),r}static get min_size(){return 12}static get scale(){return.6}static get meta(){return{cubename:"标注文本",type:k.Cubes.rt,block:!1,version:1,show:!1}}static get_default(e="",t="",n={}){return{id:rd.get_id(),type:k.Cubes.rt,info:{text:e,explanation:t},attrs:{},css:n}}static replace_id(e,t,n,r){const o=n.id;return n.id=r[o]||rd.get_id(),r[o]=n.id,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{usable:!0,data:t}}}Dk([Ti(m.Names.reset)],Bk.prototype,"reset",null),Bk=Dk([ki],Bk)})(),i})());
|