cognova 0.2.2 → 0.2.3
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/-AsXrBBy.js +1 -0
- package/.output/public/_nuxt/2W1RPpXM.js +71 -0
- package/.output/public/_nuxt/{C4pxqdgg.js → 5UFq_rDn.js} +1 -1
- package/.output/public/_nuxt/5Zh-9l8_.js +1 -0
- package/.output/public/_nuxt/{DK9jxJ0g.js → 90UksHlj.js} +1 -1
- package/.output/public/_nuxt/{9IQmsEjr.js → 9QKmiSP_.js} +1 -1
- package/.output/public/_nuxt/{BOj6t-oo.js → ARbTpeGy.js} +1 -1
- package/.output/public/_nuxt/{DyRelyfs.js → ApfLnl06.js} +1 -1
- package/.output/public/_nuxt/{DznawRFW.js → B-2BuR5g.js} +1 -1
- package/.output/public/_nuxt/B4u7Mczo.js +1 -0
- package/.output/public/_nuxt/{DAQhmSv4.js → B5dI_yLq.js} +1 -1
- package/.output/public/_nuxt/{Bm9LyG4F.js → B6fnZcA6.js} +1 -1
- package/.output/public/_nuxt/{9QnH0xQM.js → B7uMSBlN.js} +1 -1
- package/.output/public/_nuxt/BBiRyPlN.js +1 -0
- package/.output/public/_nuxt/{iBGCpHdw.js → BF7413u4.js} +2 -2
- package/.output/public/_nuxt/{4MiwzAAt.js → BGtUoCgi.js} +2 -2
- package/.output/public/_nuxt/{CxuZBC8n.js → BHe4VLtR.js} +1 -1
- package/.output/public/_nuxt/{D3RiUGdz.js → BIMBp1Tj.js} +1 -1
- package/.output/public/_nuxt/{g20UHUCv.js → BIvPdoE3.js} +1 -1
- package/.output/public/_nuxt/BKaRtCjP.js +1 -0
- package/.output/public/_nuxt/BLmc9T7l.js +1 -0
- package/.output/public/_nuxt/BMdnU6BF.js +1 -0
- package/.output/public/_nuxt/{CKkC3Ptm.js → BOgdaA_8.js} +1 -1
- package/.output/public/_nuxt/{BffWCM73.js → BQZfTrUg.js} +1 -1
- package/.output/public/_nuxt/BQnublTW.js +1 -0
- package/.output/public/_nuxt/BSsvedap.js +1 -0
- package/.output/public/_nuxt/{Ci7UEZQh.js → BVypxKRT.js} +1 -1
- package/.output/public/_nuxt/{CYP_MLH8.js → BWqJFnZy.js} +1 -1
- package/.output/public/_nuxt/BXxYdXMr.js +1 -0
- package/.output/public/_nuxt/{D_3Rq1BS.js → B_17gAr_.js} +1 -1
- package/.output/public/_nuxt/B_qzFVK_.js +1 -0
- package/.output/public/_nuxt/{BqKFIuRj.js → BbRPwpIX.js} +1 -1
- package/.output/public/_nuxt/BhrzKbv9.js +1 -0
- package/.output/public/_nuxt/{Cqy_L_ip.js → Bl6LNGlA.js} +1 -1
- package/.output/public/_nuxt/{Fukkqjkf.js → BlPToGni.js} +1 -1
- package/.output/public/_nuxt/{DHKLCQRG.js → BlwHr46F.js} +1 -1
- package/.output/public/_nuxt/{C6aqGHu1.js → BnmwiZbF.js} +1 -1
- package/.output/public/_nuxt/BqtxLJaf.js +1 -0
- package/.output/public/_nuxt/{eko-0FUm.js → BrEXdify.js} +1 -1
- package/.output/public/_nuxt/{D3e44mCL.js → BtNnS4m3.js} +1 -1
- package/.output/public/_nuxt/{BCtfQCzC.js → BtVIBBUN.js} +1 -1
- package/.output/public/_nuxt/Bw5h4Jaf.js +1 -0
- package/.output/public/_nuxt/{FvlxxmNk.js → Bwcpy7gC.js} +2 -2
- package/.output/public/_nuxt/{Db2v8O7O.js → C0TUK31m.js} +1 -1
- package/.output/public/_nuxt/C1T4GK6c.js +1 -0
- package/.output/public/_nuxt/C2ANDZen.js +1 -0
- package/.output/public/_nuxt/{CqU2XbzO.js → C2RZSTuy.js} +1 -1
- package/.output/public/_nuxt/C3dYlP5x.js +1 -0
- package/.output/public/_nuxt/{m5kGCDpI.js → C3sh_tLi.js} +3 -3
- package/.output/public/_nuxt/{BjjCvHLT.js → C4zyxZG7.js} +1 -1
- package/.output/public/_nuxt/{C3FxIITy.js → C5I-XBZT.js} +1 -1
- package/.output/public/_nuxt/{yuf23kh9.js → CC4Goztu.js} +1 -1
- package/.output/public/_nuxt/CC77iplr.js +1 -0
- package/.output/public/_nuxt/{xuzLdW-o.js → CFyD2NHP.js} +1 -1
- package/.output/public/_nuxt/{CsJ9KhQ4.js → CGQDTeaO.js} +1 -1
- package/.output/public/_nuxt/{DnjGH3SQ.js → CHpwuMSk.js} +1 -1
- package/.output/public/_nuxt/CLzcRUcs.js +1 -0
- package/.output/public/_nuxt/CM2phu_3.js +1 -0
- package/.output/public/_nuxt/{Cr8ixbr1.js → CQpYRq61.js} +1 -1
- package/.output/public/_nuxt/{C0JKNMDO.js → CUN4bYcg.js} +1 -1
- package/.output/public/_nuxt/{CmzH6R-N.js → CXoITXft.js} +19 -19
- package/.output/public/_nuxt/CYjcQPl-.js +1 -0
- package/.output/public/_nuxt/{DGX0tzL8.js → CZ32KfaS.js} +1 -1
- package/.output/public/_nuxt/CclZMdca.js +1 -0
- package/.output/public/_nuxt/{C69W7k2j.js → CdpT_Vb6.js} +1 -1
- package/.output/public/_nuxt/CflRLvFC.js +1 -0
- package/.output/public/_nuxt/{gBC9k4Qj.js → CkqNv7sq.js} +2 -2
- package/.output/public/_nuxt/ClXDAYjE.js +1 -0
- package/.output/public/_nuxt/CrZGoMo_.js +1 -0
- package/.output/public/_nuxt/{BZXMQuYP.js → CvJtd2Af.js} +1 -1
- package/.output/public/_nuxt/{DKZxeXDQ.js → Cwtd8e-P.js} +1 -1
- package/.output/public/_nuxt/{nIU2F7ia.js → Cx44SSNp.js} +3 -3
- package/.output/public/_nuxt/{BzOqrmGa.js → CxEVzuCn.js} +3 -3
- package/.output/public/_nuxt/{Dy_Cq5LQ.js → CzIMQevQ.js} +1 -1
- package/.output/public/_nuxt/{D6t3dcTl.js → D0P9llU7.js} +1 -1
- package/.output/public/_nuxt/{JJ3634gV.js → D1DYuOOm.js} +1 -1
- package/.output/public/_nuxt/{BAIz-dEB.js → D1dDc8Vw.js} +1 -1
- package/.output/public/_nuxt/{DSRrg8JT.js → D1r0uqf3.js} +1 -1
- package/.output/public/_nuxt/{CNnJrDvu.js → D3a8R1T6.js} +1 -1
- package/.output/public/_nuxt/{B1X4Bzcy.js → D5EZbuub.js} +1 -1
- package/.output/public/_nuxt/D9V13KTK.js +1 -0
- package/.output/public/_nuxt/DAE2hbP7.js +1 -0
- package/.output/public/_nuxt/{Cvp7FI3T.js → DAIbdyS6.js} +1 -1
- package/.output/public/_nuxt/{EuOqK1A6.js → DAvlXjt0.js} +1 -1
- package/.output/public/_nuxt/DBKzwexZ.js +1 -0
- package/.output/public/_nuxt/{wCGVE8_e.js → DEATxnaF.js} +1 -1
- package/.output/public/_nuxt/{cABRLVee.js → DFg8PvHV.js} +1 -1
- package/.output/public/_nuxt/DM4MyqI-.js +1 -0
- package/.output/public/_nuxt/{Cdt3I3Go.js → DNE7kw9s.js} +1 -1
- package/.output/public/_nuxt/DO0oG4fG.js +1 -0
- package/.output/public/_nuxt/{B6S_ob86.js → DPFugPaB.js} +1 -1
- package/.output/public/_nuxt/{DJjDvbZE.js → DQlXU6_H.js} +1 -1
- package/.output/public/_nuxt/DQvuQpwh.js +1 -0
- package/.output/public/_nuxt/{sf57orEk.js → DRlG_bnX.js} +1 -1
- package/.output/public/_nuxt/{C6RC3lA1.js → DSQj-oMk.js} +1 -1
- package/.output/public/_nuxt/{CeIVm4A3.js → DU6ewLkE.js} +1 -1
- package/.output/public/_nuxt/{Cp2MA0cm.js → DWhzQg7B.js} +1 -1
- package/.output/public/_nuxt/{DJMS2og1.js → D_vK6VPK.js} +1 -1
- package/.output/public/_nuxt/{CihWZmJe.js → DaBp0Gba.js} +2 -2
- package/.output/public/_nuxt/DaH2FbAy.js +1 -0
- package/.output/public/_nuxt/{CtYFj7k1.js → DaJo0CeV.js} +1 -1
- package/.output/public/_nuxt/DauLdT7p.js +1 -0
- package/.output/public/_nuxt/{DG-T44jj.js → DdPA4eTX.js} +1 -1
- package/.output/public/_nuxt/{YuTZB7sD.js → DeAGWdWK.js} +1 -1
- package/.output/public/_nuxt/{CitkKxhw.js → DfF1qofg.js} +1 -1
- package/.output/public/_nuxt/{Daz4MeL6.js → DiGBA-aA.js} +1 -1
- package/.output/public/_nuxt/DiJxF69i.js +1 -0
- package/.output/public/_nuxt/{DIoI0uJm.js → DkBIU-1F.js} +1 -1
- package/.output/public/_nuxt/DmAM6bZ0.js +1 -0
- package/.output/public/_nuxt/DmeAKr3J.js +1 -0
- package/.output/public/_nuxt/DmmTnMzZ.js +1 -0
- package/.output/public/_nuxt/{Lwdv_RKd.js → DqsUSndS.js} +1 -1
- package/.output/public/_nuxt/Dvw-hR3Y.js +1 -0
- package/.output/public/_nuxt/{CVgTJeSq.js → Dz6sfh81.js} +1 -1
- package/.output/public/_nuxt/{BYjadNrw.js → FNhYm5FX.js} +1 -1
- package/.output/public/_nuxt/{Nb2jBtYT.js → HOeKUnra.js} +1 -1
- package/.output/public/_nuxt/{CtchsY6e.js → IR1jkN7B.js} +1 -1
- package/.output/public/_nuxt/{DCzfkCGa.js → MpTk6K7N.js} +1 -1
- package/.output/public/_nuxt/NZ7Wz6LP.js +1 -0
- package/.output/public/_nuxt/{DfQu3kEw.js → PqWbiAD2.js} +1 -1
- package/.output/public/_nuxt/{Jez9DHn7.js → Tu4FhMRc.js} +1 -1
- package/.output/public/_nuxt/{B3y_Qqox.js → UKPXYG4z.js} +1 -1
- package/.output/public/_nuxt/{BlAZO7nq.js → UO2Y9Nve.js} +1 -1
- package/.output/public/_nuxt/{KKK6HVeG.js → XHiJSquP.js} +1 -1
- package/.output/public/_nuxt/YGWAImQo.js +1 -0
- package/.output/public/_nuxt/{ghuJ76mD.js → ZR87XvwB.js} +1 -1
- package/.output/public/_nuxt/{yNrp2XvX.js → _E89BQAO.js} +1 -1
- package/.output/public/_nuxt/{C_BdYLzz.js → aiXk7zRt.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/91727fcc-bf7f-407f-9b1e-092017fcfee0.json +1 -0
- package/.output/public/_nuxt/cL7whuPe.js +1 -0
- package/.output/public/_nuxt/{BasgsT_S.js → ct6_k5IW.js} +1 -1
- package/.output/public/_nuxt/entry._7ZkP07A.css +1 -0
- package/.output/public/_nuxt/{DTDgHTuh.js → fEUQvmn8.js} +2 -2
- package/.output/public/_nuxt/{FNC8XZTk.js → gGlaVUMD.js} +1 -1
- package/.output/public/_nuxt/gjmGkVlL.js +1 -0
- package/.output/public/_nuxt/{IRSbVPIu.js → m5001Uvl.js} +1 -1
- package/.output/public/_nuxt/{_CYZi8HN.js → mQkFCz_M.js} +1 -1
- package/.output/public/_nuxt/{BxXOsXrM.js → p9l1LjVc.js} +10 -10
- package/.output/public/_nuxt/{BsEZoHd1.js → qR_K5W8V.js} +1 -1
- package/.output/public/_nuxt/{BrNqhp1a.js → t_9QQ4MF.js} +7 -7
- package/.output/public/_nuxt/{pcUI-zuY.js → uc4c4mfb.js} +1 -1
- package/.output/public/_nuxt/{usage.vakN1lvi.css → usage.BDeyCZwW.css} +1 -1
- package/.output/public/_nuxt/wPSLEMBw.js +1 -0
- package/.output/public/_nuxt/xKRwul0f.js +1 -0
- package/.output/public/_nuxt/{BWhMnjID.js → xgpiGSxb.js} +1 -1
- package/.output/public/_nuxt/xxnk7j0F.js +1 -0
- package/.output/public/favicon.svg +1 -0
- package/.output/server/chunks/build/A-BWukSPjS.mjs +1 -0
- package/.output/server/chunks/build/Accordion-BaJYea6e.mjs +1 -0
- package/.output/server/chunks/build/AccordionItem-DdG2zgcN.mjs +1 -0
- package/.output/server/chunks/build/Badge-BrU9UkCv.mjs +1 -0
- package/.output/server/chunks/build/Blockquote-DND8wTkU.mjs +1 -0
- package/.output/server/chunks/build/Callout-1halpaEg.mjs +1 -0
- package/.output/server/chunks/build/Card-BHCSDKDt.mjs +1 -0
- package/.output/server/chunks/build/CardGroup-BOuJcNGp.mjs +1 -0
- package/.output/server/chunks/build/Caution-BP3y-TcC.mjs +1 -0
- package/.output/server/chunks/build/Code-B1xkAS5a.mjs +1 -0
- package/.output/server/chunks/build/CodeCollapse-BIhaNa22.mjs +1 -0
- package/.output/server/chunks/build/CodeGroup-BviYyCuo.mjs +1 -0
- package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +2 -1
- package/.output/server/chunks/build/CodePreview-D8PsCQ6m.mjs +1 -0
- package/.output/server/chunks/build/CodeTree-BUTLupmL.mjs +1 -0
- package/.output/server/chunks/build/Collapsible-BIvXNaSq.mjs +1 -0
- package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
- package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
- package/.output/server/chunks/build/Em-DsIz_BnD.mjs +1 -0
- package/.output/server/chunks/build/Field-cwwmSQDT.mjs +1 -0
- package/.output/server/chunks/build/FieldGroup-CAIpQv8s.mjs +1 -0
- package/.output/server/chunks/build/H1-BbFNsPyP.mjs +1 -0
- package/.output/server/chunks/build/H2-vHTl_pWr.mjs +1 -0
- package/.output/server/chunks/build/H3-7eTcfO3s.mjs +1 -0
- package/.output/server/chunks/build/H4-C89p_PKO.mjs +1 -0
- package/.output/server/chunks/build/Hr-Bm8RlL3O.mjs +1 -0
- package/.output/server/chunks/build/Icon-Dp9iy0BI.mjs +1 -0
- package/.output/server/chunks/build/Img-CWLmvN1t.mjs +2 -1
- package/.output/server/chunks/build/Kbd-CQG6I_Ch.mjs +1 -0
- package/.output/server/chunks/build/Li-Bw1QUaGv.mjs +1 -0
- package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
- package/.output/server/chunks/build/Note-CHkjm9jm.mjs +1 -0
- package/.output/server/chunks/build/Ol-D-fPnfFM.mjs +1 -0
- package/.output/server/chunks/build/P-B5YI1V9y.mjs +1 -0
- package/.output/server/chunks/build/Pre-ChiJcf3C.mjs +1 -0
- package/.output/server/chunks/build/ProseH5-DahJyv8h.mjs +1 -0
- package/.output/server/chunks/build/ProseH6-C4Is5h6c.mjs +1 -0
- package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
- package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
- package/.output/server/chunks/build/Steps-BZpvXfzb.mjs +1 -0
- package/.output/server/chunks/build/Strong-DXJqOWL3.mjs +1 -0
- package/.output/server/chunks/build/Table-BSrLZ7dt.mjs +1 -0
- package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
- package/.output/server/chunks/build/Tabs-Dk3nvOFF.mjs +1 -0
- package/.output/server/chunks/build/TabsItem-CDhyuBtJ.mjs +1 -0
- package/.output/server/chunks/build/Tbody-CjMT5oH-.mjs +1 -0
- package/.output/server/chunks/build/Td-ZBVaEjFN.mjs +1 -0
- package/.output/server/chunks/build/Th-D317icbd.mjs +1 -0
- package/.output/server/chunks/build/Thead-Ca_ZESTK.mjs +1 -0
- package/.output/server/chunks/build/Tip-CP3oTARR.mjs +1 -0
- package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
- package/.output/server/chunks/build/Tr-6jI8j9gD.mjs +1 -0
- package/.output/server/chunks/build/{docs-Dk2JnYq3.mjs → Tree-DUhXKd8y.mjs} +46 -2235
- package/.output/server/chunks/build/Tree-DUhXKd8y.mjs.map +1 -0
- package/.output/server/chunks/build/Ul-BUGj_CPb.mjs +1 -0
- package/.output/server/chunks/build/Warning-BJ8G6cxC.mjs +1 -0
- package/.output/server/chunks/build/_id_-DN00UDdO.mjs +1 -0
- package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +1 -1
- package/.output/server/chunks/build/_name_-BnS_KEfX.mjs +1592 -0
- package/.output/server/chunks/build/_name_-BnS_KEfX.mjs.map +1 -0
- package/.output/server/chunks/build/{_uuid_-0UgdUhfY.mjs → _uuid_-DfJaumTE.mjs} +5 -4
- package/.output/server/chunks/build/{_uuid_-0UgdUhfY.mjs.map → _uuid_-DfJaumTE.mjs.map} +1 -1
- package/.output/server/chunks/build/auth-BGPNH2QJ.mjs +20 -0
- package/.output/server/chunks/build/auth-BGPNH2QJ.mjs.map +1 -0
- package/.output/server/chunks/build/auth-CvD7MqKW.mjs +1 -0
- package/.output/server/chunks/build/auth-CvD7MqKW.mjs.map +1 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs +1 -0
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
- package/.output/server/chunks/build/{dashboard-YEscLBQN.mjs → dashboard-CLk1NlbR.mjs} +15 -4
- package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs.map +1 -0
- package/.output/server/chunks/build/{dashboard-CpMVYnDV.mjs → dashboard-CiVTAZuF.mjs} +12 -4
- package/.output/server/chunks/build/{dashboard-CpMVYnDV.mjs.map → dashboard-CiVTAZuF.mjs.map} +1 -1
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs +2204 -0
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-BzbcNcdU.mjs +1 -0
- package/.output/server/chunks/build/error-500-uCDjGRW8.mjs +1 -0
- package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
- package/.output/server/chunks/build/{hooks-DP8WoUPS.mjs → hooks-D328DcO6.mjs} +3 -2
- package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DVx-QlhP.mjs → index-Byt-3Yq6.mjs} +3 -2
- package/.output/server/chunks/build/{index-DVx-QlhP.mjs.map → index-Byt-3Yq6.mjs.map} +1 -1
- package/.output/server/chunks/build/{index-Ba_bPJgk.mjs → index-C9PuieXh.mjs} +3 -2
- package/.output/server/chunks/build/index-C9PuieXh.mjs.map +1 -0
- package/.output/server/chunks/build/index-C_LcBBgO.mjs +1508 -0
- package/.output/server/chunks/build/index-C_LcBBgO.mjs.map +1 -0
- package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
- package/.output/server/chunks/build/index-DzdvIi8V.mjs +1 -0
- package/.output/server/chunks/build/library-CbWcF5wT.mjs +601 -0
- package/.output/server/chunks/build/library-CbWcF5wT.mjs.map +1 -0
- package/.output/server/chunks/build/{login-BAysbpyX.mjs → login-DnnElTl2.mjs} +15 -7
- package/.output/server/chunks/build/{login-BAysbpyX.mjs.map → login-DnnElTl2.mjs.map} +1 -1
- package/.output/server/chunks/build/memories-BqA719O1.mjs +1 -0
- package/.output/server/chunks/build/memories-BqA719O1.mjs.map +1 -1
- package/.output/server/chunks/build/server.mjs +62 -34
- package/.output/server/chunks/build/server.mjs.map +1 -1
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -0
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs.map +1 -1
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{tasks-DiOi1HG_.mjs → tasks-DnAFqbtt.mjs} +3 -2
- package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +1 -0
- package/.output/server/chunks/build/{usage-H_mcd_fz.mjs → usage-CSrBh4Or.mjs} +159 -44
- package/.output/server/chunks/build/{usage-H_mcd_fz.mjs.map → usage-CSrBh4Or.mjs.map} +1 -1
- package/.output/server/chunks/build/{usePreferences-CzC8fRzd.mjs → usePreferences-DH1QjxOj.mjs} +7 -1
- package/.output/server/chunks/build/usePreferences-DH1QjxOj.mjs.map +1 -0
- package/.output/server/chunks/build/{view-Dc8mvzCB.mjs → view-n2sYa4Zh.mjs} +4 -3
- package/.output/server/chunks/build/{view-Dc8mvzCB.mjs.map → view-n2sYa4Zh.mjs.map} +1 -1
- package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-imports-PtwWlZ2H.mjs +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +1247 -824
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +2 -1
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/run.post.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/run.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id_.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id_.patch.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/stats.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/auth/_...all_.mjs +1 -0
- package/.output/server/chunks/routes/api/auth/_...all_.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +1 -0
- package/.output/server/chunks/routes/api/conversations/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +1 -0
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/delete.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/list.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/move.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/read.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/rename.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/write.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -0
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -0
- package/.output/server/chunks/routes/api/home.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/hooks/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -0
- package/.output/server/chunks/routes/api/hooks/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -0
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get2.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get5.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get6.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +40 -38
- package/.output/server/chunks/routes/api/index.get7.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +33 -38
- package/.output/server/chunks/routes/api/index.get8.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get9.mjs +83 -0
- package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -0
- package/.output/server/chunks/routes/api/index.post.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post2.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post4.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/context.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +2 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/store.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/projects/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/projects/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/projects/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -0
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -0
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +72 -0
- package/.output/server/chunks/routes/api/skills/_name/export.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +73 -0
- package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +71 -0
- package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +69 -0
- package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +69 -0
- package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +60 -0
- package/.output/server/chunks/routes/api/skills/_name/index.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +87 -0
- package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +62 -0
- package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/create.post.mjs +79 -0
- package/.output/server/chunks/routes/api/skills/create.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/generate.post.mjs +143 -0
- package/.output/server/chunks/routes/api/skills/generate.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/import.post.mjs +96 -0
- package/.output/server/chunks/routes/api/skills/import.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/index.get.mjs +82 -0
- package/.output/server/chunks/routes/api/skills/index.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/index.get2.mjs +83 -0
- package/.output/server/chunks/routes/api/skills/index.get2.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +72 -0
- package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/library/install.post.mjs +90 -0
- package/.output/server/chunks/routes/api/skills/library/install.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +4 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/user/email.patch.mjs +2 -1
- package/.output/server/chunks/routes/api/user/email.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/notifications.mjs +2 -1
- package/.output/server/chunks/routes/notifications.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/routes/terminal.mjs +2 -1
- package/.output/server/chunks/routes/terminal.mjs.map +1 -1
- package/.output/server/index.mjs +2 -1
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/adm-zip/adm-zip.js +949 -0
- package/.output/server/node_modules/adm-zip/headers/entryHeader.js +374 -0
- package/.output/server/node_modules/adm-zip/headers/index.js +2 -0
- package/.output/server/node_modules/adm-zip/headers/mainHeader.js +130 -0
- package/.output/server/node_modules/adm-zip/methods/deflater.js +33 -0
- package/.output/server/node_modules/adm-zip/methods/index.js +3 -0
- package/.output/server/node_modules/adm-zip/methods/inflater.js +34 -0
- package/.output/server/node_modules/adm-zip/methods/zipcrypto.js +175 -0
- package/.output/server/node_modules/adm-zip/package.json +49 -0
- package/.output/server/node_modules/adm-zip/util/constants.js +142 -0
- package/.output/server/node_modules/adm-zip/util/decoder.js +5 -0
- package/.output/server/node_modules/adm-zip/util/errors.js +63 -0
- package/.output/server/node_modules/adm-zip/util/fattr.js +76 -0
- package/.output/server/node_modules/adm-zip/util/index.js +5 -0
- package/.output/server/node_modules/adm-zip/util/utils.js +336 -0
- package/.output/server/node_modules/adm-zip/zipEntry.js +405 -0
- package/.output/server/node_modules/adm-zip/zipFile.js +446 -0
- package/.output/server/package.json +2 -1
- package/README.md +3 -0
- package/app/app.vue +1 -1
- package/app/components/dashboard/StatCards.vue +21 -2
- package/app/components/usage/UsageCostChart.client.vue +59 -23
- package/app/components/usage/UsageCostChart.server.vue +1 -0
- package/app/components/usage/UsageSourceDonut.client.vue +17 -5
- package/app/components/usage/UsageSourceDonut.server.vue +1 -0
- package/app/components/usage/UsageTopConsumers.vue +13 -3
- package/app/composables/usePreferences.ts +9 -1
- package/app/layouts/auth.vue +0 -10
- package/app/pages/login.vue +18 -8
- package/app/pages/skills/[name].vue +12 -0
- package/app/pages/skills/index.vue +47 -0
- package/app/pages/usage.vue +43 -16
- package/dist/cli/index.js +12 -13
- package/package.json +5 -3
- package/server/api/skills/[name]/export.get.ts +45 -0
- package/server/api/skills/import.post.ts +87 -0
- package/server/api/usage/stats.get.ts +4 -2
- package/shared/types/index.ts +2 -1
- package/.output/public/_nuxt/5ZXA0Ckq.js +0 -1
- package/.output/public/_nuxt/BIIJhjQO.js +0 -1
- package/.output/public/_nuxt/BIckl6wA.js +0 -1
- package/.output/public/_nuxt/BJ3o57WW.js +0 -1
- package/.output/public/_nuxt/BNetzZzF.js +0 -1
- package/.output/public/_nuxt/BS0ofHJK.js +0 -1
- package/.output/public/_nuxt/B_3_hrpn.js +0 -1
- package/.output/public/_nuxt/BaBZjmMC.js +0 -1
- package/.output/public/_nuxt/BaMqDm5u.js +0 -1
- package/.output/public/_nuxt/BhzMoffi.js +0 -1
- package/.output/public/_nuxt/BlhFigLL.js +0 -1
- package/.output/public/_nuxt/BoIxv-gM.js +0 -1
- package/.output/public/_nuxt/Br19oYkq.js +0 -1
- package/.output/public/_nuxt/C0kh_F7v.js +0 -1
- package/.output/public/_nuxt/C61KgSco.js +0 -1
- package/.output/public/_nuxt/CJUdYEdO.js +0 -1
- package/.output/public/_nuxt/CVJQGP1Q.js +0 -1
- package/.output/public/_nuxt/CWMUi89H.js +0 -1
- package/.output/public/_nuxt/Cdu2qGgq.js +0 -1
- package/.output/public/_nuxt/CeIu7z4p.js +0 -1
- package/.output/public/_nuxt/D2689qk4.js +0 -1
- package/.output/public/_nuxt/D31L7Ks6.js +0 -1
- package/.output/public/_nuxt/DB359q8R.js +0 -1
- package/.output/public/_nuxt/DHG66LPS.js +0 -1
- package/.output/public/_nuxt/DJ5V-y_x.js +0 -1
- package/.output/public/_nuxt/DLETdGFL.js +0 -1
- package/.output/public/_nuxt/DOICd-Ld.js +0 -1
- package/.output/public/_nuxt/DPEcH-gi.js +0 -65
- package/.output/public/_nuxt/Db8-_gO7.js +0 -1
- package/.output/public/_nuxt/DgV-EDJ9.js +0 -1
- package/.output/public/_nuxt/Dp2X5R2m.js +0 -1
- package/.output/public/_nuxt/DqB723Z0.js +0 -1
- package/.output/public/_nuxt/Q8Ps7oN5.js +0 -1
- package/.output/public/_nuxt/SXTDhzp6.js +0 -1
- package/.output/public/_nuxt/Sg2Lwc46.js +0 -1
- package/.output/public/_nuxt/_J_7XIn-.js +0 -1
- package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +0 -1
- package/.output/public/_nuxt/entry.CGxIBGAf.css +0 -1
- package/.output/public/_nuxt/inmzPrjz.js +0 -1
- package/.output/public/_nuxt/oIX-ZDN6.js +0 -1
- package/.output/server/chunks/build/auth-CDHRohj4.mjs +0 -77
- package/.output/server/chunks/build/auth-CDHRohj4.mjs.map +0 -1
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +0 -1
- package/.output/server/chunks/build/docs-Dk2JnYq3.mjs.map +0 -1
- package/.output/server/chunks/build/hooks-DP8WoUPS.mjs.map +0 -1
- package/.output/server/chunks/build/index-Ba_bPJgk.mjs.map +0 -1
- package/.output/server/chunks/build/tasks-DiOi1HG_.mjs.map +0 -1
- package/.output/server/chunks/build/usePreferences-CzC8fRzd.mjs.map +0 -1
- /package/.output/public/_nuxt/{useCopyToClipboard.Be_IvFWy.css → CodeEditor.Be_IvFWy.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./JJ3634gV.js";import{a as Dt,ay as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a1 as It,f as I,R as Xt}from"./BxXOsXrM.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1
|
+
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./D1DYuOOm.js";import{a as Dt,aA as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,R as Xt}from"./p9l1LjVc.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,r=!1,a;return{s:function(){e=e.call(t)},n:function(){var h=e.next();return o=h.done,h},e:function(h){r=!0,a=h},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(r)throw a}}}}function ji(t,i){var e=[],n=[];function s(o,r){if(o.length===1)e.push(o[0]),n.push(o[0]);else{for(var a=Array(o.length-1),h=0;h<a.length;h++)h===0&&e.push(o[0]),h===a.length-1&&n.push(o[h+1]),a[h]=[(1-r)*o[h][0]+r*o[h+1][0],(1-r)*o[h][1]+r*o[h+1][1]];s(a,r)}}return t.length&&s(t,i),{left:e,right:n.reverse()}}function Ei(t){var i={};return t.length===4&&(i.x2=t[2][0],i.y2=t[2][1]),t.length>=3&&(i.x1=t[1][0],i.y1=t[1][1]),i.x=t[t.length-1][0],i.y=t[t.length-1][1],t.length===4?i.type="C":t.length===3?i.type="Q":i.type="L",i}function Di(t,i){i=i||2;for(var e=[],n=t,s=1/i,o=0;o<i-1;o++){var r=s/(1-s*o),a=ji(n,r);e.push(a.left),n=a.right}return e.push(n),e}function Ri(t,i,e){var n=[[t.x,t.y]];return i.x1!=null&&n.push([i.x1,i.y1]),i.x2!=null&&n.push([i.x2,i.y2]),n.push([i.x,i.y]),Di(n,e).map(Ei)}var $i=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,A={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(A).forEach(function(t){A[t.toLowerCase()]=A[t]});function et(t,i){for(var e=Array(t),n=0;n<t;n++)e[n]=i;return e}function Bi(t){return"".concat(t.type).concat(A[t.type].map(function(i){return t[i]}).join(","))}function Li(t,i){var e={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==i.type&&i.type.toUpperCase()!=="M"){var s={};Object.keys(i).forEach(function(o){var r=i[o],a=t[o];a===void 0&&(n.includes(o)?a=r:(a===void 0&&e[o]&&(a=t[e[o]]),a===void 0&&(a=0))),s[o]=a}),s.type=i.type,t=s}return t}function Hi(t,i,e){var n=[];if(i.type==="L"||i.type==="Q"||i.type==="C")n=n.concat(Ri(t,i,e));else{var s=z({},t);s.type==="M"&&(s.type="L"),n=n.concat(et(e-1).map(function(){return s})),n.push(i)}return n}function wt(t,i,e){var n=t.length-1,s=i.length-1,o=n/s,r=et(s).reduce(function(h,u,_){var l=Math.floor(o*_);if(e&&l<t.length-1&&e(t[l],t[l+1])){var c=o*_%1<.5;h[l]&&(c?l>0?l-=1:l<t.length-1&&(l+=1):l<t.length-1?l+=1:l>0&&(l-=1))}return h[l]=(h[l]||0)+1,h},[]),a=r.reduce(function(h,u,_){if(_===t.length-1){var l=et(u,z({},t[t.length-1]));return l[0].type==="M"&&l.forEach(function(c){c.type="L"}),h.concat(l)}return h.concat(Hi(t[_],t[_+1],u))},[]);return a.unshift(t[0]),a}function Mt(t){for(var i=(t||"").match($i)||[],e=[],n,s,o=0;o<i.length;++o)if(n=A[i[o]],n){s={type:i[o]};for(var r=0;r<n.length;++r)s[n[r]]=+i[o+r+1];o+=n.length,e.push(s)}return e}function Fi(t,i,e){var n=t==null?[]:t.slice(),s=i==null?[]:i.slice(),o=R(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return[]};var h=(n.length===0||n[n.length-1].type==="Z")&&(s.length===0||s[s.length-1].type==="Z");n.length>0&&n[n.length-1].type==="Z"&&n.pop(),s.length>0&&s[s.length-1].type==="Z"&&s.pop(),n.length?s.length||s.push(n[0]):n.push(s[0]);var u=Math.abs(s.length-n.length);u!==0&&(s.length>n.length?n=wt(n,s,r):s.length<n.length&&(s=wt(s,n,r))),n=n.map(function(l,c){return Li(l,s[c])});var _=n.map(function(l){return Ni({},l)});return h&&(_.push({type:"Z"}),n.push({type:"Z"})),function(c){if(c===1&&a)return i??[];if(c===0)return n;for(var d=0;d<_.length;++d){var x=n[d],m=s[d],f=_[d],y=ni(A[f.type]),v;try{for(y.s();!(v=y.n()).done;){var p=v.value;f[p]=(1-c)*x[p]+c*m[p],(p==="largeArcFlag"||p==="sweepFlag")&&(f[p]=Math.round(f[p]))}}catch(b){y.e(b)}finally{y.f()}}return _}}function si(t,i,e){var n=Mt(t),s=Mt(i),o=R(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return""};var h=Fi(n,s,{excludeSegment:r,snapEndsToInput:a});return function(_){if(_===1&&a)return i??"";var l=h(_),c="",d=ni(l),x;try{for(d.s();!(x=d.n()).done;){var m=x.value;c+=Bi(m)}}catch(f){d.e(f)}finally{d.f()}return c}}var g;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(g||(g={}));const nt={[g.Basis]:ui,[g.BasisClosed]:fi,[g.BasisOpen]:pi,[g.Bundle]:yi,[g.Cardinal]:vi,[g.CardinalClosed]:di,[g.CardinalOpen]:xi,[g.CatmullRom]:gi,[g.CatmullRomClosed]:bi,[g.CatmullRomOpen]:mi,[g.Linear]:ct,[g.LinearClosed]:ki,[g.MonotoneX]:Si,[g.MonotoneY]:wi,[g.Natural]:Mi,[g.Step]:Ti,[g.StepAfter]:Pi,[g.StepBefore]:Oi},Ii=Object.assign(Object.assign({},Tt),{curveType:g.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),Xi=Ot`
|
|
3
3
|
:root {
|
|
4
4
|
--vis-line-cursor: default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as y,M as q,N as g,O as m,P as k,c as v,Q as B,R as C,S as _,T as u,_ as d,C as e,U as c,V as h,W as b}from"./
|
|
1
|
+
import{L as y,M as q,N as g,O as m,P as k,c as v,Q as B,R as C,S as _,T as u,_ as d,C as e,U as c,V as h,W as b}from"./p9l1LjVc.js";const M=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(p){const a=p,{t:n}=y(),i=q(),o=g(),f=m(k(a,"icon")),l=v({get(){return i.value==="dark"},set(r){i.preference=r?"dark":"light"}});return(r,t)=>(C(),B(b,h({...e(f),"aria-label":l.value?e(n)("colorMode.switchToLight"):e(n)("colorMode.switchToDark"),...r.$attrs},{onClick:t[0]||(t[0]=s=>l.value=!l.value)}),{leading:_(({ui:s})=>[u(d,{class:c(s.leadingIcon({class:[a.ui?.leadingIcon,"hidden dark:inline-block"]})),name:e(o).ui.icons.dark},null,8,["class","name"]),u(d,{class:c(s.leadingIcon({class:[a.ui?.leadingIcon,"dark:hidden"]})),name:e(o).ui.icons.light},null,8,["class","name"])]),_:1},16))}});export{M as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a8 as l,a6 as s}from"./p9l1LjVc.js";function t(r,i){return l(r)?!1:Array.isArray(r)?r.some(a=>s(a,i)):s(r,i)}export{t as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as h,a0 as x}from"./p9l1LjVc.js";function V(a){const e=h("",1e3);return{search:e,handleTypeaheadSearch:(s,d)=>{e.value=e.value+s;{const o=x(),c=d.map(t=>({...t,textValue:t.value?.textValue??t.ref.textContent?.trim()??""})),u=c.find(t=>t.ref===o),n=c.map(t=>t.textValue),i=m(n,e.value,u?.textValue),f=c.find(t=>t.textValue===i);return f&&f.ref.focus(),f?.ref}},resetTypeahead:()=>{e.value=""}}}function p(a,e){return a.map((r,l)=>a[(e+l)%a.length])}function m(a,e,r){const s=e.length>1&&Array.from(e).every(n=>n===e[0])?e[0]:e,d=r?a.indexOf(r):-1;let o=p(a,Math.max(d,0));s.length===1&&(o=o.filter(n=>n!==r));const u=o.find(n=>n.toLowerCase().startsWith(s.toLowerCase()));return u!==r?u:void 0}export{m as g,V as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as r,c,G as n,R as p,a4 as u,U as m,al as s}from"./p9l1LjVc.js";const i={base:"list-decimal ps-6 my-5 marker:text-muted"},_={__name:"ProseOl",props:{class:{type:null,required:!1}},setup(e){const a=e,t=r(),l=c(()=>s({extend:s(i),...t.ui?.prose?.ol||{}}));return(o,d)=>(p(),n("ol",{class:m(l.value({class:a.class}))},[u(o.$slots,"default")],2))}};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as X}from"./CYjcQPl-.js";import{a as H,e as $,Q as x,R as u,S as r,ab as p,a9 as q,ae as V,aa as I,an as ce,C as t,af as Y,ao as ge,N as me,aF as fe,aw as pe,c as Z,al as Q,aG as ve,f as be,q as ee,a4 as L,G as C,V as W,U as A,_ as P,ax as ye,a3 as he,aH as ke,k as xe,am as _e,ag as te,T as d,W as ae,ak as G,ai as J,aj as K,n as ze}from"./p9l1LjVc.js";import{_ as we,a as $e}from"./CflRLvFC.js";import{_ as Ie}from"./BrEXdify.js";import{_ as Ce}from"./DdPA4eTX.js";import{_ as qe}from"./5UFq_rDn.js";import{_ as Se}from"./BXxYdXMr.js";import{u as Ve}from"./CZ32KfaS.js";import{_ as Be}from"./ApfLnl06.js";import"./C5I-XBZT.js";import"./UO2Y9Nve.js";import"./C2ANDZen.js";import"./D_vK6VPK.js";import"./BlPToGni.js";import"./YGWAImQo.js";import"./BhrzKbv9.js";import"./CM2phu_3.js";import"./B4u7Mczo.js";const Ue={class:"flex items-start justify-between gap-3"},Ne={class:"flex-1 min-w-0"},Te={class:"flex items-center gap-2 mb-1"},Fe={class:"font-medium text-sm truncate"},Ae={class:"text-xs text-muted line-clamp-2"},Me={class:"flex items-center gap-2 mt-3"},De={class:"text-xs text-dimmed ml-auto"},Oe=H({__name:"Card",props:{skill:{}},emits:["toggle"],setup(l,{emit:_}){const z=l,e=_,f=$(!1);async function b(){f.value=!0,e("toggle",z.skill.name),f.value=!1}return(c,s)=>{const g=Ce,y=qe,B=Y;return u(),x(B,{to:`/skills/${l.skill.name}`,class:"block p-4 rounded-lg border border-default bg-elevated/50 hover:bg-elevated transition-colors"},{default:r(()=>[p("div",Ue,[p("div",Ne,[p("div",Te,[p("span",Fe,V(l.skill.name),1),l.skill.core?(u(),x(g,{key:0,variant:"subtle",color:"primary",size:"xs"},{default:r(()=>[...s[1]||(s[1]=[I(" Core ",-1)])]),_:1})):q("",!0),l.skill.active?q("",!0):(u(),x(g,{key:1,variant:"subtle",color:"neutral",size:"xs"},{default:r(()=>[...s[2]||(s[2]=[I(" Disabled ",-1)])]),_:1}))]),p("p",Ae,V(l.skill.description),1)]),l.skill.core?q("",!0):(u(),x(y,{key:0,"model-value":l.skill.active,size:"sm",loading:t(f),"onUpdate:modelValue":b,onClick:s[0]||(s[0]=ce(()=>{},["prevent","stop"]))},null,8,["model-value","loading"]))]),p("div",Me,[l.skill.version?(u(),x(g,{key:0,variant:"soft",color:"neutral",size:"xs"},{default:r(()=>[I(" v"+V(l.skill.version),1)]),_:1})):q("",!0),l.skill.author?(u(),x(g,{key:1,variant:"soft",color:"neutral",size:"xs"},{default:r(()=>[I(V(l.skill.author),1)]),_:1})):q("",!0),p("span",De,V(l.skill.fileCount)+" file"+V(l.skill.fileCount!==1?"s":""),1)])]),_:1},8,["to"])}}}),je=Object.assign(Oe,{__name:"SkillsCard"}),Re={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute start-0 flex items-start",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute end-0 flex items-start",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2 inset-y-1",trailing:"pe-2 inset-y-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},autoresize:{true:{base:"resize-none"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Le=["id","value","name","rows","placeholder","disabled","required"],Pe=Object.assign({inheritAttrs:!1},{__name:"UTextarea",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},autoresize:{type:Boolean,required:!1},autoresizeDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},rows:{type:Number,required:!1,default:3},maxrows:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(l,{expose:_,emit:z}){const e=l,f=z,b=ge(),c=Ve(e,"modelValue",f,{defaultValue:e.defaultValue}),s=me(),{emitFormFocus:g,emitFormBlur:y,emitFormInput:B,emitFormChange:U,size:v,color:a,id:i,name:m,highlight:h,disabled:F,ariaAttrs:N}=fe(e,{deferInputValidation:!0}),{isLeading:T,isTrailing:k,leadingIconName:M,trailingIconName:D}=pe(e),n=Z(()=>Q({extend:Q(Re),...s.ui?.textarea||{}})({color:a.value,variant:e.variant,size:v?.value,loading:e.loading,highlight:h.value,autoresize:e.autoresize,leading:T.value||!!e.avatar||!!b.leading,trailing:k.value||!!b.trailing})),w=ve("textareaRef");function E(o){e.modelModifiers?.trim&&(o=o?.trim()??null),e.modelModifiers?.number&&(o=ke(o)),e.modelModifiers?.nullable&&(o||=null),e.modelModifiers?.optional&&(o||=void 0),c.value=o,B()}function ie(o){O(),e.modelModifiers?.lazy||E(o.target.value)}function le(o){const S=o.target.value;e.modelModifiers?.lazy&&E(S),e.modelModifiers?.trim&&(o.target.value=S.trim()),U(),f("change",o)}function se(o){y(),f("blur",o)}function ne(){e.autofocus&&w.value?.focus()}function O(){if(e.autoresize&&w.value){w.value.rows=e.rows;const o=w.value.style.overflow;w.value.style.overflow="hidden";const S=window.getComputedStyle(w.value),j=Number.parseInt(S.paddingTop),oe=Number.parseInt(S.paddingBottom),re=j+oe,ue=Number.parseInt(S.lineHeight),{scrollHeight:de}=w.value,R=(de-re)/ue;R>e.rows&&(w.value.rows=e.maxrows?Math.min(R,e.maxrows):R),w.value.style.overflow=o}}return be(c,()=>{xe(O)}),ee(()=>{setTimeout(()=>{ne()},e.autofocusDelay),setTimeout(()=>{O()},e.autoresizeDelay)}),_({textareaRef:w}),(o,S)=>(u(),x(t(he),{as:l.as,"data-slot":"root",class:A(n.value.root({class:[e.ui?.root,e.class]}))},{default:r(()=>[p("textarea",W({id:t(i),ref_key:"textareaRef",ref:w,value:t(c),name:t(m),rows:l.rows,placeholder:l.placeholder,"data-slot":"base",class:n.value.base({class:e.ui?.base}),disabled:t(F),required:l.required},{...o.$attrs,...t(N)},{onInput:ie,onBlur:se,onChange:le,onFocus:S[0]||(S[0]=(...j)=>t(g)&&t(g)(...j))}),null,16,Le),L(o.$slots,"default",{ui:n.value}),t(T)||l.avatar||b.leading?(u(),C("span",{key:0,"data-slot":"leading",class:A(n.value.leading({class:e.ui?.leading}))},[L(o.$slots,"leading",{ui:n.value},()=>[t(T)&&t(M)?(u(),x(P,{key:0,name:t(M),"data-slot":"leadingIcon",class:A(n.value.leadingIcon({class:e.ui?.leadingIcon}))},null,8,["name","class"])):l.avatar?(u(),x(ye,W({key:1,size:e.ui?.leadingAvatarSize||n.value.leadingAvatarSize()},l.avatar,{"data-slot":"leadingAvatar",class:n.value.leadingAvatar({class:e.ui?.leadingAvatar})}),null,16,["size","class"])):q("",!0)])],2)):q("",!0),t(k)||b.trailing?(u(),C("span",{key:1,"data-slot":"trailing",class:A(n.value.trailing({class:e.ui?.trailing}))},[L(o.$slots,"trailing",{ui:n.value},()=>[t(D)?(u(),x(P,{key:0,name:t(D),"data-slot":"trailingIcon",class:A(n.value.trailingIcon({class:e.ui?.trailingIcon}))},null,8,["name","class"])):q("",!0)])],2)):q("",!0)]),_:3},8,["as","class"]))}}),Ge={class:"space-y-4"},He={class:"flex gap-2"},Ee={key:0,class:"text-xs text-muted"},Qe={class:"flex justify-end gap-2"},We=H({__name:"CreateModal",props:{open:{type:Boolean}},emits:["update:open","created"],setup(l,{emit:_}){const z=l,e=_,f=_e(),b=te(),c=$("blank"),s=$(""),g=$(""),y=$(!1);function B(){c.value="blank",s.value="",g.value="",y.value=!1}function U(){e("update:open",!1),B()}async function v(){if(s.value.trim()){y.value=!0;try{if(c.value==="blank")await $fetch("/api/skills/create",{method:"POST",body:{name:s.value.trim(),description:g.value.trim()||void 0}}),b.add({title:`Skill '${s.value}' created`,color:"success"}),e("created",s.value.trim()),U(),f.push(`/skills/${s.value.trim()}`);else{if(!g.value.trim()){b.add({title:"Description is required for AI generation",color:"warning"}),y.value=!1;return}const a=await $fetch("/api/skills/generate",{method:"POST",body:{name:s.value.trim(),description:g.value.trim()}});b.add({title:`Skill '${s.value}' generated`,description:`Cost: $${a.data.costUsd.toFixed(4)} — created in inactive state for review`,color:"success"}),e("created",s.value.trim()),U(),f.push(`/skills/${s.value.trim()}`)}}catch(a){const i=a instanceof Error?a.message:"Failed to create skill";b.add({title:i,color:"error"})}finally{y.value=!1}}}return(a,i)=>{const m=ae,h=X,F=Se,N=Pe,T=Be;return u(),x(T,{open:z.open,"onUpdate:open":i[4]||(i[4]=k=>e("update:open",k))},{header:r(()=>[...i[5]||(i[5]=[p("span",{class:"font-semibold"},"Create Skill",-1)])]),body:r(()=>[p("div",Ge,[p("div",He,[d(m,{variant:t(c)==="blank"?"solid":"outline",color:"neutral",size:"sm",icon:"i-lucide-file-plus",onClick:i[0]||(i[0]=k=>c.value="blank")},{default:r(()=>[...i[6]||(i[6]=[I(" Blank Skill ",-1)])]),_:1},8,["variant"]),d(m,{variant:t(c)==="generate"?"solid":"outline",color:"neutral",size:"sm",icon:"i-lucide-sparkles",onClick:i[1]||(i[1]=k=>c.value="generate")},{default:r(()=>[...i[7]||(i[7]=[I(" AI Generate ",-1)])]),_:1},8,["variant"])]),d(F,{label:"Name"},{default:r(()=>[d(h,{modelValue:t(s),"onUpdate:modelValue":i[2]||(i[2]=k=>G(s)?s.value=k:null),placeholder:"my-skill",disabled:t(y),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),d(F,{label:"Description",required:t(c)==="generate"},{default:r(()=>[d(N,{modelValue:t(g),"onUpdate:modelValue":i[3]||(i[3]=k=>G(g)?g.value=k:null),placeholder:t(c)==="generate"?"Describe what this skill should do...":"Optional description",rows:3,disabled:t(y),class:"w-full"},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["required"]),t(c)==="generate"?(u(),C("p",Ee," AI-generated skills are created in an inactive state so you can review them before enabling. ")):q("",!0)])]),footer:r(()=>[p("div",Qe,[d(m,{variant:"ghost",color:"neutral",disabled:t(y),onClick:U},{default:r(()=>[...i[8]||(i[8]=[I(" Cancel ",-1)])]),_:1},8,["disabled"]),d(m,{loading:t(y),disabled:!t(s).trim(),onClick:v},{default:r(()=>[I(V(t(c)==="generate"?"Generate":"Create"),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["open"])}}}),Je=Object.assign(We,{__name:"SkillsCreateModal"}),Ke={class:"flex flex-1 min-w-0"},Xe={class:"p-4"},Ye={key:0,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},Ze={key:1,class:"flex flex-col items-center justify-center py-16 text-dimmed"},et={key:2,class:"text-center py-12 text-muted text-sm"},tt={key:3,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},kt=H({__name:"index",setup(l){const _=te(),z=$([]),e=$(!0),f=$(""),b=$(!1),c=$(!1),s=$(null),g=Z(()=>{if(!f.value.trim())return z.value;const v=f.value.toLowerCase();return z.value.filter(a=>a.name.toLowerCase().includes(v)||a.description.toLowerCase().includes(v))});async function y(){e.value=!0;try{const v=await $fetch("/api/skills");z.value=v.data}catch{_.add({title:"Failed to load skills",color:"error"})}finally{e.value=!1}}async function B(v){const a=v.target,i=a.files?.[0];if(i){c.value=!0;try{const m=new FormData;m.append("file",i);const h=await $fetch("/api/skills/import",{method:"POST",body:m});_.add({title:`Imported ${h.data.name}`,description:`${h.data.fileCount} file${h.data.fileCount===1?"":"s"}`,color:"success"}),ze(`/skills/${h.data.name}`)}catch(m){const h=m instanceof Error?m.message:"Import failed";_.add({title:"Import failed",description:h,color:"error"})}finally{c.value=!1,a.value=""}}}async function U(v){try{const a=await $fetch(`/api/skills/${v}/toggle`,{method:"POST"}),i=z.value.find(m=>m.name===v);i&&(i.active=a.data.active),_.add({title:`${v} ${a.data.active?"enabled":"disabled"}`,color:"success"})}catch{_.add({title:`Failed to toggle ${v}`,color:"error"})}}return ee(()=>y()),(v,a)=>{const i=X,m=ae,h=Y,F=$e,N=Ie,T=P,k=je,M=we,D=Je;return u(),C("div",Ke,[d(M,{id:"skills-main",grow:""},{header:r(()=>[d(F,{title:"Skills"},{right:r(()=>[d(i,{modelValue:t(f),"onUpdate:modelValue":a[0]||(a[0]=n=>G(f)?f.value=n:null),icon:"i-lucide-search",placeholder:"Search skills...",size:"sm",class:"w-48"},null,8,["modelValue"]),d(h,{to:"/skills/library"},{default:r(()=>[d(m,{icon:"i-lucide-library",variant:"ghost",color:"neutral",size:"sm"},{default:r(()=>[...a[4]||(a[4]=[I(" Library ",-1)])]),_:1})]),_:1}),d(m,{icon:"i-lucide-upload",variant:"ghost",color:"neutral",size:"sm",loading:t(c),onClick:a[1]||(a[1]=n=>t(s)?.click())},{default:r(()=>[...a[5]||(a[5]=[I(" Import ",-1)])]),_:1},8,["loading"]),p("input",{ref_key:"fileInput",ref:s,type:"file",accept:".zip",class:"hidden",onChange:B},null,544),d(m,{icon:"i-lucide-plus",size:"sm",onClick:a[2]||(a[2]=n=>b.value=!0)},{default:r(()=>[...a[6]||(a[6]=[I(" Create Skill ",-1)])]),_:1})]),_:1})]),body:r(()=>[p("div",Xe,[t(e)?(u(),C("div",Ye,[(u(),C(J,null,K(6,n=>p("div",{key:n,class:"p-4 rounded-lg border border-default bg-elevated/50"},[d(N,{class:"h-4 w-24 mb-2"}),d(N,{class:"h-3 w-full mb-1"}),d(N,{class:"h-3 w-2/3"})])),64))])):t(z).length===0?(u(),C("div",Ze,[d(T,{name:"i-lucide-puzzle",class:"size-12 mb-4"}),a[7]||(a[7]=p("p",{class:"text-lg font-medium"}," No skills found ",-1)),a[8]||(a[8]=p("p",{class:"text-sm mt-1"}," Skills are loaded from ~/.claude/skills/ ",-1))])):t(g).length===0?(u(),C("div",et,' No skills matching "'+V(t(f))+'" ',1)):(u(),C("div",tt,[(u(!0),C(J,null,K(t(g),n=>(u(),x(k,{key:n.name,skill:n,onToggle:U},null,8,["skill"]))),128))]))])]),_:1}),d(D,{open:t(b),"onUpdate:open":a[3]||(a[3]=n=>b.value=n),onCreated:y},null,8,["open"])])}}});export{kt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Hi,e as Fi,q as Vi,b1 as hs,F as ji,k as Pa,N as La,ay as Jd,c as he,O as za,P as $a,aP as We,aj as xr,bQ as Kn,Q as st,R as ve,S as jt,T as ur,C as ze,a2 as ii,U as kn,G as dr,ag as hr,ah as Jo,a9 as Gd,a7 as Ba,a3 as _a,V as nt,W as Jn,bM as Qd,bN as Xd,s as Yd,y as Zd,c7 as eh,b0 as th,h as nh,c8 as rh,f as sh,K as ih}from"./BxXOsXrM.js";import{S as oh}from"./Cdt3I3Go.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./Nb2jBtYT.js";import{_ as lh}from"./C0kh_F7v.js";import{_ as Go}from"./DznawRFW.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Qa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Qa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ya(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Xa(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Xa(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Xa(i.content,e-s-1,t-s-1)))}function Ya(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ya(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Qo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Qo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Qo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
1
|
+
import{a as Hi,e as Fi,q as Vi,b5 as hs,F as ji,k as Pa,N as La,aA as Jd,c as he,O as za,P as $a,aT as We,al as xr,b7 as Kn,Q as st,R as ve,S as jt,T as ur,C as ze,a3 as ii,U as kn,G as dr,ai as hr,aj as Jo,ab as Gd,a9 as Ba,a4 as _a,V as nt,W as Jn,bR as Qd,b9 as Xd,s as Yd,y as Zd,c7 as eh,b4 as th,h as nh,c8 as rh,f as sh,K as ih}from"./p9l1LjVc.js";import{S as oh}from"./DNE7kw9s.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./HOeKUnra.js";import{_ as lh}from"./C1T4GK6c.js";import{_ as Go}from"./B-2BuR5g.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Qa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Qa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ya(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Xa(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Xa(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Xa(i.content,e-s-1,t-s-1)))}function Ya(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ya(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Qo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Qo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Qo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
2
2
|
`)}}Nt.empty=new Nt(!0);class mh{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function rc(n){let e=[];do e.push(gh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function gh(n){let e=[];do e.push(yh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function yh(n){let e=xh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=kh(n,e);else break;return e}function Xo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function kh(n,e){let t=Xo(n),r=t;return n.eat(",")&&(n.next!="}"?r=Xo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function bh(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function xh(n){if(n.eat("(")){let e=rc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=bh(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function wh(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function sc(n,e){return e-n}function Yo(n,e){let t=[];return r(e),t.sort(sc);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function vh(n){let e=Object.create(null);return t(Yo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Yo(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Nt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(sc);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Sh(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ic(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function oc(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function lc(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function ac(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Th(n,r,e[r]);return t}let Zo=class cc{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ac(e,r.attrs),this.defaultAttrs=ic(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:oc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Me(this,this.computeAttrs(e),w.from(t),_.setFrom(r))}createChecked(e=null,t,r){return t=w.from(t),this.checkContent(t),new Me(this,this.computeAttrs(e),t,_.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=w.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(w.empty,!0);return i?new Me(this,e,t.append(i),_.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){lc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new cc(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ch(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Th{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ch(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class fs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=ac(e,s.attrs),this.excluded=null;let i=ic(this.attrs);this.instance=i?new _(this,i):null}create(e=null){return!e&&this.instance?this.instance:new _(this,oc(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new fs(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){lc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class uc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=ie.from(e.nodes),t.marks=ie.from(e.marks||{}),this.nodes=Zo.compile(this.spec.nodes,this),this.marks=fs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Nt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?el(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:el(this,o.split(" "))}this.nodeFromJSON=s=>Me.fromJSON(this,s),this.markFromJSON=s=>_.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Zo){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Tr(r,r.defaultAttrs,e,_.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function el(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Mh(n){return n.tag!=null}function Eh(n){return n.style!=null}class Ye{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Mh(s))this.tags.push(s);else if(Eh(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new nl(this,t,!1);return r.addAll(e,_.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new nl(this,t,!0);return r.addAll(e,_.none,t.from,t.to),M.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Nh(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ye(e,Ye.schemaRules(e)))}}const dc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ah={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hc={ol:!0,ul:!0},Rn=1,ai=2,xn=4;function tl(n,e,t){return e!=null?(e?Rn:0)|(e==="full"?ai:0):n&&n.whitespace=="pre"?Rn|ai:t&~xn}class Qn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=_.none,this.match=i||(o&xn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(w.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=w.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!dc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class nl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=tl(null,t.preserveWhitespace,0)|(r?xn:0);s?i=new Qn(s.type,s.attrs,_.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Qn(null,null,_.none,!0,null,o):i=new Qn(e.schema.topNodeType,null,_.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&ai?"full":this.localPreserveWS||(s.options&Rn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;hc.hasOwnProperty(o)&&this.parser.normalizeLists&&Oh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Ah.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(dc.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=_.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):sl(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=tl(e,i,o.options);o.options&xn&&o.content.length==0&&(l|=xn);let a=_.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):sl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Qn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Rn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Oh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Nh(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function rl(n){let e={};for(let t in n)e[t]=n[t];return e}function sl(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class zt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ds(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=fr(Ds(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&fr(Ds(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return fr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=il(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return il(e.marks)}}function il(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ds(n){return n.document||window.document}const ol=new WeakMap;function Rh(n){let e=ol.get(n);return e===void 0&&ol.set(n,e=Ih(n)),e}function Ih(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function fr(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Rh(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?a.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=fr(n,h,t,r);if(a.appendChild(f),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const fc=65535,pc=Math.pow(2,16);function Dh(n,e){return n+e*pc}function ll(n){return n&fc}function Ph(n){return(n-(n&fc))/pc}const mc=1,gc=2,pr=4,yc=8;class ci{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&yc)>0}get deletedBefore(){return(this.delInfo&(mc|pr))>0}get deletedAfter(){return(this.delInfo&(gc|pr))>0}get deletedAcross(){return(this.delInfo&pr)>0}}class be{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&be.empty)return be.empty}recover(e){let t=0,r=ll(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Ph(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let h=c?e==a?-1:e==d?1:t:t,f=a+s+(h<0?0:u);if(r)return f;let p=e==(t<0?a:d)?null:Dh(l/3,e-a),g=e==a?gc:e==d?mc:pr;return(t<0?e!=a:e!=d)&&(g|=yc),new ci(f,g,p)}s+=u-c}return r?e+s:new ci(e+s,0,null)}touches(e,t){let r=0,s=ll(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new be(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?be.empty:new be(e<0?[0,-e,0]:[0,0,e])}}be.empty=new be([]);class In{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new In(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new In;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ci(e,s,null)}}const Ps=Object.create(null);class ue{getMap(){return be.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ps[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Ps)throw new RangeError("Duplicate use of step JSON ID "+e);return Ps[e]=t,t.prototype.jsonID=e,t}}class Q{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Q(e,null)}static fail(e){return new Q(null,e)}static fromReplace(e,t,r,s){try{return Q.ok(e.replace(t,r,s))}catch(i){if(i instanceof vr)return Q.fail(i.message);throw i}}}function qi(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(qi(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return w.fromArray(r)}class dt extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new M(qi(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return Q.fromReplace(e,this.from,this.to,i)}invert(){return new Re(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new dt(t.pos,r.pos,this.mark)}merge(e){return e instanceof dt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dt(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("addMark",dt);class Re extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new M(qi(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return Q.fromReplace(e,this.from,this.to,r)}invert(){return new dt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Re(t.pos,r.pos,this.mark)}merge(e){return e instanceof Re&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Re(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Re(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("removeMark",Re);class ht extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Q.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new ht(this.pos,t.marks[s]);return new ht(this.pos,this.mark)}}return new Rt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ht(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ht(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("addNodeMark",ht);class Rt extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Q.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ht(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Rt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Rt(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("removeNodeMark",Rt);class te extends ue{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ui(e,this.from,this.to)?Q.fail("Structure replace would overwrite content"):Q.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new be([this.from,this.to-this.from,this.slice.size])}invert(e){return new te(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new te(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof te)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new te(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new te(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new te(t.from,t.to,M.fromJSON(e,t.slice),!!t.structure)}}ue.jsonID("replace",te);class re extends ue{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ui(e,this.from,this.gapFrom)||ui(e,this.gapTo,this.to)))return Q.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Q.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Q.fromReplace(e,this.from,this.to,r):Q.fail("Content does not fit in gap")}getMap(){return new be([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new re(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new re(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new re(t.from,t.to,t.gapFrom,t.gapTo,M.fromJSON(e,t.slice),t.insert,!!t.structure)}}ue.jsonID("replaceAround",re);function ui(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Lh(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==h&&o.mark.eq(d[g])?o.to=f:s.push(o=new Re(h,f,d[g])));l&&l.to==h?l.to=f:i.push(l=new dt(h,f,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function zh(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof fs){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],h;for(let f=0;f<s.length;f++){let p=s[f];p.step==i-1&&d.eq(s[f].style)&&(h=p)}h?(h.to=c,h.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Re(o.from,o.to,o.style)))}function Ui(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new te(l,u,M.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new Re(l,u,c.marks[h]));if(s&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new M(w.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new te(l+h.index,l+h.index+h[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(w.empty,!0);n.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function $h(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function sn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!$h(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Bh(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=w.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=w.from(r.node(p).copy(u)),d++):a--;let h=w.empty,f=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,h=w.from(s.node(p).copy(h)),f++):c++;n.step(new re(a,c,o,l,new M(u.append(h),d,f),u.size-d,!0))}function Wi(n,e,t=null,r=n){let s=_h(n,e),i=s&&Hh(r,e);return i?s.map(al).concat({type:e,attrs:t}).concat(i.map(al)):null}function al(n){return{type:n,attrs:null}}function _h(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Hh(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Fh(n,e,t){let r=w.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new re(s,i,s,i,new M(r,0,0),t.length,!0))}function Vh(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&jh(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&bc(n,o,l,i),Ui(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),h=u.map(l+o.nodeSize,1);return n.step(new re(d,h,d+1,h-1,new M(w.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&kc(n,o,l,i),!1}})}function kc(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function bc(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./
|
|
1
|
+
import{a as g}from"./CZ32KfaS.js";import{L as b,N as v,c as h,G as n,R as c,a9 as x,T as u,ab as d,U as r,ae as q,C as o,W as C,a4 as k,V as S,al as p}from"./p9l1LjVc.js";import $ from"./C2RZSTuy.js";const w={slots:{root:"relative my-5 group",header:"flex items-center gap-1.5 border border-muted bg-default border-b-0 relative rounded-t-md px-4 py-3",filename:"text-default text-sm/6",icon:"size-4 shrink-0",copy:"absolute top-[11px] right-[11px] lg:opacity-0 lg:group-hover:opacity-100 transition",base:"group font-mono text-sm/6 border border-muted bg-muted rounded-md px-4 py-3 whitespace-pre-wrap break-words overflow-x-auto focus:outline-none"},variants:{filename:{true:{root:"[&>pre]:rounded-t-none [&>pre]:my-0 my-5"}}}},P={__name:"ProsePre",props:{icon:{type:null,required:!1},code:{type:String,required:!1},language:{type:String,required:!1},filename:{type:String,required:!1},highlights:{type:Array,required:!1},hideHeader:{type:Boolean,required:!1},meta:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(a){const e=a,{t:m}=b(),{copy:f,copied:y}=g(),l=v(),s=h(()=>p({extend:p(w),...l.ui?.prose?.pre||{}})());return(t,i)=>(c(),n("div",{class:r(s.value.root({class:[e.ui?.root],filename:!!a.filename}))},[a.filename&&!a.hideHeader?(c(),n("div",{key:0,class:r(s.value.header({class:e.ui?.header}))},[u($,{icon:a.icon,filename:a.filename,class:r(s.value.icon({class:e.ui?.icon}))},null,8,["icon","filename","class"]),d("span",{class:r(s.value.filename({class:e.ui?.filename}))},q(a.filename),3)],2)):x("",!0),u(C,{icon:o(y)?o(l).ui.icons.copyCheck:o(l).ui.icons.copy,color:"neutral",variant:"outline",size:"sm","aria-label":o(m)("prose.pre.copy"),class:r(s.value.copy({class:e.ui?.copy})),tabindex:"-1",onClick:i[0]||(i[0]=B=>o(f)(e.code||""))},null,8,["icon","aria-label","class"]),d("pre",S({class:s.value.base({class:[e.ui?.base,e.class]})},t.$attrs),[k(t.$slots,"default")],16)],2))}};export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as L,C as t,a as V,a_ as oe,Q as _,R as c,S as h,T as F,a3 as W,V as T,a4 as I,a6 as ct,aR as Ie,aP as je,a1 as De,aS as Fe,e as H,aQ as Le,f as Ge,bn as Ke,a9 as N,k as pe,$ as tt,bm as qe,an as Ae,b_ as ft,q as fe,a2 as Re,b$ as vt,bo as mt,ao as at,bA as gt,ai as ie,E as ht,a0 as bt,G,aj as Pe,au as lt,aV as yt,h as _t,ak as it,O as xt,bG as Ct,aN as _e,aJ as ot,bf as qt,aa as ye,ae as de,aO as Ee,b6 as It,aq as We,ar as St,L as wt,N as kt,aI as zt,aK as Lt,aC as he,aT as Ve,aF as Et,av as Ft,aw as At,al as Ye,b7 as Bt,Y as be,c0 as Tt,aG as Vt,U as z,ab as ze,_ as Oe,ax as Qe,bV as Ot,bW as Je,D as Kt,aH as Pt}from"./p9l1LjVc.js";import{a as $t,u as Dt,F as Rt}from"./CM2phu_3.js";import{c as Nt,a as Mt,b as Ht,P as Gt}from"./HOeKUnra.js";import{u as rt}from"./DAIbdyS6.js";import{f as $e}from"./mQkFCz_M.js";import{u as jt}from"./C2ANDZen.js";import{u as Ut,g as Wt}from"./BKaRtCjP.js";import{g as Yt,M as Qt}from"./DAE2hbP7.js";import{V as Jt}from"./D_vK6VPK.js";import{u as Se}from"./YGWAImQo.js";import{u as Xt}from"./BF7413u4.js";import{c as Xe}from"./CZ32KfaS.js";import{g as Zt}from"./CrZGoMo_.js";import{_ as ea}from"./CYjcQPl-.js";function st(s){const r=L(()=>t(s)),a=L(()=>new Intl.Collator("en",{usage:"search",...r.value}));return{startsWith:(u,p)=>p.length===0?!0:(u=u.normalize("NFC"),p=p.normalize("NFC"),a.value.compare(u.slice(0,p.length),p)===0),endsWith:(u,p)=>p.length===0?!0:(u=u.normalize("NFC"),p=p.normalize("NFC"),a.value.compare(u.slice(-p.length),p)===0),contains:(u,p)=>{if(p.length===0)return!0;u=u.normalize("NFC"),p=p.normalize("NFC");let v=0;const k=p.length;for(;v+k<=u.length;v++){const C=u.slice(v,v+k);if(a.value.compare(p,C)===0)return!0}return!1}}}function ta(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}var aa=V({__name:"ComboboxAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const{forwardRef:r}=oe();return(a,e)=>(c(),_(t(Nt),{"as-child":"",reference:a.reference},{default:h(()=>[F(t(W),T({ref:t(r),"as-child":a.asChild,as:a.as},a.$attrs),{default:h(()=>[I(a.$slots,"default")]),_:3},16,["as-child","as"])]),_:3},8,["reference"]))}}),la=aa;function Ze(s){return s?.querySelector("[data-state=checked]")}function ia(s,r,a){return s===void 0?!1:Array.isArray(s)?s.some(e=>ce(e,r,a)):ce(s,r,a)}function ce(s,r,a){return s===void 0||r===void 0?!1:typeof s=="string"?s===r:typeof a=="function"?a(s,r):typeof a=="string"?s?.[a]===r?.[a]:ct(s,r)}const[Be,oa]=Ie("ListboxRoot");var ra=V({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(s,{expose:r,emit:a}){const e=s,l=a,{multiple:i,highlightOnHover:u,orientation:p,disabled:v,selectionBehavior:k,dir:C}=je(e),{getItems:S}=De({isProvider:!0}),{handleTypeaheadSearch:f}=Ut(),{primitiveElement:m,currentElement:n}=Fe(),q=ta(),D=rt(C),P=jt(n),M=H(),Y=H(!1),j=H(!0),w=Le(e,"modelValue",l,{defaultValue:e.defaultValue??(i.value?[]:void 0),passive:e.modelValue===void 0,deep:!0});function xe(d){if(Y.value=!0,e.multiple){const y=Array.isArray(w.value)?[...w.value]:[],x=y.findIndex(E=>ce(E,d,e.by));e.selectionBehavior==="toggle"?(x===-1?y.push(d):y.splice(x,1),w.value=y):(w.value=[d],M.value=d)}else e.selectionBehavior==="toggle"&&ce(w.value,d,e.by)?w.value=void 0:w.value=d;setTimeout(()=>{Y.value=!1},1)}const O=H(null),se=H(null),Q=H(!1),ee=H(!1),ne=Ke(),ve=Ke(),J=Ke();function te(){return S().map(d=>d.ref).filter(d=>d.dataset.disabled!=="")}function R(d,y=!0){if(!d)return;O.value=d,j.value&&O.value.focus(),y&&O.value.scrollIntoView({block:"nearest"});const x=S().find(E=>E.ref===d);l("highlight",x)}function A(d){if(Q.value)J.trigger(d);else{const y=S().find(x=>ce(x.value,d,e.by));y&&(O.value=y.ref,R(y.ref))}}function X(d){O.value&&O.value.isConnected&&(d.preventDefault(),d.stopPropagation(),ee.value||O.value.click())}function Z(d){if(j.value){if(Y.value=!0,Q.value)ve.trigger(d);else{const y=d.altKey||d.ctrlKey||d.metaKey;if(y&&d.key==="a"&&i.value){const x=S(),E=x.map(ue=>ue.value);w.value=[...E],d.preventDefault(),R(x[x.length-1].ref)}else if(!y){const x=f(d.key,S());x&&R(x)}}setTimeout(()=>{Y.value=!1},1)}}function ae(){ee.value=!0}function me(){pe(()=>{ee.value=!1})}function le(){pe(()=>{const d=new KeyboardEvent("keydown",{key:"PageUp"});Ce(d)})}function g(d){const y=O.value;y?.isConnected&&(se.value=y),O.value=null,l("leave",d)}function Ne(d){const y=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(d.currentTarget?.dispatchEvent(y),l("entryFocus",y),!y.defaultPrevented)if(se.value)R(se.value);else{const x=te()?.[0];R(x)}}function Ce(d){const y=Yt(d,p.value,D.value);if(!y)return;let x=te();if(O.value){if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const E=x.indexOf(O.value);x=x.slice(E+1)}we(d,x[0])}if(x.length){const E=!O.value&&y==="prev"?x.length-1:0;R(x[E])}if(Q.value)return ve.trigger(d)}function we(d,y){if(!(Q.value||e.selectionBehavior!=="replace"||!i.value||!Array.isArray(w.value)||(d.altKey||d.ctrlKey||d.metaKey)&&!d.shiftKey)&&d.shiftKey){const E=S().filter(ge=>ge.ref.dataset.disabled!=="");let ue=E.find(ge=>ge.ref===y)?.value;if(d.key===q.END?ue=E[E.length-1].value:d.key===q.HOME&&(ue=E[0].value),!ue||!M.value)return;const Me=$e(E.map(ge=>ge.value),M.value,ue);w.value=Me}}async function ke(d){if(await pe(),Q.value)ne.trigger(d);else{const y=te(),x=y.find(E=>E.dataset.state==="checked");x?R(x):y.length&&R(y[0])}}return Ge(w,()=>{Y.value||pe(()=>{ke()})},{immediate:!0,deep:!0}),r({highlightedElement:O,highlightItem:A,highlightFirstItem:le,highlightSelected:ke,getItems:S}),oa({modelValue:w,onValueChange:xe,multiple:i,orientation:p,dir:D,disabled:v,highlightOnHover:u,highlightedElement:O,isVirtual:Q,virtualFocusHook:ne,virtualKeydownHook:ve,virtualHighlightHook:J,by:e.by,firstValue:M,selectionBehavior:k,focusable:j,onLeave:g,onEnter:Ne,changeHighlight:R,onKeydownEnter:X,onKeydownNavigation:Ce,onKeydownTypeAhead:Z,onCompositionStart:ae,onCompositionEnd:me,highlightFirstItem:le}),(d,y)=>(c(),_(t(W),{ref_key:"primitiveElement",ref:m,as:d.as,"as-child":d.asChild,dir:t(D),"data-disabled":t(v)?"":void 0,onPointerleave:g,onFocusout:y[0]||(y[0]=async x=>{const E=x.relatedTarget||x.target;await pe(),O.value&&t(n)&&!t(n).contains(E)&&g(x)})},{default:h(()=>[I(d.$slots,"default",{modelValue:t(w)}),t(P)&&d.name?(c(),_(t(Jt),{key:0,name:d.name,value:t(w),disabled:t(v),required:d.required},null,8,["name","value","disabled","required"])):N("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),sa=ra,na=V({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const{CollectionSlot:r}=De(),a=Be(),e=tt(!1,10);return(l,i)=>(c(),_(t(r),null,{default:h(()=>[F(t(W),{role:"listbox",as:l.as,"as-child":l.asChild,tabindex:t(a).focusable.value?t(a).highlightedElement.value?"-1":"0":"-1","aria-orientation":t(a).orientation.value,"aria-multiselectable":!!t(a).multiple.value,"data-orientation":t(a).orientation.value,onMousedown:i[0]||(i[0]=Ae(u=>e.value=!0,["left"])),onFocus:i[1]||(i[1]=u=>{t(e)||t(a).onEnter(u)}),onKeydown:[i[2]||(i[2]=qe(u=>{t(a).orientation.value==="vertical"&&(u.key==="ArrowLeft"||u.key==="ArrowRight")||t(a).orientation.value==="horizontal"&&(u.key==="ArrowUp"||u.key==="ArrowDown")||(u.preventDefault(),t(a).focusable.value&&t(a).onKeydownNavigation(u))},["down","up","left","right","home","end"])),qe(t(a).onKeydownEnter,["enter"]),t(a).onKeydownTypeAhead]},{default:h(()=>[I(l.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),ua=na,da=V({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(s,{emit:r}){const a=s,l=Le(a,"modelValue",r,{defaultValue:"",passive:a.modelValue===void 0}),i=Be(),{primitiveElement:u,currentElement:p}=Fe(),v=L(()=>a.disabled||i.disabled.value||!1),k=H();return ft(()=>k.value=i.highlightedElement.value?.id),fe(()=>{i.focusable.value=!1,setTimeout(()=>{a.autoFocus&&p.value?.focus()},1)}),Re(()=>{i.focusable.value=!0}),(C,S)=>(c(),_(t(W),{ref_key:"primitiveElement",ref:u,as:C.as,"as-child":C.asChild,value:t(l),disabled:v.value?"":void 0,"data-disabled":v.value?"":void 0,"aria-disabled":v.value??void 0,"aria-activedescendant":k.value,type:"text",onKeydown:[qe(Ae(t(i).onKeydownNavigation,["prevent"]),["down","up","home","end"]),qe(t(i).onKeydownEnter,["enter"])],onInput:S[0]||(S[0]=f=>{l.value=f.target.value,t(i).highlightFirstItem()}),onCompositionstart:t(i).onCompositionStart,onCompositionend:t(i).onCompositionEnd},{default:h(()=>[I(C.$slots,"default",{modelValue:t(l)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onKeydown","onCompositionstart","onCompositionend"]))}}),pa=da;const[ml,ca]=Ie("ListboxGroup");var fa=V({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const r=s,a=Se(void 0,"reka-listbox-group");return ca({id:a}),(e,l)=>(c(),_(t(W),T({role:"group"},r,{"aria-labelledby":t(a)}),{default:h(()=>[I(e.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),va=fa;const ma="listbox.select",[ga,ha]=Ie("ListboxItem");var ba=V({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(s,{emit:r}){const a=s,e=r,l=Se(void 0,"reka-listbox-item"),{CollectionItem:i}=De(),{forwardRef:u,currentElement:p}=oe(),v=Be(),k=L(()=>p.value===v.highlightedElement.value),C=L(()=>ia(v.modelValue.value,a.value,v.by)),S=L(()=>v.disabled.value||a.disabled);async function f(n){e("select",n),!n?.defaultPrevented&&!S.value&&n&&(v.onValueChange(a.value),v.changeHighlight(p.value))}function m(n){const q={originalEvent:n,value:a.value};mt(ma,f,q)}return ha({isSelected:C}),(n,q)=>(c(),_(t(i),{value:n.value},{default:h(()=>[vt([k.value,C.value],()=>F(t(W),T({id:t(l)},n.$attrs,{ref:t(u),role:"option",tabindex:t(v).focusable.value?k.value?"0":"-1":-1,"aria-selected":C.value,as:n.as,"as-child":n.asChild,disabled:S.value?"":void 0,"data-disabled":S.value?"":void 0,"data-highlighted":k.value?"":void 0,"data-state":C.value?"checked":"unchecked",onClick:m,onKeydown:qe(Ae(m,["prevent"]),["space"]),onPointermove:q[0]||(q[0]=()=>{t(v).highlightedElement.value!==t(p)&&t(v).highlightOnHover.value&&!t(v).focusable.value&&t(v).changeHighlight(t(p),!1)})}),{default:h(()=>[I(n.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),q,1)]),_:3},8,["value"]))}}),ya=ba,_a=V({__name:"ListboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const r=s;oe();const a=ga();return(e,l)=>t(a).isSelected.value?(c(),_(t(W),T({key:0,"aria-hidden":"true"},r),{default:h(()=>[I(e.$slots,"default")]),_:3},16)):N("v-if",!0)}}),xa=_a,Ca=V({__name:"ListboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(s){const r=s,a=at(),e=Be(),l=gt(),{getItems:i}=De();e.isVirtual.value=!0;const u=L(()=>{const f=l.value;if(f){const m=window.getComputedStyle(f);return{start:Number.parseFloat(m.paddingBlockStart||m.paddingTop),end:Number.parseFloat(m.paddingBlockEnd||m.paddingBottom)}}else return{start:0,end:0}}),p=Xt({get scrollPaddingStart(){return u.value.start},get scrollPaddingEnd(){return u.value.end},get count(){return r.options.length},get horizontal(){return e.orientation.value==="horizontal"},estimateSize(){return r.estimateSize??28},getScrollElement(){return l.value},overscan:r.overscan??12}),v=L(()=>p.value.getVirtualItems().map(f=>{const m=a.default({option:r.options[f.index],virtualizer:p.value,virtualItem:f})[0],n=m.type===ie&&Array.isArray(m.children)?m.children[0]:m;return{item:f,is:ht(n,{key:`${f.key}`,"data-index":f.index,"aria-setsize":r.options.length,"aria-posinset":f.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${f.start}px)`,overflowAnchor:"none"}})}}));e.virtualFocusHook.on(f=>{const m=r.options.findIndex(n=>Array.isArray(e.modelValue.value)?ce(n,e.modelValue.value[0],e.by):ce(n,e.modelValue.value,e.by));m!==-1?(f?.preventDefault(),p.value.scrollToIndex(m,{align:"start"}),requestAnimationFrame(()=>{const n=Ze(l.value);n&&(e.changeHighlight(n),f&&n?.focus())})):e.highlightFirstItem()}),e.virtualHighlightHook.on(f=>{const m=r.options.findIndex(n=>ce(n,f,e.by));p.value.scrollToIndex(m,{align:"start"}),requestAnimationFrame(()=>{const n=Ze(l.value);n&&e.changeHighlight(n)})});const k=tt("",1e3),C=L(()=>{const f=m=>r.textContent?r.textContent(m):m?.toString().toLowerCase();return r.options.map((m,n)=>({index:n,textContent:f(m)}))});function S(f,m){if(!e.firstValue?.value||!e.multiple.value||!Array.isArray(e.modelValue.value))return;const q=i().filter(P=>P.ref.dataset.disabled!=="").find(P=>P.ref===e.highlightedElement.value)?.value;if(!q)return;let D=null;switch(m){case"prev":case"next":{D=$e(r.options,e.firstValue.value,q);break}case"first":{D=$e(r.options,e.firstValue.value,r.options?.[0]);break}case"last":{D=$e(r.options,e.firstValue.value,r.options?.[r.options.length-1]);break}}e.modelValue.value=D}return e.virtualKeydownHook.on(f=>{const m=f.altKey||f.ctrlKey||f.metaKey;if(f.key==="Tab"&&!m)return;let q=Qt[f.key];if(m&&f.key==="a"&&e.multiple.value?(f.preventDefault(),e.modelValue.value=[...r.options],q="last"):f.shiftKey&&q&&S(f,q),["first","last"].includes(q)){f.preventDefault();const D=q==="first"?0:r.options.length-1;p.value.scrollToIndex(D),requestAnimationFrame(()=>{const P=i(),M=q==="first"?P[0]:P[P.length-1];M&&e.changeHighlight(M.ref)})}else if(!q&&!m){k.value+=f.key;const D=Number(bt()?.getAttribute("data-index")),P=C.value[D].textContent,M=C.value.map(w=>w.textContent??""),Y=Wt(M,k.value,P),j=C.value.find(w=>w.textContent===Y);j&&(p.value.scrollToIndex(j.index,{align:"start"}),requestAnimationFrame(()=>{const w=l.value.querySelector(`[data-index="${j.index}"]`);w instanceof HTMLElement&&e.changeHighlight(w)}))}}),(f,m)=>(c(),G("div",{"data-reka-virtualizer":"",style:yt({position:"relative",width:"100%",height:`${t(p).getTotalSize()}px`})},[(c(!0),G(ie,null,Pe(v.value,({is:n,item:q})=>(c(),_(lt(n),{key:q.index}))),128))],4))}}),qa=Ca;const[re,Ia]=Ie("ComboboxRoot");var Sa=V({__name:"ComboboxRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","update:open"],setup(s,{expose:r,emit:a}){const e=s,l=a,{primitiveElement:i,currentElement:u}=Fe(),{multiple:p,disabled:v,ignoreFilter:k,resetSearchTermOnSelect:C,openOnFocus:S,openOnClick:f,dir:m,resetModelValueOnClear:n,highlightOnHover:q}=je(e),D=rt(m),P=Le(e,"modelValue",l,{defaultValue:e.defaultValue??(p.value?[]:void 0),passive:e.modelValue===void 0,deep:!0}),M=Le(e,"open",l,{defaultValue:e.defaultOpen,passive:e.open===void 0});async function Y(A){M.value=A,J.value="",A?(await pe(),i.value?.highlightSelected(),w.value=!0,O.value?.focus()):(w.value=!1,setTimeout(()=>{!A&&e.resetSearchTermOnBlur&&j.trigger()},1))}const j=Ke(),w=H(!1),xe=H(!1),O=H(),se=H(),Q=L(()=>i.value?.highlightedElement??void 0),ee=H(new Map),ne=H(new Map),{contains:ve}=st({sensitivity:"base"}),J=H(""),te=L(A=>{if(!J.value||e.ignoreFilter||xe.value)return{count:ee.value.size,items:A?.items??new Map,groups:A?.groups??new Set(ne.value.keys())};let X=0;const Z=new Map,ae=new Set;for(const[me,le]of ee.value){const g=ve(le,J.value);Z.set(me,g?1:0),g&&X++}for(const[me,le]of ne.value)for(const g of le)if(Z.get(g)>0){ae.add(me);break}return{count:X,items:Z,groups:ae}}),R=_t();return fe(()=>{R?.exposed&&(R.exposed.highlightItem=i.value?.highlightItem,R.exposed.highlightFirstItem=i.value?.highlightFirstItem,R.exposed.highlightSelected=i.value?.highlightSelected)}),r({filtered:te,highlightedElement:Q,highlightItem:i.value?.highlightItem,highlightFirstItem:i.value?.highlightFirstItem,highlightSelected:i.value?.highlightSelected}),Ia({modelValue:P,multiple:p,disabled:v,open:M,onOpenChange:Y,contentId:"",isUserInputted:w,isVirtual:xe,inputElement:O,highlightedElement:Q,onInputElementChange:A=>O.value=A,triggerElement:se,onTriggerElementChange:A=>se.value=A,parentElement:u,resetSearchTermOnSelect:C,onResetSearchTerm:j.on,allItems:ee,allGroups:ne,filterSearch:J,filterState:te,ignoreFilter:k,openOnFocus:S,openOnClick:f,resetModelValueOnClear:n}),(A,X)=>(c(),_(t(Mt),null,{default:h(()=>[F(t(sa),T({ref_key:"primitiveElement",ref:i},A.$attrs,{modelValue:t(P),"onUpdate:modelValue":X[0]||(X[0]=Z=>it(P)?P.value=Z:null),style:{pointerEvents:t(M)?"auto":void 0},as:A.as,"as-child":A.asChild,dir:t(D),multiple:t(p),name:A.name,required:A.required,disabled:t(v),"highlight-on-hover":t(q),by:e.by,onHighlight:X[1]||(X[1]=Z=>l("highlight",Z))}),{default:h(()=>[I(A.$slots,"default",{open:t(M),modelValue:t(P)})]),_:3},16,["modelValue","style","as","as-child","dir","multiple","name","required","disabled","highlight-on-hover","by"])]),_:3}))}}),wa=Sa;const[ka,za]=Ie("ComboboxContent");var La=V({__name:"ComboboxContentImpl",props:{position:{type:String,required:!1,default:"inline"},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(s,{emit:r}){const a=s,e=r,{position:l}=je(a),i=re(),{forwardRef:u,currentElement:p}=oe();$t(a.bodyLock),Dt(i.parentElement);const v=L(()=>a.position==="popper"?a:{}),k=xt(v.value),C={boxSizing:"border-box","--reka-combobox-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-combobox-content-available-width":"var(--reka-popper-available-width)","--reka-combobox-content-available-height":"var(--reka-popper-available-height)","--reka-combobox-trigger-width":"var(--reka-popper-anchor-width)","--reka-combobox-trigger-height":"var(--reka-popper-anchor-height)"};za({position:l});const S=H(!1);return fe(()=>{i.inputElement.value&&(S.value=p.value.contains(i.inputElement.value),S.value&&i.inputElement.value.focus())}),Re(()=>{S.value&&i.triggerElement.value?.focus()}),(f,m)=>(c(),_(t(ua),{"as-child":""},{default:h(()=>[F(t(Ct),{"as-child":"","disable-outside-pointer-events":f.disableOutsidePointerEvents,onDismiss:m[0]||(m[0]=n=>t(i).onOpenChange(!1)),onFocusOutside:m[1]||(m[1]=n=>{t(i).parentElement.value?.contains(n.target)&&n.preventDefault(),e("focusOutside",n)}),onInteractOutside:m[2]||(m[2]=n=>e("interactOutside",n)),onEscapeKeyDown:m[3]||(m[3]=n=>e("escapeKeyDown",n)),onPointerDownOutside:m[4]||(m[4]=n=>{t(i).parentElement.value?.contains(n.target)&&n.preventDefault(),e("pointerDownOutside",n)})},{default:h(()=>[(c(),_(lt(t(l)==="popper"?t(Ht):t(W)),T({...f.$attrs,...t(k)},{id:t(i).contentId,ref:t(u),"data-state":t(i).open.value?"open":"closed",style:{display:"flex",flexDirection:"column",outline:"none",...t(l)==="popper"?C:{}}}),{default:h(()=>[I(f.$slots,"default")]),_:3},16,["id","data-state","style"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3}))}}),Ea=La,Fa=V({__name:"ComboboxArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(s){const r=s,a=re(),e=ka();return oe(),(l,i)=>t(a).open.value&&t(e).position.value==="popper"?(c(),_(t(Gt),_e(T({key:0},r)),{default:h(()=>[I(l.$slots,"default")]),_:3},16)):N("v-if",!0)}}),Aa=Fa,Ba=V({__name:"ComboboxContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(s,{emit:r}){const l=ot(s,r),{forwardRef:i}=oe(),u=re();return u.contentId||=Se(void 0,"reka-combobox-content"),(p,v)=>(c(),_(t(qt),{present:p.forceMount||t(u).open.value},{default:h(()=>[F(Ea,T({...t(l),...p.$attrs},{ref:t(i)}),{default:h(()=>[I(p.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Ta=Ba,Va=V({__name:"ComboboxEmpty",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const r=s,a=re(),e=L(()=>a.ignoreFilter.value?a.allItems.value.size===0:a.filterState.value.count===0);return(l,i)=>e.value?(c(),_(t(W),_e(T({key:0},r)),{default:h(()=>[I(l.$slots,"default",{},()=>[i[0]||(i[0]=ye("No options"))])]),_:3},16)):N("v-if",!0)}}),Oa=Va;const[nt,Ka]=Ie("ComboboxGroup");var Pa=V({__name:"ComboboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const r=s,a=Se(void 0,"reka-combobox-group"),e=re(),l=L(()=>e.ignoreFilter.value?!0:e.filterSearch.value?e.filterState.value.groups.has(a):!0),i=Ka({id:a,labelId:""});return fe(()=>{e.allGroups.value.has(a)||e.allGroups.value.set(a,new Set)}),Re(()=>{e.allGroups.value.delete(a)}),(u,p)=>(c(),_(t(va),T({id:t(a),"aria-labelledby":t(i).labelId},r,{hidden:l.value?void 0:!0}),{default:h(()=>[I(u.$slots,"default")]),_:3},16,["id","aria-labelledby","hidden"]))}}),He=Pa,$a=V({__name:"ComboboxInput",props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(s,{emit:r}){const a=s,e=r,l=re(),i=Be(),{primitiveElement:u,currentElement:p}=Fe(),v=Le(a,"modelValue",e,{passive:a.modelValue===void 0});fe(()=>{p.value&&l.onInputElementChange(p.value)});function k(n){l.open.value||l.onOpenChange(!0)}function C(n){const q=n.target;l.open.value?l.filterSearch.value=q.value:(l.onOpenChange(!0),pe(()=>{q.value&&(l.filterSearch.value=q.value,i.highlightFirstItem())}))}function S(){l.openOnFocus.value&&!l.open.value&&l.onOpenChange(!0)}function f(){l.openOnClick.value&&!l.open.value&&l.onOpenChange(!0)}function m(){const n=l.modelValue.value;a.displayValue?v.value=a.displayValue(n):!l.multiple.value&&n&&!Array.isArray(n)&&typeof n!="object"?v.value=n.toString():v.value="",pe(()=>{v.value=v.value})}return l.onResetSearchTerm(()=>{m()}),Ge(l.modelValue,async()=>{!l.isUserInputted.value&&l.resetSearchTermOnSelect.value&&m()},{immediate:!0,deep:!0}),Ge(l.filterState,(n,q)=>{!l.isVirtual.value&&q.count===0&&i.highlightFirstItem()}),(n,q)=>(c(),_(t(pa),{ref_key:"primitiveElement",ref:u,modelValue:t(v),"onUpdate:modelValue":q[0]||(q[0]=D=>it(v)?v.value=D:null),as:n.as,"as-child":n.asChild,"auto-focus":n.autoFocus,disabled:n.disabled,"aria-expanded":t(l).open.value,"aria-controls":t(l).contentId,"aria-autocomplete":"list",role:"combobox",autocomplete:"off",onClick:f,onInput:C,onKeydown:qe(Ae(k,["prevent"]),["down","up"]),onFocus:S},{default:h(()=>[I(n.$slots,"default")]),_:3},8,["modelValue","as","as-child","auto-focus","disabled","aria-expanded","aria-controls","onKeydown"]))}}),Da=$a,Ra=V({__name:"ComboboxItem",props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(s,{emit:r}){const a=s,e=r,l=Se(void 0,"reka-combobox-item"),i=re(),u=nt(null),{primitiveElement:p,currentElement:v}=Fe();if(a.value==="")throw new Error("A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.");const k=L(()=>{if(i.isVirtual.value||i.ignoreFilter.value||!i.filterSearch.value)return!0;{const C=i.filterState.value.items.get(l);return C===void 0?!0:C>0}});return fe(()=>{i.allItems.value.set(l,a.textValue||v.value.textContent||v.value.innerText);const C=u?.id;C&&(i.allGroups.value.has(C)?i.allGroups.value.get(C)?.add(l):i.allGroups.value.set(C,new Set([l])))}),Re(()=>{i.allItems.value.delete(l)}),(C,S)=>k.value?(c(),_(t(ya),T({key:0},a,{id:t(l),ref_key:"primitiveElement",ref:p,disabled:t(i).disabled.value||C.disabled,onSelect:S[0]||(S[0]=f=>{e("select",f),!f.defaultPrevented&&!t(i).multiple.value&&!C.disabled&&!t(i).disabled.value&&(f.preventDefault(),t(i).onOpenChange(!1),t(i).modelValue.value=a.value)})}),{default:h(()=>[I(C.$slots,"default",{},()=>[ye(de(C.value),1)])]),_:3},16,["id","disabled"])):N("v-if",!0)}}),et=Ra,Na=V({__name:"ComboboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const r=s;return(a,e)=>(c(),_(t(xa),_e(Ee(r)),{default:h(()=>[I(a.$slots,"default")]),_:3},16))}}),Ma=Na,Ha=V({__name:"ComboboxLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(s){const r=s;oe();const a=nt({id:"",labelId:""});return a.labelId||=Se(void 0,"reka-combobox-group-label"),(e,l)=>(c(),_(t(W),T(r,{id:t(a).labelId}),{default:h(()=>[I(e.$slots,"default")]),_:3},16,["id"]))}}),Ga=Ha,ja=V({__name:"ComboboxPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(s){const r=s;return(a,e)=>(c(),_(t(It),_e(Ee(r)),{default:h(()=>[I(a.$slots,"default")]),_:3},16))}}),Ua=ja,Wa=V({__name:"ComboboxSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const r=s;return oe(),(a,e)=>(c(),_(t(W),T(r,{"aria-hidden":"true"}),{default:h(()=>[I(a.$slots,"default")]),_:3},16))}}),Ya=Wa,Qa=V({__name:"ComboboxTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(s){const r=s,{forwardRef:a,currentElement:e}=oe(),l=re(),i=L(()=>r.disabled||l.disabled.value||!1);return fe(()=>{e.value&&l.onTriggerElementChange(e.value)}),(u,p)=>(c(),_(t(W),T(r,{ref:t(a),type:u.as==="button"?"button":void 0,tabindex:"-1","aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":t(l).open.value,"aria-controls":t(l).contentId,"data-state":t(l).open.value?"open":"closed",disabled:i.value,"data-disabled":i.value?"":void 0,"aria-disabled":i.value??void 0,onClick:p[0]||(p[0]=v=>t(l).onOpenChange(!t(l).open.value))}),{default:h(()=>[I(u.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","disabled","data-disabled","aria-disabled"]))}}),Ja=Qa,Xa=V({__name:"ComboboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(s){const r=s,a=re();return a.isVirtual.value=!0,(e,l)=>(c(),_(qa,_e(Ee(r)),{default:h(i=>[I(e.$slots,"default",_e(Ee(i)))]),_:3},16))}}),Za=Xa;const el={slots:{base:["relative group rounded-md inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-default",content:["max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col","origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],viewport:"relative scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",input:"border-b border-default",focusScope:"flex flex-col min-h-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-1 text-xs"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-1.5 text-xs"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-1.5 text-sm"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-2 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},gl=Object.assign({inheritAttrs:!1},{__name:"USelectMenu",props:We({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:We(["update:open","change","blur","focus","create","highlight","update:modelValue"],["update:searchTerm"]),setup(s,{expose:r,emit:a}){const e=s,l=a,i=at(),u=St(s,"searchTerm",{type:String,default:""}),{t:p}=wt(),v=kt(),{contains:k}=st({sensitivity:"base"}),C=ot(zt(e,"modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","highlightOnHover"),l),S=Lt(he(()=>e.portal)),f=he(()=>Ve(e.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),m=he(()=>e.arrow),n=he(()=>e.virtualize?Ve(typeof e.virtualize=="boolean"?{}:e.virtualize,{estimateSize:Zt(we.value,e.size||"md",e.descriptionKey)}):!1),q=he(()=>Ve(e.searchInput,{placeholder:p("selectMenu.search"),variant:"none"})),{emitFormBlur:D,emitFormFocus:P,emitFormInput:M,emitFormChange:Y,size:j,color:w,id:xe,name:O,highlight:se,disabled:Q,ariaAttrs:ee}=Et(e),{orientation:ne,size:ve}=Ft(e),{isLeading:J,isTrailing:te,leadingIconName:R,trailingIconName:A}=At(he(()=>Ve(e,{trailingIcon:v.ui.icons.chevronDown}))),X=L(()=>ve.value||j.value),[Z,ae]=Xe(),[me,le]=Xe({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),g=L(()=>Ye({extend:Ye(el),...v.ui?.selectMenu||{}})({color:w.value,variant:e.variant,size:X?.value,loading:e.loading,highlight:se.value,leading:J.value||!!e.avatar||!!i.leading,trailing:te.value||!!i.trailing,fieldGroup:ne.value,virtualize:!!e.virtualize}));function Ne(b){if(e.multiple&&Array.isArray(b)){const B=b.map(o=>Je(we.value,o,{labelKey:e.labelKey,valueKey:e.valueKey})).filter(o=>o!=null&&o!=="");return B.length>0?B.join(", "):void 0}return Je(we.value,b,{labelKey:e.labelKey,valueKey:e.valueKey})}const Ce=L(()=>e.items?.length?Bt(e.items)?e.items:[e.items]:[]),we=L(()=>Ce.value.flatMap(b=>b)),ke=L(()=>{if(e.ignoreFilter||!u.value)return Ce.value;const b=Array.isArray(e.filterFields)?e.filterFields:[e.labelKey];return Ce.value.map(B=>B.filter(o=>o==null?!1:typeof o!="object"?k(String(o),u.value):o.type&&["label","separator"].includes(o.type)?!0:b.some(U=>{const K=be(o,U);return K!=null&&k(String(K),u.value)}))).filter(B=>B.filter(o=>!$(o)||!o.type||!["label","separator"].includes(o.type)).length>0)}),d=L(()=>ke.value.flatMap(b=>b)),y=L(()=>{if(!e.createItem||!u.value)return!1;const b=e.valueKey?{[e.valueKey]:u.value}:u.value;return typeof e.createItem=="object"&&e.createItem.when==="always"||e.createItem==="always"?!d.value.find(B=>Tt(B,b,e.valueKey)):!d.value.length}),x=L(()=>typeof e.createItem=="object"?e.createItem.position:"bottom"),E=Vt("triggerRef");function ue(){e.autofocus&&E.value?.$el?.focus({focusVisible:!0})}fe(()=>{setTimeout(()=>{ue()},e.autofocusDelay)});function Me(b){if(Kt(e.modelValue)===b)return;e.modelModifiers?.trim&&(b=b?.trim()??null),e.modelModifiers?.number&&(b=Pt(b)),e.modelModifiers?.nullable&&(b??=null),e.modelModifiers?.optional&&(b??=void 0);const B=new Event("change",{target:{value:b}});l("change",B),Y(),M(),e.resetSearchTermOnSelect&&(u.value="")}function ge(b){let B;if(b){const o=new FocusEvent("focus");l("focus",o),P(),clearTimeout(B)}else{const o=new FocusEvent("blur");l("blur",o),D(),e.resetSearchTermOnBlur&&(B=setTimeout(()=>{u.value=""},100))}}function ut(b){b.preventDefault(),b.stopPropagation(),l("create",u.value)}function dt(b,B){if($(B)){if(B.disabled){b.preventDefault();return}B.onSelect?.(b)}}function $(b){return typeof b=="object"&&b!==null}return r({triggerRef:he(()=>E.value?.$el)}),(b,B)=>(c(),G(ie,null,[F(t(Z),null,{default:h(()=>[F(t(et),{"data-slot":"item",class:z(g.value.item({class:e.ui?.item})),value:u.value,onSelect:ut},{default:h(()=>[ze("span",{"data-slot":"itemLabel",class:z(g.value.itemLabel({class:e.ui?.itemLabel}))},[I(b.$slots,"create-item-label",{item:u.value},()=>[ye(de(t(p)("selectMenu.create",{label:u.value})),1)])],2)]),_:3},8,["class","value"])]),_:3}),F(t(me),null,{default:h(({item:o,index:U})=>[$(o)&&o.type==="label"?(c(),_(t(Ga),{key:0,"data-slot":"label",class:z(g.value.label({class:[e.ui?.label,o.ui?.label,o.class]}))},{default:h(()=>[ye(de(t(be)(o,e.labelKey)),1)]),_:2},1032,["class"])):$(o)&&o.type==="separator"?(c(),_(t(Ya),{key:1,"data-slot":"separator",class:z(g.value.separator({class:[e.ui?.separator,o.ui?.separator,o.class]}))},null,8,["class"])):(c(),_(t(et),{key:2,"data-slot":"item",class:z(g.value.item({class:[e.ui?.item,$(o)&&o.ui?.item,$(o)&&o.class]})),disabled:$(o)&&o.disabled,value:e.valueKey&&$(o)?t(be)(o,e.valueKey):o,onSelect:K=>dt(K,o)},{default:h(()=>[I(b.$slots,"item",{item:o,index:U,ui:g.value},()=>[I(b.$slots,"item-leading",{item:o,index:U,ui:g.value},()=>[$(o)&&o.icon?(c(),_(Oe,{key:0,name:o.icon,"data-slot":"itemLeadingIcon",class:z(g.value.itemLeadingIcon({class:[e.ui?.itemLeadingIcon,o.ui?.itemLeadingIcon]}))},null,8,["name","class"])):$(o)&&o.avatar?(c(),_(Qe,T({key:1,size:o.ui?.itemLeadingAvatarSize||e.ui?.itemLeadingAvatarSize||g.value.itemLeadingAvatarSize()},o.avatar,{"data-slot":"itemLeadingAvatar",class:g.value.itemLeadingAvatar({class:[e.ui?.itemLeadingAvatar,o.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):$(o)&&o.chip?(c(),_(Ot,T({key:2,size:e.ui?.itemLeadingChipSize||g.value.itemLeadingChipSize(),inset:"",standalone:""},o.chip,{"data-slot":"itemLeadingChip",class:g.value.itemLeadingChip({class:[e.ui?.itemLeadingChip,o.ui?.itemLeadingChip]})}),null,16,["size","class"])):N("",!0)]),ze("span",{"data-slot":"itemWrapper",class:z(g.value.itemWrapper({class:[e.ui?.itemWrapper,$(o)&&o.ui?.itemWrapper]}))},[ze("span",{"data-slot":"itemLabel",class:z(g.value.itemLabel({class:[e.ui?.itemLabel,$(o)&&o.ui?.itemLabel]}))},[I(b.$slots,"item-label",{item:o,index:U},()=>[ye(de($(o)?t(be)(o,e.labelKey):o),1)])],2),$(o)&&(t(be)(o,e.descriptionKey)||i["item-description"])?(c(),G("span",{key:0,"data-slot":"itemDescription",class:z(g.value.itemDescription({class:[e.ui?.itemDescription,$(o)&&o.ui?.itemDescription]}))},[I(b.$slots,"item-description",{item:o,index:U},()=>[ye(de(t(be)(o,e.descriptionKey)),1)])],2)):N("",!0)],2),ze("span",{"data-slot":"itemTrailing",class:z(g.value.itemTrailing({class:[e.ui?.itemTrailing,$(o)&&o.ui?.itemTrailing]}))},[I(b.$slots,"item-trailing",{item:o,index:U,ui:g.value}),F(t(Ma),{"as-child":""},{default:h(()=>[F(Oe,{name:s.selectedIcon||t(v).ui.icons.check,"data-slot":"itemTrailingIcon",class:z(g.value.itemTrailingIcon({class:[e.ui?.itemTrailingIcon,$(o)&&o.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))]),_:3}),F(t(wa),T({id:t(xe)},{...t(C),...b.$attrs,...t(ee)},{"ignore-filter":"","as-child":"",name:t(O),disabled:t(Q),"onUpdate:modelValue":Me,"onUpdate:open":ge}),{default:h(({modelValue:o,open:U})=>[F(t(la),{"as-child":""},{default:h(()=>[F(t(Ja),{ref_key:"triggerRef",ref:E,"data-slot":"base",class:z(g.value.base({class:[e.ui?.base,e.class]})),tabindex:"0"},{default:h(()=>[t(J)||s.avatar||i.leading?(c(),G("span",{key:0,"data-slot":"leading",class:z(g.value.leading({class:e.ui?.leading}))},[I(b.$slots,"leading",{modelValue:o,open:U,ui:g.value},()=>[t(J)&&t(R)?(c(),_(Oe,{key:0,name:t(R),"data-slot":"leadingIcon",class:z(g.value.leadingIcon({class:e.ui?.leadingIcon}))},null,8,["name","class"])):s.avatar?(c(),_(Qe,T({key:1,size:e.ui?.itemLeadingAvatarSize||g.value.itemLeadingAvatarSize()},s.avatar,{"data-slot":"itemLeadingAvatar",class:g.value.itemLeadingAvatar({class:e.ui?.itemLeadingAvatar})}),null,16,["size","class"])):N("",!0)])],2)):N("",!0),I(b.$slots,"default",{modelValue:o,open:U,ui:g.value},()=>[(c(!0),G(ie,null,Pe([Ne(o)],K=>(c(),G(ie,{key:K},[K!=null?(c(),G("span",{key:0,"data-slot":"value",class:z(g.value.value({class:e.ui?.value}))},de(K),3)):(c(),G("span",{key:1,"data-slot":"placeholder",class:z(g.value.placeholder({class:e.ui?.placeholder}))},de(s.placeholder??" "),3))],64))),128))]),t(te)||i.trailing?(c(),G("span",{key:1,"data-slot":"trailing",class:z(g.value.trailing({class:e.ui?.trailing}))},[I(b.$slots,"trailing",{modelValue:o,open:U,ui:g.value},()=>[t(A)?(c(),_(Oe,{key:0,name:t(A),"data-slot":"trailingIcon",class:z(g.value.trailingIcon({class:e.ui?.trailingIcon}))},null,8,["name","class"])):N("",!0)])],2)):N("",!0)]),_:2},1032,["class"])]),_:2},1024),F(t(Ua),_e(Ee(t(S))),{default:h(()=>[F(t(Ta),T({"data-slot":"content",class:g.value.content({class:e.ui?.content})},f.value),{default:h(()=>[F(t(Rt),{trapped:"","data-slot":"focusScope",class:z(g.value.focusScope({class:e.ui?.focusScope}))},{default:h(()=>[I(b.$slots,"content-top"),s.searchInput?(c(),_(t(Da),{key:0,modelValue:u.value,"onUpdate:modelValue":B[1]||(B[1]=K=>u.value=K),"display-value":()=>u.value,"as-child":""},{default:h(()=>[F(ea,T({autofocus:"",autocomplete:"off",size:s.size},q.value,{"data-slot":"input",class:g.value.input({class:e.ui?.input}),onChange:B[0]||(B[0]=Ae(()=>{},["stop"]))}),null,16,["size","class"])]),_:1},8,["modelValue","display-value"])):N("",!0),F(t(Oa),{"data-slot":"empty",class:z(g.value.empty({class:e.ui?.empty}))},{default:h(()=>[I(b.$slots,"empty",{searchTerm:u.value},()=>[ye(de(u.value?t(p)("selectMenu.noMatch",{searchTerm:u.value}):t(p)("selectMenu.noData")),1)])]),_:3},8,["class"]),ze("div",{role:"presentation","data-slot":"viewport",class:z(g.value.viewport({class:e.ui?.viewport}))},[s.virtualize?(c(),G(ie,{key:0},[y.value&&x.value==="top"?(c(),_(t(ae),{key:0})):N("",!0),F(t(Za),T({options:d.value,"text-content":K=>$(K)?t(be)(K,e.labelKey):String(K)},n.value),{default:h(({option:K,virtualItem:Te})=>[F(t(le),{item:K,index:Te.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),y.value&&x.value==="bottom"?(c(),_(t(ae),{key:1})):N("",!0)],64)):(c(),G(ie,{key:1},[y.value&&x.value==="top"?(c(),_(t(He),{key:0,"data-slot":"group",class:z(g.value.group({class:e.ui?.group}))},{default:h(()=>[F(t(ae))]),_:1},8,["class"])):N("",!0),(c(!0),G(ie,null,Pe(ke.value,(K,Te)=>(c(),_(t(He),{key:`group-${Te}`,"data-slot":"group",class:z(g.value.group({class:e.ui?.group}))},{default:h(()=>[(c(!0),G(ie,null,Pe(K,(pt,Ue)=>(c(),_(t(le),{key:`group-${Te}-${Ue}`,item:pt,index:Ue},null,8,["item","index"]))),128))]),_:2},1032,["class"]))),128)),y.value&&x.value==="bottom"?(c(),_(t(He),{key:1,"data-slot":"group",class:z(g.value.group({class:e.ui?.group}))},{default:h(()=>[F(t(ae))]),_:1},8,["class"])):N("",!0)],64))],2),I(b.$slots,"content-bottom")]),_:3},8,["class"]),s.arrow?(c(),_(t(Aa),T({key:0},m.value,{"data-slot":"arrow",class:g.value.arrow({class:e.ui?.arrow})}),null,16,["class"])):N("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["id","name","disabled"])],64))}});export{ya as L,gl as _,xa as a,pa as b,ua as c,qa as d,va as e,sa as f,ml as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./p9l1LjVc.js";const s=globalThis.setInterval;export{s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aq as c,ar as d,L as f,N as g,c as m,G as v,R as x,a4 as C,ab as y,T as b,U as r,C as t,W as h,al as p}from"./p9l1LjVc.js";const q={slots:{root:"relative [&_pre]:h-[200px]",footer:"h-16 absolute inset-x-px bottom-px rounded-b-md flex items-center justify-center",trigger:"group",triggerIcon:"group-data-[state=open]:rotate-180"},variants:{open:{true:{root:"[&_pre]:h-auto [&_pre]:min-h-[200px] [&_pre]:max-h-[80vh] [&_pre]:pb-12"},false:{root:"[&_pre]:overflow-hidden",footer:"bg-gradient-to-t from-muted"}}}},B={__name:"ProseCodeCollapse",props:c({icon:{type:null,required:!1},name:{type:String,required:!1},openText:{type:String,required:!1},closeText:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(s){const e=s,o=d(s,"open",{type:Boolean,default:!1}),{t:l}=f(),n=g(),a=m(()=>p({extend:p(q),...n.ui?.prose?.codeCollapse||{}})({open:o.value}));return(u,i)=>(x(),v("div",{class:r(a.value.root({class:[e.ui?.root,e.class]}))},[C(u.$slots,"default"),y("div",{class:r(a.value.footer({class:e.ui?.footer}))},[b(h,{icon:s.icon||t(n).ui.icons.chevronDown,color:"neutral",variant:"outline","data-state":o.value?"open":"closed",label:`${o.value?e.closeText||t(l)("prose.codeCollapse.closeText"):e.openText||t(l)("prose.codeCollapse.openText")} ${e.name||t(l)("prose.codeCollapse.name")}`,class:r(a.value.trigger({class:e.ui?.trigger})),ui:{leadingIcon:a.value.triggerIcon({class:e.ui?.triggerIcon})},onClick:i[0]||(i[0]=T=>o.value=!o.value)},null,8,["icon","data-state","label","class","ui"])],2)],2))}};export{B as default};
|