@semiont/cli 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +45 -12
- package/dist/frontend/dist/assets/ArrowsRightLeftIcon-eQUXtsyS.js +2 -0
- package/dist/frontend/dist/assets/ArrowsRightLeftIcon-eQUXtsyS.js.map +1 -0
- package/dist/frontend/dist/assets/ChevronLeftIcon-QLs1eT1j.js +2 -0
- package/dist/frontend/dist/assets/ChevronLeftIcon-QLs1eT1j.js.map +1 -0
- package/dist/frontend/dist/assets/CommandLineIcon-BEeeWFhQ.js +2 -0
- package/dist/frontend/dist/assets/CommandLineIcon-BEeeWFhQ.js.map +1 -0
- package/dist/frontend/dist/assets/CookiePreferences-CMgprW9V.js +2 -0
- package/dist/frontend/dist/assets/CookiePreferences-CMgprW9V.js.map +1 -0
- package/dist/frontend/dist/assets/KeyboardShortcutsContext-BRLeqQUj.js +2 -0
- package/dist/frontend/dist/assets/KeyboardShortcutsContext-BRLeqQUj.js.map +1 -0
- package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js +2 -0
- package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js.map +1 -0
- package/dist/frontend/dist/assets/ToolbarPanels-CRGQDX-L.js +2 -0
- package/dist/frontend/dist/assets/ToolbarPanels-CRGQDX-L.js.map +1 -0
- package/dist/frontend/dist/assets/XMarkIcon-CddZGiiz.js +2 -0
- package/dist/frontend/dist/assets/XMarkIcon-CddZGiiz.js.map +1 -0
- package/dist/frontend/dist/assets/ar-U2EXWUMQ-Ds9Pt3_I.js +2 -0
- package/dist/frontend/dist/assets/ar-U2EXWUMQ-Ds9Pt3_I.js.map +1 -0
- package/dist/frontend/dist/assets/bn-DRJGV772-BUYrNEk8.js +2 -0
- package/dist/frontend/dist/assets/bn-DRJGV772-BUYrNEk8.js.map +1 -0
- package/dist/frontend/dist/assets/chunk-GERSK2DY-D2Q8aVeK.js +2 -0
- package/dist/frontend/dist/assets/chunk-GERSK2DY-D2Q8aVeK.js.map +1 -0
- package/dist/frontend/dist/assets/chunk-K6BJDL2I-CcwOtHVB.js +2 -0
- package/dist/frontend/dist/assets/chunk-K6BJDL2I-CcwOtHVB.js.map +1 -0
- package/dist/frontend/dist/assets/client-DkMJxPA7.js +2 -0
- package/dist/frontend/dist/assets/client-DkMJxPA7.js.map +1 -0
- package/dist/frontend/dist/assets/client-DvALJ3DL.js +2 -0
- package/dist/frontend/dist/assets/client-DvALJ3DL.js.map +1 -0
- package/dist/frontend/dist/assets/client-DxlEW_QJ.js +2 -0
- package/dist/frontend/dist/assets/client-DxlEW_QJ.js.map +1 -0
- package/dist/frontend/dist/assets/client-uEoQ8iJO.js +2 -0
- package/dist/frontend/dist/assets/client-uEoQ8iJO.js.map +1 -0
- package/dist/frontend/dist/assets/cs-PTWDM23V-DfbMzFEw.js +2 -0
- package/dist/frontend/dist/assets/cs-PTWDM23V-DfbMzFEw.js.map +1 -0
- package/dist/frontend/dist/assets/da-KSNIKYSS-BMtq201F.js +2 -0
- package/dist/frontend/dist/assets/da-KSNIKYSS-BMtq201F.js.map +1 -0
- package/dist/frontend/dist/assets/de-F2XBEWFY-ChjoYEH0.js +2 -0
- package/dist/frontend/dist/assets/de-F2XBEWFY-ChjoYEH0.js.map +1 -0
- package/dist/frontend/dist/assets/el-DLD2GWAP-ClFunpNV.js +2 -0
- package/dist/frontend/dist/assets/el-DLD2GWAP-ClFunpNV.js.map +1 -0
- package/dist/frontend/dist/assets/en-L45VK7BS-C9ArL-E1.js +1 -0
- package/dist/frontend/dist/assets/es-WLPYWGB5-C53vYarX.js +2 -0
- package/dist/frontend/dist/assets/es-WLPYWGB5-C53vYarX.js.map +1 -0
- package/dist/frontend/dist/assets/fa-BAXHSDZG-DJia4XF_.js +2 -0
- package/dist/frontend/dist/assets/fa-BAXHSDZG-DJia4XF_.js.map +1 -0
- package/dist/frontend/dist/assets/fi-FCHSYVOT-D2etzjyC.js +2 -0
- package/dist/frontend/dist/assets/fi-FCHSYVOT-D2etzjyC.js.map +1 -0
- package/dist/frontend/dist/assets/fr-3UERBSL6-Bi8o9u26.js +2 -0
- package/dist/frontend/dist/assets/fr-3UERBSL6-Bi8o9u26.js.map +1 -0
- package/dist/frontend/dist/assets/he-F6F3FV2K-CwGkucCK.js +2 -0
- package/dist/frontend/dist/assets/he-F6F3FV2K-CwGkucCK.js.map +1 -0
- package/dist/frontend/dist/assets/hi-4BK6IK7Q-fsSpyO-Z.js +2 -0
- package/dist/frontend/dist/assets/{hi-CFUAV4BF-CuWy2y7I.js.map → hi-4BK6IK7Q-fsSpyO-Z.js.map} +1 -1
- package/dist/frontend/dist/assets/i18n-B53Yefbh.js +2 -0
- package/dist/frontend/dist/assets/i18n-B53Yefbh.js.map +1 -0
- package/dist/frontend/dist/assets/id-7ECCWP3J-MhvUbYNG.js +2 -0
- package/dist/frontend/dist/assets/id-7ECCWP3J-MhvUbYNG.js.map +1 -0
- package/dist/frontend/dist/assets/index-95t-6XJg.css +1 -0
- package/dist/frontend/dist/assets/index-DjtRDlfn.js +141 -0
- package/dist/frontend/dist/assets/index-DjtRDlfn.js.map +1 -0
- package/dist/frontend/dist/assets/it-234Z6XK6-n-8MkFtz.js +2 -0
- package/dist/frontend/dist/assets/it-234Z6XK6-n-8MkFtz.js.map +1 -0
- package/dist/frontend/dist/assets/ja-PJWQI4OQ-CbrcVSYZ.js +2 -0
- package/dist/frontend/dist/assets/ja-PJWQI4OQ-CbrcVSYZ.js.map +1 -0
- package/dist/frontend/dist/assets/ko-APUEW2RS-CLubHAbf.js +2 -0
- package/dist/frontend/dist/assets/ko-APUEW2RS-CLubHAbf.js.map +1 -0
- package/dist/frontend/dist/assets/layout-BhnmJA6O.js +2 -0
- package/dist/frontend/dist/assets/layout-BhnmJA6O.js.map +1 -0
- package/dist/frontend/dist/assets/layout-DolG9tOf.js +2 -0
- package/dist/frontend/dist/assets/layout-DolG9tOf.js.map +1 -0
- package/dist/frontend/dist/assets/layout-e6QyrD0Y.js +2 -0
- package/dist/frontend/dist/assets/layout-e6QyrD0Y.js.map +1 -0
- package/dist/frontend/dist/assets/layout-xDEqzpvE.js +2 -0
- package/dist/frontend/dist/assets/layout-xDEqzpvE.js.map +1 -0
- package/dist/frontend/dist/assets/ms-PJBZWZWD-Bu45eJYe.js +2 -0
- package/dist/frontend/dist/assets/ms-PJBZWZWD-Bu45eJYe.js.map +1 -0
- package/dist/frontend/dist/assets/nl-L4C3ZBCU-bLU3oN_N.js +2 -0
- package/dist/frontend/dist/assets/nl-L4C3ZBCU-bLU3oN_N.js.map +1 -0
- package/dist/frontend/dist/assets/no-QE5N5KNG-BCG75Nm1.js +2 -0
- package/dist/frontend/dist/assets/no-QE5N5KNG-BCG75Nm1.js.map +1 -0
- package/dist/frontend/dist/assets/not-found-4iuCkpA7.js +2 -0
- package/dist/frontend/dist/assets/not-found-4iuCkpA7.js.map +1 -0
- package/dist/frontend/dist/assets/page-6YupxiP8.js +8 -0
- package/dist/frontend/dist/assets/page-6YupxiP8.js.map +1 -0
- package/dist/frontend/dist/assets/page-7cCGgkUd.js +2 -0
- package/dist/frontend/dist/assets/page-7cCGgkUd.js.map +1 -0
- package/dist/frontend/dist/assets/page-8sXDEos5.js +2 -0
- package/dist/frontend/dist/assets/page-8sXDEos5.js.map +1 -0
- package/dist/frontend/dist/assets/page-A6_MoyUb2.js +5 -0
- package/dist/frontend/dist/assets/page-A6_MoyUb2.js.map +1 -0
- package/dist/frontend/dist/assets/page-B9EYfbrY.js +2 -0
- package/dist/frontend/dist/assets/page-B9EYfbrY.js.map +1 -0
- package/dist/frontend/dist/assets/page-BOhOKDMk.js +2 -0
- package/dist/frontend/dist/assets/page-BOhOKDMk.js.map +1 -0
- package/dist/frontend/dist/assets/page-BioSV21A.js +2 -0
- package/dist/frontend/dist/assets/page-BioSV21A.js.map +1 -0
- package/dist/frontend/dist/assets/page-Bl8sZu8k.js +2 -0
- package/dist/frontend/dist/assets/page-Bl8sZu8k.js.map +1 -0
- package/dist/frontend/dist/assets/page-BrSlkHj9.js +2 -0
- package/dist/frontend/dist/assets/page-BrSlkHj9.js.map +1 -0
- package/dist/frontend/dist/assets/page-C5gTlI4M.js +2 -0
- package/dist/frontend/dist/assets/page-C5gTlI4M.js.map +1 -0
- package/dist/frontend/dist/assets/page-CXVPWK3i.js +20 -0
- package/dist/frontend/dist/assets/page-CXVPWK3i.js.map +1 -0
- package/dist/frontend/dist/assets/page-CXhfUrZM.js +2 -0
- package/dist/frontend/dist/assets/page-CXhfUrZM.js.map +1 -0
- package/dist/frontend/dist/assets/page-CkHE2rPM.js +2 -0
- package/dist/frontend/dist/assets/page-CkHE2rPM.js.map +1 -0
- package/dist/frontend/dist/assets/page-D0bYoQZI.js +2 -0
- package/dist/frontend/dist/assets/page-D0bYoQZI.js.map +1 -0
- package/dist/frontend/dist/assets/page-D1veR3Kp.js +2 -0
- package/dist/frontend/dist/assets/page-D1veR3Kp.js.map +1 -0
- package/dist/frontend/dist/assets/page-D6oe9LkY.js +2 -0
- package/dist/frontend/dist/assets/page-D6oe9LkY.js.map +1 -0
- package/dist/frontend/dist/assets/page-DVCVvH_S.js +2 -0
- package/dist/frontend/dist/assets/page-DVCVvH_S.js.map +1 -0
- package/dist/frontend/dist/assets/page-DbwiMF1N.js +2 -0
- package/dist/frontend/dist/assets/page-DbwiMF1N.js.map +1 -0
- package/dist/frontend/dist/assets/pl-5Q2D23PD-DgP2517z.js +2 -0
- package/dist/frontend/dist/assets/pl-5Q2D23PD-DgP2517z.js.map +1 -0
- package/dist/frontend/dist/assets/pt-AIGUOIOC-CN21pR38.js +2 -0
- package/dist/frontend/dist/assets/pt-AIGUOIOC-CN21pR38.js.map +1 -0
- package/dist/frontend/dist/assets/ro-T56CSHTY-mCdsn9QL.js +2 -0
- package/dist/frontend/dist/assets/ro-T56CSHTY-mCdsn9QL.js.map +1 -0
- package/dist/frontend/dist/assets/rolldown-runtime-jpDsebLB.js +1 -0
- package/dist/frontend/dist/assets/routing-Bcj1FhkC.js +2 -0
- package/dist/frontend/dist/assets/routing-Bcj1FhkC.js.map +1 -0
- package/dist/frontend/dist/assets/routing-DW1ehi64.js +2 -0
- package/dist/frontend/dist/assets/routing-DW1ehi64.js.map +1 -0
- package/dist/frontend/dist/assets/sv-L4TJQ2UH-Cj1jmTXz.js +2 -0
- package/dist/frontend/dist/assets/sv-L4TJQ2UH-Cj1jmTXz.js.map +1 -0
- package/dist/frontend/dist/assets/th-6O7Y6O2Q-Db0HgJLY.js +2 -0
- package/dist/frontend/dist/assets/th-6O7Y6O2Q-Db0HgJLY.js.map +1 -0
- package/dist/frontend/dist/assets/tr-D4CQCSNO-B0u3f4nL.js +2 -0
- package/dist/frontend/dist/assets/tr-D4CQCSNO-B0u3f4nL.js.map +1 -0
- package/dist/frontend/dist/assets/uk-2HMQG6ND-Dx2FfvV4.js +2 -0
- package/dist/frontend/dist/assets/uk-2HMQG6ND-Dx2FfvV4.js.map +1 -0
- package/dist/frontend/dist/assets/vendor-0HjOURbh.js +10 -0
- package/dist/frontend/dist/assets/vendor-0HjOURbh.js.map +1 -0
- package/dist/frontend/dist/assets/vi-XVJ4RUEJ-CeoZ1h3m.js +2 -0
- package/dist/frontend/dist/assets/vi-XVJ4RUEJ-CeoZ1h3m.js.map +1 -0
- package/dist/frontend/dist/assets/web-Dr6mdA1A.js +2 -0
- package/dist/frontend/dist/assets/web-Dr6mdA1A.js.map +1 -0
- package/dist/frontend/dist/assets/zh-K2KDPGHK-BriluvPe.js +2 -0
- package/dist/frontend/dist/assets/zh-K2KDPGHK-BriluvPe.js.map +1 -0
- package/dist/frontend/dist/index.html +7 -4
- package/dist/frontend/dist/messages/ar.json +1 -19
- package/dist/frontend/dist/messages/bn.json +1 -19
- package/dist/frontend/dist/messages/cs.json +1 -19
- package/dist/frontend/dist/messages/da.json +1 -19
- package/dist/frontend/dist/messages/de.json +1 -19
- package/dist/frontend/dist/messages/el.json +1 -19
- package/dist/frontend/dist/messages/en.json +2 -20
- package/dist/frontend/dist/messages/es.json +1 -19
- package/dist/frontend/dist/messages/fa.json +1 -19
- package/dist/frontend/dist/messages/fi.json +1 -19
- package/dist/frontend/dist/messages/fr.json +1 -19
- package/dist/frontend/dist/messages/he.json +1 -19
- package/dist/frontend/dist/messages/hi.json +1 -19
- package/dist/frontend/dist/messages/id.json +1 -19
- package/dist/frontend/dist/messages/it.json +1 -19
- package/dist/frontend/dist/messages/ja.json +1 -19
- package/dist/frontend/dist/messages/ko.json +1 -19
- package/dist/frontend/dist/messages/ms.json +1 -19
- package/dist/frontend/dist/messages/nl.json +1 -19
- package/dist/frontend/dist/messages/no.json +1 -19
- package/dist/frontend/dist/messages/pl.json +1 -19
- package/dist/frontend/dist/messages/pt.json +1 -19
- package/dist/frontend/dist/messages/ro.json +1 -19
- package/dist/frontend/dist/messages/sv.json +1 -19
- package/dist/frontend/dist/messages/th.json +1 -19
- package/dist/frontend/dist/messages/tr.json +1 -19
- package/dist/frontend/dist/messages/uk.json +1 -19
- package/dist/frontend/dist/messages/vi.json +1 -19
- package/dist/frontend/dist/messages/zh.json +1 -19
- package/dist/frontend/package.json +1 -1
- package/dist/templates/package.json +1 -1
- package/package.json +9 -9
- package/dist/frontend/dist/assets/ArrowsRightLeftIcon-BzLgl5o9.js +0 -2
- package/dist/frontend/dist/assets/ArrowsRightLeftIcon-BzLgl5o9.js.map +0 -1
- package/dist/frontend/dist/assets/ChevronLeftIcon-BLyRNZuL.js +0 -2
- package/dist/frontend/dist/assets/ChevronLeftIcon-BLyRNZuL.js.map +0 -1
- package/dist/frontend/dist/assets/CommandLineIcon-Ba4gpk8e.js +0 -2
- package/dist/frontend/dist/assets/CommandLineIcon-Ba4gpk8e.js.map +0 -1
- package/dist/frontend/dist/assets/CookiePreferences-5feiOAX4.js +0 -2
- package/dist/frontend/dist/assets/CookiePreferences-5feiOAX4.js.map +0 -1
- package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-5QESNO5H-Cxm4Es_X.js +0 -2
- package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-5QESNO5H-Cxm4Es_X.js.map +0 -1
- package/dist/frontend/dist/assets/ToolbarPanels-D5L18Wxk.js +0 -2
- package/dist/frontend/dist/assets/ToolbarPanels-D5L18Wxk.js.map +0 -1
- package/dist/frontend/dist/assets/XMarkIcon-KMKD47CF.js +0 -2
- package/dist/frontend/dist/assets/XMarkIcon-KMKD47CF.js.map +0 -1
- package/dist/frontend/dist/assets/ar-3W37O3R3-BJ1fDUvB.js +0 -2
- package/dist/frontend/dist/assets/ar-3W37O3R3-BJ1fDUvB.js.map +0 -1
- package/dist/frontend/dist/assets/bn-JZTJLMVE-k1gI6ffq.js +0 -2
- package/dist/frontend/dist/assets/bn-JZTJLMVE-k1gI6ffq.js.map +0 -1
- package/dist/frontend/dist/assets/browser-ponyfill-D2ngVqWO.js +0 -3
- package/dist/frontend/dist/assets/browser-ponyfill-D2ngVqWO.js.map +0 -1
- package/dist/frontend/dist/assets/client-BmABw25x.js +0 -2
- package/dist/frontend/dist/assets/client-BmABw25x.js.map +0 -1
- package/dist/frontend/dist/assets/client-CTyYgbIC.js +0 -2
- package/dist/frontend/dist/assets/client-CTyYgbIC.js.map +0 -1
- package/dist/frontend/dist/assets/client-Cjf1Te8y.js +0 -2
- package/dist/frontend/dist/assets/client-Cjf1Te8y.js.map +0 -1
- package/dist/frontend/dist/assets/client-D7w_vlsg.js +0 -2
- package/dist/frontend/dist/assets/client-D7w_vlsg.js.map +0 -1
- package/dist/frontend/dist/assets/cs-XYHH7HNE-BqQWIWM9.js +0 -2
- package/dist/frontend/dist/assets/cs-XYHH7HNE-BqQWIWM9.js.map +0 -1
- package/dist/frontend/dist/assets/da-MZKIECVT-pufSb0d_.js +0 -2
- package/dist/frontend/dist/assets/da-MZKIECVT-pufSb0d_.js.map +0 -1
- package/dist/frontend/dist/assets/de-AYXTMRQW-BRMduIa0.js +0 -2
- package/dist/frontend/dist/assets/de-AYXTMRQW-BRMduIa0.js.map +0 -1
- package/dist/frontend/dist/assets/el-A6CVQWAW-DycBhXUi.js +0 -2
- package/dist/frontend/dist/assets/el-A6CVQWAW-DycBhXUi.js.map +0 -1
- package/dist/frontend/dist/assets/es-M2HXLJGT-BFQ6WIpw.js +0 -2
- package/dist/frontend/dist/assets/es-M2HXLJGT-BFQ6WIpw.js.map +0 -1
- package/dist/frontend/dist/assets/fa-V6JZJDYP-C8CwCeSd.js +0 -2
- package/dist/frontend/dist/assets/fa-V6JZJDYP-C8CwCeSd.js.map +0 -1
- package/dist/frontend/dist/assets/fi-ONDTZ5H7-aby5--Ip.js +0 -2
- package/dist/frontend/dist/assets/fi-ONDTZ5H7-aby5--Ip.js.map +0 -1
- package/dist/frontend/dist/assets/fr-PAPV4H4G-D9SFT8MA.js +0 -2
- package/dist/frontend/dist/assets/fr-PAPV4H4G-D9SFT8MA.js.map +0 -1
- package/dist/frontend/dist/assets/he-F6VTLJLW-B8Rc1C-m.js +0 -2
- package/dist/frontend/dist/assets/he-F6VTLJLW-B8Rc1C-m.js.map +0 -1
- package/dist/frontend/dist/assets/hi-CFUAV4BF-CuWy2y7I.js +0 -2
- package/dist/frontend/dist/assets/i18n-BbpF47i1.js +0 -2
- package/dist/frontend/dist/assets/i18n-BbpF47i1.js.map +0 -1
- package/dist/frontend/dist/assets/id-NBKLCCI7-DnMwKKq7.js +0 -2
- package/dist/frontend/dist/assets/id-NBKLCCI7-DnMwKKq7.js.map +0 -1
- package/dist/frontend/dist/assets/index-BVOR3arc.js +0 -169
- package/dist/frontend/dist/assets/index-BVOR3arc.js.map +0 -1
- package/dist/frontend/dist/assets/index-Dg-Pampr.css +0 -1
- package/dist/frontend/dist/assets/it-SLSOWVVU-hrlm8f9F.js +0 -2
- package/dist/frontend/dist/assets/it-SLSOWVVU-hrlm8f9F.js.map +0 -1
- package/dist/frontend/dist/assets/ja-L5IG4ECE-BvMVB5sy.js +0 -2
- package/dist/frontend/dist/assets/ja-L5IG4ECE-BvMVB5sy.js.map +0 -1
- package/dist/frontend/dist/assets/ko-QYMTULKK-CNEZe0oy.js +0 -2
- package/dist/frontend/dist/assets/ko-QYMTULKK-CNEZe0oy.js.map +0 -1
- package/dist/frontend/dist/assets/layout-B1HJjFMW.js +0 -2
- package/dist/frontend/dist/assets/layout-B1HJjFMW.js.map +0 -1
- package/dist/frontend/dist/assets/layout-B7mIcfJU.js +0 -2
- package/dist/frontend/dist/assets/layout-B7mIcfJU.js.map +0 -1
- package/dist/frontend/dist/assets/layout-BK6OF3Hx.js +0 -2
- package/dist/frontend/dist/assets/layout-BK6OF3Hx.js.map +0 -1
- package/dist/frontend/dist/assets/layout-Cw-T4GPy.js +0 -2
- package/dist/frontend/dist/assets/layout-Cw-T4GPy.js.map +0 -1
- package/dist/frontend/dist/assets/ms-5DGSFKM2-BlyezW6W.js +0 -2
- package/dist/frontend/dist/assets/ms-5DGSFKM2-BlyezW6W.js.map +0 -1
- package/dist/frontend/dist/assets/nl-VZPCGONO-BJ0llUPS.js +0 -2
- package/dist/frontend/dist/assets/nl-VZPCGONO-BJ0llUPS.js.map +0 -1
- package/dist/frontend/dist/assets/no-MF6F352I-Wf2ZNjHx.js +0 -2
- package/dist/frontend/dist/assets/no-MF6F352I-Wf2ZNjHx.js.map +0 -1
- package/dist/frontend/dist/assets/not-found-uRBdv-bF.js +0 -2
- package/dist/frontend/dist/assets/not-found-uRBdv-bF.js.map +0 -1
- package/dist/frontend/dist/assets/page-5wC1as95.js +0 -2
- package/dist/frontend/dist/assets/page-5wC1as95.js.map +0 -1
- package/dist/frontend/dist/assets/page-B6XEk2Ue.js +0 -2
- package/dist/frontend/dist/assets/page-B6XEk2Ue.js.map +0 -1
- package/dist/frontend/dist/assets/page-BLt9SJto.js +0 -2
- package/dist/frontend/dist/assets/page-BLt9SJto.js.map +0 -1
- package/dist/frontend/dist/assets/page-BNaAGnc3.js +0 -5
- package/dist/frontend/dist/assets/page-BNaAGnc3.js.map +0 -1
- package/dist/frontend/dist/assets/page-Bcljtfsa.js +0 -2
- package/dist/frontend/dist/assets/page-Bcljtfsa.js.map +0 -1
- package/dist/frontend/dist/assets/page-Bf4MMijQ.js +0 -20
- package/dist/frontend/dist/assets/page-Bf4MMijQ.js.map +0 -1
- package/dist/frontend/dist/assets/page-BlU7QK_-.js +0 -2
- package/dist/frontend/dist/assets/page-BlU7QK_-.js.map +0 -1
- package/dist/frontend/dist/assets/page-Bnawjb1Y.js +0 -2
- package/dist/frontend/dist/assets/page-Bnawjb1Y.js.map +0 -1
- package/dist/frontend/dist/assets/page-C7vfVcap.js +0 -2
- package/dist/frontend/dist/assets/page-C7vfVcap.js.map +0 -1
- package/dist/frontend/dist/assets/page-CBL0MuAo.js +0 -2
- package/dist/frontend/dist/assets/page-CBL0MuAo.js.map +0 -1
- package/dist/frontend/dist/assets/page-CKCKmPQO.js +0 -2
- package/dist/frontend/dist/assets/page-CKCKmPQO.js.map +0 -1
- package/dist/frontend/dist/assets/page-CdqGKYBH.js +0 -2
- package/dist/frontend/dist/assets/page-CdqGKYBH.js.map +0 -1
- package/dist/frontend/dist/assets/page-CfMLSllg.js +0 -2
- package/dist/frontend/dist/assets/page-CfMLSllg.js.map +0 -1
- package/dist/frontend/dist/assets/page-D7w7NNd7.js +0 -8
- package/dist/frontend/dist/assets/page-D7w7NNd7.js.map +0 -1
- package/dist/frontend/dist/assets/page-DAH06BM4.js +0 -2
- package/dist/frontend/dist/assets/page-DAH06BM4.js.map +0 -1
- package/dist/frontend/dist/assets/page-Dgqi9Orl.js +0 -2
- package/dist/frontend/dist/assets/page-Dgqi9Orl.js.map +0 -1
- package/dist/frontend/dist/assets/page-SrDV7XYv.js +0 -2
- package/dist/frontend/dist/assets/page-SrDV7XYv.js.map +0 -1
- package/dist/frontend/dist/assets/page-wxqWVnqc.js +0 -2
- package/dist/frontend/dist/assets/page-wxqWVnqc.js.map +0 -1
- package/dist/frontend/dist/assets/pl-WIK72JUO-wOGg7Me5.js +0 -2
- package/dist/frontend/dist/assets/pl-WIK72JUO-wOGg7Me5.js.map +0 -1
- package/dist/frontend/dist/assets/privacy-Kk_oWnpO.js +0 -2
- package/dist/frontend/dist/assets/privacy-Kk_oWnpO.js.map +0 -1
- package/dist/frontend/dist/assets/pt-RRP5ZF6A-C32Vedhv.js +0 -2
- package/dist/frontend/dist/assets/pt-RRP5ZF6A-C32Vedhv.js.map +0 -1
- package/dist/frontend/dist/assets/ro-XHQLC3T7-uGs3uHRp.js +0 -2
- package/dist/frontend/dist/assets/ro-XHQLC3T7-uGs3uHRp.js.map +0 -1
- package/dist/frontend/dist/assets/routing-CGghUc0N.js +0 -2
- package/dist/frontend/dist/assets/routing-CGghUc0N.js.map +0 -1
- package/dist/frontend/dist/assets/routing-CKNCPdYO.js +0 -2
- package/dist/frontend/dist/assets/routing-CKNCPdYO.js.map +0 -1
- package/dist/frontend/dist/assets/sv-EWULDN6E-CkRBfwt9.js +0 -2
- package/dist/frontend/dist/assets/sv-EWULDN6E-CkRBfwt9.js.map +0 -1
- package/dist/frontend/dist/assets/th-TGOBHFG4-BGt_aO5K.js +0 -2
- package/dist/frontend/dist/assets/th-TGOBHFG4-BGt_aO5K.js.map +0 -1
- package/dist/frontend/dist/assets/tr-LMMPBMV7-CrGE1PKA.js +0 -2
- package/dist/frontend/dist/assets/tr-LMMPBMV7-CrGE1PKA.js.map +0 -1
- package/dist/frontend/dist/assets/uk-IPGRRJY6-CPaxgpd8.js +0 -2
- package/dist/frontend/dist/assets/uk-IPGRRJY6-CPaxgpd8.js.map +0 -1
- package/dist/frontend/dist/assets/vendor-DJo4KD8w.js +0 -29
- package/dist/frontend/dist/assets/vendor-DJo4KD8w.js.map +0 -1
- package/dist/frontend/dist/assets/vi-Q676OJQS-DpyIm6R1.js +0 -2
- package/dist/frontend/dist/assets/vi-Q676OJQS-DpyIm6R1.js.map +0 -1
- package/dist/frontend/dist/assets/web-DdXPBk3h.js +0 -2
- package/dist/frontend/dist/assets/web-DdXPBk3h.js.map +0 -1
- package/dist/frontend/dist/assets/zh-F3MTWQDX-C09t_PFf.js +0 -2
- package/dist/frontend/dist/assets/zh-F3MTWQDX-C09t_PFf.js.map +0 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/en-L45VK7BS-C9ArL-E1.js","assets/chunk-GERSK2DY-D2Q8aVeK.js","assets/PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js","assets/rolldown-runtime-jpDsebLB.js","assets/i18n-B53Yefbh.js","assets/vendor-0HjOURbh.js","assets/layout-DolG9tOf.js","assets/KeyboardShortcutsContext-BRLeqQUj.js","assets/routing-Bcj1FhkC.js","assets/page-D6oe9LkY.js","assets/page-6YupxiP8.js","assets/CookiePreferences-CMgprW9V.js","assets/XMarkIcon-CddZGiiz.js","assets/routing-DW1ehi64.js","assets/page-CXVPWK3i.js","assets/page-A6_MoyUb2.js","assets/page-DbwiMF1N.js","assets/page-BrSlkHj9.js","assets/page-C5gTlI4M.js","assets/page-Bl8sZu8k.js","assets/layout-xDEqzpvE.js","assets/ToolbarPanels-CRGQDX-L.js","assets/ChevronLeftIcon-QLs1eT1j.js","assets/page-7cCGgkUd.js","assets/page-B9EYfbrY.js","assets/page-BioSV21A.js","assets/page-DVCVvH_S.js","assets/layout-BhnmJA6O.js","assets/ArrowsRightLeftIcon-eQUXtsyS.js","assets/CommandLineIcon-BEeeWFhQ.js","assets/page-BOhOKDMk.js","assets/client-uEoQ8iJO.js","assets/client-DkMJxPA7.js","assets/client-DvALJ3DL.js","assets/page-D0bYoQZI.js","assets/layout-e6QyrD0Y.js","assets/page-D1veR3Kp.js","assets/page-8sXDEos5.js","assets/page-CkHE2rPM.js","assets/page-CXhfUrZM.js","assets/client-DxlEW_QJ.js","assets/not-found-4iuCkpA7.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,t}from"./rolldown-runtime-jpDsebLB.js";import{i as n,n as r,r as i,t as a}from"./i18n-B53Yefbh.js";import{n as o,r as s,t as c}from"./vendor-0HjOURbh.js";import{y as l}from"./chunk-GERSK2DY-D2Q8aVeK.js";import{i as u,n as d,r as f,t as p}from"./chunk-K6BJDL2I-CcwOtHVB.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var m=e(n(),1),h=e(s(),1),g=e(o()),_=`modulepreload`,v=function(e){return`/`+e},y={},b=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=v(t,n),t in y)return;y[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:_,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},x=`popstate`;function S(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function C(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return O(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:k(t)}return ee(t,n,null,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function E(){return Math.random().toString(36).substring(2,10)}function D(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function O(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||E(),unstable_mask:i}}function k({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function A(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u()+1;let d=D(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u();let i=D(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return te(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(x,d),c=e,()=>{i.removeEventListener(x,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function te(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),w(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:k(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function j(e,t,n=`/`){return ne(e,t,n,!1)}function ne(e,t,n,r){let i=ve((typeof t==`string`?A(t):t).pathname||`/`,n);if(i==null)return null;let a=ie(e);M(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=_e(i);o=me(a[e],t,r)}return o}function re(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ie(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;w(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ee([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ie(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:fe(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ae(e.path))a(e,t,!0,n)}),t}function ae(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ae(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function M(e){e.sort((e,t)=>e.score===t.score?pe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var oe=/^:[\w-]+$/,se=3,ce=2,le=1,ue=10,N=-2,de=e=>e===`*`;function fe(e,t){let n=e.split(`/`),r=n.length;return n.some(de)&&(r+=N),t&&(r+=ce),n.filter(e=>!de(e)).reduce((e,t)=>e+(oe.test(t)?se:t===``?le:ue),r)}function pe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function me(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=he({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=he({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Ee([a,u.pathname]),pathnameBase:De(Ee([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Ee([a,u.pathnameBase]))}return o}function he(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ge(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ge(e,t=!1,n=!0){T(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function _e(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ve(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ye=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function be(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?xe(n.substring(1),`/`):xe(n,t)):a=t,{pathname:a,search:Oe(r),hash:ke(i)}}function xe(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Se(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ce(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function we(e){let t=Ce(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Te(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),Se(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),Se(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),Se(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=be(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ee=e=>e.join(`/`).replace(/\/\/+/g,`/`),De=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Oe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ke=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ae=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function je(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Me(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Ne=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Pe(e,t){let n=e;if(typeof n!=`string`||!ye.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ne)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=ve(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Fe=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Fe);var Ie=[`GET`,...Fe];new Set(Ie);var Le=m.createContext(null);Le.displayName=`DataRouter`;var Re=m.createContext(null);Re.displayName=`DataRouterState`;var ze=m.createContext(!1),Be=m.createContext({isTransitioning:!1});Be.displayName=`ViewTransition`;var Ve=m.createContext(new Map);Ve.displayName=`Fetchers`;var He=m.createContext(null);He.displayName=`Await`;var Ue=m.createContext(null);Ue.displayName=`Navigation`;var We=m.createContext(null);We.displayName=`Location`;var Ge=m.createContext({outlet:null,matches:[],isDataRoute:!1});Ge.displayName=`Route`;var Ke=m.createContext(null);Ke.displayName=`RouteError`;var qe=`REACT_ROUTER_ERROR`,Je=`REDIRECT`,Ye=`ROUTE_ERROR_RESPONSE`;function Xe(e){if(e.startsWith(`${qe}:${Je}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ze(e){if(e.startsWith(`${qe}:${Ye}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ae(t.status,t.statusText,t.data)}catch{}}function Qe(e,{relative:t}={}){w($e(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=m.useContext(Ue),{hash:i,pathname:a,search:o}=ct(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ee([n,a])),r.createHref({pathname:s,search:o,hash:i})}function $e(){return m.useContext(We)!=null}function et(){return w($e(),`useLocation() may be used only in the context of a <Router> component.`),m.useContext(We).location}var tt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function nt(e){m.useContext(Ue).static||m.useLayoutEffect(e)}function rt(){let{isDataRoute:e}=m.useContext(Ge);return e?Dt():it()}function it(){w($e(),`useNavigate() may be used only in the context of a <Router> component.`);let e=m.useContext(Le),{basename:t,navigator:n}=m.useContext(Ue),{matches:r}=m.useContext(Ge),{pathname:i}=et(),a=JSON.stringify(we(r)),o=m.useRef(!1);return nt(()=>{o.current=!0}),m.useCallback((r,s={})=>{if(T(o.current,tt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Te(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ee([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var at=m.createContext(null);function ot(e){let t=m.useContext(Ge).outlet;return m.useMemo(()=>t&&m.createElement(at.Provider,{value:e},t),[t,e])}function st(){let{matches:e}=m.useContext(Ge),t=e[e.length-1];return t?t.params:{}}function ct(e,{relative:t}={}){let{matches:n}=m.useContext(Ge),{pathname:r}=et(),i=JSON.stringify(we(n));return m.useMemo(()=>Te(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n){w($e(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=m.useContext(Ue),{matches:i}=m.useContext(Ge),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;kt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=et(),d;if(t){let e=typeof t==`string`?A(t):t;w(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=j(e,{pathname:p});T(l||h!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),T(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=_t(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ee([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ee([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?m.createElement(We.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},g):g}function dt(){let e=Et(),t=je(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=m.createElement(m.Fragment,null,m.createElement(`p`,null,`💿 Hey developer 👋`),m.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,m.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,m.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),m.createElement(m.Fragment,null,m.createElement(`h2`,null,`Unexpected Application Error!`),m.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?m.createElement(`pre`,{style:i},n):null,o)}var ft=m.createElement(dt,null),pt=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ze(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:m.createElement(Ge.Provider,{value:this.props.routeContext},m.createElement(Ke.Provider,{value:e,children:this.props.component}));return this.context?m.createElement(ht,{error:e},t):t}};pt.contextType=ze;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=m.useContext(Ue);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Xe(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=Pe(e.location,n);if(Ne&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return m.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=m.useContext(Le);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Ge.Provider,{value:e},n)}function _t(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);w(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Me(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ft,o&&(s<0&&c===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?m.createElement(n.route.Component,null):n.route.element?n.route.element:e,m.createElement(gt,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?m.createElement(pt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=m.useContext(Le);return w(t,vt(e)),t}function bt(e){let t=m.useContext(Re);return w(t,vt(e)),t}function xt(e){let t=m.useContext(Ge);return w(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return w(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return m.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function Et(){let e=m.useContext(Ke),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=m.useRef(!1);return nt(()=>{n.current=!0}),m.useCallback(async(r,i={})=>{T(n.current,tt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,T(!1,n))}m.memo(At);function At({routes:e,future:t,state:n,isStatic:r,onError:i}){return ut(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function jt({to:e,replace:t,state:n,relative:r}){w($e(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=m.useContext(Ue);T(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=m.useContext(Ge),{pathname:o}=et(),s=rt(),c=Te(e,we(a),o,r===`path`),l=JSON.stringify(c);return m.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Mt(e){return ot(e.context)}function Nt(e){w(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Pt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){w(!$e(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=m.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=A(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:h}=n,g=m.useMemo(()=>{let e=ve(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:h},navigationType:r}},[s,l,u,d,f,p,r,h]);return T(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(Ue.Provider,{value:c},m.createElement(We.Provider,{children:t,value:g}))}function Ft({children:e,location:t}){return lt(It(e),t)}m.Component;function It(e,t=[]){let n=[];return m.Children.forEach(e,(e,r)=>{if(!m.isValidElement(e))return;let i=[...t,r];if(e.type===m.Fragment){n.push.apply(n,It(e.props.children,i));return}w(e.type===Nt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),w(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=It(e.props.children,i)),n.push(a)}),n}var Lt=`get`,Rt=`application/x-www-form-urlencoded`;function zt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Bt(e){return zt(e)&&e.tagName.toLowerCase()===`button`}function Vt(e){return zt(e)&&e.tagName.toLowerCase()===`form`}function Ht(e){return zt(e)&&e.tagName.toLowerCase()===`input`}function Ut(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wt(e,t){return e.button===0&&(!t||t===`_self`)&&!Ut(e)}function Gt(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Kt(e,t){let n=Gt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var qt=null;function Jt(){if(qt===null)try{new FormData(document.createElement(`form`),0),qt=!1}catch{qt=!0}return qt}var Yt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Xt(e){return e!=null&&!Yt.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rt}"`),null):e}function Zt(e,t){let n,r,i,a,o;if(Vt(e)){let o=e.getAttribute(`action`);r=o?ve(o,t):null,n=e.getAttribute(`method`)||Lt,i=Xt(e.getAttribute(`enctype`))||Rt,a=new FormData(e)}else if(Bt(e)||Ht(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ve(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Lt,i=Xt(e.getAttribute(`formenctype`))||Xt(o.getAttribute(`enctype`))||Rt,a=new FormData(o,e),!Jt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(zt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Lt,r=null,i=Rt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Qt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},$t=/[&><\u2028\u2029]/g;function en(e){return e.replace($t,e=>Qt[e])}function tn(e,t){if(e===!1||e==null)throw Error(t)}function nn(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&ve(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function rn(e,t){if(e.id in t)return t[e.id];try{let n=await b(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function an(e){return e!=null&&typeof e.page==`string`}function on(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function sn(e,t,n){return fn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await rn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(on).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function cn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ln(e,t,{includeHydrateFallback:n}={}){return un(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function un(e){return[...new Set(e)]}function dn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!an(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(dn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function pn(){let e=m.useContext(Le);return tn(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function mn(){let e=m.useContext(Re);return tn(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var hn=m.createContext(void 0);hn.displayName=`FrameworkContext`;function gn(){let e=m.useContext(hn);return tn(e,`You must render this element inside a <HydratedRouter> element`),e}function _n(e,t){let n=m.useContext(hn),[r,i]=m.useState(!1),[a,o]=m.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=m.useRef(null);m.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),m.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:vn(s,p),onBlur:vn(c,h),onMouseEnter:vn(l,p),onMouseLeave:vn(u,h),onTouchStart:vn(d,p)}]:[a,f,{}]:[!1,f,{}]}function vn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function yn({page:e,...t}){let{router:n}=pn(),r=m.useMemo(()=>j(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(xn,{page:e,matches:r,...t}):null}function bn(e){let{manifest:t,routeModules:n}=gn(),[r,i]=m.useState([]);return m.useEffect(()=>{let r=!1;return sn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function xn({page:e,matches:t,...n}){let r=et(),{future:i,manifest:a,routeModules:o}=gn(),{basename:s}=pn(),{loaderData:c,matches:l}=mn(),u=m.useMemo(()=>cn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=m.useMemo(()=>cn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=nn(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=m.useMemo(()=>ln(d,a),[d,a]),h=bn(d);return m.createElement(m.Fragment,null,f.map(e=>m.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>m.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>m.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Sn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}m.Component;var Cn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Cn&&(window.__reactRouterVersion=`7.13.2`)}catch{}function wn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=m.useRef();i.current??=C({window:r,v5Compat:!0});let a=i.current,[o,s]=m.useState({action:a.action,location:a.location}),c=m.useCallback(e=>{n===!1?s(e):m.startTransition(()=>s(e))},[n]);return m.useLayoutEffect(()=>a.listen(c),[a,c]),m.createElement(Pt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Tn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=m.useState({action:n.action,location:n.location}),o=m.useCallback(e=>{r===!1?a(e):m.startTransition(()=>a(e))},[r]);return m.useLayoutEffect(()=>n.listen(o),[n,o]),m.createElement(Pt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Tn.displayName=`unstable_HistoryRouter`;var En=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=m.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},h){let{basename:g,navigator:_,unstable_useTransitions:v}=m.useContext(Ue),y=typeof l==`string`&&En.test(l),b=Pe(l,g);l=b.to;let x=Qe(l,{relative:r}),S=et(),C=null;if(o){let e=Te(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:Ee([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=_n(n,p),D=Pn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=m.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Sn(h,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?m.createElement(m.Fragment,null,A,m.createElement(yn,{page:x})):A});Dn.displayName=`Link`;var On=m.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ct(a,{relative:c.relative}),d=et(),f=m.useContext(Re),{navigator:p,basename:h}=m.useContext(Ue),g=f!=null&&Gn(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=ve(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return m.createElement(Dn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});On.displayName=`NavLink`;var kn=m.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Lt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},h)=>{let{unstable_useTransitions:g}=m.useContext(Ue),_=Rn(),v=zn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&En.test(s);return m.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});g&&n!==!1?m.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});kn.displayName=`Form`;function An({getKey:e,storageKey:t,...n}){let r=m.useContext(hn),{basename:i}=m.useContext(Ue),a=et(),o=Tt();Un({getKey:e,storageKey:t});let s=m.useMemo(()=>{if(!r||!e)return null;let t=Hn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return m.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${en(JSON.stringify(t||Bn))}, ${en(JSON.stringify(s))})`}})}An.displayName=`ScrollRestoration`;function jn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mn(e){let t=m.useContext(Le);return w(t,jn(e)),t}function Nn(e){let t=m.useContext(Re);return w(t,jn(e)),t}function Pn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=rt(),d=et(),f=ct(e,{relative:o});return m.useCallback(p=>{if(Wt(p,t)){p.preventDefault();let t=n===void 0?k(d)===k(f):n,h=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?m.startTransition(()=>h()):h()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Fn(e){T(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=m.useRef(Gt(e)),n=m.useRef(!1),r=et(),i=m.useMemo(()=>Kt(r.search,n.current?null:t.current),[r.search]),a=rt();return[i,m.useCallback((e,t)=>{let r=Gt(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var In=0,Ln=()=>`__${String(++In)}__`;function Rn(){let{router:e}=Mn(`useSubmit`),{basename:t}=m.useContext(Ue),n=Ct(),r=e.fetch,i=e.navigate;return m.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Zt(e,t);a.navigate===!1?await r(a.fetcherKey||Ln(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function zn(e,{relative:t}={}){let{basename:n}=m.useContext(Ue),r=m.useContext(Ge);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ct(e||`.`,{relative:t})},o=et();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Ee([n,a.pathname])),k(a)}var Bn=`react-router-scroll-positions`,Vn={};function Hn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ve(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Un({getKey:e,storageKey:t}={}){let{router:n}=Mn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Nn(`useScrollRestoration`),{basename:a}=m.useContext(Ue),o=et(),s=Tt(),c=wt();m.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Wn(m.useCallback(()=>{if(c.state===`idle`){let t=Hn(o,s,a,e);Vn[t]=window.scrollY}try{sessionStorage.setItem(t||Bn,JSON.stringify(Vn))}catch(e){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(m.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Bn);e&&(Vn=JSON.parse(e))}catch{}},[t]),m.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Vn,()=>window.scrollY,e?(t,n)=>Hn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),m.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{T(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Wn(e,t){let{capture:n}=t||{};m.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Gn(e,{relative:t}={}){let n=m.useContext(Be);w(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Mn(`useViewTransitionState`),i=ct(e,{relative:t});if(!n.isTransitioning)return!1;let a=ve(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ve(n.nextLocation.pathname,r)||n.nextLocation.pathname;return he(i.pathname,o)!=null||he(i.pathname,a)!=null}var Kn=[];Kn.forEach,Kn.slice;var qn=[`__proto__`,`constructor`,`prototype`];function Jn(e){return!(typeof e!=`string`||e.length===0||e.length>128||qn.indexOf(e)>-1||e.indexOf(`..`)>-1||e.indexOf(`\\`)>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Yn(e){return!(!Jn(e)||e.indexOf(`/`)>-1)}function Xn(e){return Jn(e)}var Zn={lng:Yn,ns:Xn};function Qn(e){return typeof e==`string`?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e}function $n(e){if(typeof e!=`string`||e.length===0)return e;try{let t=new URL(e);return t.username||t.password?(t.username=``,t.password=``,t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,`$1`)}}function er(){return typeof XMLHttpRequest==`function`||typeof XMLHttpRequest==`object`}function tr(e){return!!e&&typeof e.then==`function`}function nr(e){return tr(e)?e:Promise.resolve(e)}var rr=/\{\{(.+?)\}\}/g;function ir(e,t){let n=!1,r=e.replace(rr,(e,r)=>{let i=r.trim();if(qn.indexOf(i)>-1)return e;let a=t[i];if(a==null)return e;let o=Zn[i]||Yn,s=String(a).split(`+`);for(let t of s)if(!o(t))return n=!0,e;return s.join(`+`)});return n?null:r}var ar=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof window<`u`?window:void 0,or;typeof fetch==`function`?or=fetch:ar&&typeof ar.fetch==`function`&&(or=ar.fetch);var sr=er()&&ar?ar.XMLHttpRequest:void 0,cr=typeof ActiveXObject==`function`&&ar?ar.ActiveXObject:void 0,lr=[`__proto__`,`constructor`,`prototype`],ur=(e,t)=>{if(t&&typeof t==`object`){let n=``;for(let e of Object.keys(t))lr.indexOf(e)>-1||(n+=`&`+encodeURIComponent(e)+`=`+encodeURIComponent(t[e]));if(!n)return e;e=e+(e.indexOf(`?`)===-1?`?`:`&`)+n.slice(1)}return e},dr=(e,t,n,r)=>{let i=e=>{if(!e.ok)return n(e.statusText||`Error`,{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(r){let a=r(e,t);if(a instanceof Promise){a.then(i).catch(n);return}}typeof fetch==`function`?fetch(e,t).then(i).catch(n):or(e,t).then(i).catch(n)},fr=(e,t,n,r)=>{e.queryStringParams&&(t=ur(t,e.queryStringParams));let i={...typeof e.customHeaders==`function`?e.customHeaders():e.customHeaders};typeof window>`u`&&typeof global<`u`&&global.process!==void 0&&global.process.versions&&global.process.versions.node&&(i[`User-Agent`]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(i[`Content-Type`]=`application/json`);let a=typeof e.requestOptions==`function`?e.requestOptions(n):e.requestOptions,o={method:n?`POST`:`GET`,body:n?e.stringify(n):void 0,headers:i,...e._omitFetchOptions?{}:a},s=typeof e.alternateFetch==`function`&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{dr(t,o,r,s)}catch(n){if(!a||Object.keys(a).length===0||!n.message||n.message.indexOf(`not implemented`)<0)return r(n);try{Object.keys(a).forEach(e=>{delete o[e]}),dr(t,o,r,s),e._omitFetchOptions=!0}catch(e){r(e)}}},pr=(e,t,n,r)=>{n&&typeof n==`object`&&(n=ur(``,n).slice(1)),e.queryStringParams&&(t=ur(t,e.queryStringParams));try{let i=sr?new sr:new cr(`MSXML2.XMLHTTP.3.0`);i.open(n?`POST`:`GET`,t,1),e.crossDomain||i.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),i.overrideMimeType&&i.overrideMimeType(`application/json`);let a=e.customHeaders;if(a=typeof a==`function`?a():a,a)for(let e of Object.keys(a))lr.indexOf(e)>-1||i.setRequestHeader(e,a[e]);i.onreadystatechange=()=>{i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}},mr=(e,t,n,r)=>{if(typeof n==`function`&&(r=n,n=void 0),r||=(()=>{}),or&&t.indexOf(`file:`)!==0)return fr(e,t,n,r);if(er()||typeof ActiveXObject==`function`)return pr(e,t,n,r);r(Error(`No fetch and no xhr implementation found!`))},hr=()=>({loadPath:`/locales/{{lng}}/{{ns}}.json`,addPath:`/locales/add/{{lng}}/{{ns}}`,parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||``}),parseLoadPayload:(e,t)=>void 0,request:mr,reloadInterval:typeof window<`u`?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:`cors`,credentials:`same-origin`,cache:`default`}}),gr=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type=`backend`,this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...hr(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,i){let a=this.options.loadPath;typeof this.options.loadPath==`function`&&(a=this.options.loadPath(e,n)),a=nr(a),a.then(a=>{if(!a)return i(null,{});let o=ir(a,{lng:e.join(`+`),ns:n.join(`+`)});if(o==null){let t=e.map(Qn).join(`, `),r=n.map(Qn).join(`, `);return i(Error(`i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[`+t+`] namespaces=[`+r+`]`),!1)}this.loadUrl(o,i,t,r)})}loadUrl(e,t,n,r){let i=typeof n==`string`?[n]:n,a=typeof r==`string`?[r]:r,o=this.options.parseLoadPayload(i,a),s=Qn($n(e));this.options.request(this.options,e,o,(e,i)=>{if(i&&(i.status>=500&&i.status<600||!i.status))return t(`failed loading `+s+`; status code: `+i.status,!0);if(i&&i.status>=400&&i.status<500)return t(`failed loading `+s+`; status code: `+i.status,!1);if(!i&&e&&e.message){let n=e.message.toLowerCase();if([`failed`,`fetch`,`network`,`load`].find(e=>n.indexOf(e)>-1))return t(`failed loading `+s+`: `+Qn(e.message),!0)}if(e)return t(e,!1);let a,o;try{a=typeof i.data==`string`?this.options.parse(i.data,n,r):i.data}catch{o=`failed parsing `+s+` to json`}if(o)return t(o,!1);t(null,a)})}create(e,t,n,r,i){if(!this.options.addPath)return;typeof e==`string`&&(e=[e]);let a=this.options.parsePayload(t,n,r),o=0,s=[],c=[];e.forEach(n=>{let r=this.options.addPath;typeof this.options.addPath==`function`&&(r=this.options.addPath(n,t));let l=ir(r,{lng:n,ns:t});if(l==null){o+=1,i&&o===e.length&&i(s,c);return}this.options.request(this.options,l,a,(t,n)=>{o+=1,s.push(t),c.push(n),o===e.length&&typeof i==`function`&&i(s,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()===`cimode`)return;let i=[],a=e=>{t.toResolveHierarchy(e).forEach(e=>{i.indexOf(e)<0&&i.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>a(e)),i.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,`read`,null,null,(i,a)=>{i&&n.warn(`loading namespace ${r} for language ${t} failed`,i),!i&&a&&n.log(`loaded namespace ${r} for language ${t}`,a),e.loaded(`${t}|${r}`,i,a)})})})}};gr.type=`backend`;var _r=`ar.bn.cs.da.de.el.en.es.fa.fi.fr.he.hi.id.it.ja.ko.ms.nl.no.pl.pt.ro.sv.th.tr.uk.vi.zh`.split(`.`);function vr(e){return _r.includes(e)}a.use(gr).use(i).init({ns:[`translation`],defaultNS:`translation`,fallbackLng:`en`,supportedLngs:[..._r],backend:{loadPath:`/messages/{{lng}}.json`},interpolation:{escapeValue:!1},initImmediate:!1});var yr=function(e,t){return yr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},yr(e,t)};function br(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);yr(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function xr(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function Sr(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Cr(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function wr(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Tr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Er(e){return this instanceof Er?(this.v=e,this):new Er(e)}function Dr(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Er?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Or(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Cr==`function`?Cr(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function kr(e){return typeof e==`function`}function Ar(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var jr=Ar(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
5
|
+
`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
|
|
6
|
+
`):``,this.name=`UnsubscriptionError`,this.errors=t}});function Mr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Nr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Cr(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(kr(c))try{c()}catch(e){i=e instanceof jr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Cr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Ir(f)}catch(e){i??=[],e instanceof jr?i=Tr(Tr([],wr(i)),wr(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new jr(i)}},e.prototype.add=function(t){if(t&&t!==this)if(this.closed)Ir(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Mr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Mr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),Pr=Nr.EMPTY;function Fr(e){return e instanceof Nr||e&&`closed`in e&&kr(e.remove)&&kr(e.add)&&kr(e.unsubscribe)}function Ir(e){kr(e)?e():e.unsubscribe()}var Lr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Rr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=Rr.delegate;return r?.setTimeout?r.setTimeout.apply(r,Tr([e,t],wr(n))):setTimeout.apply(void 0,Tr([e,t],wr(n)))},clearTimeout:function(e){return(Rr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function zr(e){Rr.setTimeout(function(){var t=Lr.onUnhandledError;if(t)t(e);else throw e})}function Br(){}var Vr=(function(){return Wr(`C`,void 0,void 0)})();function Hr(e){return Wr(`E`,void 0,e)}function Ur(e){return Wr(`N`,e,void 0)}function Wr(e,t,n){return{kind:e,value:t,error:n}}var Gr=null;function Kr(e){if(Lr.useDeprecatedSynchronousErrorHandling){var t=!Gr;if(t&&(Gr={errorThrown:!1,error:null}),e(),t){var n=Gr,r=n.errorThrown,i=n.error;if(Gr=null,r)throw i}}else e()}function qr(e){Lr.useDeprecatedSynchronousErrorHandling&&Gr&&(Gr.errorThrown=!0,Gr.error=e)}var Jr=function(e){br(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Fr(t)&&t.add(n)):n.destination=ni,n}return t.create=function(e,t,n){return new Qr(e,t,n)},t.prototype.next=function(e){this.isStopped?ti(Ur(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ti(Hr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ti(Vr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Nr),Yr=Function.prototype.bind;function Xr(e,t){return Yr.call(e,t)}var Zr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){$r(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){$r(e)}else $r(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){$r(e)}},e}(),Qr=function(e){br(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(kr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&Lr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Xr(t.next,o),error:t.error&&Xr(t.error,o),complete:t.complete&&Xr(t.complete,o)}):a=t}return i.destination=new Zr(a),i}return t}(Jr);function $r(e){Lr.useDeprecatedSynchronousErrorHandling?qr(e):zr(e)}function ei(e){throw e}function ti(e,t){var n=Lr.onStoppedNotification;n&&Rr.setTimeout(function(){return n(e,t)})}var ni={closed:!0,next:Br,error:ei,complete:Br},ri=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function ii(e){return e}function ai(e){return e.length===0?ii:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var oi=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=li(e)?e:new Qr(e,t,n);return Kr(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=si(t),new t(function(t,r){var i=new Qr({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[ri]=function(){return this},e.prototype.pipe=function(){return ai([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=si(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function si(e){return e??Lr.Promise??Promise}function ci(e){return e&&kr(e.next)&&kr(e.error)&&kr(e.complete)}function li(e){return e&&e instanceof Jr||ci(e)&&Fr(e)}function ui(e){return kr(e?.lift)}function di(e){return function(t){if(ui(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function fi(e,t,n,r,i){return new pi(e,t,n,r,i)}var pi=function(e){br(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Jr),mi=Ar(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),hi=function(e){br(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new gi(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new mi},t.prototype.next=function(e){var t=this;Kr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Cr(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Kr(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Kr(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,`observed`,{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Pr:(this.currentObservers=null,a.push(e),new Nr(function(){t.currentObservers=null,Mr(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new oi;return e.source=this,e},t.create=function(e,t){return new gi(e,t)},t}(oi),gi=function(e){br(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??Pr},t}(hi),_i=function(e){br(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,`value`,{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(hi),vi={now:function(){return(vi.delegate||Date).now()},delegate:void 0},yi=function(e){br(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(Nr),bi={setInterval:function(e,t){var n=[...arguments].slice(2),r=bi.delegate;return r?.setInterval?r.setInterval.apply(r,Tr([e,t],wr(n))):setInterval.apply(void 0,Tr([e,t],wr(n)))},clearInterval:function(e){return(bi.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},xi=function(e){br(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),bi.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&bi.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Mr(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(yi),Si=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=vi.now,e}(),Ci=new(function(e){br(t,e);function t(t,n){n===void 0&&(n=Si.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(Si))(xi),wi=new oi(function(e){return e.complete()});function Ti(e){return e&&kr(e.schedule)}function Ei(e){return e[e.length-1]}function Di(e){return Ti(Ei(e))?e.pop():void 0}function Oi(e,t){return typeof Ei(e)==`number`?e.pop():t}var ki=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Ai(e){return kr(e?.then)}function ji(e){return kr(e[ri])}function Mi(e){return Symbol.asyncIterator&&kr(e?.[Symbol.asyncIterator])}function Ni(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Pi(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Fi=Pi();function Ii(e){return kr(e?.[Fi])}function Li(e){return Dr(this,arguments,function(){var t,n,r,i;return Sr(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Er(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,Er(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Er(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Ri(e){return kr(e?.getReader)}function zi(e){if(e instanceof oi)return e;if(e!=null){if(ji(e))return Bi(e);if(ki(e))return Vi(e);if(Ai(e))return Hi(e);if(Mi(e))return Wi(e);if(Ii(e))return Ui(e);if(Ri(e))return Gi(e)}throw Ni(e)}function Bi(e){return new oi(function(t){var n=e[ri]();if(kr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function Vi(e){return new oi(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Hi(e){return new oi(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,zr)})}function Ui(e){return new oi(function(t){var n,r;try{for(var i=Cr(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function Wi(e){return new oi(function(t){Ki(e,t).catch(function(e){return t.error(e)})})}function Gi(e){return Wi(Li(e))}function Ki(e,t){var n,r,i,a;return xr(this,void 0,void 0,function(){var o,s;return Sr(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Or(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function qi(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function Ji(e,t){return t===void 0&&(t=0),di(function(n,r){n.subscribe(fi(r,function(n){return qi(r,e,function(){return r.next(n)},t)},function(){return qi(r,e,function(){return r.complete()},t)},function(n){return qi(r,e,function(){return r.error(n)},t)}))})}function Yi(e,t){return t===void 0&&(t=0),di(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Xi(e,t){return zi(e).pipe(Yi(t),Ji(t))}function Zi(e,t){return zi(e).pipe(Yi(t),Ji(t))}function Qi(e,t){return new oi(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function $i(e,t){return new oi(function(n){var r;return qi(n,t,function(){r=e[Fi](),qi(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return kr(r?.return)&&r.return()}})}function ea(e,t){if(!e)throw Error(`Iterable cannot be null`);return new oi(function(n){qi(n,t,function(){var r=e[Symbol.asyncIterator]();qi(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function ta(e,t){return ea(Li(e),t)}function na(e,t){if(e!=null){if(ji(e))return Xi(e,t);if(ki(e))return Qi(e,t);if(Ai(e))return Zi(e,t);if(Mi(e))return ea(e,t);if(Ii(e))return $i(e,t);if(Ri(e))return ta(e,t)}throw Ni(e)}function ra(e,t){return t?na(e,t):zi(e)}function ia(){var e=[...arguments];return ra(e,Di(e))}function aa(e,t){var n=kr(e)?e:function(){return e},r=function(e){return e.error(n())};return new oi(t?function(e){return t.schedule(r,0,e)}:r)}var oa=Ar(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function sa(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=!1,o;e.subscribe({next:function(e){o=e,a=!0},error:i,complete:function(){a?r(o):n?r(t.defaultValue):i(new oa)}})})}function ca(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=new Qr({next:function(e){r(e),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new oa)}});e.subscribe(a)})}function la(e){return e instanceof Date&&!isNaN(e)}var ua=Ar(function(e){return function(t){t===void 0&&(t=null),e(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this.info=t}});function da(e,t){var n=la(e)?{first:e}:typeof e==`number`?{each:e}:e,r=n.first,i=n.each,a=n.with,o=a===void 0?fa:a,s=n.scheduler,c=s===void 0?t??Ci:s,l=n.meta,u=l===void 0?null:l;if(r==null&&i==null)throw TypeError(`No timeout provided.`);return di(function(e,t){var n,a,s=null,l=0,d=function(e){a=qi(t,c,function(){try{n.unsubscribe(),zi(o({meta:u,lastValue:s,seen:l})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(fi(t,function(e){a?.unsubscribe(),l++,t.next(s=e),i>0&&d(i)},void 0,void 0,function(){a?.closed||a?.unsubscribe(),s=null})),!l&&d(r==null?i:typeof r==`number`?r:+r-c.now())})}function fa(e){throw new ua(e)}function pa(e,t){return di(function(n,r){var i=0;n.subscribe(fi(r,function(n){r.next(e.call(t,n,i++))}))})}function ma(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;zi(n(e,u++)).subscribe(fi(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?qi(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(fi(t,p,function(){d=!0,f()})),function(){s?.()}}function ha(e,t,n){return n===void 0&&(n=1/0),kr(t)?ha(function(n,r){return pa(function(e,i){return t(n,e,r,i)})(zi(e(n,r)))},n):(typeof t==`number`&&(n=t),di(function(t,r){return ma(t,r,e,n)}))}function ga(e){return e===void 0&&(e=1/0),ha(ii,e)}function _a(){return ga(1)}function va(){var e=[...arguments];return _a()(ra(e,Di(e)))}function ya(){var e=[...arguments],t=Di(e),n=Oi(e,1/0),r=e;return r.length?r.length===1?zi(r[0]):ga(n)(ra(r,t)):wi}function ba(e,t){return di(function(n,r){var i=0;n.subscribe(fi(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function xa(e){return di(function(t,n){var r=null,i=!1,a;r=t.subscribe(fi(n,void 0,void 0,function(o){a=zi(e(o,xa(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function Sa(e,t){return t===void 0&&(t=Ci),di(function(n,r){var i=null,a=null,o=null,s=function(){if(i){i.unsubscribe(),i=null;var e=a;a=null,r.next(e)}};function c(){var n=o+e,a=t.now();if(a<n){i=this.schedule(void 0,n-a),r.add(i);return}s()}n.subscribe(fi(r,function(n){a=n,o=t.now(),i||(i=t.schedule(c,e),r.add(i))},function(){s(),r.complete()},void 0,function(){a=i=null}))})}function Ca(e){return e<=0?function(){return wi}:di(function(t,n){var r=0;t.subscribe(fi(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function wa(e,t){return t===void 0&&(t=ii),e??=Ta,di(function(n,r){var i,a=!0;n.subscribe(fi(r,function(n){var o=t(n);(a||!e(i,o))&&(a=!1,i=o,r.next(n))}))})}function Ta(e,t){return e===t}function Ea(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new hi}:t,r=e.resetOnError,i=r===void 0?!0:r,a=e.resetOnComplete,o=a===void 0?!0:a,s=e.resetOnRefCountZero,c=s===void 0?!0:s;return function(e){var t,r,a,s=0,l=!1,u=!1,d=function(){r?.unsubscribe(),r=void 0},f=function(){d(),t=a=void 0,l=u=!1},p=function(){var e=t;f(),e?.unsubscribe()};return di(function(e,m){s++,!u&&!l&&d();var h=a??=n();m.add(function(){s--,s===0&&!u&&!l&&(r=Da(p,c))}),h.subscribe(m),!t&&s>0&&(t=new Qr({next:function(e){return h.next(e)},error:function(e){u=!0,d(),r=Da(f,i,e),h.error(e)},complete:function(){l=!0,d(),r=Da(f,o),h.complete()}}),zi(e).subscribe(t))})(e)}}function Da(e,t){var n=[...arguments].slice(2);if(t===!0){e();return}if(t!==!1){var r=new Qr({next:function(){r.unsubscribe(),e()}});return zi(t.apply(void 0,Tr([],wr(n)))).subscribe(r)}}function Oa(){var e=[...arguments],t=Di(e);return di(function(n,r){(t?va(e,n,t):va(e,n)).subscribe(r)})}function ka(e,t){return di(function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(fi(r,function(n){i?.unsubscribe();var o=0,c=a++;zi(e(n,c)).subscribe(i=fi(r,function(e){return r.next(t?t(n,e,c,o++):e)},function(){i=null,s()}))},function(){o=!0,s()}))})}function Aa(e){return di(function(t,n){zi(e).subscribe(fi(n,function(){return n.complete()},Br)),!n.closed&&t.subscribe(n)})}var P=c();function ja(e){return e}function Ma(e){return e}function Na(e){return e}function Pa(e){return e}function Fa(e){return e}function Ia(e){return e}function La(e){return e}function Ra(e){if(e.includes(`/`))throw TypeError(`Expected ResourceId, got URI: ${e}`);return e}function za(e){if(e.includes(`/`))throw TypeError(`Expected AnnotationId, got URI: ${e}`);return e}var Ba=[`yield:created`,`yield:cloned`,`yield:updated`,`yield:moved`,`yield:representation-added`,`yield:representation-removed`,`mark:added`,`mark:removed`,`mark:body-updated`,`mark:archived`,`mark:unarchived`,`mark:entity-tag-added`,`mark:entity-tag-removed`,`frame:entity-type-added`,`frame:tag-schema-added`,`job:started`,`job:progress`,`job:completed`,`job:failed`],Va=[`job:complete`,`job:fail`];function Ha(e){let t=e.payload;if(e.type===`mark:added`)return t?.annotation?.id||null;if((e.type===`mark:removed`||e.type===`mark:body-updated`)&&t?.annotationId&&e.resourceId)try{let n=e.resourceId;return`${n.substring(0,n.lastIndexOf(`/resources/`))}/annotations/${t.annotationId}`}catch{return null}return null}var Ua=typeof process<`u`&&!!{}?.SEMIONT_BUS_LOG;function Wa(){return globalThis.__SEMIONT_BUS_LOG__?!0:Ua}var Ga;function Ka(e){Ga=e}function qa(e,t,n,r){if(!Wa())return;let i=n?.correlationId,a=typeof i==`string`?i.slice(0,8):void 0,o;if(Ga)try{o=Ga()}catch{}let s=`[bus ${e}] ${t}`+(r?` scope=${r}`:``)+(a?` cid=${a}`:``)+(o?` trace=${o.slice(0,8)}`:``);console.debug(s,n)}var Ja=class{subjects;isDestroyed;constructor(){this.subjects=new Map,this.isDestroyed=!1}get(e){if(this.isDestroyed)throw Error(`Cannot access event '${String(e)}' on destroyed bus`);if(!this.subjects.has(e)){let t=new hi;if(Wa()){let n=t.next.bind(t);t.next=t=>{qa(`EMIT`,String(e),t),n(t)}}this.subjects.set(e,t)}return this.subjects.get(e)}getDomainEvent(e){return this.get(e)}destroy(){if(!this.isDestroyed){for(let e of this.subjects.values())e.complete();this.subjects.clear(),this.isDestroyed=!0}}get destroyed(){return this.isDestroyed}scope(e){return new Ya(this,e)}},Ya=class e{constructor(e,t){this.parent=e,this.scopePrefix=t}get(e){let t=`${this.scopePrefix}:${e}`,n=this.parent.subjects;return n.has(t)||n.set(t,new hi),n.get(t)}getDomainEvent(e){return this.get(e)}scope(t){return new e(this.parent,`${this.scopePrefix}:${t}`)}};function Xa(e){if(!e)return null;let t=(Array.isArray(e)?e:[e]).find(e=>e.type===`TextPositionSelector`);return t&&t.type===`TextPositionSelector`?t:null}function Za(e){if(!e)return null;let t=(Array.isArray(e)?e:[e]).find(e=>e.type===`SvgSelector`);return t&&t.type===`SvgSelector`?t:null}function Qa(e){if(!e)return null;let t=(Array.isArray(e)?e:[e]).find(e=>e.type===`FragmentSelector`);return t&&t.type===`FragmentSelector`?t:null}function $a(e){if(Array.isArray(e)){for(let t of e)if(typeof t==`object`&&t&&`type`in t&&`source`in t){let e=t.type,n=t.source;if(e===`SpecificResource`&&typeof n==`string`)return n}return null}if(typeof e==`object`&&e&&`type`in e&&`source`in e){let t=e.type,n=e.source;if(t===`SpecificResource`&&typeof n==`string`)return n}return null}function eo(e){return $a(e)!==null}function to(e){if(typeof e!=`string`)return e.selector}function no(e){return e.motivation===`highlighting`}function ro(e){return e.motivation===`linking`}function io(e){return e.motivation===`assessing`}function ao(e){return e.motivation===`commenting`}function oo(e){return e.motivation===`tagging`}function so(e){if(!ao(e))return;let t=Array.isArray(e.body)?e.body[0]:e.body;if(t&&`value`in t)return t.value}function co(e){return ro(e)&&eo(e.body)}function lo(e){if(!e)return``;let t=(Array.isArray(e)?e:[e]).find(e=>e.type===`TextQuoteSelector`);return t?t.exact:``}function uo(e){return lo(to(e.target))}function fo(e){let t=(Array.isArray(e)?e:[e]).find(e=>e.type===`TextQuoteSelector`);return t&&t.type===`TextQuoteSelector`?t:null}function po(e){if(e)return e[`@id`]||void 0}function mo(e){if(e?.representations)return(Array.isArray(e.representations)?e.representations:[e.representations])[0]}function ho(e){return mo(e)?.mediaType}function go(e){return mo(e)?.language}var _o=`browse:resources-result.browse:resources-failed.browse:resource-result.browse:resource-failed.browse:annotations-result.browse:annotations-failed.browse:annotation-result.browse:annotation-failed.browse:annotation-history-result.browse:annotation-history-failed.browse:events-result.browse:events-failed.browse:referenced-by-result.browse:referenced-by-failed.browse:entity-types-result.browse:entity-types-failed.browse:tag-schemas-result.browse:tag-schemas-failed.browse:directory-result.browse:directory-failed.browse:annotation-context-result.browse:annotation-context-failed.mark:delete-ok.mark:delete-failed.mark:create-ok.mark:create-failed.match:search-results.match:search-failed.gather:complete.gather:failed.gather:annotation-progress.gather:annotation-finished.gather:summary-result.gather:summary-failed.bind:body-updated.bind:body-update-failed.job:report-progress.job:complete.job:fail.job:status-result.job:status-failed.job:created.job:create-failed.job:claimed.job:claim-failed.yield:create-ok.yield:create-failed.yield:update-ok.yield:update-failed.yield:clone-token-generated.yield:clone-token-failed.yield:clone-resource-result.yield:clone-resource-failed.yield:clone-created.yield:clone-create-failed.frame:entity-type-added.frame:tag-schema-added.beckon:focus.beckon:sparkle.bus:resume-gap`.split(`.`);function vo(e){return e.replace(/\s+/g,` `).replace(/[\u2018\u2019]/g,`'`).replace(/[\u201C\u201D]/g,`"`).replace(/\u2014/g,`--`).replace(/\u2013/g,`-`).trim()}function yo(e,t){let n=e.length,r=t.length,i=[];for(let e=0;e<=n;e++)i[e]=[e];for(let e=0;e<=r;e++)i[0][e]=e;for(let a=1;a<=n;a++)for(let n=1;n<=r;n++){let r=e[a-1]===t[n-1]?0:1,o=i[a-1][n]+1,s=i[a][n-1]+1,c=i[a-1][n-1]+r;i[a][n]=Math.min(o,s,c)}return i[n][r]}function bo(e){return{normalizedContent:vo(e),lowerContent:e.toLowerCase()}}function xo(e,t,n,r){let i=Math.max(5,Math.floor(t.length*.05)),a=e.indexOf(t);if(a!==-1)return{start:a,end:a+t.length,matchQuality:`exact`};let o=vo(t),s=r.normalizedContent.indexOf(o);if(s!==-1){let n=0,r=0;for(;r<s&&n<e.length;){let t=e[n],i=vo(t);i&&(r+=i.length),n++}return{start:n,end:n+t.length,matchQuality:`normalized`}}let c=t.toLowerCase(),l=r.lowerContent.indexOf(c);if(l!==-1)return{start:l,end:l+t.length,matchQuality:`case-insensitive`};let u=t.length,d=Math.min(500,e.length),f=n===void 0?0:Math.max(0,n-d),p=n===void 0?e.length:Math.min(e.length,n+d),m=null;for(let n=f;n<=p-u;n++){let r=yo(t,e.substring(n,n+u));r<=i&&(!m||r<m.distance)&&(m={start:n,distance:r})}return m?{start:m.start,end:m.start+u,matchQuality:`fuzzy`}:null}function So(e,t,n,r,i,a){if(!t)return null;if(i!==void 0&&i>=0&&i+t.length<=e.length&&e.substring(i,i+t.length)===t)return{start:i,end:i+t.length};let o=[],s=e.indexOf(t);for(;s!==-1;)o.push(s),s=e.indexOf(t,s+1);if(o.length===0){let n=xo(e,t,i,a);return n?{start:n.start,end:n.end}:null}if(o.length===1){let e=o[0];return{start:e,end:e+t.length}}if(n||r){for(let i of o){let a=Math.max(0,i-(n?.length||0)),o=e.substring(a,i),s=Math.min(e.length,i+t.length+(r?.length||0)),c=e.substring(i+t.length,s),l=!n||o.endsWith(n),u=!r||c.startsWith(r);if(l&&u)return{start:i,end:i+t.length}}for(let i of o){let a=e.substring(Math.max(0,i-(n?.length||0)),i),o=e.substring(i+t.length,i+t.length+(r?.length||0)),s=!n||a.includes(n.trim()),c=!r||o.includes(r.trim());if(s&&c)return{start:i,end:i+t.length}}}let c=o[0];return{start:c,end:c+t.length}}var Co=[{code:`ar`,nativeName:`العربية`,englishName:`Arabic`},{code:`bn`,nativeName:`বাংলা`,englishName:`Bengali`},{code:`cs`,nativeName:`Čeština`,englishName:`Czech`},{code:`da`,nativeName:`Dansk`,englishName:`Danish`},{code:`de`,nativeName:`Deutsch`,englishName:`German`},{code:`el`,nativeName:`Ελληνικά`,englishName:`Greek`},{code:`en`,nativeName:`English`,englishName:`English`},{code:`es`,nativeName:`Español`,englishName:`Spanish`},{code:`fa`,nativeName:`فارسی`,englishName:`Persian`},{code:`fi`,nativeName:`Suomi`,englishName:`Finnish`},{code:`fr`,nativeName:`Français`,englishName:`French`},{code:`he`,nativeName:`עברית`,englishName:`Hebrew`},{code:`hi`,nativeName:`हिन्दी`,englishName:`Hindi`},{code:`id`,nativeName:`Bahasa Indonesia`,englishName:`Indonesian`},{code:`it`,nativeName:`Italiano`,englishName:`Italian`},{code:`ja`,nativeName:`日本語`,englishName:`Japanese`},{code:`ko`,nativeName:`한국어`,englishName:`Korean`},{code:`ms`,nativeName:`Bahasa Melayu`,englishName:`Malay`},{code:`nl`,nativeName:`Nederlands`,englishName:`Dutch`},{code:`no`,nativeName:`Norsk`,englishName:`Norwegian`},{code:`pl`,nativeName:`Polski`,englishName:`Polish`},{code:`pt`,nativeName:`Português`,englishName:`Portuguese`},{code:`ro`,nativeName:`Română`,englishName:`Romanian`},{code:`sv`,nativeName:`Svenska`,englishName:`Swedish`},{code:`th`,nativeName:`ไทย`,englishName:`Thai`},{code:`tr`,nativeName:`Türkçe`,englishName:`Turkish`},{code:`uk`,nativeName:`Українська`,englishName:`Ukrainian`},{code:`vi`,nativeName:`Tiếng Việt`,englishName:`Vietnamese`},{code:`zh`,nativeName:`中文`,englishName:`Chinese`}],wo=new Map(Co.map(e=>[e.code.toLowerCase(),e]));function To(e){if(e)return wo.get(e.toLowerCase())}function Eo(e){if(!e)return;let t=To(e);return t?`${t.nativeName} (${e.toLowerCase()})`:e}function Do(e,t){return`<svg xmlns="http://www.w3.org/2000/svg"><rect x="${Math.min(e.x,t.x)}" y="${Math.min(e.y,t.y)}" width="${Math.abs(t.x-e.x)}" height="${Math.abs(t.y-e.y)}"/></svg>`}function Oo(e){if(e.length<3)throw Error(`Polygon requires at least 3 points`);return`<svg xmlns="http://www.w3.org/2000/svg"><polygon points="${e.map(e=>`${e.x},${e.y}`).join(` `)}"/></svg>`}function ko(e,t){if(t<=0)throw Error(`Circle radius must be positive`);return`<svg xmlns="http://www.w3.org/2000/svg"><circle cx="${e.x}" cy="${e.y}" r="${t}"/></svg>`}function Ao(e){let t=e.match(/<rect\s+([^>]+)\/>/);if(t&&t[1]){let e=t[1];return{type:`rect`,data:{x:parseFloat(e.match(/x="([^"]+)"/)?.[1]||`0`),y:parseFloat(e.match(/y="([^"]+)"/)?.[1]||`0`),width:parseFloat(e.match(/width="([^"]+)"/)?.[1]||`0`),height:parseFloat(e.match(/height="([^"]+)"/)?.[1]||`0`)}}}let n=e.match(/<polygon\s+points="([^"]+)"/);if(n&&n[1])return{type:`polygon`,data:{points:n[1].split(/\s+/).map(e=>{let[t,n]=e.split(`,`).map(parseFloat);return{x:t,y:n}})}};let r=e.match(/<circle\s+([^>]+)\/>/);if(r&&r[1]){let e=r[1];return{type:`circle`,data:{cx:parseFloat(e.match(/cx="([^"]+)"/)?.[1]||`0`),cy:parseFloat(e.match(/cy="([^"]+)"/)?.[1]||`0`),r:parseFloat(e.match(/r="([^"]+)"/)?.[1]||`0`)}}}return null}function jo(e,t,n,r,i){let a=Ao(e);if(!a)return e;let o=r/t,s=i/n;switch(a.type){case`rect`:{let{x:e,y:t,width:n,height:r}=a.data;return Do({x:e*o,y:t*s},{x:(e+n)*o,y:(t+r)*s})}case`circle`:{let{cx:e,cy:t,r:n}=a.data;return ko({x:e*o,y:t*s},n*Math.min(o,s))}case`polygon`:return Oo(a.data.points.map(e=>({x:e.x*o,y:e.y*s})))}return e}function Mo(e,t,n){let r;if(t>0){let n=Math.max(0,t-64),i=0;for(;n>0&&i<32;){let t=e[n-1];if(!t||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(t))break;n--,i++}r=e.substring(n,t)}let i;if(n<e.length){let t=Math.min(e.length,n+64),r=0;for(;t<e.length&&r<32;){let n=e[t];if(!n||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(n))break;t++,r++}i=e.substring(n,t)}return{prefix:r,suffix:i}}function No(e){return(e.match(/charset=([^\s;]+)/i)?.[1]||`utf-8`).toLowerCase()}function Po(e,t){let n=No(t);return new TextDecoder(n).decode(e)}function Fo(e){return e===`image/png`||e===`image/jpeg`}function Io(e){return e===`text/plain`||e===`text/markdown`}function Lo(e){return e===`application/pdf`}function Ro(e){return Io(e)?`text`:Fo(e)||Lo(e)?`image`:`unsupported`}var zo=class extends Error{constructor(e,t,n){super(e),this.code=t,this.details=n,this.name=`SemiontError`,Error.captureStackTrace(this,this.constructor)}},Bo=class extends Error{response;request;options;constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),this.name=`HTTPError`,this.response=e,this.request=t,this.options=n}},Vo=class extends Error{name=`NonError`;value;constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),this.value=e}},Ho=class extends Error{name=`ForceRetryError`;customDelay;code;customRequest;constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new Vo(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},Uo=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),Wo=typeof globalThis.AbortController==`function`,Go=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,Ko=typeof globalThis.ReadableStream==`function`,qo=typeof globalThis.FormData==`function`,Jo=[`get`,`post`,`put`,`patch`,`head`,`delete`],Yo={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},Xo=2147483647,Zo=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,Qo=Symbol(`stop`),$o=class{options;constructor(e){this.options=e}},es=e=>new $o(e),ts={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},ns={next:!0},rs={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},is=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=Zo,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r==`string`?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e==`string`)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if(`byteLength`in e)return e.byteLength;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},as=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},os=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let n=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response(as(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},ss=(e,t,n)=>{if(!e.body)return e;let r=is(n??e.body);return new Request(e,{duplex:`half`,body:as(e.body,r,t)})},cs=e=>typeof e==`object`&&!!e,ls=(...e)=>{for(let t of e)if((!cs(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return ms({},...e)},us=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n};function ds(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:ms(e[n]??[],t[n]??[])}var fs=(e={},t={})=>({beforeRequest:ds(e,t,`beforeRequest`),beforeRetry:ds(e,t,`beforeRetry`),afterResponse:ds(e,t,`afterResponse`),beforeError:ds(e,t,`beforeError`)}),ps=(e,t)=>{let n=new URLSearchParams;for(let r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(let[e,t]of r.entries())n.append(e,t);else if(Array.isArray(r))for(let e of r){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1]))}else if(cs(r))for(let[e,t]of Object.entries(r))t!==void 0&&n.append(e,String(t));else{let e=new URLSearchParams(r);for(let[t,r]of e.entries())n.append(t,r)}return n},ms=(...e)=>{let t={},n={},r={},i,a=[];for(let o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(cs(o)){for(let[e,n]of Object.entries(o)){if(e===`signal`&&n instanceof globalThis.AbortSignal){a.push(n);continue}if(e===`context`){if(n!=null&&(!cs(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");t={...t,context:n==null?{}:{...t.context,...n}};continue}if(e===`searchParams`){i=n==null?void 0:i===void 0?n:ps(i,n);continue}cs(n)&&e in t&&(n=ms(t[e],n)),t={...t,[e]:n}}cs(o.hooks)&&(r=fs(r,o.hooks),t.hooks=r),cs(o.headers)&&(n=us(n,o.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:Go?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},hs=e=>Jo.includes(e)?e.toUpperCase():e,gs={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},_s=(e={})=>{if(typeof e==`number`)return{...gs,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...gs,...t}},vs=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name=`TimeoutError`,this.request=e}};async function ys(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new vs(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function bs(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var xs=(e,t)=>{let n={};for(let r in t)Object.hasOwn(t,r)&&!(r in rs)&&!(r in ts)&&(!(r in e)||r in ns)&&(n[r]=t[r]);return n},Ss=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e;function Cs(e){return e instanceof Bo||e?.name===Bo.name}function ws(e){return e instanceof vs||e?.name===vs.name}var Ts=class e{static create(t,n){let r=new e(t,n),i=r.#p(async()=>{if(typeof r.#i.timeout==`number`&&r.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${Xo}`);await Promise.resolve();let e=await r.#m();for(let t of r.#i.hooks.afterResponse){let n=r.#u(e.clone()),i;try{i=await t(r.request,r.#h(),n,{retryCount:r.#n})}catch(t){throw r.#f(n),r.#f(e),t}if(i instanceof $o)throw r.#f(n),r.#f(e),new Ho(i.options);let a=i instanceof globalThis.Response?i:e;n!==a&&r.#f(n),e!==a&&r.#f(e),e=a}if(r.#u(e),!e.ok&&(typeof r.#i.throwHttpErrors==`function`?r.#i.throwHttpErrors(e.status):r.#i.throwHttpErrors)){let t=new Bo(e,r.request,r.#h());for(let e of r.#i.hooks.beforeError)t=await e(t,{retryCount:r.#n});throw t}if(r.#i.onDownloadProgress){if(typeof r.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!Ko)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let t=e.clone();return r.#f(e),os(t,r.#i.onDownloadProgress)}return e}).finally(()=>{let e=r.#a;r.#d(e?.body??void 0),r.#d(r.request.body??void 0)});for(let[e,t]of Object.entries(Yo))e===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(i[e]=async()=>{r.request.headers.set(`accept`,r.request.headers.get(`accept`)||t);let a=await i;if(e===`json`){if(a.status===204)return``;let e=await a.text();return e===``?``:n.parseJson?n.parseJson(e):JSON.parse(e)}return a[e]()});return i}static#e(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}request;#t;#n=0;#r;#i;#a;#o;#s;constructor(t,n={}){if(this.#r=t,this.#i={...n,headers:us(this.#r.headers,n.headers),hooks:fs({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:hs(n.method??this.#r.method??`GET`),prefixUrl:String(n.prefixUrl||``),retry:_s(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this.#i.prefixUrl&&typeof this.#r==`string`){if(this.#r.startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#i.prefixUrl.endsWith(`/`)||(this.#i.prefixUrl+=`/`),this.#r=this.#i.prefixUrl+this.#r}Wo&&Go&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal),Uo&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let r=n.headers&&new globalThis.Headers(n.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(qo&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!r&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),Ss(this.#i.searchParams)){let t=`?`+(typeof this.#i.searchParams==`string`?this.#i.searchParams.replace(/^\?/,``):new URLSearchParams(e.#e(this.#i.searchParams)).toString()),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(n,this.#i)}if(this.#i.onUploadProgress){if(typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!Uo)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#_(this.request,this.#i.body??void 0)}}#c(){let e=this.#i.retry.delay(this.#n),t=e;this.#i.retry.jitter===!0?t=Math.random()*e:typeof this.#i.retry.jitter==`function`&&(t=this.#i.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));let n=this.#i.retry.backoffLimit??1/0;return Math.min(n,t)}async#l(e){if(this.#n++,this.#n>this.#i.retry.limit)throw e;let t=e instanceof Error?e:new Vo(e);if(t instanceof Ho)return t.customDelay??this.#c();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#i.retry.shouldRetry!==void 0){let n=await this.#i.retry.shouldRetry({error:t,retryCount:this.#n});if(n===!1)throw e;if(n===!0)return this.#c()}if(ws(e)&&!this.#i.retry.retryOnTimeout)throw e;if(Cs(e)){if(!this.#i.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&this.#i.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now());let n=this.#i.retry.maxRetryAfter??e;return e<n?e:n}if(e.response.status===413)throw e}return this.#c()}#u(e){return this.#i.parseJson&&(e.json=async()=>this.#i.parseJson(await e.text())),e}#d(e){e&&e.cancel().catch(()=>void 0)}#f(e){this.#d(e.body??void 0)}async#p(e){try{return await e()}catch(t){let n=Math.min(await this.#l(t),Xo);if(this.#n<1)throw t;if(await bs(n,this.#o?{signal:this.#o}:{}),t instanceof Ho&&t.customRequest){let e=this.#i.signal?new globalThis.Request(t.customRequest,{signal:this.#i.signal}):new globalThis.Request(t.customRequest);this.#g(e)}for(let e of this.#i.hooks.beforeRetry){let n=await e({request:this.request,options:this.#h(),error:t,retryCount:this.#n});if(n instanceof globalThis.Request){this.#g(n);break}if(n instanceof globalThis.Response)return n;if(n===Qo)return}return this.#p(e)}}async#m(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal,this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));for(let e of this.#i.hooks.beforeRequest){let t=await e(this.request,this.#h(),{retryCount:this.#n});if(t instanceof Response)return t;if(t instanceof globalThis.Request){this.#g(t);break}}let e=xs(this.request,this.#i);return this.#a=this.request,this.request=this.#a.clone(),this.#i.timeout===!1?this.#i.fetch(this.#a,e):ys(this.#a,e,this.#t,this.#i)}#h(){if(!this.#s){let{hooks:e,...t}=this.#i;this.#s=Object.freeze(t)}return this.#s}#g(e){this.#s=void 0,this.request=this.#_(e)}#_(e,t){return!this.#i.onUploadProgress||!e.body?e:ss(e,this.#i.onUploadProgress,t??this.#i.body??void 0)}},Es=e=>{let t=(t,n)=>Ts.create(t,ls(e,n));for(let n of Jo)t[n]=(t,r)=>Ts.create(t,ls(e,r,{method:n}));return t.create=e=>Es(ls(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),Es(ls(e,t))),t.stop=Qo,t.retry=es,t},Ds=Es(),Os=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},ks=`1.9.0`,As=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function js(e){var t=new Set([e]),n=new Set,r=e.match(As);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(As);if(!r)return a(e);var s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var Ms=js(ks),Ns=ks.split(`.`)[0],Ps=Symbol.for(`opentelemetry.js.api.`+Ns),Fs=Os;function Is(e,t,n,r){r===void 0&&(r=!1);var i=Fs[Ps]=Fs[Ps]??{version:ks};if(!r&&i[e]){var a=Error(`@opentelemetry/api: Attempted duplicate registration of API: `+e);return n.error(a.stack||a.message),!1}if(i.version!==`1.9.0`){var a=Error(`@opentelemetry/api: Registration of version v`+i.version+` for `+e+` does not match previously registered API v`+ks);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for `+e+` v`+ks+`.`),!0}function Ls(e){var t=Fs[Ps]?.version;if(!(!t||!Ms(t)))return Fs[Ps]?.[e]}function Rs(e,t){t.debug(`@opentelemetry/api: Unregistering a global for `+e+` v`+ks+`.`);var n=Fs[Ps];n&&delete n[e]}var zs=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Bs=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Vs=function(){function e(e){this._namespace=e.namespace||`DiagComponentLogger`}return e.prototype.debug=function(){var e=[...arguments];return Hs(`debug`,this._namespace,e)},e.prototype.error=function(){var e=[...arguments];return Hs(`error`,this._namespace,e)},e.prototype.info=function(){var e=[...arguments];return Hs(`info`,this._namespace,e)},e.prototype.warn=function(){var e=[...arguments];return Hs(`warn`,this._namespace,e)},e.prototype.verbose=function(){var e=[...arguments];return Hs(`verbose`,this._namespace,e)},e}();function Hs(e,t,n){var r=Ls(`diag`);if(r)return n.unshift(t),r[e].apply(r,Bs([],zs(n),!1))}var Us;(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(Us||={});function Ws(e,t){e<Us.NONE?e=Us.NONE:e>Us.ALL&&(e=Us.ALL),t||={};function n(n,r){var i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,Us.ERROR),warn:n(`warn`,Us.WARN),info:n(`info`,Us.INFO),debug:n(`debug`,Us.DEBUG),verbose:n(`verbose`,Us.VERBOSE)}}var Gs=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Ks=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},qs=`diag`,Js=function(){function e(){function e(e){return function(){var t=[...arguments],n=Ls(`diag`);if(n)return n[e].apply(n,Ks([],Gs(t),!1))}}var t=this;t.setLogger=function(e,n){if(n===void 0&&(n={logLevel:Us.INFO}),e===t){var r=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(r.stack??r.message),!1}typeof n==`number`&&(n={logLevel:n});var i=Ls(`diag`),a=Ws(n.logLevel??Us.INFO,e);if(i&&!n.suppressOverrideMessage){var o=Error().stack??`<failed to generate stacktrace>`;i.warn(`Current logger will be overwritten from `+o),a.warn(`Current logger will overwrite one already registered from `+o)}return Is(`diag`,a,t,!0)},t.disable=function(){Rs(qs,t)},t.createComponentLogger=function(e){return new Vs(e)},t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}return e.instance=function(){return this._instance||=new e,this._instance},e}(),Ys=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Xs=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},Zs=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=Ys(e,2);return[t[0],t[1]]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=new e(this._entries);try{for(var o=Xs(r),s=o.next();!s.done;s=o.next()){var c=s.value;a._entries.delete(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}(),Qs=Symbol(`BaggageEntryMetadata`),$s=Js.instance();function ec(e){return e===void 0&&(e={}),new Zs(new Map(Object.entries(e)))}function tc(e){return typeof e!=`string`&&($s.error(`Cannot create baggage metadata from unknown type: `+typeof e),e=``),{__TYPE__:Qs,toString:function(){return e}}}function nc(e){return Symbol.for(e)}var rc=new(function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}return e}()),ic=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ac=function(){function e(){}return e.prototype.createGauge=function(e,t){return _c},e.prototype.createHistogram=function(e,t){return vc},e.prototype.createCounter=function(e,t){return gc},e.prototype.createUpDownCounter=function(e,t){return yc},e.prototype.createObservableGauge=function(e,t){return xc},e.prototype.createObservableCounter=function(e,t){return bc},e.prototype.createObservableUpDownCounter=function(e,t){return Sc},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),oc=function(){function e(){}return e}(),sc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(oc),cc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(oc),lc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(oc),uc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(oc),dc=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),fc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(dc),pc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(dc),mc=function(e){ic(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(dc),hc=new ac,gc=new sc,_c=new lc,vc=new uc,yc=new cc,bc=new fc,xc=new pc,Sc=new mc;function Cc(){return hc}var wc={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},Tc={set:function(e,t,n){e!=null&&(e[t]=n)}},Ec=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Dc=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Oc=function(){function e(){}return e.prototype.active=function(){return rc},e.prototype.with=function(e,t,n){var r=[...arguments].slice(3);return t.call.apply(t,Dc([n],Ec(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),kc=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Ac=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},jc=`context`,Mc=new Oc,Nc=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalContextManager=function(e){return Is(jc,e,Js.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return(r=this._getContextManager()).with.apply(r,Ac([e,t,n],kc(i),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return Ls(jc)||Mc},e.prototype.disable=function(){this._getContextManager().disable(),Rs(jc,Js.instance())},e}(),Pc;(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(Pc||={});var Fc={traceId:`00000000000000000000000000000000`,spanId:`0000000000000000`,traceFlags:Pc.NONE},Ic=function(){function e(e){e===void 0&&(e=Fc),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),Lc=nc(`OpenTelemetry Context Key SPAN`);function Rc(e){return e.getValue(Lc)||void 0}function zc(){return Rc(Nc.getInstance().active())}function Bc(e,t){return e.setValue(Lc,t)}function Vc(e){return e.deleteValue(Lc)}function Hc(e,t){return Bc(e,new Ic(t))}function Uc(e){return Rc(e)?.spanContext()}var Wc=/^([0-9a-f]{32})$/i,Gc=/^[0-9a-f]{16}$/i;function Kc(e){return Wc.test(e)&&e!==`00000000000000000000000000000000`}function qc(e){return Gc.test(e)&&e!==`0000000000000000`}function Jc(e){return Kc(e.traceId)&&qc(e.spanId)}function Yc(e){return new Ic(e)}var Xc=Nc.getInstance(),Zc=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(n===void 0&&(n=Xc.active()),t?.root)return new Ic;var r=n&&Uc(n);return Qc(r)&&Jc(r)?new Ic(r):new Ic},e.prototype.startActiveSpan=function(e,t,n,r){var i,a,o;if(!(arguments.length<2)){arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);var s=a??Xc.active(),c=this.startSpan(e,i,s),l=Bc(s,c);return Xc.with(l,o,void 0,c)}},e}();function Qc(e){return typeof e==`object`&&typeof e.spanId==`string`&&typeof e.traceId==`string`&&typeof e.traceFlags==`number`}var $c=new Zc,el=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):$c},e}(),tl=new(function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new Zc},e}()),nl=function(){function e(){}return e.prototype.getTracer=function(e,t,n){return this.getDelegateTracer(e,t,n)??new el(this,e,t,n)},e.prototype.getDelegate=function(){return this._delegate??tl},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){return this._delegate?.getTracer(e,t,n)},e}(),rl;(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(rl||={});var il;(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(il||={});var al=Nc.getInstance(),ol=new(function(){function e(){}return e.prototype.getMeter=function(e,t,n){return hc},e}()),sl=`metrics`,cl=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalMeterProvider=function(e){return Is(sl,e,Js.instance())},e.prototype.getMeterProvider=function(){return Ls(sl)||ol},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){Rs(sl,Js.instance())},e}().getInstance(),ll=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),ul=nc(`OpenTelemetry Baggage Key`);function dl(e){return e.getValue(ul)||void 0}function fl(){return dl(Nc.getInstance().active())}function pl(e,t){return e.setValue(ul,t)}function ml(e){return e.deleteValue(ul)}var hl=`propagation`,gl=new ll,_l=function(){function e(){this.createBaggage=ec,this.getBaggage=dl,this.getActiveBaggage=fl,this.setBaggage=pl,this.deleteBaggage=ml}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalPropagator=function(e){return Is(hl,e,Js.instance())},e.prototype.inject=function(e,t,n){return n===void 0&&(n=Tc),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return n===void 0&&(n=wc),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Rs(hl,Js.instance())},e.prototype._getGlobalPropagator=function(){return Ls(hl)||gl},e}().getInstance(),vl=`trace`,yl=function(){function e(){this._proxyTracerProvider=new nl,this.wrapSpanContext=Yc,this.isSpanContextValid=Jc,this.deleteSpan=Vc,this.getSpan=Rc,this.getActiveSpan=zc,this.getSpanContext=Uc,this.setSpan=Bc,this.setSpanContext=Hc}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=Is(vl,this._proxyTracerProvider,Js.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return Ls(vl)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){Rs(vl,Js.instance()),this._proxyTracerProvider=new nl},e}().getInstance();Ka(()=>{let e=yl.getActiveSpan();if(!e)return;let t=e.spanContext();if(Jc(t))return t.traceId});var bl=`semiont`,xl=()=>yl.getTracer(bl);async function Sl(e,t,n){let r=xl().startSpan(e,{kind:n?.kind??rl.INTERNAL,...n?.attrs?{attributes:n.attrs}:{}});try{return await al.with(yl.setSpan(al.active(),r),()=>t(r))}catch(e){throw r.recordException(e),r.setStatus({code:il.ERROR,message:e instanceof Error?e.message:String(e)}),e}finally{r.end()}}var Cl=`_trace`;function wl(){let e={};_l.inject(al.active(),e);let t=e.traceparent;if(t)return e.tracestate?{traceparent:t,tracestate:e.tracestate}:{traceparent:t}}function Tl(e){let t=e[Cl];if(t!==void 0&&delete e[Cl],!(!t||typeof t.traceparent!=`string`))return t}function El(e,t){if(!e)return t();let n={traceparent:e.traceparent};e.tracestate&&(n.tracestate=e.tracestate);let r=_l.extract(al.active(),n);return al.with(r,t)}var Dl=`semiont`,Ol=()=>cl.getMeter(Dl),kl;function Al(){return kl||=Ol().createCounter(`semiont.bus.emit`,{description:`Bus emits by channel and scope`}),kl}function jl(e,t){Al().add(1,{"bus.channel":e,...t?{"bus.scope":t}:{}})}var Ml=3e3,Nl={initial:[`connecting`,`closed`],connecting:[`open`,`reconnecting`,`closed`],open:[`reconnecting`,`closed`],reconnecting:[`connecting`,`degraded`,`closed`],degraded:[`connecting`,`closed`],closed:[]};function Pl(e){let{baseUrl:t,token:n,channels:r,scope:i,reconnectMs:a=5e3}=e,o=typeof n==`function`?n:()=>n,s=new Set(r),c=new Set,l=i,u=new hi,d=new _i(`initial`),f=`initial`,p=null,m=e=>{if(f===e)return;if(!Nl[f].includes(e))throw Error(`Invalid connection state transition: ${f} \u2192 ${e}`);let t=f;f=e,e===`reconnecting`&&t!==`reconnecting`&&(p&&clearTimeout(p),p=setTimeout(()=>{f===`reconnecting`&&m(`degraded`)},Ml)),t===`reconnecting`&&e!==`reconnecting`&&(p&&=(clearTimeout(p),null)),d.next(e)},h=!1,g=new Set,_=null,v=null,y=u.pipe(Ea()),b=()=>{for(let e of g)try{e.abort()}catch{}g.clear(),_&&=(clearTimeout(_),null)},x=async()=>{m(`connecting`);for(let e of g)try{e.abort()}catch{}g.clear();let e=new URLSearchParams;for(let t of s)e.append(`channel`,t);if(l&&c.size>0){e.append(`scope`,l);for(let t of c)e.append(`scoped`,t)}let n=`${t}/bus/subscribe?${e.toString()}`,r=new AbortController;g.add(r);try{let e={Authorization:`Bearer ${o()}`};v&&(e[`Last-Event-ID`]=v);let t=await fetch(n,{headers:e,signal:r.signal});if(!t.ok||!t.body)throw Error(`SSE connect failed: ${t.status}`);m(`open`);let i=t.body.getReader(),a=new TextDecoder,s=``,c=``,l=``,d;for(;h&&g.has(r);){let{done:e,value:t}=await i.read();if(e)break;s+=a.decode(t,{stream:!0});let n=s.split(`
|
|
7
|
+
`);s=n.pop()??``;for(let e of n)if(e.startsWith(`event: `))c=e.slice(7);else if(e.startsWith(`data: `))l=e.slice(6);else if(e.startsWith(`id: `))d=e.slice(4);else if(e===``){if(c===`bus-event`&&l){d!==void 0&&(v=d);let e=JSON.parse(l);qa(`RECV`,e.channel,e.payload,e.scope),await El(Tl(e.payload),()=>Sl(`bus.recv:${e.channel}`,()=>{u.next(e)},{kind:rl.CONSUMER,attrs:{"bus.channel":e.channel,...e.scope?{"bus.scope":e.scope}:{}}}))}c=``,l=``,d=void 0}}}catch(e){if(e.name===`AbortError`)return}finally{g.delete(r)}h&&(m(`reconnecting`),_=setTimeout(()=>{h&&x()},a))},S=()=>{h&&((f===`open`||f===`connecting`||f===`degraded`)&&m(`reconnecting`),b(),x())},C=null,w=()=>{C&&clearTimeout(C),C=setTimeout(()=>{C=null,S()},100)};return{on$(e){return y.pipe(ba(t=>t.channel===e),pa(e=>e.payload))},emit:async(e,n,r)=>{let i={channel:e,payload:n};r&&(i.scope=r);let a={"Content-Type":`application/json`,Authorization:`Bearer ${o()}`},s=wl();s&&(a.traceparent=s.traceparent,s.tracestate&&(a.tracestate=s.tracestate)),await fetch(`${t}/bus/emit`,{method:`POST`,headers:a,body:JSON.stringify(i)})},state$:d.asObservable(),addChannels:(e,t)=>{let n=!1;if(t!==void 0){for(let t of e)c.has(t)||(c.add(t),n=!0);t!==l&&(l=t,n=!0)}else for(let t of e)s.has(t)||(s.add(t),n=!0);n&&w()},removeChannels:e=>{let t=!1;for(let n of e)c.delete(n)&&(t=!0),s.delete(n)&&(t=!0);c.size===0&&(l=void 0),t&&w()},start:()=>{h||(h=!0,x())},stop:()=>{h=!1,f!==`closed`&&m(`closed`),C&&=(clearTimeout(C),null),p&&=(clearTimeout(p),null),b()},dispose:()=>{h=!1,f!==`closed`&&m(`closed`),C&&=(clearTimeout(C),null),p&&=(clearTimeout(p),null),b(),u.complete(),d.complete()}}}var Fl=[...Ba.filter(e=>e!==`frame:entity-type-added`),...Va];function Il(e){let t=e.headers.get(`Content-Type`)??`application/octet-stream`,n=e.headers.get(`Content-Disposition`)?.match(/filename="(.+?)"/)?.[1];return{stream:e.body,contentType:t,...n?{filename:n}:{}}}function Ll(e){return e===400?`bad-request`:e===401?`unauthorized`:e===403?`forbidden`:e===404?`not-found`:e===409?`conflict`:e>=500?`unavailable`:`error`}var Rl=class extends zo{status;statusText;constructor(e,t,n,r){super(e,Ll(t),{status:t,statusText:n,body:r}),this.name=`APIError`,this.status=t,this.statusText=n}},zl=class{baseUrl;http;token$;logger;errorsSubject=new hi;errors$=this.errorsSubject.asObservable();_actor=null;_actorStarted=!1;disposed=!1;activeResource=null;bridges=[];constructor(e){let{baseUrl:t,timeout:n=3e4,retry:r=2,logger:i,tokenRefresher:a}=e;this.baseUrl=t.endsWith(`/`)?t.slice(0,-1):t,this.token$=e.token$??new _i(null),this.logger=i;let o=a?{limit:1,methods:[`get`,`post`,`put`,`patch`,`delete`,`head`,`options`],statusCodes:[401,408,413,429,500,502,503,504]}:r;this.http=Ds.create({timeout:n,retry:o,credentials:`include`,hooks:{beforeRequest:[e=>{this.logger&&this.logger.debug(`HTTP Request`,{type:`http_request`,url:e.url,method:e.method,timestamp:Date.now(),hasAuth:e.headers.has(`Authorization`)})}],beforeRetry:a?[async({request:e,error:t})=>{if(!(!(t instanceof Bo)||t.response.status!==401))try{let t=await a();if(!t)return Ds.stop;e.headers.set(`Authorization`,`Bearer ${t}`);return}catch{return Ds.stop}}]:[],afterResponse:[(e,t,n)=>(this.logger&&this.logger.debug(`HTTP Response`,{type:`http_response`,url:e.url,method:e.method,status:n.status,statusText:n.statusText}),n)],beforeError:[async e=>{let{response:t,request:n}=e;if(t){let e=await t.json().catch(()=>({}));this.logger&&this.logger.error(`HTTP Request Failed`,{type:`http_error`,url:n.url,method:n.method,status:t.status,statusText:t.statusText,error:e.message||`HTTP ${t.status}: ${t.statusText}`});let r=new Rl(e.message||`HTTP ${t.status}: ${t.statusText}`,t.status,t.statusText,e);throw this.errorsSubject.next(r),r}return e}]}}),this.token$.subscribe(e=>{e&&!this._actorStarted&&!this.disposed&&(this._actorStarted=!0,this.actor.start())})}get actor(){if(!this._actor){this._actor=Pl({baseUrl:this.baseUrl,token:()=>this.token$.getValue()??``,channels:[..._o]});for(let e of _o)this._actor.on$(e).subscribe(t=>{for(let n of this.bridges)n.get(e).next(t)})}return this._actor}async emit(e,t,n){qa(`EMIT`,e,t,n),jl(e,n),await Sl(`bus.emit:${e}`,async()=>{n===void 0?await this.actor.emit(e,t):await this.actor.emit(e,t,n)},{kind:rl.PRODUCER,attrs:{"bus.channel":e,...n?{"bus.scope":n}:{}}})}on(e,t){let n=this.actor.on$(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.actor.on$(e)}bridgeInto(e){this.bridges.push(e)}subscribeToResource(e){if(this.activeResource){if(this.activeResource.resourceId!==e)throw Error(`HttpTransport already subscribed to resource ${this.activeResource.resourceId}; call the unsubscribe returned from the previous subscribeToResource before subscribing to ${e}.`);return this.activeResource.refCount++,this.makeUnsubscriber()}this.actor.addChannels([...Fl],e);let t=[];for(let e of Fl)t.push(this.actor.on$(e).subscribe(t=>{for(let n of this.bridges)n.get(e).next(t)}));return this.activeResource={resourceId:e,refCount:1,bridgeSubs:t},this.makeUnsubscriber()}makeUnsubscriber(){let e=!1;return()=>{if(!e&&(e=!0,this.activeResource&&(this.activeResource.refCount--,!(this.activeResource.refCount>0)))){for(let e of this.activeResource.bridgeSubs)e.unsubscribe();this.actor.removeChannels([...Fl]),this.activeResource=null}}}get state$(){return this.actor.state$}dispose(){if(!this.disposed){if(this.disposed=!0,this.activeResource){for(let e of this.activeResource.bridgeSubs)e.unsubscribe();this.activeResource=null}this._actor&&=(this._actor.dispose(),null),this.errorsSubject.complete()}}pushError(e){this.disposed||this.errorsSubject.next(e)}authHeaders(){let e=this.token$.getValue()??void 0;return e?{Authorization:`Bearer ${e}`}:{}}async authenticatePassword(e,t){return this.http.post(`${this.baseUrl}/api/tokens/password`,{json:{email:e,password:t},headers:this.authHeaders()}).json()}async authenticateGoogle(e){return this.http.post(`${this.baseUrl}/api/tokens/google`,{json:{credential:e},headers:this.authHeaders()}).json()}async refreshAccessToken(e){return this.http.post(`${this.baseUrl}/api/tokens/refresh`,{json:{refreshToken:e},headers:this.authHeaders()}).json()}async logout(){await this.http.post(`${this.baseUrl}/api/users/logout`,{headers:this.authHeaders()}).json()}async acceptTerms(){await this.http.post(`${this.baseUrl}/api/users/accept-terms`,{headers:this.authHeaders()}).json()}async getCurrentUser(){return this.http.get(`${this.baseUrl}/api/users/me`,{headers:this.authHeaders()}).json()}async generateMcpToken(){return this.http.post(`${this.baseUrl}/api/tokens/mcp-generate`,{headers:this.authHeaders()}).json()}async getMediaToken(e){return this.http.post(`${this.baseUrl}/api/tokens/media`,{json:{resourceId:e},headers:this.authHeaders()}).json()}async listUsers(){return this.http.get(`${this.baseUrl}/api/admin/users`,{headers:this.authHeaders()}).json()}async getUserStats(){return this.http.get(`${this.baseUrl}/api/admin/users/stats`,{headers:this.authHeaders()}).json()}async updateUser(e,t){return this.http.patch(`${this.baseUrl}/api/admin/users/${e}`,{json:t,headers:this.authHeaders()}).json()}async getOAuthConfig(){return this.http.get(`${this.baseUrl}/api/admin/oauth/config`,{headers:this.authHeaders()}).json()}async backupKnowledgeBase(){return Il(await this.http.post(`${this.baseUrl}/api/admin/exchange/backup`,{headers:this.authHeaders()}))}restoreKnowledgeBase(e){return this.sseProgressStream(`${this.baseUrl}/api/admin/exchange/restore`,e)}async exportKnowledgeBase(e){let t=e?.includeArchived?new URLSearchParams({includeArchived:`true`}):void 0;return Il(await this.http.post(`${this.baseUrl}/api/moderate/exchange/export`,{headers:this.authHeaders(),...t?{searchParams:t}:{}}))}importKnowledgeBase(e){return this.sseProgressStream(`${this.baseUrl}/api/moderate/exchange/import`,e)}sseProgressStream(e,t){return new oi(n=>{let r=new AbortController,i=new FormData;return i.append(`file`,t),(async()=>{try{let t=(await this.http.post(e,{body:i,headers:this.authHeaders(),signal:r.signal})).body.getReader(),a=new TextDecoder,o=``;for(;!n.closed;){let{done:e,value:r}=await t.read();if(e)break;o+=a.decode(r,{stream:!0});let i=o.split(`
|
|
8
|
+
`);o=i.pop();for(let e of i)if(e.startsWith(`data: `)){let t=JSON.parse(e.slice(6));n.next(t)}}n.complete()}catch(e){n.closed||n.error(e)}})(),()=>r.abort()})}async healthCheck(){return this.http.get(`${this.baseUrl}/api/health`,{headers:this.authHeaders()}).json()}async getStatus(){return this.http.get(`${this.baseUrl}/api/status`,{headers:this.authHeaders()}).json()}get rawHttp(){return this.http}getToken(){return this.token$.getValue()??void 0}},Bl=class{constructor(e){this.transport=e}async putBinary(e,t){let n=e.file instanceof File?e.file.size:e.file.length;return qa(`PUT`,`content`,{name:e.name,format:e.format,storageUri:e.storageUri,sizeBytes:n}),Sl(`content.put`,async()=>{let n=Vl(e),r=this.requestHeaders(t?.auth);return typeof XMLHttpRequest<`u`&&(t?.onProgress||t?.signal)?Hl({url:`${this.transport.baseUrl}/resources`,formData:n,headers:r,onProgress:t.onProgress,signal:t.signal,onApiError:e=>this.transport.pushError(e)}):{resourceId:(await this.transport.rawHttp.post(`${this.transport.baseUrl}/resources`,{body:n,headers:r}).json()).resourceId}},{kind:rl.CLIENT,attrs:{"content.format":e.format,"content.size_bytes":n}})}async getBinary(e,t){return qa(`GET`,`content`,{resourceId:e,accept:t?.accept}),Sl(`content.get`,async()=>{let n=await this.transport.rawHttp.get(`${this.transport.baseUrl}/resources/${e}`,{headers:{Accept:t?.accept??`text/plain`,...this.requestHeaders(t?.auth)}}),r=n.headers.get(`content-type`)||`application/octet-stream`;return{data:await n.arrayBuffer(),contentType:r}},{kind:rl.CLIENT,attrs:{"resource.id":e}})}async getBinaryStream(e,t){return qa(`GET`,`content`,{resourceId:e,accept:t?.accept,stream:!0}),Sl(`content.get`,async()=>{let n=await this.transport.rawHttp.get(`${this.transport.baseUrl}/resources/${e}`,{headers:{Accept:t?.accept??`text/plain`,...this.requestHeaders(t?.auth)}}),r=n.headers.get(`content-type`)||`application/octet-stream`;if(!n.body)throw Error(`Response body is null - cannot create stream`);return{stream:n.body,contentType:r}},{kind:rl.CLIENT,attrs:{"resource.id":e,"content.stream":!0}})}dispose(){}requestHeaders(e){let t=e??this.transport.getToken(),n=t?{Authorization:`Bearer ${t}`}:{},r=wl();return r&&(n.traceparent=r.traceparent,r.tracestate&&(n.tracestate=r.tracestate)),n}};function Vl(e){let t=new FormData;if(t.append(`name`,e.name),t.append(`format`,e.format),t.append(`storageUri`,e.storageUri),e.file instanceof File)t.append(`file`,e.file);else if(typeof Buffer<`u`&&Buffer.isBuffer(e.file)){let n=new Blob([new Uint8Array(e.file)],{type:e.format});t.append(`file`,n,e.name)}else throw Error(`file must be a File or Buffer`);return e.entityTypes&&e.entityTypes.length>0&&t.append(`entityTypes`,JSON.stringify(e.entityTypes)),e.language&&t.append(`language`,e.language),e.sourceAnnotationId&&t.append(`sourceAnnotationId`,String(e.sourceAnnotationId)),e.sourceResourceId&&t.append(`sourceResourceId`,String(e.sourceResourceId)),e.generationPrompt&&t.append(`generationPrompt`,e.generationPrompt),e.generator&&t.append(`generator`,JSON.stringify(e.generator)),e.isDraft!==void 0&&t.append(`isDraft`,String(e.isDraft)),t}function Hl(e){let{url:t,formData:n,headers:r,onProgress:i,signal:a,onApiError:o}=e;return new Promise((e,s)=>{let c=new XMLHttpRequest;if(a?.aborted){let e=new Rl(`Upload aborted`,0,`aborted`);o(e),s(e);return}c.open(`POST`,t);for(let[e,t]of Object.entries(r))c.setRequestHeader(e,t);i&&(c.upload.onprogress=e=>{let t=e.lengthComputable?e.total:0;i({bytesUploaded:e.loaded,totalBytes:t})}),c.onload=()=>{if(c.status>=200&&c.status<300){try{e({resourceId:JSON.parse(c.responseText).resourceId})}catch(e){let t=new Rl(`Upload succeeded but response was not valid JSON: ${e.message}`,c.status,c.statusText,c.responseText);o(t),s(t)}return}let t=c.responseText;try{t=JSON.parse(c.responseText)}catch{}let n=new Rl(t&&typeof t==`object`&&`message`in t&&typeof t.message==`string`?t.message:`HTTP ${c.status}: ${c.statusText}`,c.status,c.statusText,t);o(n),s(n)},c.onerror=()=>{let e=new Rl(`Network error during upload`,0,`network-error`);o(e),s(e)},c.ontimeout=()=>{let e=new Rl(`Upload timed out`,0,`timeout`);o(e),s(e)},c.onabort=()=>{let e=new Rl(`Upload aborted`,0,`aborted`);o(e),s(e)},a&&a.addEventListener(`abort`,()=>c.abort(),{once:!0}),c.send(n)})}var Ul=class e extends oi{then(e,t){return sa(this).then(e,t)}static from(t){return new e(e=>t.subscribe(e))}},Wl=class e extends oi{then(e,t){return ca(this.pipe(ba(e=>e!==void 0))).then(e,t)}static from(t){let n=Gl.get(t);return n||(n=new e(e=>t.subscribe(e)),Gl.set(t,n)),n}},Gl=new WeakMap,Kl=class extends oi{then(e,t){return sa(this).then(t=>{if(t.phase!==`finished`)throw Error(`UploadObservable resolved on a non-finished event: ${t.phase}`);let n={resourceId:t.resourceId};return e?e(n):n},t)}},ql=class extends zo{constructor(e,t,n){super(e,t,n),this.name=`BusRequestError`}};async function Jl(e,t,n,r,i,a=3e4){let o=crypto.randomUUID(),s={...n,correlationId:o},c=ca(ya(e.stream(r).pipe(ba(e=>e.correlationId===o),pa(e=>({ok:!0,response:e.response}))),e.stream(i).pipe(ba(e=>e.correlationId===o),pa(e=>({ok:!1,error:new ql(e.message??`Bus request rejected`,`bus.rejected`,{channel:i,correlationId:o,payload:e})})))).pipe(Ca(1),da(a),xa(e=>e instanceof ua?aa(()=>new ql(`Bus request timed out after ${a}ms on ${r}`,`bus.timeout`,{channel:t,resultChannel:r,correlationId:o,timeoutMs:a})):aa(()=>e))));await e.emit(t,s);let l=await c;if(!l.ok)throw l.error;return l.response}function Yl(e){let t=new _i(new Map),n=new Set,r=new Map,i=async r=>{if(!n.has(r)){n.add(r);try{let n=await e(r),i=new Map(t.value);i.set(r,n),t.next(i)}catch{}finally{n.delete(r)}}};return{observe(e){!t.value.has(e)&&!n.has(e)&&i(e);let a=r.get(e);return a||(a=t.pipe(pa(t=>t.get(e)),wa()),r.set(e,a)),a},get(e){return t.value.get(e)},keys(){return[...t.value.keys()]},invalidate(e){n.delete(e),i(e)},remove(e){let r=new Map(t.value);r.delete(e),t.next(r),n.delete(e)},set(e,n){let r=new Map(t.value);r.set(e,n),t.next(r)},invalidateAll(){for(let e of t.value.keys())n.delete(e),i(e)},dispose(){t.complete(),r.clear(),n.clear()}}}var Xl=`_`,Zl=`_`,Ql=class{constructor(e,t,n){this.transport=e,this.bus=t,this.content=n,this.resourceCache=Yl(async e=>(await Jl(this.transport,`browse:resource-requested`,{resourceId:e},`browse:resource-result`,`browse:resource-failed`)).resource),this.resourceListCache=Yl(async e=>{let t=this.resourceListFilters.get(e)??{},n=t.search?Ia(t.search):void 0;return(await Jl(this.transport,`browse:resources-requested`,{search:n,archived:t.archived,limit:t.limit??100,offset:0},`browse:resources-result`,`browse:resources-failed`)).resources}),this.annotationListCache=Yl(async e=>Jl(this.transport,`browse:annotations-requested`,{resourceId:e},`browse:annotations-result`,`browse:annotations-failed`)),this.annotationDetailCache=Yl(async e=>{let t=this.annotationResources.get(e);if(!t)throw Error(`Cannot fetch annotation ${e}: no resourceId known`);return(await Jl(this.transport,`browse:annotation-requested`,{resourceId:t,annotationId:e},`browse:annotation-result`,`browse:annotation-failed`)).annotation}),this.entityTypesCache=Yl(async()=>(await Jl(this.transport,`browse:entity-types-requested`,{},`browse:entity-types-result`,`browse:entity-types-failed`)).entityTypes),this.tagSchemasCache=Yl(async()=>(await Jl(this.transport,`browse:tag-schemas-requested`,{},`browse:tag-schemas-result`,`browse:tag-schemas-failed`)).tagSchemas),this.referencedByCache=Yl(async e=>(await Jl(this.transport,`browse:referenced-by-requested`,{resourceId:e},`browse:referenced-by-result`,`browse:referenced-by-failed`)).referencedBy),this.resourceEventsCache=Yl(async e=>(await Jl(this.transport,`browse:events-requested`,{resourceId:e},`browse:events-result`,`browse:events-failed`)).events),this.subscribeToEvents()}resourceCache;resourceListCache;annotationListCache;annotationDetailCache;annotationResources=new Map;entityTypesCache;tagSchemasCache;referencedByCache;resourceEventsCache;resourceListFilters=new Map;annotationListObs=new Map;resource(e){return Wl.from(this.resourceCache.observe(e))}resources(e){let t=JSON.stringify(e??{});return this.resourceListFilters.set(t,e??{}),Wl.from(this.resourceListCache.observe(t))}annotations(e){let t=this.annotationListObs.get(e);return t||(t=this.annotationListCache.observe(e).pipe(pa(e=>e?.annotations)),this.annotationListObs.set(e,t)),Wl.from(t)}annotation(e,t){return this.annotationResources.set(t,e),Wl.from(this.annotationDetailCache.observe(t))}entityTypes(){return Wl.from(this.entityTypesCache.observe(Xl))}tagSchemas(){return Wl.from(this.tagSchemasCache.observe(Zl))}referencedBy(e){return Wl.from(this.referencedByCache.observe(e))}events(e){return Wl.from(this.resourceEventsCache.observe(e))}async resourceContent(e){let t=await this.content.getBinary(e,{accept:`text/plain`});return new TextDecoder().decode(t.data)}async resourceRepresentation(e,t){return this.content.getBinary(e,t?.accept?{accept:t.accept}:void 0)}async resourceRepresentationStream(e,t){return this.content.getBinaryStream(e,t?.accept?{accept:t.accept}:void 0)}async resourceEvents(e){return(await Jl(this.transport,`browse:events-requested`,{resourceId:e},`browse:events-result`,`browse:events-failed`)).events}async annotationHistory(e,t){return Jl(this.transport,`browse:annotation-history-requested`,{resourceId:e,annotationId:t},`browse:annotation-history-result`,`browse:annotation-history-failed`)}async connections(e){throw Error(`Not implemented: connections endpoint does not exist yet`)}async backlinks(e){throw Error(`Not implemented: backlinks endpoint does not exist yet`)}async resourcesByName(e,t){throw Error(`Not implemented: resourcesByName endpoint does not exist yet`)}async files(e,t){return Jl(this.transport,`browse:directory-requested`,{path:e??`.`,sort:t??`name`},`browse:directory-result`,`browse:directory-failed`)}click(e,t){this.bus.get(`browse:click`).next({annotationId:e,motivation:t})}navigateReference(e){this.bus.get(`browse:reference-navigate`).next({resourceId:e})}invalidateAnnotationList(e){this.annotationListCache.invalidate(e)}removeAnnotationDetail(e){this.annotationDetailCache.remove(e),this.annotationResources.delete(e)}invalidateResourceDetail(e){this.resourceCache.invalidate(e)}invalidateResourceLists(){this.resourceListCache.invalidateAll()}invalidateEntityTypes(){this.entityTypesCache.invalidate(Xl)}invalidateTagSchemas(){this.tagSchemasCache.invalidate(Zl)}invalidateReferencedBy(e){this.referencedByCache.invalidate(e)}invalidateResourceEvents(e){this.resourceEventsCache.invalidate(e)}updateAnnotationInPlace(e,t){let n=this.annotationListCache.get(e);if(n){let r=n.annotations.findIndex(e=>e.id===t.id),i=r>=0?n.annotations.map((e,n)=>n===r?t:e):[...n.annotations,t];this.annotationListCache.set(e,{...n,annotations:i})}let r=za(t.id);this.annotationResources.set(r,e),this.annotationDetailCache.set(r,t)}on(e,t){this.bus.get(e).subscribe(t)}onEntityTagChanged=e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceDetail(e.resourceId),this.invalidateResourceEvents(e.resourceId))};onArchiveToggled=e=>{e.resourceId&&(this.invalidateResourceDetail(e.resourceId),this.invalidateResourceLists())};onYieldResourceMutated=e=>{let t=Ra(e.resourceId);this.invalidateResourceDetail(t),this.invalidateResourceLists()};subscribeToEvents(){this.on(`bus:resume-gap`,e=>{let t=e.scope;if(t){let e=t;this.invalidateAnnotationList(e),this.invalidateResourceDetail(e),this.invalidateResourceEvents(e),this.invalidateReferencedBy(e)}else{this.invalidateResourceLists();for(let e of this.annotationListCache.keys())this.invalidateAnnotationList(e);for(let e of this.resourceCache.keys())this.invalidateResourceDetail(e);for(let e of this.resourceEventsCache.keys())this.invalidateResourceEvents(e);for(let e of this.referencedByCache.keys())this.invalidateReferencedBy(e)}this.invalidateEntityTypes(),this.invalidateTagSchemas()}),this.on(`mark:delete-ok`,e=>{this.removeAnnotationDetail(za(e.annotationId))}),this.on(`mark:added`,e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId))}),this.on(`mark:removed`,e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId)),this.removeAnnotationDetail(za(e.payload.annotationId))}),this.on(`mark:body-updated`,e=>{let t=e;!t.resourceId||!t.annotation||(this.updateAnnotationInPlace(t.resourceId,t.annotation),this.invalidateResourceEvents(t.resourceId))}),this.on(`mark:entity-tag-added`,this.onEntityTagChanged),this.on(`mark:entity-tag-removed`,this.onEntityTagChanged),this.on(`replay-window-exceeded`,e=>{e.resourceId&&this.invalidateAnnotationList(e.resourceId)}),this.on(`yield:create-ok`,this.onYieldResourceMutated),this.on(`yield:update-ok`,this.onYieldResourceMutated),this.on(`mark:archived`,this.onArchiveToggled),this.on(`mark:unarchived`,this.onArchiveToggled),this.on(`frame:entity-type-added`,()=>this.invalidateEntityTypes()),this.on(`frame:tag-schema-added`,()=>this.invalidateTagSchemas())}},$l=class{constructor(e,t){this.transport=e,this.bus=t}async annotation(e){let t=Ra(e.target.source);return{annotationId:za((await Jl(this.transport,`mark:create-request`,{resourceId:t,request:e},`mark:create-ok`,`mark:create-failed`)).annotationId)}}async delete(e,t){await this.transport.emit(`mark:delete`,{annotationId:t,resourceId:e})}async archive(e){await this.transport.emit(`mark:archive`,{resourceId:e})}async unarchive(e){await this.transport.emit(`mark:unarchive`,{resourceId:e})}assist(e,t,n){return new Ul(r=>{let i=!1,a=null,o=null,s=this.transport.subscribeToResource(e),c=()=>{i=!0,a&&=(clearTimeout(a),null),o&&=(clearInterval(o),null),s&&=(s(),null)},l=t=>{a&&clearTimeout(a),o&&=(clearInterval(o),null),a=setTimeout(()=>{i||(o=setInterval(()=>{i||Jl(this.transport,`job:status-requested`,{jobId:t},`job:status-result`,`job:status-failed`).then(n=>{i||(n.status===`complete`?(c(),r.next({kind:`complete`,data:{jobId:t,jobType:n.jobType??`annotation`,resourceId:e,result:n.result}}),r.complete()):n.status===`failed`&&(c(),r.error(Error(n.error??`Job failed`))))}).catch(()=>{})},5e3))},1e4)},u=null,d=this.bus.get(`job:report-progress`).pipe(ba(e=>e.jobId===u)),f=this.bus.get(`job:complete`).pipe(ba(e=>e.jobId===u)),p=this.bus.get(`job:fail`).pipe(ba(e=>e.jobId===u)),m=d.pipe(Aa(ya(f,p))).subscribe(e=>{e.progress&&r.next({kind:`progress`,data:e.progress}),u&&l(u)}),h=f.subscribe(e=>{c(),r.next({kind:`complete`,data:e}),r.complete()}),g=p.subscribe(e=>{c(),r.error(Error(e.error))});return this.dispatchAssist(e,t,n).then(({jobId:e})=>{e&&!i&&(u=e,l(e))}).catch(e=>{c(),r.error(e)}),()=>{c(),m.unsubscribe(),h.unsubscribe(),g.unsubscribe()}})}request(e,t){this.bus.get(`mark:requested`).next({selector:e,motivation:t})}requestAssist(e,t,n){this.bus.get(`mark:assist-request`).next({motivation:e,options:t,...n?{correlationId:n}:{}})}submit(e){this.bus.get(`mark:submit`).next(e)}cancelPending(){this.bus.get(`mark:cancel-pending`).next(void 0)}dismissProgress(){this.bus.get(`mark:progress-dismiss`).next(void 0)}changeSelection(e){this.bus.get(`mark:selection-changed`).next({motivation:e})}changeClick(e){this.bus.get(`mark:click-changed`).next({action:e})}changeShape(e){this.bus.get(`mark:shape-changed`).next({shape:e})}toggleMode(){this.bus.get(`mark:mode-toggled`).next(void 0)}async dispatchAssist(e,t,n){let r={tagging:`tag-annotation`,linking:`reference-annotation`,highlighting:`highlight-annotation`,assessing:`assessment-annotation`,commenting:`comment-annotation`}[t];if(!r)throw Error(`Unsupported motivation: ${t}`);if(t===`tagging`){if(!n.schemaId||!n.categories?.length)throw Error(`Tag assist requires schemaId and categories`)}else if(t===`linking`&&!n.entityTypes?.length)throw Error(`Reference assist requires entityTypes`);let i={};return n.entityTypes&&(i.entityTypes=n.entityTypes),n.includeDescriptiveReferences!==void 0&&(i.includeDescriptiveReferences=n.includeDescriptiveReferences),n.instructions!==void 0&&(i.instructions=n.instructions),n.density!==void 0&&(i.density=n.density),n.tone!==void 0&&(i.tone=n.tone),n.language!==void 0&&(i.language=n.language),n.sourceLanguage!==void 0&&(i.sourceLanguage=n.sourceLanguage),n.schemaId!==void 0&&(i.schemaId=n.schemaId),n.categories!==void 0&&(i.categories=n.categories),Jl(this.transport,`job:create`,{jobType:r,resourceId:e,params:i},`job:created`,`job:create-failed`)}},eu=class{constructor(e,t){this.transport=e,this.bus=t}async body(e,t,n){await this.transport.emit(`bind:update-body`,{correlationId:crypto.randomUUID(),annotationId:t,resourceId:e,operations:n})}initiate(e){this.bus.get(`bind:initiate`).next(e)}},tu=class{constructor(e,t){this.transport=e,this.bus=t}annotation(e,t,n){return new Ul(r=>{let i=crypto.randomUUID(),a=this.bus.get(`gather:complete`).pipe(ba(e=>e.correlationId===i)),o=this.bus.get(`gather:failed`).pipe(ba(e=>e.correlationId===i)),s=ya(this.bus.get(`gather:annotation-progress`).pipe(ba(e=>e.annotationId===t),pa(e=>e)),a.pipe(pa(e=>e))).pipe(Aa(ya(a,o))).subscribe({next:e=>r.next(e),error:e=>r.error(e)}),c=a.subscribe(e=>{r.next(e),r.complete()}),l=o.subscribe(e=>{r.error(Error(e.message))});return this.transport.emit(`gather:requested`,{correlationId:i,annotationId:t,resourceId:e,options:{contextWindow:n?.contextWindow??2e3}}).catch(e=>{r.error(e)}),()=>{s.unsubscribe(),c.unsubscribe(),l.unsubscribe()}})}resource(e,t){throw Error(`Not implemented: gather.resource() — no backend route yet`)}},nu=class{constructor(e,t){this.transport=e,this.bus=t}requestSearch(e){this.bus.get(`match:search-requested`).next(e)}search(e,t,n,r){return new Ul(i=>{let a=crypto.randomUUID(),o=this.bus.get(`match:search-results`).pipe(ba(e=>e.correlationId===a)),s=this.bus.get(`match:search-failed`).pipe(ba(e=>e.correlationId===a)),c=o.subscribe(e=>{i.next(e),i.complete()}),l=s.subscribe(e=>{i.error(Error(e.error))});return this.transport.emit(`match:search-requested`,{correlationId:a,resourceId:e,referenceId:t,context:n,limit:r?.limit??10,useSemanticScoring:r?.useSemanticScoring??!0}).catch(e=>{i.error(e)}),()=>{c.unsubscribe(),l.unsubscribe()}})}},ru=class{constructor(e,t,n){this.transport=e,this.bus=t,this.content=n}resource(e){let t=typeof Buffer<`u`&&e.file instanceof Buffer?e.file.length:e.file.size;return new Kl(n=>{n.next({phase:`started`,totalBytes:t});let r=!1,i=new AbortController;return this.content.putBinary({name:e.name,file:e.file,format:e.format,storageUri:e.storageUri,...e.entityTypes?{entityTypes:e.entityTypes}:{},...e.language?{language:e.language}:{},...e.sourceAnnotationId?{sourceAnnotationId:e.sourceAnnotationId}:{},...e.sourceResourceId?{sourceResourceId:e.sourceResourceId}:{},...e.generationPrompt?{generationPrompt:e.generationPrompt}:{},...e.generator?{generator:e.generator}:{},...e.isDraft===void 0?{}:{isDraft:e.isDraft}},{onProgress:({bytesUploaded:e,totalBytes:i})=>{if(r)return;let a=i>0?i:t;n.next({phase:`progress`,bytesUploaded:e,totalBytes:a})},signal:i.signal}).then(e=>{r||(n.next({phase:`finished`,resourceId:Ra(e.resourceId)}),n.complete())}).catch(e=>{r||n.error(e)}),()=>{r=!0,i.abort()}})}fromAnnotation(e,t,n){return new Ul(r=>{let i=!1,a=null,o=null,s=this.transport.subscribeToResource(e),c=()=>{i=!0,a&&=(clearTimeout(a),null),o&&=(clearInterval(o),null),s&&=(s(),null)},l=t=>{a&&clearTimeout(a),o&&=(clearInterval(o),null),a=setTimeout(()=>{i||(o=setInterval(()=>{i||Jl(this.transport,`job:status-requested`,{jobId:t},`job:status-result`,`job:status-failed`).then(n=>{i||(n.status===`complete`?(c(),r.next({kind:`complete`,data:{jobId:t,jobType:n.jobType??`generation`,resourceId:e,result:n.result}}),r.complete()):n.status===`failed`&&(c(),r.error(Error(n.error??`Generation failed`))))}).catch(()=>{})},5e3))},1e4)},u=null,d=this.bus.get(`job:report-progress`).pipe(ba(e=>e.jobId===u)),f=this.bus.get(`job:complete`).pipe(ba(e=>e.jobId===u)),p=this.bus.get(`job:fail`).pipe(ba(e=>e.jobId===u)),m=d.pipe(Aa(ya(f,p))).subscribe(e=>{e.progress&&r.next({kind:`progress`,data:e.progress}),u&&l(u)}),h=f.subscribe(e=>{c(),r.next({kind:`complete`,data:e}),r.complete()}),g=p.subscribe(e=>{c(),r.error(Error(e.error))});return Jl(this.transport,`job:create`,{jobType:`generation`,resourceId:e,params:{referenceId:t,title:n.title,prompt:n.prompt,entityTypes:n.entityTypes,language:n.language,sourceLanguage:n.sourceLanguage,temperature:n.temperature,maxTokens:n.maxTokens,storageUri:n.storageUri,context:n.context}},`job:created`,`job:create-failed`).then(({jobId:e})=>{e&&!i&&(u=e,l(e))}).catch(e=>{c(),r.error(e)}),()=>{c(),m.unsubscribe(),h.unsubscribe(),g.unsubscribe()}})}async cloneToken(e){return Jl(this.transport,`yield:clone-token-requested`,{resourceId:e},`yield:clone-token-generated`,`yield:clone-token-failed`)}async fromToken(e){return(await Jl(this.transport,`yield:clone-resource-requested`,{token:e},`yield:clone-resource-result`,`yield:clone-resource-failed`)).sourceResource}async createFromToken(e){return{resourceId:Ra((await Jl(this.transport,`yield:clone-create`,e,`yield:clone-created`,`yield:clone-create-failed`)).resourceId)}}clone(){this.bus.get(`yield:clone`).next(void 0)}},iu=class{constructor(e,t){this.transport=e,this.bus=t}attention(e,t){this.transport.emit(`beckon:focus`,{annotationId:t,resourceId:e})}hover(e){this.bus.get(`beckon:hover`).next({annotationId:e})}sparkle(e){this.bus.get(`beckon:sparkle`).next({annotationId:e})}},au=class{constructor(e){this.transport=e}async addEntityType(e){await this.transport.emit(`frame:add-entity-type`,{tag:e})}async addEntityTypes(e){for(let t of e)await this.transport.emit(`frame:add-entity-type`,{tag:t})}async addTagSchema(e){await this.transport.emit(`frame:add-tag-schema`,{schema:e})}},ou=class{constructor(e,t){this.transport=e,this.bus=t}get queued$(){return this.bus.get(`job:queued`)}get progress$(){return this.bus.get(`job:report-progress`)}get complete$(){return this.bus.get(`job:complete`)}get fail$(){return this.bus.get(`job:fail`)}async status(e){return Jl(this.transport,`job:status-requested`,{jobId:e},`job:status-result`,`job:status-failed`)}async pollUntilComplete(e,t){let n=t?.interval??1e3,r=t?.timeout??6e4,i=Date.now();for(;;){let a=await this.status(e);if(t?.onProgress&&t.onProgress(a),a.status===`complete`||a.status===`failed`||a.status===`cancelled`)return a;if(Date.now()-i>r)throw Error(`Job polling timeout after ${r}ms`);await new Promise(e=>setTimeout(e,n))}}async cancelByType(e){await this.transport.emit(`job:cancel-requested`,{jobType:e})}cancelRequest(e){this.bus.get(`job:cancel-requested`).next({jobType:e})}},su=class{constructor(e){this.backend=e}async password(e,t){return this.backend.authenticatePassword(ja(e),t)}async google(e){return this.backend.authenticateGoogle(Ma(e))}async refresh(e){return this.backend.refreshAccessToken(Pa(e))}async logout(){await this.backend.logout()}async me(){return this.backend.getCurrentUser()}async acceptTerms(){await this.backend.acceptTerms()}async mcpToken(){return this.backend.generateMcpToken()}async mediaToken(e){return this.backend.getMediaToken(e)}},cu=class{constructor(e){this.backend=e}async users(){return(await this.backend.listUsers()).users}async userStats(){return this.backend.getUserStats()}async updateUser(e,t){return(await this.backend.updateUser(e,t)).user}async oauthConfig(){return this.backend.getOAuthConfig()}async healthCheck(){return this.backend.healthCheck()}async status(){return this.backend.getStatus()}async backup(){return this.backend.backupKnowledgeBase()}restore(e){return lu(this.backend.restoreKnowledgeBase(e))}async exportKnowledgeBase(e){return this.backend.exportKnowledgeBase(e)}importKnowledgeBase(e){return lu(this.backend.importKnowledgeBase(e))}};function lu(e){return new Ul(t=>{let n=e.subscribe({next:e=>t.next(e),error:e=>t.error(e),complete:()=>t.complete()});return()=>n.unsubscribe()})}var uu=class e{transport;content;bus;baseUrl;frame;browse;mark;bind;gather;match;yield;beckon;job;auth;admin;constructor(e,t,n){this.transport=e,this.content=t,this.baseUrl=e.baseUrl,this.bus=new Ja,this.transport.bridgeInto(this.bus),this.frame=new au(this.transport),this.browse=new Ql(this.transport,this.bus,this.content),this.mark=new $l(this.transport,this.bus),this.bind=new eu(this.transport,this.bus),this.gather=new tu(this.transport,this.bus),this.match=new nu(this.transport,this.bus),this.yield=new ru(this.transport,this.bus,this.content),this.beckon=new iu(this.transport,this.bus),this.job=new ou(this.transport,this.bus),this.auth=n?new su(n):void 0,this.admin=n?new cu(n):void 0}get state$(){return this.transport.state$}subscribeToResource(e){return this.transport.subscribeToResource(e)}dispose(){this.transport.dispose(),this.content.dispose()}static fromHttp(t){let n=new zl({baseUrl:typeof t.baseUrl==`string`?La(t.baseUrl):t.baseUrl,token$:new _i(t.token==null?null:typeof t.token==`string`?Na(t.token):t.token)});return new e(n,new Bl(n),n)}static async signInHttp(t){let n=typeof t.baseUrl==`string`?La(t.baseUrl):t.baseUrl,r=new _i(null),i=new zl({baseUrl:n,token$:r}),a=new e(i,new Bl(i),i);try{let e=await a.auth.password(t.email,t.password);return r.next(Na(e.token)),a}catch(e){throw a.dispose(),e}}},du=`semiont.session.`,fu=`semiont.knowledgeBases`,pu=`semiont.activeKnowledgeBaseId`,mu=300*1e3;function hu(e){return`${du}${e}`}function gu(e,t){let n=e.get(hu(t));if(!n)return null;try{let e=JSON.parse(n);if(e&&typeof e.access==`string`&&typeof e.refresh==`string`)return{access:e.access,refresh:e.refresh}}catch{}return null}function _u(e,t,n){e.set(hu(t),JSON.stringify(n))}function vu(e,t){e.delete(hu(t))}function yu(e){try{let t=e.split(`.`);if(t.length!==3||!t[1])return null;let n=JSON.parse(atob(t[1]));return n.exp?new Date(n.exp*1e3):null}catch{return null}}function bu(e){let t=yu(e);return t?t.getTime()<Date.now():!0}function xu(e){if(!e||typeof e!=`object`)return!1;let t=e;if(typeof t.id!=`string`||typeof t.label!=`string`||typeof t.email!=`string`)return!1;let n=t.endpoint;return!n||typeof n!=`object`?!1:n.kind===`http`?typeof n.host==`string`&&typeof n.port==`number`&&(n.protocol===`http`||n.protocol===`https`):n.kind===`local`?typeof n.kbId==`string`:!1}function Su(e){try{let t=e.get(fu);return t?JSON.parse(t).filter(xu):[]}catch{return[]}}function Cu(e,t){e.set(fu,JSON.stringify(t))}function wu(e){return e===`localhost`||e===`127.0.0.1`?`http`:`https`}var Tu=/^(([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?|localhost|\d{1,3}(\.\d{1,3}){3})$/;function Eu(e){return Tu.test(e)}function Du(e){if(!Eu(e.host))throw Error(`Invalid KB hostname: "${e.host}"`);let t=new URL(`http://x`);return t.protocol=e.protocol+`:`,t.hostname=e.host,t.port=String(e.port),`${e.protocol}://${t.hostname}:${e.port}`}function Ou(){return crypto.randomUUID()}var ku=class extends zo{kbId;constructor(e,t,n=null){super(t,e,{kbId:n}),this.name=`SemiontSessionError`,this.kbId=n}},Au=class e{kb;client;token$;user$;streamState$;errors$;ready;storage;doRefresh;doValidate;onAuthFailed;onError;refreshTimer=null;unsubscribeStorage=null;disposed=!1;constructor(e){this.kb=e.kb,this.storage=e.storage,this.doRefresh=e.refresh,this.doValidate=e.validate,this.onAuthFailed=e.onAuthFailed??(()=>{}),this.onError=e.onError??(()=>{}),this.client=e.client,this.token$=e.token$,this.user$=new _i(null),this.errors$=this.client.transport.errors$;let t=gu(this.storage,this.kb.id);t&&!bu(t.access)&&this.token$.getValue()===null&&this.token$.next(Na(t.access));let n=this.token$.getValue();this.streamState$=this.client.state$,n&&this.scheduleProactiveRefresh(n),this.unsubscribeStorage=this.storage.subscribe?.((e,t)=>{this.handleStorageChange(e,t)})??null,this.ready=this.validate(t)}async validate(e){if(!e)return;let t=bu(e.access)?this.doRefresh?await this.doRefresh():null:e.access;if(!t){bu(e.access)&&vu(this.storage,this.kb.id);return}if(t!==e.access&&(this.token$.next(Na(t)),this.scheduleProactiveRefresh(t)),!this.doValidate)return;let n=async e=>{if(!this.disposed)try{let t=await this.doValidate(Na(e));if(this.disposed)return;this.user$.next(t)}catch(e){if(this.disposed)return;if(e instanceof Rl&&e.status===401){let e=this.doRefresh?await this.doRefresh():null;if(this.disposed)return;if(e){this.token$.next(Na(e)),this.scheduleProactiveRefresh(e),await n(e);return}vu(this.storage,this.kb.id),this.token$.next(null),this.onAuthFailed(`Your session has expired. Please sign in again.`)}else this.onError(new ku(`session.auth-failed`,e instanceof Error?e.message:String(e),this.kb.id))}};await n(t)}async refresh(){if(this.disposed||!this.doRefresh)return null;let e=await this.doRefresh();if(this.disposed)return null;if(e){let t=Na(e);return this.token$.next(t),this.scheduleProactiveRefresh(e),t}return this.token$.next(null),vu(this.storage,this.kb.id),this.onAuthFailed(`Your session has expired. Please sign in again.`),this.onError(new ku(`session.refresh-exhausted`,`Token refresh failed`,this.kb.id)),null}scheduleProactiveRefresh(e){this.clearRefreshTimer();let t=yu(e);if(!t)return;let n=t.getTime()-mu,r=Math.max(0,n-Date.now());this.refreshTimer=setTimeout(()=>{this.refreshTimer=null,this.disposed||this.refresh()},r)}clearRefreshTimer(){this.refreshTimer&&=(clearTimeout(this.refreshTimer),null)}handleStorageChange(e,t){if(!this.disposed&&e===hu(this.kb.id)){if(!t){this.token$.next(null),this.user$.next(null),this.clearRefreshTimer();return}try{let e=JSON.parse(t);typeof e.access==`string`&&(this.token$.next(Na(e.access)),this.scheduleProactiveRefresh(e.access))}catch{}}}get expiresAt(){let e=this.token$.getValue();return e?yu(e):null}subscribe(e,t){let n=this.client.bus.get(e).subscribe(t);return()=>n.unsubscribe()}async dispose(){this.disposed||(this.disposed=!0,this.clearRefreshTimer(),this.unsubscribeStorage&&=(this.unsubscribeStorage(),null),this.client.dispose(),this.token$.complete(),this.user$.complete())}static fromHttp(t){let n=typeof t.baseUrl==`string`?La(t.baseUrl):t.baseUrl,r=new _i(t.token==null?null:typeof t.token==`string`?Na(t.token):t.token),i=new zl({baseUrl:n,token$:r}),a=new uu(i,new Bl(i),i),o={kb:t.kb,storage:t.storage,client:a,token$:r};return t.refresh&&(o.refresh=t.refresh),t.validate&&(o.validate=t.validate),t.onAuthFailed&&(o.onAuthFailed=t.onAuthFailed),t.onError&&(o.onError=t.onError),new e(o)}static async signInHttp(t){let n=typeof t.baseUrl==`string`?La(t.baseUrl):t.baseUrl,r=new _i(null),i=new zl({baseUrl:n,token$:r}),a=new uu(i,new Bl(i),i),o;try{o=await a.auth.password(t.email,t.password)}catch(e){throw a.dispose(),e}_u(t.storage,t.kb.id,{access:o.token,refresh:o.refreshToken}),r.next(Na(o.token));let s={kb:t.kb,storage:t.storage,client:a,token$:r,refresh:async()=>{let e=gu(t.storage,t.kb.id);if(!e)return null;try{return(await a.auth.refresh(e.refresh)).access_token}catch{return null}}};t.validate&&(s.validate=t.validate),t.onAuthFailed&&(s.onAuthFailed=t.onAuthFailed),t.onError&&(s.onError=t.onError);let c=new e(s);return await c.ready,c}},ju=class{sessionExpiredAt$;sessionExpiredMessage$;permissionDeniedAt$;permissionDeniedMessage$;constructor(){this.sessionExpiredAt$=new _i(null),this.sessionExpiredMessage$=new _i(null),this.permissionDeniedAt$=new _i(null),this.permissionDeniedMessage$=new _i(null)}notifySessionExpired(e){this.sessionExpiredMessage$.next(e??`Your session has expired. Please sign in again.`),this.sessionExpiredAt$.next(Date.now())}notifyPermissionDenied(e){this.permissionDeniedMessage$.next(e??`You do not have permission to perform this action.`),this.permissionDeniedAt$.next(Date.now())}acknowledgeSessionExpired(){this.sessionExpiredAt$.next(null),this.sessionExpiredMessage$.next(null)}acknowledgePermissionDenied(){this.permissionDeniedAt$.next(null),this.permissionDeniedMessage$.next(null)}dispose(){this.sessionExpiredAt$.complete(),this.sessionExpiredMessage$.complete(),this.permissionDeniedAt$.complete(),this.permissionDeniedMessage$.complete()}},Mu=`openDocuments`;function Nu(e){return[...e].sort((e,t)=>e.order!==void 0&&t.order!==void 0?e.order-t.order:e.openedAt-t.openedAt)}function Pu(e){try{let t=e.get(Mu);if(t)return Nu(JSON.parse(t))}catch{}return[]}var Fu=class{kbs$;activeKbId$;activeSession$;activeSignals$;sessionActivating$;openResources$;error$;identityToken$;storage;sessionFactory;eventBus=new Ja;unsubscribeStorage=null;disposed=!1;activating=null;constructor(e){this.storage=e.storage,this.sessionFactory=e.sessionFactory;let t=Su(this.storage),n=this.storage.get(pu),r=n&&t.some(e=>e.id===n)?n:t[0]?.id??null;this.kbs$=new _i(t),this.activeKbId$=new _i(r),this.activeSession$=new _i(null),this.activeSignals$=new _i(null),this.sessionActivating$=new _i(!1),this.openResources$=new _i(Pu(this.storage)),this.error$=new hi,this.identityToken$=new _i(null),this.kbs$.subscribe(e=>Cu(this.storage,e)),this.activeKbId$.subscribe(e=>{e?this.storage.set(pu,e):this.storage.delete(pu)}),this.openResources$.subscribe(e=>{this.storage.set(Mu,JSON.stringify(e))}),this.unsubscribeStorage=this.storage.subscribe?.((e,t)=>{if(!(e!==Mu||!t))try{this.openResources$.next(Nu(JSON.parse(t)))}catch{}})??null,r&&this.setActiveKb(r)}emit(e,t){this.disposed||this.eventBus.get(e).next(t)}on(e,t){let n=this.eventBus.get(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.eventBus.get(e).asObservable()}setIdentityToken(e){this.disposed||this.identityToken$.next(e)}addKb(e,t,n){let r={id:Ou(),...e};return _u(this.storage,r.id,{access:t,refresh:n}),this.kbs$.next([...this.kbs$.getValue(),r]),this.setActiveKb(r.id),r}removeKb(e){vu(this.storage,e);let t=this.kbs$.getValue().filter(t=>t.id!==e);this.kbs$.next(t),this.activeKbId$.getValue()===e&&this.setActiveKb(t[0]?.id??null)}updateKb(e,t){this.kbs$.next(this.kbs$.getValue().map(n=>n.id===e?{...n,...t}:n))}getKbSessionStatus(e){let t=gu(this.storage,e);return t?bu(t.access)?`expired`:`authenticated`:`signed-out`}async setActiveKb(e){if(this.disposed)return;let t=this.activeKbId$.getValue(),n=this.activeSession$.getValue();if(e===t&&n)return;for(t!==e&&this.activeKbId$.next(e),n&&(this.activeSession$.next(null),this.activeSignals$.next(null));this.activating;)if(await this.activating,this.disposed||this.activeKbId$.getValue()!==e)return;let r=(async()=>{let t=this.activeSession$.getValue(),n=this.activeSignals$.getValue();if(t&&(this.activeSession$.next(null),this.activeSignals$.next(null),await t.dispose(),n?.dispose()),!e)return;let r=this.kbs$.getValue().find(t=>t.id===e);if(!r)return;let i=new ju,a;try{a=this.sessionFactory({kb:r,storage:this.storage,signals:i,onError:e=>this.error$.next(e)})}catch(t){this.error$.next(t instanceof ku?t:new ku(`session.construct-failed`,t instanceof Error?t.message:String(t),e)),i.dispose();return}a.errors$.subscribe(e=>{e.code===`unauthorized`?i.notifySessionExpired(e.message):e.code===`forbidden`&&i.notifyPermissionDenied(e.message)});try{await a.ready}catch(t){this.error$.next(new ku(`session.construct-failed`,t instanceof Error?t.message:String(t),e)),await a.dispose(),i.dispose();return}if(this.disposed||this.activeKbId$.getValue()!==e){await a.dispose(),i.dispose();return}this.activeSession$.next(a),this.activeSignals$.next(i)})();this.activating=r,this.sessionActivating$.next(!0);try{await r}finally{this.activating===r&&(this.activating=null,this.sessionActivating$.next(!1))}}async signIn(e,t,n){if(!this.disposed){if(_u(this.storage,e,{access:t,refresh:n}),this.activeKbId$.getValue()===e){let t=this.activeSession$.getValue(),n=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),t&&await t.dispose(),n?.dispose(),await this.setActiveKb(e);return}await this.setActiveKb(e)}}async signOut(e){if(!this.disposed&&(vu(this.storage,e),this.kbs$.next([...this.kbs$.getValue()]),this.activeKbId$.getValue()===e)){let e=this.activeSession$.getValue(),t=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),e&&await e.dispose(),t?.dispose()}}addOpenResource(e,t,n,r){let i=this.openResources$.getValue(),a=i.findIndex(t=>t.id===e);if(a>=0){let e={...i[a],name:t,...n===void 0?{}:{mediaType:n},...r===void 0?{}:{storageUri:r}},o=[...i];o[a]=e,this.openResources$.next(o);return}let o={id:e,name:t,openedAt:Date.now(),order:i.length,...n===void 0?{}:{mediaType:n},...r===void 0?{}:{storageUri:r}};this.openResources$.next([...i,o])}removeOpenResource(e){this.openResources$.next(this.openResources$.getValue().filter(t=>t.id!==e))}updateOpenResourceName(e,t){this.openResources$.next(this.openResources$.getValue().map(n=>n.id===e?{...n,name:t}:n))}reorderOpenResources(e,t){let n=[...this.openResources$.getValue()];if(e<0||e>=n.length||t<0||t>=n.length)return;let[r]=n.splice(e,1);r&&n.splice(t,0,r),this.openResources$.next(n)}async dispose(){if(this.disposed)return;this.disposed=!0,this.unsubscribeStorage&&=(this.unsubscribeStorage(),null);let e=this.activeSession$.getValue(),t=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),e&&await e.dispose(),t?.dispose(),this.kbs$.complete(),this.activeKbId$.complete(),this.activeSession$.complete(),this.activeSignals$.complete(),this.openResources$.complete(),this.error$.complete(),this.identityToken$.complete(),this.eventBus.destroy()}};function Iu(){let e=new Map;return t=>{let{kb:n,storage:r,signals:i,onError:a}=t;if(n.endpoint.kind!==`http`)throw new ku(`session.construct-failed`,`HTTP session factory cannot construct a session for endpoint kind "${n.endpoint.kind}"`,n.id);let o=n.endpoint,s=async()=>{let t=e.get(n.id);if(t)return t;let i=(async()=>{let e=gu(r,n.id);if(!e)return null;let t=new zl({baseUrl:La(Du(o))}),i=new uu(t,new Bl(t),t);try{let t=(await i.auth.refresh(e.refresh)).access_token;return t?(_u(r,n.id,{access:t,refresh:e.refresh}),t):null}catch{return null}finally{i.dispose()}})();e.set(n.id,i);try{return await i}finally{e.delete(n.id)}},c=async e=>{let t=new _i(e),n=new zl({baseUrl:La(Du(o)),token$:t}),r=new uu(n,new Bl(n),n);try{return await r.auth.me()}finally{r.dispose(),t.complete()}},l=new _i(null),u,d=new zl({baseUrl:La(Du(o)),token$:l,tokenRefresher:()=>u.refresh().then(e=>e??null)});return u=new Au({kb:n,storage:r,client:new uu(d,new Bl(d),d),token$:l,refresh:s,validate:c,onAuthFailed:e=>i.notifySessionExpired(e),onError:a}),u}}var Lu=null;function Ru(e){return Lu||=new Fu({storage:e.storage,sessionFactory:e.sessionFactory}),Lu}function zu(){let e=new Nr;return{add:t=>e.add(typeof t==`function`?t:()=>t.dispose()),dispose:()=>e.unsubscribe()}}function Bu(e,t={}){let n=t.debounceMs??250,r=t.initialQuery??``,i=new hi;return{query$:i.pipe(Oa(r)),state$:i.pipe(Oa(r),Sa(n),wa(),ka(t=>{let n=t.trim();return n?e(n).pipe(pa(e=>({results:e??[],isSearching:e===void 0})),Oa({results:[],isSearching:!0})):ia({results:[],isSearching:!1})})),setQuery:e=>i.next(e),dispose:()=>i.complete()}}function Vu(e){let t=[],n=new _i(null);return t.push(e.bus.get(`beckon:hover`).subscribe(({annotationId:t})=>{n.next(t),t&&e.bus.get(`beckon:sparkle`).next({annotationId:t})})),t.push(e.bus.get(`browse:click`).subscribe(({annotationId:t})=>{e.bus.get(`beckon:focus`).next({annotationId:t})})),{hoveredAnnotationId$:n.asObservable(),hover:t=>e.bus.get(`beckon:hover`).next({annotationId:t}),focus:t=>e.bus.get(`beckon:focus`).next({annotationId:t}),sparkle:t=>e.bus.get(`beckon:sparkle`).next({annotationId:t}),dispose(){t.forEach(e=>e.unsubscribe()),n.complete()}}}function Hu(e,t){let n=null,r=null,i=()=>{r!==null&&(clearTimeout(r),r=null)};return{handleMouseEnter:a=>{n!==a&&(i(),r=setTimeout(()=>{r=null,n=a,e(a)},t))},handleMouseLeave:()=>{i(),n!==null&&(n=null,e(null))},cleanup:i}}function Uu(e,t){let n=[],r=new _i(null),i=new _i(!1),a=new _i(null),o=new _i(null);return n.push(e.bus.get(`gather:requested`).subscribe(s=>{i.next(!0),a.next(null),r.next(null),o.next(za(s.annotationId));let c=e.gather.annotation(t,za(s.annotationId),{contextWindow:s.options?.contextWindow??2e3}).pipe(da(6e4)).subscribe({next:e=>{`response`in e&&e.response&&(r.next(e.response.context??null),i.next(!1))},error:e=>{a.next(e instanceof Error?e:Error(String(e))),i.next(!1)},complete:()=>{i.next(!1)}});n.push(c)})),{context$:r.asObservable(),loading$:i.asObservable(),error$:a.asObservable(),annotationId$:o.asObservable(),dispose(){n.forEach(e=>e.unsubscribe()),r.complete(),i.complete(),a.complete(),o.complete()}}}function Wu(e,t){let n=[];return n.push(e.bus.get(`match:search-requested`).subscribe(t=>{let r=e.match.search(Ra(t.resourceId),za(t.referenceId),t.context,{limit:t.limit,useSemanticScoring:t.useSemanticScoring}).pipe(da(6e4)).subscribe({next:t=>e.bus.get(`match:search-results`).next(t),error:n=>e.bus.get(`match:search-failed`).next({correlationId:t.correlationId,referenceId:t.referenceId,error:n instanceof Error?n.message:String(n)})});n.push(r)})),{dispose(){n.forEach(e=>e.unsubscribe())}}}function Gu(e,t,n){let r=[],i=new _i(!1),a=new _i(null),o=null;return{isGenerating$:i.asObservable(),progress$:a.asObservable(),generate:(s,c)=>{let l=e.yield.fromAnnotation(Ra(t),za(s),{...c,language:c.language||n}).pipe(da({each:3e5})).subscribe({next:e=>{e.kind===`progress`&&(a.next(e.data),i.next(!0))},complete:()=>{i.next(!1),o&&clearTimeout(o),o=setTimeout(()=>{a.next(null),o=null},2e3)},error:()=>{a.next(null),i.next(!1)}});r.push(l)},dispose(){r.forEach(e=>e.unsubscribe()),o&&clearTimeout(o),i.complete(),a.complete()}}}function Ku(e){if(e.svgSelector)return{type:`SvgSelector`,value:e.svgSelector};if(e.fragmentSelector){let t=[{type:`FragmentSelector`,value:e.fragmentSelector,...e.conformsTo&&{conformsTo:e.conformsTo}}];return e.exact&&t.push({type:`TextQuoteSelector`,exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}),t}return{type:`TextQuoteSelector`,exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}}function qu(e,t){let n=[],r=new _i(null),i=new _i(null),a=new _i(null),o=null,s=()=>{o&&=(clearTimeout(o),null)},c=e=>{r.next(e)};return n.push(e.bus.get(`mark:requested`).subscribe(c)),n.push(e.bus.get(`mark:select-comment`).subscribe(e=>c({selector:Ku(e),motivation:`commenting`}))),n.push(e.bus.get(`mark:select-tag`).subscribe(e=>c({selector:Ku(e),motivation:`tagging`}))),n.push(e.bus.get(`mark:select-assessment`).subscribe(e=>c({selector:Ku(e),motivation:`assessing`}))),n.push(e.bus.get(`mark:select-reference`).subscribe(e=>c({selector:Ku(e),motivation:`linking`}))),n.push(e.bus.get(`mark:cancel-pending`).subscribe(()=>r.next(null))),n.push(e.bus.get(`mark:create-ok`).subscribe(()=>r.next(null))),n.push(e.bus.get(`mark:submit`).subscribe(async n=>{try{let r=await e.mark.annotation({motivation:n.motivation,target:{source:t,selector:n.selector},body:n.body});e.bus.get(`mark:create-ok`).next({annotationId:r.annotationId})}catch(t){e.bus.get(`mark:create-failed`).next({message:t instanceof Error?t.message:String(t)})}})),n.push(e.bus.get(`mark:delete`).subscribe(async n=>{try{await e.mark.delete(t,n.annotationId),e.bus.get(`mark:delete-ok`).next({annotationId:n.annotationId})}catch(t){e.bus.get(`mark:delete-failed`).next({message:t instanceof Error?t.message:String(t)})}})),n.push(e.bus.get(`mark:assist-request`).subscribe(r=>{s(),i.next(r.motivation),a.next(null);let c=e.mark.assist(t,r.motivation,r.options).pipe(da({each:18e4})).subscribe({next:e=>{e.kind===`progress`&&a.next(e.data)},complete:()=>{i.next(null),s(),o=setTimeout(()=>{a.next(null),o=null},5e3)},error:()=>{s(),i.next(null),a.next(null)}});n.push(c)})),n.push(e.bus.get(`mark:progress-dismiss`).subscribe(()=>{s(),a.next(null)})),{pendingAnnotation$:r.asObservable(),assistingMotivation$:i.asObservable(),progress$:a.asObservable(),dispose(){n.forEach(e=>e.unsubscribe()),s(),r.complete(),i.complete(),a.complete()}}}var Ju=p({"../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isFunction=void 0;function t(e){return typeof e==`function`}e.isFunction=t}}),Yu=p({"../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createErrorClass=void 0;function t(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}e.createErrorClass=t}}),Xu=p({"../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.UnsubscriptionError=void 0,e.UnsubscriptionError=Yu().createErrorClass(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
9
|
+
`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
|
|
10
|
+
`):``,this.name=`UnsubscriptionError`,this.errors=t}})}}),Zu=p({"../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.arrRemove=void 0;function t(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}e.arrRemove=t}}),Qu=p({"../../node_modules/rxjs/dist/cjs/internal/Subscription.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.isSubscription=e.EMPTY_SUBSCRIPTION=e.Subscription=void 0;var i=Ju(),a=Xu(),o=Zu(),s=(function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,o,s,c,u;if(!this.closed){this.closed=!0;var d=this._parentage;if(d)if(this._parentage=null,Array.isArray(d))try{for(var f=t(d),p=f.next();!p.done;p=f.next())p.value.remove(this)}catch(t){e={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(e)throw e.error}}else d.remove(this);var m=this.initialTeardown;if(i.isFunction(m))try{m()}catch(e){u=e instanceof a.UnsubscriptionError?e.errors:[e]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var g=t(h),_=g.next();!_.done;_=g.next()){var v=_.value;try{l(v)}catch(e){u??=[],e instanceof a.UnsubscriptionError?u=r(r([],n(u)),n(e.errors)):u.push(e)}}}catch(e){s={error:e}}finally{try{_&&!_.done&&(c=g.return)&&c.call(g)}finally{if(s)throw s.error}}}if(u)throw new a.UnsubscriptionError(u)}},e.prototype.add=function(t){if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&o.arrRemove(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&o.arrRemove(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})();e.Subscription=s,e.EMPTY_SUBSCRIPTION=s.EMPTY;function c(e){return e instanceof s||e&&`closed`in e&&i.isFunction(e.remove)&&i.isFunction(e.add)&&i.isFunction(e.unsubscribe)}e.isSubscription=c;function l(e){i.isFunction(e)?e():e.unsubscribe()}}}),$u=p({"../../node_modules/rxjs/dist/cjs/internal/config.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}}}),ed=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(r,i){var a=[...arguments].slice(2),o=e.timeoutProvider.delegate;return o?.setTimeout?o.setTimeout.apply(o,n([r,i],t(a))):setTimeout.apply(void 0,n([r,i],t(a)))},clearTimeout:function(t){return(e.timeoutProvider.delegate?.clearTimeout||clearTimeout)(t)},delegate:void 0}}}),td=p({"../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.reportUnhandledError=void 0;var t=$u(),n=ed();function r(e){n.timeoutProvider.setTimeout(function(){var n=t.config.onUnhandledError;if(n)n(e);else throw e})}e.reportUnhandledError=r}}),nd=p({"../../node_modules/rxjs/dist/cjs/internal/util/noop.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.noop=void 0;function t(){}e.noop=t}}),rd=p({"../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=(function(){return r(`C`,void 0,void 0)})();function t(e){return r(`E`,void 0,e)}e.errorNotification=t;function n(e){return r(`N`,e,void 0)}e.nextNotification=n;function r(e,t,n){return{kind:e,value:t,error:n}}e.createNotification=r}}),id=p({"../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.captureError=e.errorContext=void 0;var t=$u(),n=null;function r(e){if(t.config.useDeprecatedSynchronousErrorHandling){var r=!n;if(r&&(n={errorThrown:!1,error:null}),e(),r){var i=n,a=i.errorThrown,o=i.error;if(n=null,a)throw o}}else e()}e.errorContext=r;function i(e){t.config.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=e)}e.captureError=i}}),ad=p({"../../node_modules/rxjs/dist/cjs/internal/Subscriber.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var n=Ju(),r=Qu(),i=$u(),a=td(),o=nd(),s=rd(),c=ed(),l=id(),u=(function(n){t(i,n);function i(t){var i=n.call(this)||this;return i.isStopped=!1,t?(i.destination=t,r.isSubscription(t)&&t.add(i)):i.destination=e.EMPTY_OBSERVER,i}return i.create=function(e,t,n){return new m(e,t,n)},i.prototype.next=function(e){this.isStopped?_(s.nextNotification(e),this):this._next(e)},i.prototype.error=function(e){this.isStopped?_(s.errorNotification(e),this):(this.isStopped=!0,this._error(e))},i.prototype.complete=function(){this.isStopped?_(s.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},i.prototype._next=function(e){this.destination.next(e)},i.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},i.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i})(r.Subscription);e.Subscriber=u;var d=Function.prototype.bind;function f(e,t){return d.call(e,t)}var p=(function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){h(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){h(e)}else h(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){h(e)}},e})(),m=(function(e){t(r,e);function r(t,r,a){var o=e.call(this)||this,s;if(n.isFunction(t)||!t)s={next:t??void 0,error:r??void 0,complete:a??void 0};else{var c;o&&i.config.useDeprecatedNextContext?(c=Object.create(t),c.unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&f(t.next,c),error:t.error&&f(t.error,c),complete:t.complete&&f(t.complete,c)}):s=t}return o.destination=new p(s),o}return r})(u);e.SafeSubscriber=m;function h(e){i.config.useDeprecatedSynchronousErrorHandling?l.captureError(e):a.reportUnhandledError(e)}function g(e){throw e}function _(e,t){var n=i.config.onStoppedNotification;n&&c.timeoutProvider.setTimeout(function(){return n(e,t)})}e.EMPTY_OBSERVER={closed:!0,next:o.noop,error:g,complete:o.noop}}}),od=p({"../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.observable=void 0,e.observable=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})()}}),sd=p({"../../node_modules/rxjs/dist/cjs/internal/util/identity.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.identity=void 0;function t(e){return e}e.identity=t}}),cd=p({"../../node_modules/rxjs/dist/cjs/internal/util/pipe.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.pipeFromArray=e.pipe=void 0;var t=sd();function n(){return r([...arguments])}e.pipe=n;function r(e){return e.length===0?t.identity:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}e.pipeFromArray=r}}),ld=p({"../../node_modules/rxjs/dist/cjs/internal/Observable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.Observable=void 0;var t=ad(),n=Qu(),r=od(),i=cd(),a=$u(),o=Ju(),s=id();e.Observable=(function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,n,r){var i=this,a=u(e)?e:new t.SafeSubscriber(e,n,r);return s.errorContext(function(){var e=i,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,n){var r=this;return n=c(n),new n(function(n,i){var a=new t.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),a.unsubscribe()}},error:i,complete:n});r.subscribe(a)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[r.observable]=function(){return this},e.prototype.pipe=function(){var e=[...arguments];return i.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=c(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e})();function c(e){return e??a.config.Promise??Promise}function l(e){return e&&o.isFunction(e.next)&&o.isFunction(e.error)&&o.isFunction(e.complete)}function u(e){return e&&e instanceof t.Subscriber||l(e)&&n.isSubscription(e)}}}),F=p({"../../node_modules/rxjs/dist/cjs/internal/util/lift.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.operate=e.hasLift=void 0;var t=Ju();function n(e){return t.isFunction(e?.lift)}e.hasLift=n;function r(e){return function(t){if(n(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}e.operate=r}}),I=p({"../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var n=ad();function r(e,t,n,r,a){return new i(e,t,n,r,a)}e.createOperatorSubscriber=r;var i=(function(e){t(n,e);function n(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return n.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},n})(n.Subscriber);e.OperatorSubscriber=i}}),ud=p({"../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.refCount=void 0;var t=F(),n=I();function r(){return t.operate(function(e,t){var r=null;e._refCount++;var i=n.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var n=e._connection,i=r;r=null,n&&(!i||n===i)&&n.unsubscribe(),t.unsubscribe()});e.subscribe(i),i.closed||(r=e.connect())})}e.refCount=r}}),dd=p({"../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.ConnectableObservable=void 0;var n=ld(),r=Qu(),i=ud(),a=I(),o=F();e.ConnectableObservable=(function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,o.hasLift(t)&&(r.lift=t.lift),r}return n.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},n.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},n.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,e?.unsubscribe()},n.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new r.Subscription;var n=this.getSubject();t.add(this.source.subscribe(a.createOperatorSubscriber(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=r.Subscription.EMPTY)}return t},n.prototype.refCount=function(){return i.refCount()(this)},n})(n.Observable)}}),fd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}}}),pd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.animationFrameProvider=void 0;var r=Qu();e.animationFrameProvider={schedule:function(t){var n=requestAnimationFrame,i=cancelAnimationFrame,a=e.animationFrameProvider.delegate;a&&(n=a.requestAnimationFrame,i=a.cancelAnimationFrame);var o=n(function(e){i=void 0,t(e)});return new r.Subscription(function(){return i?.(o)})},requestAnimationFrame:function(){var r=[...arguments];return(e.animationFrameProvider.delegate?.requestAnimationFrame||requestAnimationFrame).apply(void 0,n([],t(r)))},cancelAnimationFrame:function(){var r=[...arguments];return(e.animationFrameProvider.delegate?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,n([],t(r)))},delegate:void 0}}}),md=p({"../../node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.animationFrames=void 0;var t=ld(),n=fd(),r=pd();function i(e){return e?a(e):o}e.animationFrames=i;function a(e){return new t.Observable(function(t){var i=e||n.performanceTimestampProvider,a=i.now(),o=0,s=function(){t.closed||(o=r.animationFrameProvider.requestAnimationFrame(function(n){o=0;var r=i.now();t.next({timestamp:e?r:n,elapsed:r-a}),s()}))};return s(),function(){o&&r.animationFrameProvider.cancelAnimationFrame(o)}})}var o=a()}}),hd=p({"../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ObjectUnsubscribedError=void 0,e.ObjectUnsubscribedError=Yu().createErrorClass(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}})}}),gd=p({"../../node_modules/rxjs/dist/cjs/internal/Subject.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.AnonymousSubject=e.Subject=void 0;var r=ld(),i=Qu(),a=hd(),o=Zu(),s=id(),c=(function(e){t(c,e);function c(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return c.prototype.lift=function(e){var t=new l(this,this);return t.operator=e,t},c.prototype._throwIfClosed=function(){if(this.closed)throw new a.ObjectUnsubscribedError},c.prototype.next=function(e){var t=this;s.errorContext(function(){var r,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var a=n(t.currentObservers),o=a.next();!o.done;o=a.next())o.value.next(e)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}})},c.prototype.error=function(e){var t=this;s.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},c.prototype.complete=function(){var e=this;s.errorContext(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},c.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(c.prototype,`observed`,{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),c.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},c.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},c.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,s=n.observers;return r||a?i.EMPTY_SUBSCRIPTION:(this.currentObservers=null,s.push(e),new i.Subscription(function(){t.currentObservers=null,o.arrRemove(s,e)}))},c.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},c.prototype.asObservable=function(){var e=new r.Observable;return e.source=this,e},c.create=function(e,t){return new l(e,t)},c})(r.Observable);e.Subject=c;var l=(function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return n.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},n.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},n.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},n.prototype._subscribe=function(e){return this.source?.subscribe(e)??i.EMPTY_SUBSCRIPTION},n})(c);e.AnonymousSubject=l}}),_d=p({"../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.BehaviorSubject=void 0,e.BehaviorSubject=(function(e){t(n,e);function n(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(n.prototype,`value`,{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n})(gd().Subject)}}),vd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}}),yd=p({"../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.ReplaySubject=void 0;var n=gd(),r=vd();e.ReplaySubject=(function(e){t(n,e);function n(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=r.dateTimestampProvider);var a=e.call(this)||this;return a._bufferSize=t,a._windowTime=n,a._timestampProvider=i,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=n===1/0,a._bufferSize=Math.max(1,t),a._windowTime=Math.max(1,n),a}return n.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},n.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},n.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},n})(n.Subject)}}),bd=p({"../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AsyncSubject=void 0,e.AsyncSubject=(function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return n.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},n.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},n.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},n})(gd().Subject)}}),xd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.Action=void 0,e.Action=(function(e){t(n,e);function n(t,n){return e.call(this)||this}return n.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},n})(Qu().Subscription)}}),Sd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(r,i){var a=[...arguments].slice(2),o=e.intervalProvider.delegate;return o?.setInterval?o.setInterval.apply(o,n([r,i],t(a))):setInterval.apply(void 0,n([r,i],t(a)))},clearInterval:function(t){return(e.intervalProvider.delegate?.clearInterval||clearInterval)(t)},delegate:void 0}}}),Cd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AsyncAction=void 0;var n=xd(),r=Sd(),i=Zu();e.AsyncAction=(function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return n.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},n.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),r.intervalProvider.setInterval(e.flush.bind(e,this),n)},n.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&r.intervalProvider.clearInterval(t)},n.prototype.execute=function(e,t){if(this.closed)return Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},n.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},n.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,a=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,i.arrRemove(a,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},n})(n.Action)}}),wd=p({"../../node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.TestTools=e.Immediate=void 0;var t=1,n,r={};function i(e){return e in r?(delete r[e],!0):!1}e.Immediate={setImmediate:function(e){var a=t++;return r[a]=!0,n||=Promise.resolve(),n.then(function(){return i(a)&&e()}),a},clearImmediate:function(e){i(e)}},e.TestTools={pending:function(){return Object.keys(r).length}}}}),Td=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.immediateProvider=void 0;var r=wd(),i=r.Immediate.setImmediate,a=r.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){var r=[...arguments];return(e.immediateProvider.delegate?.setImmediate||i).apply(void 0,n([],t(r)))},clearImmediate:function(t){return(e.immediateProvider.delegate?.clearImmediate||a)(t)},delegate:void 0}}}),Ed=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AsapAction=void 0;var n=Cd(),r=Td();e.AsapAction=(function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||=r.immediateProvider.setImmediate(t.flush.bind(t,void 0)))},n.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i==null?this.delay>0:i>0)return e.prototype.recycleAsyncId.call(this,t,n,i);var a=t.actions;n!=null&&a[a.length-1]?.id!==n&&(r.immediateProvider.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},n})(n.AsyncAction)}}),Dd=p({"../../node_modules/rxjs/dist/cjs/internal/Scheduler.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.Scheduler=void 0;var t=vd();e.Scheduler=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=t.dateTimestampProvider.now,e})()}}),Od=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AsyncScheduler=void 0;var n=Dd();e.AsyncScheduler=(function(e){t(r,e);function r(t,r){r===void 0&&(r=n.Scheduler.now);var i=e.call(this,t,r)||this;return i.actions=[],i._active=!1,i}return r.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},r})(n.Scheduler)}}),kd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AsapScheduler=void 0,e.AsapScheduler=(function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n=this.actions,r;e||=n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},n})(Od().AsyncScheduler)}}),Ad=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.asap=e.asapScheduler=void 0;var t=Ed();e.asapScheduler=new(kd()).AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}}),jd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.async=e.asyncScheduler=void 0;var t=Cd();e.asyncScheduler=new(Od()).AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}}),Md=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.QueueAction=void 0,e.QueueAction=(function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},n.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},n.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!=null&&r>0||r==null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},n})(Cd().AsyncAction)}}),Nd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.QueueScheduler=void 0,e.QueueScheduler=(function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n})(Od().AsyncScheduler)}}),Pd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.queue=e.queueScheduler=void 0;var t=Md();e.queueScheduler=new(Nd()).QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}}),Fd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AnimationFrameAction=void 0;var n=Cd(),r=pd();e.AnimationFrameAction=(function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||=r.animationFrameProvider.requestAnimationFrame(function(){return t.flush(void 0)}))},n.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i==null?this.delay>0:i>0)return e.prototype.recycleAsyncId.call(this,t,n,i);var a=t.actions;n!=null&&n===t._scheduled&&a[a.length-1]?.id!==n&&(r.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},n})(n.AsyncAction)}}),Id=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.AnimationFrameScheduler=void 0,e.AnimationFrameScheduler=(function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.flush=function(e){this._active=!0;var t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var n=this.actions,r;e||=n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},n})(Od().AsyncScheduler)}}),Ld=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=Fd();e.animationFrameScheduler=new(Id()).AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}}),Rd=p({"../../node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(e){var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.VirtualAction=e.VirtualTimeScheduler=void 0;var n=Cd(),r=Qu();e.VirtualTimeScheduler=(function(e){t(n,e);function n(t,n){t===void 0&&(t=i),n===void 0&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return n.prototype.flush=function(){for(var e=this,t=e.actions,n=e.maxFrames,r,i;(i=t[0])&&i.delay<=n&&(t.shift(),this.frame=i.delay,!(r=i.execute(i.state,i.delay))););if(r){for(;i=t.shift();)i.unsubscribe();throw r}},n.frameTimeFactor=10,n})(Od().AsyncScheduler);var i=(function(e){t(n,e);function n(t,n,r){r===void 0&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return n.prototype.schedule=function(t,i){if(i===void 0&&(i=0),Number.isFinite(i)){if(!this.id)return e.prototype.schedule.call(this,t,i);this.active=!1;var a=new n(this.scheduler,this.work);return this.add(a),a.schedule(t,i)}else return r.Subscription.EMPTY},n.prototype.requestAsyncId=function(e,t,r){r===void 0&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(n.sortActions),1},n.prototype.recycleAsyncId=function(e,t,n){n===void 0&&(n=0)},n.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},n.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},n})(n.AsyncAction);e.VirtualAction=i}}),zd=p({"../../node_modules/rxjs/dist/cjs/internal/observable/empty.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.empty=e.EMPTY=void 0;var t=ld();e.EMPTY=new t.Observable(function(e){return e.complete()});function n(t){return t?r(t):e.EMPTY}e.empty=n;function r(e){return new t.Observable(function(t){return e.schedule(function(){return t.complete()})})}}}),Bd=p({"../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isScheduler=void 0;var t=Ju();function n(e){return e&&t.isFunction(e.schedule)}e.isScheduler=n}}),Vd=p({"../../node_modules/rxjs/dist/cjs/internal/util/args.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var t=Ju(),n=Bd();function r(e){return e[e.length-1]}function i(e){return t.isFunction(r(e))?e.pop():void 0}e.popResultSelector=i;function a(e){return n.isScheduler(r(e))?e.pop():void 0}e.popScheduler=a;function o(e,t){return typeof r(e)==`number`?e.pop():t}e.popNumber=o}}),Hd=p({"../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isArrayLike=void 0,e.isArrayLike=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`})}}),Ud=p({"../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isPromise=void 0;var t=Ju();function n(e){return t.isFunction(e?.then)}e.isPromise=n}}),Wd=p({"../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isInteropObservable=void 0;var t=od(),n=Ju();function r(e){return n.isFunction(e[t.observable])}e.isInteropObservable=r}}),Gd=p({"../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isAsyncIterable=void 0;var t=Ju();function n(e){return Symbol.asyncIterator&&t.isFunction(e?.[Symbol.asyncIterator])}e.isAsyncIterable=n}}),Kd=p({"../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createInvalidObservableTypeError=void 0;function t(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}e.createInvalidObservableTypeError=t}}),qd=p({"../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.iterator=e.getSymbolIterator=void 0;function t(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}e.getSymbolIterator=t,e.iterator=t()}}),Jd=p({"../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isIterable=void 0;var t=qd(),n=Ju();function r(e){return n.isFunction(e?.[t.iterator])}e.isIterable=r}}),Yd=p({"../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(e){var t=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},n=e&&e.__await||function(e){return this instanceof n?(this.v=e,this):new n(e)},r=e&&e.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var i=r.apply(e,t||[]),a,o=[];return a={},s(`next`),s(`throw`),s(`return`),a[Symbol.asyncIterator]=function(){return this},a;function s(e){i[e]&&(a[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||c(e,t)})})}function c(e,t){try{l(i[e](t))}catch(e){f(o[0][3],e)}}function l(e){e.value instanceof n?Promise.resolve(e.value.v).then(u,d):f(o[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),o.shift(),o.length&&c(o[0][0],o[0][1])}};Object.defineProperty(e,`__esModule`,{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var i=Ju();function a(e){return r(this,arguments,function(){var r,i,a,o;return t(this,function(t){switch(t.label){case 0:r=e.getReader(),t.label=1;case 1:t.trys.push([1,,9,10]),t.label=2;case 2:return[4,n(r.read())];case 3:return i=t.sent(),a=i.value,o=i.done,o?[4,n(void 0)]:[3,5];case 4:return[2,t.sent()];case 5:return[4,n(a)];case 6:return[4,t.sent()];case 7:return t.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}e.readableStreamLikeToAsyncGenerator=a;function o(e){return i.isFunction(e?.getReader)}e.isReadableStreamLike=o}}),L=p({"../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(e){var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},r=e&&e.__asyncValues||function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof i==`function`?i(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,i){n=e[t](n),a(r,i,n.done,n.value)})}}function a(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},i=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var a=Hd(),o=Ud(),s=ld(),c=Wd(),l=Gd(),u=Kd(),d=Jd(),f=Yd(),p=Ju(),m=td(),h=od();function g(e){if(e instanceof s.Observable)return e;if(e!=null){if(c.isInteropObservable(e))return _(e);if(a.isArrayLike(e))return v(e);if(o.isPromise(e))return y(e);if(l.isAsyncIterable(e))return x(e);if(d.isIterable(e))return b(e);if(f.isReadableStreamLike(e))return S(e)}throw u.createInvalidObservableTypeError(e)}e.innerFrom=g;function _(e){return new s.Observable(function(t){var n=e[h.observable]();if(p.isFunction(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}e.fromInteropObservable=_;function v(e){return new s.Observable(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}e.fromArrayLike=v;function y(e){return new s.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,m.reportUnhandledError)})}e.fromPromise=y;function b(e){return new s.Observable(function(t){var n,r;try{for(var a=i(e),o=a.next();!o.done;o=a.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}t.complete()})}e.fromIterable=b;function x(e){return new s.Observable(function(t){C(e,t).catch(function(e){return t.error(e)})})}e.fromAsyncIterable=x;function S(e){return x(f.readableStreamLikeToAsyncGenerator(e))}e.fromReadableStreamLike=S;function C(e,i){var a,o,s,c;return t(this,void 0,void 0,function(){var t,l;return n(this,function(n){switch(n.label){case 0:n.trys.push([0,5,6,11]),a=r(e),n.label=1;case 1:return[4,a.next()];case 2:if(o=n.sent(),o.done)return[3,4];if(t=o.value,i.next(t),i.closed)return[2];n.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=n.sent(),s={error:l},[3,11];case 6:return n.trys.push([6,,9,10]),o&&!o.done&&(c=a.return)?[4,c.call(a)]:[3,8];case 7:n.sent(),n.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return i.complete(),[2]}})})}}}),Xd=p({"../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.executeSchedule=void 0;function t(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}e.executeSchedule=t}}),Zd=p({"../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.observeOn=void 0;var t=Xd(),n=F(),r=I();function i(e,i){return i===void 0&&(i=0),n.operate(function(n,a){n.subscribe(r.createOperatorSubscriber(a,function(n){return t.executeSchedule(a,e,function(){return a.next(n)},i)},function(){return t.executeSchedule(a,e,function(){return a.complete()},i)},function(n){return t.executeSchedule(a,e,function(){return a.error(n)},i)}))})}e.observeOn=i}}),Qd=p({"../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.subscribeOn=void 0;var t=F();function n(e,n){return n===void 0&&(n=0),t.operate(function(t,r){r.add(e.schedule(function(){return t.subscribe(r)},n))})}e.subscribeOn=n}}),$d=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scheduleObservable=void 0;var t=L(),n=Zd(),r=Qd();function i(e,i){return t.innerFrom(e).pipe(r.subscribeOn(i),n.observeOn(i))}e.scheduleObservable=i}}),ef=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.schedulePromise=void 0;var t=L(),n=Zd(),r=Qd();function i(e,i){return t.innerFrom(e).pipe(r.subscribeOn(i),n.observeOn(i))}e.schedulePromise=i}}),tf=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scheduleArray=void 0;var t=ld();function n(e,n){return new t.Observable(function(t){var r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}e.scheduleArray=n}}),nf=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scheduleIterable=void 0;var t=ld(),n=qd(),r=Ju(),i=Xd();function a(e,a){return new t.Observable(function(t){var o;return i.executeSchedule(t,a,function(){o=e[n.iterator](),i.executeSchedule(t,a,function(){var e,n,r;try{e=o.next(),n=e.value,r=e.done}catch(e){t.error(e);return}r?t.complete():t.next(n)},0,!0)}),function(){return r.isFunction(o?.return)&&o.return()}})}e.scheduleIterable=a}}),rf=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scheduleAsyncIterable=void 0;var t=ld(),n=Xd();function r(e,r){if(!e)throw Error(`Iterable cannot be null`);return new t.Observable(function(t){n.executeSchedule(t,r,function(){var i=e[Symbol.asyncIterator]();n.executeSchedule(t,r,function(){i.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})})}e.scheduleAsyncIterable=r}}),af=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scheduleReadableStreamLike=void 0;var t=rf(),n=Yd();function r(e,r){return t.scheduleAsyncIterable(n.readableStreamLikeToAsyncGenerator(e),r)}e.scheduleReadableStreamLike=r}}),of=p({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scheduled=void 0;var t=$d(),n=ef(),r=tf(),i=nf(),a=rf(),o=Wd(),s=Ud(),c=Hd(),l=Jd(),u=Gd(),d=Kd(),f=Yd(),p=af();function m(e,m){if(e!=null){if(o.isInteropObservable(e))return t.scheduleObservable(e,m);if(c.isArrayLike(e))return r.scheduleArray(e,m);if(s.isPromise(e))return n.schedulePromise(e,m);if(u.isAsyncIterable(e))return a.scheduleAsyncIterable(e,m);if(l.isIterable(e))return i.scheduleIterable(e,m);if(f.isReadableStreamLike(e))return p.scheduleReadableStreamLike(e,m)}throw d.createInvalidObservableTypeError(e)}e.scheduled=m}}),sf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/from.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.from=void 0;var t=of(),n=L();function r(e,r){return r?t.scheduled(e,r):n.innerFrom(e)}e.from=r}}),cf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/of.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.of=void 0;var t=Vd(),n=sf();function r(){var e=[...arguments],r=t.popScheduler(e);return n.from(e,r)}e.of=r}}),lf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.throwError=void 0;var t=ld(),n=Ju();function r(e,r){var i=n.isFunction(e)?e:function(){return e},a=function(e){return e.error(i())};return new t.Observable(r?function(e){return r.schedule(a,0,e)}:a)}e.throwError=r}}),uf=p({"../../node_modules/rxjs/dist/cjs/internal/Notification.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=zd(),n=cf(),r=lf(),i=Ju();(function(e){e.NEXT=`N`,e.ERROR=`E`,e.COMPLETE=`C`})(e.NotificationKind||={}),e.Notification=(function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e===`N`}return e.prototype.observe=function(e){return a(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return i===`N`?e?.(a):i===`E`?t?.(o):n?.()},e.prototype.accept=function(e,t,n){return i.isFunction(e?.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,i=e.kind,a=e.value,o=e.error,s=i===`N`?n.of(a):i===`E`?r.throwError(function(){return o}):i===`C`?t.EMPTY:0;if(!s)throw TypeError(`Unexpected notification kind `+i);return s},e.createNext=function(t){return new e(`N`,t)},e.createError=function(t){return new e(`E`,void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e(`C`),e})();function a(e,t){var n,r,i,a=e,o=a.kind,s=a.value,c=a.error;if(typeof o!=`string`)throw TypeError(`Invalid notification, missing "kind"`);o===`N`?(n=t.next)==null||n.call(t,s):o===`E`?(r=t.error)==null||r.call(t,c):(i=t.complete)==null||i.call(t)}e.observeNotification=a}}),df=p({"../../node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isObservable=void 0;var t=ld(),n=Ju();function r(e){return!!e&&(e instanceof t.Observable||n.isFunction(e.lift)&&n.isFunction(e.subscribe))}e.isObservable=r}}),ff=p({"../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.EmptyError=void 0,e.EmptyError=Yu().createErrorClass(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}})}}),pf=p({"../../node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.lastValueFrom=void 0;var t=ff();function n(e,n){var r=typeof n==`object`;return new Promise(function(i,a){var o=!1,s;e.subscribe({next:function(e){s=e,o=!0},error:a,complete:function(){o?i(s):r?i(n.defaultValue):a(new t.EmptyError)}})})}e.lastValueFrom=n}}),mf=p({"../../node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.firstValueFrom=void 0;var t=ff(),n=ad();function r(e,r){var i=typeof r==`object`;return new Promise(function(a,o){var s=new n.SafeSubscriber({next:function(e){a(e),s.unsubscribe()},error:o,complete:function(){i?a(r.defaultValue):o(new t.EmptyError)}});e.subscribe(s)})}e.firstValueFrom=r}}),hf=p({"../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ArgumentOutOfRangeError=void 0,e.ArgumentOutOfRangeError=Yu().createErrorClass(function(e){return function(){e(this),this.name=`ArgumentOutOfRangeError`,this.message=`argument out of range`}})}}),gf=p({"../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.NotFoundError=void 0,e.NotFoundError=Yu().createErrorClass(function(e){return function(t){e(this),this.name=`NotFoundError`,this.message=t}})}}),_f=p({"../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.SequenceError=void 0,e.SequenceError=Yu().createErrorClass(function(e){return function(t){e(this),this.name=`SequenceError`,this.message=t}})}}),vf=p({"../../node_modules/rxjs/dist/cjs/internal/util/isDate.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isValidDate=void 0;function t(e){return e instanceof Date&&!isNaN(e)}e.isValidDate=t}}),yf=p({"../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.timeout=e.TimeoutError=void 0;var t=jd(),n=vf(),r=F(),i=L(),a=Yu(),o=I(),s=Xd();e.TimeoutError=a.createErrorClass(function(e){return function(t){t===void 0&&(t=null),e(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this.info=t}});function c(e,a){var c=n.isValidDate(e)?{first:e}:typeof e==`number`?{each:e}:e,u=c.first,d=c.each,f=c.with,p=f===void 0?l:f,m=c.scheduler,h=m===void 0?a??t.asyncScheduler:m,g=c.meta,_=g===void 0?null:g;if(u==null&&d==null)throw TypeError(`No timeout provided.`);return r.operate(function(e,t){var n,r,a=null,c=0,l=function(e){r=s.executeSchedule(t,h,function(){try{n.unsubscribe(),i.innerFrom(p({meta:_,lastValue:a,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(o.createOperatorSubscriber(t,function(e){r?.unsubscribe(),c++,t.next(a=e),d>0&&l(d)},void 0,void 0,function(){r?.closed||r?.unsubscribe(),a=null})),!c&&l(u==null?d:typeof u==`number`?u:+u-h.now())})}e.timeout=c;function l(t){throw new e.TimeoutError(t)}}}),bf=p({"../../node_modules/rxjs/dist/cjs/internal/operators/map.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.map=void 0;var t=F(),n=I();function r(e,r){return t.operate(function(t,i){var a=0;t.subscribe(n.createOperatorSubscriber(i,function(t){i.next(e.call(r,t,a++))}))})}e.map=r}}),xf=p({"../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.mapOneOrManyArgs=void 0;var r=bf(),i=Array.isArray;function a(e,r){return i(r)?e.apply(void 0,n([],t(r))):e(r)}function o(e){return r.map(function(t){return a(e,t)})}e.mapOneOrManyArgs=o}}),Sf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.bindCallbackInternals=void 0;var r=Bd(),i=ld(),a=Qd(),o=xf(),s=Zd(),c=bd();function l(e,u,d,f){if(d)if(r.isScheduler(d))f=d;else return function(){var t=[...arguments];return l(e,u,f).apply(this,t).pipe(o.mapOneOrManyArgs(d))};return f?function(){var t=[...arguments];return l(e,u).apply(this,t).pipe(a.subscribeOn(f),s.observeOn(f))}:function(){for(var r=this,a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var s=new c.AsyncSubject,l=!0;return new i.Observable(function(i){var o=s.subscribe(i);if(l){l=!1;var c=!1,d=!1;u.apply(r,n(n([],t(a)),[function(){var t=[...arguments];if(e){var n=t.shift();if(n!=null){s.error(n);return}}s.next(1<t.length?t:t[0]),d=!0,c&&s.complete()}])),d&&s.complete(),c=!0}return o})}}e.bindCallbackInternals=l}}),Cf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.bindCallback=void 0;var t=Sf();function n(e,n,r){return t.bindCallbackInternals(!1,e,n,r)}e.bindCallback=n}}),wf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.bindNodeCallback=void 0;var t=Sf();function n(e,n,r){return t.bindCallbackInternals(!0,e,n,r)}e.bindNodeCallback=n}}),Tf=p({"../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,r=Object.prototype,i=Object.keys;function a(e){if(e.length===1){var n=e[0];if(t(n))return{args:n,keys:null};if(o(n)){var r=i(n);return{args:r.map(function(e){return n[e]}),keys:r}}}return{args:e,keys:null}}e.argsArgArrayOrObject=a;function o(e){return e&&typeof e==`object`&&n(e)===r}}}),Ef=p({"../../node_modules/rxjs/dist/cjs/internal/util/createObject.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createObject=void 0;function t(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}e.createObject=t}}),Df=p({"../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var t=ld(),n=Tf(),r=sf(),i=sd(),a=xf(),o=Vd(),s=Ef(),c=I(),l=Xd();function u(){var e=[...arguments],c=o.popScheduler(e),l=o.popResultSelector(e),u=n.argsArgArrayOrObject(e),f=u.args,p=u.keys;if(f.length===0)return r.from([],c);var m=new t.Observable(d(f,c,p?function(e){return s.createObject(p,e)}:i.identity));return l?m.pipe(a.mapOneOrManyArgs(l)):m}e.combineLatest=u;function d(e,t,n){return n===void 0&&(n=i.identity),function(i){f(t,function(){for(var a=e.length,o=Array(a),s=a,l=a,u=function(a){f(t,function(){var u=r.from(e[a],t),d=!1;u.subscribe(c.createOperatorSubscriber(i,function(e){o[a]=e,d||(d=!0,l--),l||i.next(n(o.slice()))},function(){--s||i.complete()}))},i)},d=0;d<a;d++)u(d)},i)}}e.combineLatestInit=d;function f(e,t,n){e?l.executeSchedule(n,e,t):t()}}}),Of=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeInternals=void 0;var t=L(),n=Xd(),r=I();function i(e,i,a,o,s,c,l,u){var d=[],f=0,p=0,m=!1,h=function(){m&&!d.length&&!f&&i.complete()},g=function(e){return f<o?_(e):d.push(e)},_=function(e){c&&i.next(e),f++;var u=!1;t.innerFrom(a(e,p++)).subscribe(r.createOperatorSubscriber(i,function(e){s?.(e),c?g(e):i.next(e)},function(){u=!0},void 0,function(){if(u)try{f--;for(var e=function(){var e=d.shift();l?n.executeSchedule(i,l,function(){return _(e)}):_(e)};d.length&&f<o;)e();h()}catch(e){i.error(e)}}))};return e.subscribe(r.createOperatorSubscriber(i,g,function(){m=!0,h()})),function(){u?.()}}e.mergeInternals=i}}),kf=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeMap=void 0;var t=bf(),n=L(),r=F(),i=Of(),a=Ju();function o(e,s,c){return c===void 0&&(c=1/0),a.isFunction(s)?o(function(r,i){return t.map(function(e,t){return s(r,e,i,t)})(n.innerFrom(e(r,i)))},c):(typeof s==`number`&&(c=s),r.operate(function(t,n){return i.mergeInternals(t,n,e,c)}))}e.mergeMap=o}}),Af=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeAll=void 0;var t=kf(),n=sd();function r(e){return e===void 0&&(e=1/0),t.mergeMap(n.identity,e)}e.mergeAll=r}}),jf=p({"../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.concatAll=void 0;var t=Af();function n(){return t.mergeAll(1)}e.concatAll=n}}),Mf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/concat.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.concat=void 0;var t=jf(),n=Vd(),r=sf();function i(){var e=[...arguments];return t.concatAll()(r.from(e,n.popScheduler(e)))}e.concat=i}}),Nf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/defer.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.defer=void 0;var t=ld(),n=L();function r(e){return new t.Observable(function(t){n.innerFrom(e()).subscribe(t)})}e.defer=r}}),Pf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.connectable=void 0;var t=gd(),n=ld(),r=Nf(),i={connector:function(){return new t.Subject},resetOnDisconnect:!0};function a(e,t){t===void 0&&(t=i);var a=null,o=t.connector,s=t.resetOnDisconnect,c=s===void 0?!0:s,l=o(),u=new n.Observable(function(e){return l.subscribe(e)});return u.connect=function(){return(!a||a.closed)&&(a=r.defer(function(){return e}).subscribe(l),c&&a.add(function(){return l=o()})),a},u}e.connectable=a}}),Ff=p({"../../node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.forkJoin=void 0;var t=ld(),n=Tf(),r=L(),i=Vd(),a=I(),o=xf(),s=Ef();function c(){var e=[...arguments],c=i.popResultSelector(e),l=n.argsArgArrayOrObject(e),u=l.args,d=l.keys,f=new t.Observable(function(e){var t=u.length;if(!t){e.complete();return}for(var n=Array(t),i=t,o=t,c=function(t){var c=!1;r.innerFrom(u[t]).subscribe(a.createOperatorSubscriber(e,function(e){c||(c=!0,o--),n[t]=e},function(){return i--},void 0,function(){(!i||!c)&&(o||e.next(d?s.createObject(d,n):n),e.complete())}))},l=0;l<t;l++)c(l)});return c?f.pipe(o.mapOneOrManyArgs(c)):f}e.forkJoin=c}}),If=p({"../../node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,`__esModule`,{value:!0}),e.fromEvent=void 0;var n=L(),r=ld(),i=kf(),a=Hd(),o=Ju(),s=xf(),c=[`addListener`,`removeListener`],l=[`addEventListener`,`removeEventListener`],u=[`on`,`off`];function d(e,g,_,v){if(o.isFunction(_)&&(v=_,_=void 0),v)return d(e,g,_).pipe(s.mapOneOrManyArgs(v));var y=t(h(e)?l.map(function(t){return function(n){return e[t](g,n,_)}}):p(e)?c.map(f(e,g)):m(e)?u.map(f(e,g)):[],2),b=y[0],x=y[1];if(!b&&a.isArrayLike(e))return i.mergeMap(function(e){return d(e,g,_)})(n.innerFrom(e));if(!b)throw TypeError(`Invalid event target`);return new r.Observable(function(e){var t=function(){var t=[...arguments];return e.next(1<t.length?t:t[0])};return b(t),function(){return x(t)}})}e.fromEvent=d;function f(e,t){return function(n){return function(r){return e[n](t,r)}}}function p(e){return o.isFunction(e.addListener)&&o.isFunction(e.removeListener)}function m(e){return o.isFunction(e.on)&&o.isFunction(e.off)}function h(e){return o.isFunction(e.addEventListener)&&o.isFunction(e.removeEventListener)}}}),Lf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.fromEventPattern=void 0;var t=ld(),n=Ju(),r=xf();function i(e,a,o){return o?i(e,a).pipe(r.mapOneOrManyArgs(o)):new t.Observable(function(t){var r=function(){var e=[...arguments];return t.next(e.length===1?e[0]:e)},i=e(r);return n.isFunction(a)?function(){return a(r,i)}:void 0})}e.fromEventPattern=i}}),Rf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/generate.js"(e){var t=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(e,`__esModule`,{value:!0}),e.generate=void 0;var n=sd(),r=Bd(),i=Nf(),a=nf();function o(e,o,s,c,l){var u,d,f,p;arguments.length===1?(u=e,p=u.initialState,o=u.condition,s=u.iterate,d=u.resultSelector,f=d===void 0?n.identity:d,l=u.scheduler):(p=e,!c||r.isScheduler(c)?(f=n.identity,l=c):f=c);function m(){var e;return t(this,function(t){switch(t.label){case 0:e=p,t.label=1;case 1:return!o||o(e)?[4,f(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return e=s(e),[3,1];case 4:return[2]}})}return i.defer(l?function(){return a.scheduleIterable(m(),l)}:m)}e.generate=o}}),zf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/iif.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.iif=void 0;var t=Nf();function n(e,n,r){return t.defer(function(){return e()?n:r})}e.iif=n}}),Bf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/timer.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.timer=void 0;var t=ld(),n=jd(),r=Bd(),i=vf();function a(e,a,o){e===void 0&&(e=0),o===void 0&&(o=n.async);var s=-1;return a!=null&&(r.isScheduler(a)?o=a:s=a),new t.Observable(function(t){var n=i.isValidDate(e)?+e-o.now():e;n<0&&(n=0);var r=0;return o.schedule(function(){t.closed||(t.next(r++),0<=s?this.schedule(void 0,s):t.complete())},n)})}e.timer=a}}),Vf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/interval.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.interval=void 0;var t=jd(),n=Bf();function r(e,r){return e===void 0&&(e=0),r===void 0&&(r=t.asyncScheduler),e<0&&(e=0),n.timer(e,e,r)}e.interval=r}}),Hf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/merge.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.merge=void 0;var t=Af(),n=L(),r=zd(),i=Vd(),a=sf();function o(){var e=[...arguments],o=i.popScheduler(e),s=i.popNumber(e,1/0),c=e;return c.length?c.length===1?n.innerFrom(c[0]):t.mergeAll(s)(a.from(c,o)):r.EMPTY}e.merge=o}}),Uf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/never.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.never=e.NEVER=void 0;var t=ld(),n=nd();e.NEVER=new t.Observable(n.noop);function r(){return e.NEVER}e.never=r}}),Wf=p({"../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;function n(e){return e.length===1&&t(e[0])?e[0]:e}e.argsOrArgArray=n}}),Gf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.onErrorResumeNext=void 0;var t=ld(),n=Wf(),r=I(),i=nd(),a=L();function o(){var e=[...arguments],o=n.argsOrArgArray(e);return new t.Observable(function(e){var t=0,n=function(){if(t<o.length){var s=void 0;try{s=a.innerFrom(o[t++])}catch{n();return}var c=new r.OperatorSubscriber(e,void 0,i.noop,i.noop);s.subscribe(c),c.add(n)}else e.complete()};n()})}e.onErrorResumeNext=o}}),Kf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.pairs=void 0;var t=sf();function n(e,n){return t.from(Object.entries(e),n)}e.pairs=n}}),qf=p({"../../node_modules/rxjs/dist/cjs/internal/util/not.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.not=void 0;function t(e,t){return function(n,r){return!e.call(t,n,r)}}e.not=t}}),Jf=p({"../../node_modules/rxjs/dist/cjs/internal/operators/filter.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.filter=void 0;var t=F(),n=I();function r(e,r){return t.operate(function(t,i){var a=0;t.subscribe(n.createOperatorSubscriber(i,function(t){return e.call(r,t,a++)&&i.next(t)}))})}e.filter=r}}),Yf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/partition.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.partition=void 0;var t=qf(),n=Jf(),r=L();function i(e,i,a){return[n.filter(i,a)(r.innerFrom(e)),n.filter(t.not(i,a))(r.innerFrom(e))]}e.partition=i}}),Xf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/race.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.raceInit=e.race=void 0;var t=ld(),n=L(),r=Wf(),i=I();function a(){var e=[...arguments];return e=r.argsOrArgArray(e),e.length===1?n.innerFrom(e[0]):new t.Observable(o(e))}e.race=a;function o(e){return function(t){for(var r=[],a=function(a){r.push(n.innerFrom(e[a]).subscribe(i.createOperatorSubscriber(t,function(e){if(r){for(var n=0;n<r.length;n++)n!==a&&r[n].unsubscribe();r=null}t.next(e)})))},o=0;r&&!t.closed&&o<e.length;o++)a(o)}}e.raceInit=o}}),Zf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/range.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.range=void 0;var t=ld(),n=zd();function r(e,r,i){if(r??(r=e,e=0),r<=0)return n.EMPTY;var a=r+e;return new t.Observable(i?function(t){var n=e;return i.schedule(function(){n<a?(t.next(n++),this.schedule()):t.complete()})}:function(t){for(var n=e;n<a&&!t.closed;)t.next(n++);t.complete()})}e.range=r}}),Qf=p({"../../node_modules/rxjs/dist/cjs/internal/observable/using.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.using=void 0;var t=ld(),n=L(),r=zd();function i(e,i){return new t.Observable(function(t){var a=e(),o=i(a);return(o?n.innerFrom(o):r.EMPTY).subscribe(t),function(){a&&a.unsubscribe()}})}e.using=i}}),$f=p({"../../node_modules/rxjs/dist/cjs/internal/observable/zip.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.zip=void 0;var r=ld(),i=L(),a=Wf(),o=zd(),s=I(),c=Vd();function l(){var e=[...arguments],l=c.popResultSelector(e),u=a.argsOrArgArray(e);return u.length?new r.Observable(function(e){var r=u.map(function(){return[]}),a=u.map(function(){return!1});e.add(function(){r=a=null});for(var o=function(o){i.innerFrom(u[o]).subscribe(s.createOperatorSubscriber(e,function(i){if(r[o].push(i),r.every(function(e){return e.length})){var s=r.map(function(e){return e.shift()});e.next(l?l.apply(void 0,n([],t(s))):s),r.some(function(e,t){return!e.length&&a[t]})&&e.complete()}},function(){a[o]=!0,!r[o].length&&e.complete()}))},c=0;!e.closed&&c<u.length;c++)o(c);return function(){r=a=null}}):o.EMPTY}e.zip=l}}),ep=p({"../../node_modules/rxjs/dist/cjs/internal/types.js"(e){Object.defineProperty(e,`__esModule`,{value:!0})}}),tp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/audit.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.audit=void 0;var t=F(),n=L(),r=I();function i(e){return t.operate(function(t,i){var a=!1,o=null,s=null,c=!1,l=function(){if(s?.unsubscribe(),s=null,a){a=!1;var e=o;o=null,i.next(e)}c&&i.complete()},u=function(){s=null,c&&i.complete()};t.subscribe(r.createOperatorSubscriber(i,function(t){a=!0,o=t,s||n.innerFrom(e(t)).subscribe(s=r.createOperatorSubscriber(i,l,u))},function(){c=!0,(!a||!s||s.closed)&&i.complete()}))})}e.audit=i}}),np=p({"../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.auditTime=void 0;var t=jd(),n=tp(),r=Bf();function i(e,i){return i===void 0&&(i=t.asyncScheduler),n.audit(function(){return r.timer(e,i)})}e.auditTime=i}}),rp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.buffer=void 0;var t=F(),n=nd(),r=I(),i=L();function a(e){return t.operate(function(t,a){var o=[];return t.subscribe(r.createOperatorSubscriber(a,function(e){return o.push(e)},function(){a.next(o),a.complete()})),i.innerFrom(e).subscribe(r.createOperatorSubscriber(a,function(){var e=o;o=[],a.next(e)},n.noop)),function(){o=null}})}e.buffer=a}}),ip=p({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.bufferCount=void 0;var n=F(),r=I(),i=Zu();function a(e,a){return a===void 0&&(a=null),a??=e,n.operate(function(n,o){var s=[],c=0;n.subscribe(r.createOperatorSubscriber(o,function(n){var r,l,u,d,f=null;c++%a===0&&s.push([]);try{for(var p=t(s),m=p.next();!m.done;m=p.next()){var h=m.value;h.push(n),e<=h.length&&(f??=[],f.push(h))}}catch(e){r={error:e}}finally{try{m&&!m.done&&(l=p.return)&&l.call(p)}finally{if(r)throw r.error}}if(f)try{for(var g=t(f),_=g.next();!_.done;_=g.next()){var h=_.value;i.arrRemove(s,h),o.next(h)}}catch(e){u={error:e}}finally{try{_&&!_.done&&(d=g.return)&&d.call(g)}finally{if(u)throw u.error}}},function(){var e,n;try{for(var r=t(s),i=r.next();!i.done;i=r.next()){var a=i.value;o.next(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}o.complete()},void 0,function(){s=null}))})}e.bufferCount=a}}),ap=p({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.bufferTime=void 0;var n=Qu(),r=F(),i=I(),a=Zu(),o=jd(),s=Vd(),c=Xd();function l(e){var l=[...arguments].slice(1),u=s.popScheduler(l)??o.asyncScheduler,d=l[0]??null,f=l[1]||1/0;return r.operate(function(r,o){var s=[],l=!1,p=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(s,e),o.next(t),l&&m()},m=function(){if(s){var t=new n.Subscription;o.add(t);var r={buffer:[],subs:t};s.push(r),c.executeSchedule(t,u,function(){return p(r)},e)}};d!==null&&d>=0?c.executeSchedule(o,u,m,d,!0):l=!0,m();var h=i.createOperatorSubscriber(o,function(e){var n,r,i=s.slice();try{for(var a=t(i),o=a.next();!o.done;o=a.next()){var c=o.value,l=c.buffer;l.push(e),f<=l.length&&p(c)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},function(){for(;s?.length;)o.next(s.shift().buffer);h?.unsubscribe(),o.complete(),o.unsubscribe()},void 0,function(){return s=null});r.subscribe(h)})}e.bufferTime=l}}),op=p({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.bufferToggle=void 0;var n=Qu(),r=F(),i=L(),a=I(),o=nd(),s=Zu();function c(e,c){return r.operate(function(r,l){var u=[];i.innerFrom(e).subscribe(a.createOperatorSubscriber(l,function(e){var t=[];u.push(t);var r=new n.Subscription;r.add(i.innerFrom(c(e)).subscribe(a.createOperatorSubscriber(l,function(){s.arrRemove(u,t),l.next(t),r.unsubscribe()},o.noop)))},o.noop)),r.subscribe(a.createOperatorSubscriber(l,function(e){var n,r;try{for(var i=t(u),a=i.next();!a.done;a=i.next())a.value.push(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},function(){for(;u.length>0;)l.next(u.shift());l.complete()}))})}e.bufferToggle=c}}),sp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.bufferWhen=void 0;var t=F(),n=nd(),r=I(),i=L();function a(e){return t.operate(function(t,a){var o=null,s=null,c=function(){s?.unsubscribe();var t=o;o=[],t&&a.next(t),i.innerFrom(e()).subscribe(s=r.createOperatorSubscriber(a,c,n.noop))};c(),t.subscribe(r.createOperatorSubscriber(a,function(e){return o?.push(e)},function(){o&&a.next(o),a.complete()},void 0,function(){return o=s=null}))})}e.bufferWhen=a}}),cp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.catchError=void 0;var t=L(),n=I(),r=F();function i(e){return r.operate(function(r,a){var o=null,s=!1,c;o=r.subscribe(n.createOperatorSubscriber(a,void 0,void 0,function(n){c=t.innerFrom(e(n,i(e)(r))),o?(o.unsubscribe(),o=null,c.subscribe(a)):s=!0})),s&&(o.unsubscribe(),o=null,c.subscribe(a))})}e.catchError=i}}),lp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scanInternals=void 0;var t=I();function n(e,n,r,i,a){return function(o,s){var c=r,l=n,u=0;o.subscribe(t.createOperatorSubscriber(s,function(t){var n=u++;l=c?e(l,t,n):(c=!0,t),i&&s.next(l)},a&&(function(){c&&s.next(l),s.complete()})))}}e.scanInternals=n}}),up=p({"../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.reduce=void 0;var t=lp(),n=F();function r(e,r){return n.operate(t.scanInternals(e,r,arguments.length>=2,!1,!0))}e.reduce=r}}),dp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.toArray=void 0;var t=up(),n=F(),r=function(e,t){return e.push(t),e};function i(){return n.operate(function(e,n){t.reduce(r,[])(e).subscribe(n)})}e.toArray=i}}),fp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.joinAllInternals=void 0;var t=sd(),n=xf(),r=cd(),i=kf(),a=dp();function o(e,o){return r.pipe(a.toArray(),i.mergeMap(function(t){return e(t)}),o?n.mapOneOrManyArgs(o):t.identity)}e.joinAllInternals=o}}),pp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.combineLatestAll=void 0;var t=Df(),n=fp();function r(e){return n.joinAllInternals(t.combineLatest,e)}e.combineLatestAll=r}}),mp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.combineAll=void 0,e.combineAll=pp().combineLatestAll}}),hp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.combineLatest=void 0;var r=Df(),i=F(),a=Wf(),o=xf(),s=cd(),c=Vd();function l(){var e=[...arguments],u=c.popResultSelector(e);return u?s.pipe(l.apply(void 0,n([],t(e))),o.mapOneOrManyArgs(u)):i.operate(function(i,o){r.combineLatestInit(n([i],t(a.argsOrArgArray(e))))(o)})}e.combineLatest=l}}),gp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.combineLatestWith=void 0;var r=hp();function i(){var e=[...arguments];return r.combineLatest.apply(void 0,n([],t(e)))}e.combineLatestWith=i}}),_p=p({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.concatMap=void 0;var t=kf(),n=Ju();function r(e,r){return n.isFunction(r)?t.mergeMap(e,r,1):t.mergeMap(e,1)}e.concatMap=r}}),vp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.concatMapTo=void 0;var t=_p(),n=Ju();function r(e,r){return n.isFunction(r)?t.concatMap(function(){return e},r):t.concatMap(function(){return e})}e.concatMapTo=r}}),yp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/concat.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.concat=void 0;var r=F(),i=jf(),a=Vd(),o=sf();function s(){var e=[...arguments],s=a.popScheduler(e);return r.operate(function(r,a){i.concatAll()(o.from(n([r],t(e)),s)).subscribe(a)})}e.concat=s}}),bp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.concatWith=void 0;var r=yp();function i(){var e=[...arguments];return r.concat.apply(void 0,n([],t(e)))}e.concatWith=i}}),xp=p({"../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.fromSubscribable=void 0;var t=ld();function n(e){return new t.Observable(function(t){return e.subscribe(t)})}e.fromSubscribable=n}}),Sp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/connect.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.connect=void 0;var t=gd(),n=L(),r=F(),i=xp(),a={connector:function(){return new t.Subject}};function o(e,t){t===void 0&&(t=a);var o=t.connector;return r.operate(function(t,r){var a=o();n.innerFrom(e(i.fromSubscribable(a))).subscribe(r),r.add(t.subscribe(a))})}e.connect=o}}),Cp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/count.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.count=void 0;var t=up();function n(e){return t.reduce(function(t,n,r){return!e||e(n,r)?t+1:t},0)}e.count=n}}),wp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.debounce=void 0;var t=F(),n=nd(),r=I(),i=L();function a(e){return t.operate(function(t,a){var o=!1,s=null,c=null,l=function(){if(c?.unsubscribe(),c=null,o){o=!1;var e=s;s=null,a.next(e)}};t.subscribe(r.createOperatorSubscriber(a,function(t){c?.unsubscribe(),o=!0,s=t,c=r.createOperatorSubscriber(a,l,n.noop),i.innerFrom(e(t)).subscribe(c)},function(){l(),a.complete()},void 0,function(){s=c=null}))})}e.debounce=a}}),Tp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.debounceTime=void 0;var t=jd(),n=F(),r=I();function i(e,i){return i===void 0&&(i=t.asyncScheduler),n.operate(function(t,n){var a=null,o=null,s=null,c=function(){if(a){a.unsubscribe(),a=null;var e=o;o=null,n.next(e)}};function l(){var t=s+e,r=i.now();if(r<t){a=this.schedule(void 0,t-r),n.add(a);return}c()}t.subscribe(r.createOperatorSubscriber(n,function(t){o=t,s=i.now(),a||(a=i.schedule(l,e),n.add(a))},function(){c(),n.complete()},void 0,function(){o=a=null}))})}e.debounceTime=i}}),Ep=p({"../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultIfEmpty=void 0;var t=F(),n=I();function r(e){return t.operate(function(t,r){var i=!1;t.subscribe(n.createOperatorSubscriber(r,function(e){i=!0,r.next(e)},function(){i||r.next(e),r.complete()}))})}e.defaultIfEmpty=r}}),Dp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/take.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.take=void 0;var t=zd(),n=F(),r=I();function i(e){return e<=0?function(){return t.EMPTY}:n.operate(function(t,n){var i=0;t.subscribe(r.createOperatorSubscriber(n,function(t){++i<=e&&(n.next(t),e<=i&&n.complete())}))})}e.take=i}}),Op=p({"../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ignoreElements=void 0;var t=F(),n=I(),r=nd();function i(){return t.operate(function(e,t){e.subscribe(n.createOperatorSubscriber(t,r.noop))})}e.ignoreElements=i}}),kp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mapTo=void 0;var t=bf();function n(e){return t.map(function(){return e})}e.mapTo=n}}),Ap=p({"../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.delayWhen=void 0;var t=Mf(),n=Dp(),r=Op(),i=kp(),a=kf(),o=L();function s(e,c){return c?function(i){return t.concat(c.pipe(n.take(1),r.ignoreElements()),i.pipe(s(e)))}:a.mergeMap(function(t,r){return o.innerFrom(e(t,r)).pipe(n.take(1),i.mapTo(t))})}e.delayWhen=s}}),jp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/delay.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.delay=void 0;var t=jd(),n=Ap(),r=Bf();function i(e,i){i===void 0&&(i=t.asyncScheduler);var a=r.timer(e,i);return n.delayWhen(function(){return a})}e.delay=i}}),Mp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.dematerialize=void 0;var t=uf(),n=F(),r=I();function i(){return n.operate(function(e,n){e.subscribe(r.createOperatorSubscriber(n,function(e){return t.observeNotification(e,n)}))})}e.dematerialize=i}}),Np=p({"../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.distinct=void 0;var t=F(),n=I(),r=nd(),i=L();function a(e,a){return t.operate(function(t,o){var s=new Set;t.subscribe(n.createOperatorSubscriber(o,function(t){var n=e?e(t):t;s.has(n)||(s.add(n),o.next(t))})),a&&i.innerFrom(a).subscribe(n.createOperatorSubscriber(o,function(){return s.clear()},r.noop))})}e.distinct=a}}),Pp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.distinctUntilChanged=void 0;var t=sd(),n=F(),r=I();function i(e,i){return i===void 0&&(i=t.identity),e??=a,n.operate(function(t,n){var a,o=!0;t.subscribe(r.createOperatorSubscriber(n,function(t){var r=i(t);(o||!e(a,r))&&(o=!1,a=r,n.next(t))}))})}e.distinctUntilChanged=i;function a(e,t){return e===t}}}),Fp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.distinctUntilKeyChanged=void 0;var t=Pp();function n(e,n){return t.distinctUntilChanged(function(t,r){return n?n(t[e],r[e]):t[e]===r[e]})}e.distinctUntilKeyChanged=n}}),Ip=p({"../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.throwIfEmpty=void 0;var t=ff(),n=F(),r=I();function i(e){return e===void 0&&(e=a),n.operate(function(t,n){var i=!1;t.subscribe(r.createOperatorSubscriber(n,function(e){i=!0,n.next(e)},function(){return i?n.complete():n.error(e())}))})}e.throwIfEmpty=i;function a(){return new t.EmptyError}}}),Lp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.elementAt=void 0;var t=hf(),n=Jf(),r=Ip(),i=Ep(),a=Dp();function o(e,o){if(e<0)throw new t.ArgumentOutOfRangeError;var s=arguments.length>=2;return function(c){return c.pipe(n.filter(function(t,n){return n===e}),a.take(1),s?i.defaultIfEmpty(o):r.throwIfEmpty(function(){return new t.ArgumentOutOfRangeError}))}}e.elementAt=o}}),Rp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.endWith=void 0;var r=Mf(),i=cf();function a(){var e=[...arguments];return function(a){return r.concat(a,i.of.apply(void 0,n([],t(e))))}}e.endWith=a}}),zp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/every.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.every=void 0;var t=F(),n=I();function r(e,r){return t.operate(function(t,i){var a=0;t.subscribe(n.createOperatorSubscriber(i,function(n){e.call(r,n,a++,t)||(i.next(!1),i.complete())},function(){i.next(!0),i.complete()}))})}e.every=r}}),Bp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.exhaustMap=void 0;var t=bf(),n=L(),r=F(),i=I();function a(e,o){return o?function(r){return r.pipe(a(function(r,i){return n.innerFrom(e(r,i)).pipe(t.map(function(e,t){return o(r,e,i,t)}))}))}:r.operate(function(t,r){var a=0,o=null,s=!1;t.subscribe(i.createOperatorSubscriber(r,function(t){o||(o=i.createOperatorSubscriber(r,void 0,function(){o=null,s&&r.complete()}),n.innerFrom(e(t,a++)).subscribe(o))},function(){s=!0,!o&&r.complete()}))})}e.exhaustMap=a}}),Vp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.exhaustAll=void 0;var t=Bp(),n=sd();function r(){return t.exhaustMap(n.identity)}e.exhaustAll=r}}),Hp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.exhaust=void 0,e.exhaust=Vp().exhaustAll}}),Up=p({"../../node_modules/rxjs/dist/cjs/internal/operators/expand.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.expand=void 0;var t=F(),n=Of();function r(e,r,i){return r===void 0&&(r=1/0),r=(r||0)<1?1/0:r,t.operate(function(t,a){return n.mergeInternals(t,a,e,r,void 0,!0,i)})}e.expand=r}}),Wp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.finalize=void 0;var t=F();function n(e){return t.operate(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}e.finalize=n}}),Gp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/find.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createFind=e.find=void 0;var t=F(),n=I();function r(e,n){return t.operate(i(e,n,`value`))}e.find=r;function i(e,t,r){var i=r===`index`;return function(r,a){var o=0;r.subscribe(n.createOperatorSubscriber(a,function(n){var s=o++;e.call(t,n,s,r)&&(a.next(i?s:n),a.complete())},function(){a.next(i?-1:void 0),a.complete()}))}}e.createFind=i}}),Kp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.findIndex=void 0;var t=F(),n=Gp();function r(e,r){return t.operate(n.createFind(e,r,`index`))}e.findIndex=r}}),qp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/first.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.first=void 0;var t=ff(),n=Jf(),r=Dp(),i=Ep(),a=Ip(),o=sd();function s(e,s){var c=arguments.length>=2;return function(l){return l.pipe(e?n.filter(function(t,n){return e(t,n,l)}):o.identity,r.take(1),c?i.defaultIfEmpty(s):a.throwIfEmpty(function(){return new t.EmptyError}))}}e.first=s}}),Jp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.groupBy=void 0;var t=ld(),n=L(),r=gd(),i=F(),a=I();function o(e,o,s,c){return i.operate(function(i,l){var u;!o||typeof o==`function`?u=o:(s=o.duration,u=o.element,c=o.connector);var d=new Map,f=function(e){d.forEach(e),e(l)},p=function(e){return f(function(t){return t.error(e)})},m=0,h=!1,g=new a.OperatorSubscriber(l,function(t){try{var i=e(t),o=d.get(i);if(!o){d.set(i,o=c?c():new r.Subject);var f=_(i,o);if(l.next(f),s){var m=a.createOperatorSubscriber(o,function(){o.complete(),m?.unsubscribe()},void 0,void 0,function(){return d.delete(i)});g.add(n.innerFrom(s(f)).subscribe(m))}}o.next(u?u(t):t)}catch(e){p(e)}},function(){return f(function(e){return e.complete()})},p,function(){return d.clear()},function(){return h=!0,m===0});i.subscribe(g);function _(e,n){var r=new t.Observable(function(e){m++;var t=n.subscribe(e);return function(){t.unsubscribe(),--m===0&&h&&g.unsubscribe()}});return r.key=e,r}})}e.groupBy=o}}),Yp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isEmpty=void 0;var t=F(),n=I();function r(){return t.operate(function(e,t){e.subscribe(n.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}e.isEmpty=r}}),Xp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.takeLast=void 0;var n=zd(),r=F(),i=I();function a(e){return e<=0?function(){return n.EMPTY}:r.operate(function(n,r){var a=[];n.subscribe(i.createOperatorSubscriber(r,function(t){a.push(t),e<a.length&&a.shift()},function(){var e,n;try{for(var i=t(a),o=i.next();!o.done;o=i.next()){var s=o.value;r.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}r.complete()},void 0,function(){a=null}))})}e.takeLast=a}}),Zp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/last.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.last=void 0;var t=ff(),n=Jf(),r=Xp(),i=Ip(),a=Ep(),o=sd();function s(e,s){var c=arguments.length>=2;return function(l){return l.pipe(e?n.filter(function(t,n){return e(t,n,l)}):o.identity,r.takeLast(1),c?a.defaultIfEmpty(s):i.throwIfEmpty(function(){return new t.EmptyError}))}}e.last=s}}),Qp=p({"../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.materialize=void 0;var t=uf(),n=F(),r=I();function i(){return n.operate(function(e,n){e.subscribe(r.createOperatorSubscriber(n,function(e){n.next(t.Notification.createNext(e))},function(){n.next(t.Notification.createComplete()),n.complete()},function(e){n.next(t.Notification.createError(e)),n.complete()}))})}e.materialize=i}}),$p=p({"../../node_modules/rxjs/dist/cjs/internal/operators/max.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.max=void 0;var t=up(),n=Ju();function r(e){return t.reduce(n.isFunction(e)?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}e.max=r}}),em=p({"../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.flatMap=void 0,e.flatMap=kf().mergeMap}}),tm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeMapTo=void 0;var t=kf(),n=Ju();function r(e,r,i){return i===void 0&&(i=1/0),n.isFunction(r)?t.mergeMap(function(){return e},r,i):(typeof r==`number`&&(i=r),t.mergeMap(function(){return e},i))}e.mergeMapTo=r}}),nm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeScan=void 0;var t=F(),n=Of();function r(e,r,i){return i===void 0&&(i=1/0),t.operate(function(t,a){var o=r;return n.mergeInternals(t,a,function(t,n){return e(o,t,n)},i,function(e){o=e},!1,void 0,function(){return o=null})})}e.mergeScan=r}}),rm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/merge.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.merge=void 0;var r=F(),i=Af(),a=Vd(),o=sf();function s(){var e=[...arguments],s=a.popScheduler(e),c=a.popNumber(e,1/0);return r.operate(function(r,a){i.mergeAll(c)(o.from(n([r],t(e)),s)).subscribe(a)})}e.merge=s}}),im=p({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeWith=void 0;var r=rm();function i(){var e=[...arguments];return r.merge.apply(void 0,n([],t(e)))}e.mergeWith=i}}),am=p({"../../node_modules/rxjs/dist/cjs/internal/operators/min.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.min=void 0;var t=up(),n=Ju();function r(e){return t.reduce(n.isFunction(e)?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t})}e.min=r}}),om=p({"../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.multicast=void 0;var t=dd(),n=Ju(),r=Sp();function i(e,i){var a=n.isFunction(e)?e:function(){return e};return n.isFunction(i)?r.connect(i,{connector:a}):function(e){return new t.ConnectableObservable(e,a)}}e.multicast=i}}),sm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.onErrorResumeNext=e.onErrorResumeNextWith=void 0;var r=Wf(),i=Gf();function a(){var e=[...arguments],a=r.argsOrArgArray(e);return function(e){return i.onErrorResumeNext.apply(void 0,n([e],t(a)))}}e.onErrorResumeNextWith=a,e.onErrorResumeNext=a}}),cm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.pairwise=void 0;var t=F(),n=I();function r(){return t.operate(function(e,t){var r,i=!1;e.subscribe(n.createOperatorSubscriber(t,function(e){var n=r;r=e,i&&t.next([n,e]),i=!0}))})}e.pairwise=r}}),lm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.pluck=void 0;var t=bf();function n(){var e=[...arguments],n=e.length;if(n===0)throw Error(`list of properties cannot be empty.`);return t.map(function(t){for(var r=t,i=0;i<n;i++){var a=r?.[e[i]];if(a!==void 0)r=a;else return}return r})}e.pluck=n}}),um=p({"../../node_modules/rxjs/dist/cjs/internal/operators/publish.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.publish=void 0;var t=gd(),n=om(),r=Sp();function i(e){return e?function(t){return r.connect(e)(t)}:function(e){return n.multicast(new t.Subject)(e)}}e.publish=i}}),dm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.publishBehavior=void 0;var t=_d(),n=dd();function r(e){return function(r){var i=new t.BehaviorSubject(e);return new n.ConnectableObservable(r,function(){return i})}}e.publishBehavior=r}}),fm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.publishLast=void 0;var t=bd(),n=dd();function r(){return function(e){var r=new t.AsyncSubject;return new n.ConnectableObservable(e,function(){return r})}}e.publishLast=r}}),pm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.publishReplay=void 0;var t=yd(),n=om(),r=Ju();function i(e,i,a,o){a&&!r.isFunction(a)&&(o=a);var s=r.isFunction(a)?a:void 0;return function(r){return n.multicast(new t.ReplaySubject(e,i,o),s)(r)}}e.publishReplay=i}}),mm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.raceWith=void 0;var r=Xf(),i=F(),a=sd();function o(){var e=[...arguments];return e.length?i.operate(function(i,a){r.raceInit(n([i],t(e)))(a)}):a.identity}e.raceWith=o}}),hm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.repeat=void 0;var t=zd(),n=F(),r=I(),i=L(),a=Bf();function o(e){var o,s=1/0,c;return e!=null&&(typeof e==`object`?(o=e.count,s=o===void 0?1/0:o,c=e.delay):s=e),s<=0?function(){return t.EMPTY}:n.operate(function(e,t){var n=0,o,l=function(){if(o?.unsubscribe(),o=null,c!=null){var e=typeof c==`number`?a.timer(c):i.innerFrom(c(n)),s=r.createOperatorSubscriber(t,function(){s.unsubscribe(),u()});e.subscribe(s)}else u()},u=function(){var i=!1;o=e.subscribe(r.createOperatorSubscriber(t,void 0,function(){++n<s?o?l():i=!0:t.complete()})),i&&l()};u()})}e.repeat=o}}),gm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.repeatWhen=void 0;var t=L(),n=gd(),r=F(),i=I();function a(e){return r.operate(function(r,a){var o,s=!1,c,l=!1,u=!1,d=function(){return u&&l&&(a.complete(),!0)},f=function(){return c||(c=new n.Subject,t.innerFrom(e(c)).subscribe(i.createOperatorSubscriber(a,function(){o?p():s=!0},function(){l=!0,d()}))),c},p=function(){u=!1,o=r.subscribe(i.createOperatorSubscriber(a,void 0,function(){u=!0,!d()&&f().next()})),s&&(o.unsubscribe(),o=null,s=!1,p())};p()})}e.repeatWhen=a}}),_m=p({"../../node_modules/rxjs/dist/cjs/internal/operators/retry.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.retry=void 0;var t=F(),n=I(),r=sd(),i=Bf(),a=L();function o(e){e===void 0&&(e=1/0);var o=e&&typeof e==`object`?e:{count:e},s=o.count,c=s===void 0?1/0:s,l=o.delay,u=o.resetOnSuccess,d=u===void 0?!1:u;return c<=0?r.identity:t.operate(function(e,t){var r=0,o,s=function(){var u=!1;o=e.subscribe(n.createOperatorSubscriber(t,function(e){d&&(r=0),t.next(e)},void 0,function(e){if(r++<c){var d=function(){o?(o.unsubscribe(),o=null,s()):u=!0};if(l!=null){var f=typeof l==`number`?i.timer(l):a.innerFrom(l(e,r)),p=n.createOperatorSubscriber(t,function(){p.unsubscribe(),d()},function(){t.complete()});f.subscribe(p)}else d()}else t.error(e)})),u&&(o.unsubscribe(),o=null,s())};s()})}e.retry=o}}),vm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.retryWhen=void 0;var t=L(),n=gd(),r=F(),i=I();function a(e){return r.operate(function(r,a){var o,s=!1,c,l=function(){o=r.subscribe(i.createOperatorSubscriber(a,void 0,void 0,function(r){c||(c=new n.Subject,t.innerFrom(e(c)).subscribe(i.createOperatorSubscriber(a,function(){return o?l():s=!0}))),c&&c.next(r)})),s&&(o.unsubscribe(),o=null,s=!1,l())};l()})}e.retryWhen=a}}),ym=p({"../../node_modules/rxjs/dist/cjs/internal/operators/sample.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.sample=void 0;var t=L(),n=F(),r=nd(),i=I();function a(e){return n.operate(function(n,a){var o=!1,s=null;n.subscribe(i.createOperatorSubscriber(a,function(e){o=!0,s=e})),t.innerFrom(e).subscribe(i.createOperatorSubscriber(a,function(){if(o){o=!1;var e=s;s=null,a.next(e)}},r.noop))})}e.sample=a}}),bm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.sampleTime=void 0;var t=jd(),n=ym(),r=Vf();function i(e,i){return i===void 0&&(i=t.asyncScheduler),n.sample(r.interval(e,i))}e.sampleTime=i}}),xm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/scan.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.scan=void 0;var t=F(),n=lp();function r(e,r){return t.operate(n.scanInternals(e,r,arguments.length>=2,!0))}e.scan=r}}),Sm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.sequenceEqual=void 0;var t=F(),n=I(),r=L();function i(e,i){return i===void 0&&(i=function(e,t){return e===t}),t.operate(function(t,o){var s=a(),c=a(),l=function(e){o.next(e),o.complete()},u=function(e,t){var r=n.createOperatorSubscriber(o,function(n){var r=t.buffer,a=t.complete;r.length===0?a?l(!1):e.buffer.push(n):!i(n,r.shift())&&l(!1)},function(){e.complete=!0;var n=t.complete,i=t.buffer;n&&l(i.length===0),r?.unsubscribe()});return r};t.subscribe(u(s,c)),r.innerFrom(e).subscribe(u(c,s))})}e.sequenceEqual=i;function a(){return{buffer:[],complete:!1}}}}),Cm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/share.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.share=void 0;var r=L(),i=gd(),a=ad(),o=F();function s(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new i.Subject}:t,s=e.resetOnError,l=s===void 0?!0:s,u=e.resetOnComplete,d=u===void 0?!0:u,f=e.resetOnRefCountZero,p=f===void 0?!0:f;return function(e){var t,i,s,u=0,f=!1,m=!1,h=function(){i?.unsubscribe(),i=void 0},g=function(){h(),t=s=void 0,f=m=!1},_=function(){var e=t;g(),e?.unsubscribe()};return o.operate(function(e,o){u++,!m&&!f&&h();var v=s??=n();o.add(function(){u--,u===0&&!m&&!f&&(i=c(_,p))}),v.subscribe(o),!t&&u>0&&(t=new a.SafeSubscriber({next:function(e){return v.next(e)},error:function(e){m=!0,h(),i=c(g,l,e),v.error(e)},complete:function(){f=!0,h(),i=c(g,d),v.complete()}}),r.innerFrom(e).subscribe(t))})(e)}}e.share=s;function c(e,i){var o=[...arguments].slice(2);if(i===!0){e();return}if(i!==!1){var s=new a.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return r.innerFrom(i.apply(void 0,n([],t(o)))).subscribe(s)}}}}),wm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.shareReplay=void 0;var t=yd(),n=Cm();function r(e,r,i){var a,o,s,c,l=!1;return e&&typeof e==`object`?(a=e.bufferSize,c=a===void 0?1/0:a,o=e.windowTime,r=o===void 0?1/0:o,s=e.refCount,l=s===void 0?!1:s,i=e.scheduler):c=e??1/0,n.share({connector:function(){return new t.ReplaySubject(c,r,i)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}e.shareReplay=r}}),Tm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/single.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.single=void 0;var t=ff(),n=_f(),r=gf(),i=F(),a=I();function o(e){return i.operate(function(i,o){var s=!1,c,l=!1,u=0;i.subscribe(a.createOperatorSubscriber(o,function(t){l=!0,(!e||e(t,u++,i))&&(s&&o.error(new n.SequenceError(`Too many matching values`)),s=!0,c=t)},function(){s?(o.next(c),o.complete()):o.error(l?new r.NotFoundError(`No matching values`):new t.EmptyError)}))})}e.single=o}}),Em=p({"../../node_modules/rxjs/dist/cjs/internal/operators/skip.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.skip=void 0;var t=Jf();function n(e){return t.filter(function(t,n){return e<=n})}e.skip=n}}),Dm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.skipLast=void 0;var t=sd(),n=F(),r=I();function i(e){return e<=0?t.identity:n.operate(function(t,n){var i=Array(e),a=0;return t.subscribe(r.createOperatorSubscriber(n,function(t){var r=a++;if(r<e)i[r]=t;else{var o=r%e,s=i[o];i[o]=t,n.next(s)}})),function(){i=null}})}e.skipLast=i}}),Om=p({"../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.skipUntil=void 0;var t=F(),n=I(),r=L(),i=nd();function a(e){return t.operate(function(t,a){var o=!1,s=n.createOperatorSubscriber(a,function(){s?.unsubscribe(),o=!0},i.noop);r.innerFrom(e).subscribe(s),t.subscribe(n.createOperatorSubscriber(a,function(e){return o&&a.next(e)}))})}e.skipUntil=a}}),km=p({"../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.skipWhile=void 0;var t=F(),n=I();function r(e){return t.operate(function(t,r){var i=!1,a=0;t.subscribe(n.createOperatorSubscriber(r,function(t){return(i||=!e(t,a++))&&r.next(t)}))})}e.skipWhile=r}}),Am=p({"../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.startWith=void 0;var t=Mf(),n=Vd(),r=F();function i(){var e=[...arguments],i=n.popScheduler(e);return r.operate(function(n,r){(i?t.concat(e,n,i):t.concat(e,n)).subscribe(r)})}e.startWith=i}}),jm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.switchMap=void 0;var t=L(),n=F(),r=I();function i(e,i){return n.operate(function(n,a){var o=null,s=0,c=!1,l=function(){return c&&!o&&a.complete()};n.subscribe(r.createOperatorSubscriber(a,function(n){o?.unsubscribe();var c=0,u=s++;t.innerFrom(e(n,u)).subscribe(o=r.createOperatorSubscriber(a,function(e){return a.next(i?i(n,e,u,c++):e)},function(){o=null,l()}))},function(){c=!0,l()}))})}e.switchMap=i}}),Mm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.switchAll=void 0;var t=jm(),n=sd();function r(){return t.switchMap(n.identity)}e.switchAll=r}}),Nm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.switchMapTo=void 0;var t=jm(),n=Ju();function r(e,r){return n.isFunction(r)?t.switchMap(function(){return e},r):t.switchMap(function(){return e})}e.switchMapTo=r}}),Pm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.switchScan=void 0;var t=jm(),n=F();function r(e,r){return n.operate(function(n,i){var a=r;return t.switchMap(function(t,n){return e(a,t,n)},function(e,t){return a=t,t})(n).subscribe(i),function(){a=null}})}e.switchScan=r}}),Fm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.takeUntil=void 0;var t=F(),n=I(),r=L(),i=nd();function a(e){return t.operate(function(t,a){r.innerFrom(e).subscribe(n.createOperatorSubscriber(a,function(){return a.complete()},i.noop)),!a.closed&&t.subscribe(a)})}e.takeUntil=a}}),Im=p({"../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.takeWhile=void 0;var t=F(),n=I();function r(e,r){return r===void 0&&(r=!1),t.operate(function(t,i){var a=0;t.subscribe(n.createOperatorSubscriber(i,function(t){var n=e(t,a++);(n||r)&&i.next(t),!n&&i.complete()}))})}e.takeWhile=r}}),Lm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/tap.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.tap=void 0;var t=Ju(),n=F(),r=I(),i=sd();function a(e,a,o){var s=t.isFunction(e)||a||o?{next:e,error:a,complete:o}:e;return s?n.operate(function(e,t){var n;(n=s.subscribe)==null||n.call(s);var i=!0;e.subscribe(r.createOperatorSubscriber(t,function(e){var n;(n=s.next)==null||n.call(s,e),t.next(e)},function(){var e;i=!1,(e=s.complete)==null||e.call(s),t.complete()},function(e){var n;i=!1,(n=s.error)==null||n.call(s,e),t.error(e)},function(){var e,t;i&&((e=s.unsubscribe)==null||e.call(s)),(t=s.finalize)==null||t.call(s)}))}):i.identity}e.tap=a}}),Rm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.throttle=void 0;var t=F(),n=I(),r=L();function i(e,i){return t.operate(function(t,a){var o=i??{},s=o.leading,c=s===void 0?!0:s,l=o.trailing,u=l===void 0?!1:l,d=!1,f=null,p=null,m=!1,h=function(){p?.unsubscribe(),p=null,u&&(v(),m&&a.complete())},g=function(){p=null,m&&a.complete()},_=function(t){return p=r.innerFrom(e(t)).subscribe(n.createOperatorSubscriber(a,h,g))},v=function(){if(d){d=!1;var e=f;f=null,a.next(e),!m&&_(e)}};t.subscribe(n.createOperatorSubscriber(a,function(e){d=!0,f=e,!(p&&!p.closed)&&(c?v():_(e))},function(){m=!0,!(u&&d&&p&&!p.closed)&&a.complete()}))})}e.throttle=i}}),zm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.throttleTime=void 0;var t=jd(),n=Rm(),r=Bf();function i(e,i,a){i===void 0&&(i=t.asyncScheduler);var o=r.timer(e,i);return n.throttle(function(){return o},a)}e.throttleTime=i}}),Bm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.TimeInterval=e.timeInterval=void 0;var t=jd(),n=F(),r=I();function i(e){return e===void 0&&(e=t.asyncScheduler),n.operate(function(t,n){var i=e.now();t.subscribe(r.createOperatorSubscriber(n,function(t){var r=e.now(),o=r-i;i=r,n.next(new a(t,o))}))})}e.timeInterval=i;var a=(function(){function e(e,t){this.value=e,this.interval=t}return e})();e.TimeInterval=a}}),Vm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.timeoutWith=void 0;var t=jd(),n=vf(),r=yf();function i(e,i,a){var o,s,c;if(a??=t.async,n.isValidDate(e)?o=e:typeof e==`number`&&(s=e),i)c=function(){return i};else throw TypeError(`No observable provided to switch to`);if(o==null&&s==null)throw TypeError(`No timeout provided.`);return r.timeout({first:o,each:s,scheduler:a,with:c})}e.timeoutWith=i}}),Hm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.timestamp=void 0;var t=vd(),n=bf();function r(e){return e===void 0&&(e=t.dateTimestampProvider),n.map(function(t){return{value:t,timestamp:e.now()}})}e.timestamp=r}}),Um=p({"../../node_modules/rxjs/dist/cjs/internal/operators/window.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.window=void 0;var t=gd(),n=F(),r=I(),i=nd(),a=L();function o(e){return n.operate(function(n,o){var s=new t.Subject;o.next(s.asObservable());var c=function(e){s.error(e),o.error(e)};return n.subscribe(r.createOperatorSubscriber(o,function(e){return s?.next(e)},function(){s.complete(),o.complete()},c)),a.innerFrom(e).subscribe(r.createOperatorSubscriber(o,function(){s.complete(),o.next(s=new t.Subject)},i.noop,c)),function(){s?.unsubscribe(),s=null}})}e.window=o}}),Wm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.windowCount=void 0;var n=gd(),r=F(),i=I();function a(e,a){a===void 0&&(a=0);var o=a>0?a:e;return r.operate(function(r,a){var s=[new n.Subject],c=0;a.next(s[0].asObservable()),r.subscribe(i.createOperatorSubscriber(a,function(r){var i,l;try{for(var u=t(s),d=u.next();!d.done;d=u.next())d.value.next(r)}catch(e){i={error:e}}finally{try{d&&!d.done&&(l=u.return)&&l.call(u)}finally{if(i)throw i.error}}var f=c-e+1;if(f>=0&&f%o===0&&s.shift().complete(),++c%o===0){var p=new n.Subject;s.push(p),a.next(p.asObservable())}},function(){for(;s.length>0;)s.shift().complete();a.complete()},function(e){for(;s.length>0;)s.shift().error(e);a.error(e)},function(){s=null}))})}e.windowCount=a}}),Gm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.windowTime=void 0;var t=gd(),n=jd(),r=Qu(),i=F(),a=I(),o=Zu(),s=Vd(),c=Xd();function l(e){var l=[...arguments].slice(1),u=s.popScheduler(l)??n.asyncScheduler,d=l[0]??null,f=l[1]||1/0;return i.operate(function(n,i){var s=[],l=!1,p=function(e){var t=e.window,n=e.subs;t.complete(),n.unsubscribe(),o.arrRemove(s,e),l&&m()},m=function(){if(s){var n=new r.Subscription;i.add(n);var a=new t.Subject,o={window:a,subs:n,seen:0};s.push(o),i.next(a.asObservable()),c.executeSchedule(n,u,function(){return p(o)},e)}};d!==null&&d>=0?c.executeSchedule(i,u,m,d,!0):l=!0,m();var h=function(e){return s.slice().forEach(e)},g=function(e){h(function(t){var n=t.window;return e(n)}),e(i),i.unsubscribe()};return n.subscribe(a.createOperatorSubscriber(i,function(e){h(function(t){t.window.next(e),f<=++t.seen&&p(t)})},function(){return g(function(e){return e.complete()})},function(e){return g(function(t){return t.error(e)})})),function(){s=null}})}e.windowTime=l}}),Km=p({"../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(e){var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,`__esModule`,{value:!0}),e.windowToggle=void 0;var n=gd(),r=Qu(),i=F(),a=L(),o=I(),s=nd(),c=Zu();function l(e,l){return i.operate(function(i,u){var d=[],f=function(e){for(;0<d.length;)d.shift().error(e);u.error(e)};a.innerFrom(e).subscribe(o.createOperatorSubscriber(u,function(e){var t=new n.Subject;d.push(t);var i=new r.Subscription,p=function(){c.arrRemove(d,t),t.complete(),i.unsubscribe()},m;try{m=a.innerFrom(l(e))}catch(e){f(e);return}u.next(t.asObservable()),i.add(m.subscribe(o.createOperatorSubscriber(u,p,s.noop,f)))},s.noop)),i.subscribe(o.createOperatorSubscriber(u,function(e){var n,r,i=d.slice();try{for(var a=t(i),o=a.next();!o.done;o=a.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},function(){for(;0<d.length;)d.shift().complete();u.complete()},f,function(){for(;0<d.length;)d.shift().unsubscribe()}))})}e.windowToggle=l}}),qm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.windowWhen=void 0;var t=gd(),n=F(),r=I(),i=L();function a(e){return n.operate(function(n,a){var o,s,c=function(e){o.error(e),a.error(e)},l=function(){s?.unsubscribe(),o?.complete(),o=new t.Subject,a.next(o.asObservable());var n;try{n=i.innerFrom(e())}catch(e){c(e);return}n.subscribe(s=r.createOperatorSubscriber(a,l,l,c))};l(),n.subscribe(r.createOperatorSubscriber(a,function(e){return o.next(e)},function(){o.complete(),a.complete()},c,function(){s?.unsubscribe(),o=null}))})}e.windowWhen=a}}),Jm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.withLatestFrom=void 0;var r=F(),i=I(),a=L(),o=sd(),s=nd(),c=Vd();function l(){var e=[...arguments],l=c.popResultSelector(e);return r.operate(function(r,c){for(var u=e.length,d=Array(u),f=e.map(function(){return!1}),p=!1,m=function(t){a.innerFrom(e[t]).subscribe(i.createOperatorSubscriber(c,function(e){d[t]=e,!p&&!f[t]&&(f[t]=!0,(p=f.every(o.identity))&&(f=null))},s.noop))},h=0;h<u;h++)m(h);r.subscribe(i.createOperatorSubscriber(c,function(e){if(p){var r=n([e],t(d));c.next(l?l.apply(void 0,n([],t(r))):r)}}))})}e.withLatestFrom=l}}),Ym=p({"../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.zipAll=void 0;var t=$f(),n=fp();function r(e){return n.joinAllInternals(t.zip,e)}e.zipAll=r}}),Xm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/zip.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.zip=void 0;var r=$f(),i=F();function a(){var e=[...arguments];return i.operate(function(i,a){r.zip.apply(void 0,n([i],t(e))).subscribe(a)})}e.zip=a}}),Zm=p({"../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.zipWith=void 0;var r=Xm();function i(){var e=[...arguments];return r.zip.apply(void 0,n([],t(e)))}e.zipWith=i}}),Qm=p({"../../node_modules/rxjs/dist/cjs/index.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var r=ld();Object.defineProperty(e,`Observable`,{enumerable:!0,get:function(){return r.Observable}});var i=dd();Object.defineProperty(e,`ConnectableObservable`,{enumerable:!0,get:function(){return i.ConnectableObservable}});var a=od();Object.defineProperty(e,`observable`,{enumerable:!0,get:function(){return a.observable}});var o=md();Object.defineProperty(e,`animationFrames`,{enumerable:!0,get:function(){return o.animationFrames}});var s=gd();Object.defineProperty(e,`Subject`,{enumerable:!0,get:function(){return s.Subject}});var c=_d();Object.defineProperty(e,`BehaviorSubject`,{enumerable:!0,get:function(){return c.BehaviorSubject}});var l=yd();Object.defineProperty(e,`ReplaySubject`,{enumerable:!0,get:function(){return l.ReplaySubject}});var u=bd();Object.defineProperty(e,`AsyncSubject`,{enumerable:!0,get:function(){return u.AsyncSubject}});var d=Ad();Object.defineProperty(e,`asap`,{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(e,`asapScheduler`,{enumerable:!0,get:function(){return d.asapScheduler}});var f=jd();Object.defineProperty(e,`async`,{enumerable:!0,get:function(){return f.async}}),Object.defineProperty(e,`asyncScheduler`,{enumerable:!0,get:function(){return f.asyncScheduler}});var p=Pd();Object.defineProperty(e,`queue`,{enumerable:!0,get:function(){return p.queue}}),Object.defineProperty(e,`queueScheduler`,{enumerable:!0,get:function(){return p.queueScheduler}});var m=Ld();Object.defineProperty(e,`animationFrame`,{enumerable:!0,get:function(){return m.animationFrame}}),Object.defineProperty(e,`animationFrameScheduler`,{enumerable:!0,get:function(){return m.animationFrameScheduler}});var h=Rd();Object.defineProperty(e,`VirtualTimeScheduler`,{enumerable:!0,get:function(){return h.VirtualTimeScheduler}}),Object.defineProperty(e,`VirtualAction`,{enumerable:!0,get:function(){return h.VirtualAction}});var g=Dd();Object.defineProperty(e,`Scheduler`,{enumerable:!0,get:function(){return g.Scheduler}});var _=Qu();Object.defineProperty(e,`Subscription`,{enumerable:!0,get:function(){return _.Subscription}});var v=ad();Object.defineProperty(e,`Subscriber`,{enumerable:!0,get:function(){return v.Subscriber}});var y=uf();Object.defineProperty(e,`Notification`,{enumerable:!0,get:function(){return y.Notification}}),Object.defineProperty(e,`NotificationKind`,{enumerable:!0,get:function(){return y.NotificationKind}});var b=cd();Object.defineProperty(e,`pipe`,{enumerable:!0,get:function(){return b.pipe}});var x=nd();Object.defineProperty(e,`noop`,{enumerable:!0,get:function(){return x.noop}});var S=sd();Object.defineProperty(e,`identity`,{enumerable:!0,get:function(){return S.identity}});var C=df();Object.defineProperty(e,`isObservable`,{enumerable:!0,get:function(){return C.isObservable}});var w=pf();Object.defineProperty(e,`lastValueFrom`,{enumerable:!0,get:function(){return w.lastValueFrom}});var T=mf();Object.defineProperty(e,`firstValueFrom`,{enumerable:!0,get:function(){return T.firstValueFrom}});var E=hf();Object.defineProperty(e,`ArgumentOutOfRangeError`,{enumerable:!0,get:function(){return E.ArgumentOutOfRangeError}});var D=ff();Object.defineProperty(e,`EmptyError`,{enumerable:!0,get:function(){return D.EmptyError}});var O=gf();Object.defineProperty(e,`NotFoundError`,{enumerable:!0,get:function(){return O.NotFoundError}});var k=hd();Object.defineProperty(e,`ObjectUnsubscribedError`,{enumerable:!0,get:function(){return k.ObjectUnsubscribedError}});var A=_f();Object.defineProperty(e,`SequenceError`,{enumerable:!0,get:function(){return A.SequenceError}});var ee=yf();Object.defineProperty(e,`TimeoutError`,{enumerable:!0,get:function(){return ee.TimeoutError}});var te=Xu();Object.defineProperty(e,`UnsubscriptionError`,{enumerable:!0,get:function(){return te.UnsubscriptionError}});var j=Cf();Object.defineProperty(e,`bindCallback`,{enumerable:!0,get:function(){return j.bindCallback}});var ne=wf();Object.defineProperty(e,`bindNodeCallback`,{enumerable:!0,get:function(){return ne.bindNodeCallback}});var re=Df();Object.defineProperty(e,`combineLatest`,{enumerable:!0,get:function(){return re.combineLatest}});var ie=Mf();Object.defineProperty(e,`concat`,{enumerable:!0,get:function(){return ie.concat}});var ae=Pf();Object.defineProperty(e,`connectable`,{enumerable:!0,get:function(){return ae.connectable}});var M=Nf();Object.defineProperty(e,`defer`,{enumerable:!0,get:function(){return M.defer}});var oe=zd();Object.defineProperty(e,`empty`,{enumerable:!0,get:function(){return oe.empty}});var se=Ff();Object.defineProperty(e,`forkJoin`,{enumerable:!0,get:function(){return se.forkJoin}});var ce=sf();Object.defineProperty(e,`from`,{enumerable:!0,get:function(){return ce.from}});var le=If();Object.defineProperty(e,`fromEvent`,{enumerable:!0,get:function(){return le.fromEvent}});var ue=Lf();Object.defineProperty(e,`fromEventPattern`,{enumerable:!0,get:function(){return ue.fromEventPattern}});var N=Rf();Object.defineProperty(e,`generate`,{enumerable:!0,get:function(){return N.generate}});var de=zf();Object.defineProperty(e,`iif`,{enumerable:!0,get:function(){return de.iif}});var fe=Vf();Object.defineProperty(e,`interval`,{enumerable:!0,get:function(){return fe.interval}});var pe=Hf();Object.defineProperty(e,`merge`,{enumerable:!0,get:function(){return pe.merge}});var me=Uf();Object.defineProperty(e,`never`,{enumerable:!0,get:function(){return me.never}});var he=cf();Object.defineProperty(e,`of`,{enumerable:!0,get:function(){return he.of}});var ge=Gf();Object.defineProperty(e,`onErrorResumeNext`,{enumerable:!0,get:function(){return ge.onErrorResumeNext}});var _e=Kf();Object.defineProperty(e,`pairs`,{enumerable:!0,get:function(){return _e.pairs}});var ve=Yf();Object.defineProperty(e,`partition`,{enumerable:!0,get:function(){return ve.partition}});var ye=Xf();Object.defineProperty(e,`race`,{enumerable:!0,get:function(){return ye.race}});var be=Zf();Object.defineProperty(e,`range`,{enumerable:!0,get:function(){return be.range}});var xe=lf();Object.defineProperty(e,`throwError`,{enumerable:!0,get:function(){return xe.throwError}});var Se=Bf();Object.defineProperty(e,`timer`,{enumerable:!0,get:function(){return Se.timer}});var Ce=Qf();Object.defineProperty(e,`using`,{enumerable:!0,get:function(){return Ce.using}});var we=$f();Object.defineProperty(e,`zip`,{enumerable:!0,get:function(){return we.zip}});var Te=of();Object.defineProperty(e,`scheduled`,{enumerable:!0,get:function(){return Te.scheduled}});var Ee=zd();Object.defineProperty(e,`EMPTY`,{enumerable:!0,get:function(){return Ee.EMPTY}});var De=Uf();Object.defineProperty(e,`NEVER`,{enumerable:!0,get:function(){return De.NEVER}}),n(ep(),e);var Oe=$u();Object.defineProperty(e,`config`,{enumerable:!0,get:function(){return Oe.config}});var ke=tp();Object.defineProperty(e,`audit`,{enumerable:!0,get:function(){return ke.audit}});var Ae=np();Object.defineProperty(e,`auditTime`,{enumerable:!0,get:function(){return Ae.auditTime}});var je=rp();Object.defineProperty(e,`buffer`,{enumerable:!0,get:function(){return je.buffer}});var Me=ip();Object.defineProperty(e,`bufferCount`,{enumerable:!0,get:function(){return Me.bufferCount}});var Ne=ap();Object.defineProperty(e,`bufferTime`,{enumerable:!0,get:function(){return Ne.bufferTime}});var Pe=op();Object.defineProperty(e,`bufferToggle`,{enumerable:!0,get:function(){return Pe.bufferToggle}});var Fe=sp();Object.defineProperty(e,`bufferWhen`,{enumerable:!0,get:function(){return Fe.bufferWhen}});var Ie=cp();Object.defineProperty(e,`catchError`,{enumerable:!0,get:function(){return Ie.catchError}});var Le=mp();Object.defineProperty(e,`combineAll`,{enumerable:!0,get:function(){return Le.combineAll}});var Re=pp();Object.defineProperty(e,`combineLatestAll`,{enumerable:!0,get:function(){return Re.combineLatestAll}});var ze=gp();Object.defineProperty(e,`combineLatestWith`,{enumerable:!0,get:function(){return ze.combineLatestWith}});var Be=jf();Object.defineProperty(e,`concatAll`,{enumerable:!0,get:function(){return Be.concatAll}});var Ve=_p();Object.defineProperty(e,`concatMap`,{enumerable:!0,get:function(){return Ve.concatMap}});var He=vp();Object.defineProperty(e,`concatMapTo`,{enumerable:!0,get:function(){return He.concatMapTo}});var Ue=bp();Object.defineProperty(e,`concatWith`,{enumerable:!0,get:function(){return Ue.concatWith}});var We=Sp();Object.defineProperty(e,`connect`,{enumerable:!0,get:function(){return We.connect}});var Ge=Cp();Object.defineProperty(e,`count`,{enumerable:!0,get:function(){return Ge.count}});var Ke=wp();Object.defineProperty(e,`debounce`,{enumerable:!0,get:function(){return Ke.debounce}});var qe=Tp();Object.defineProperty(e,`debounceTime`,{enumerable:!0,get:function(){return qe.debounceTime}});var Je=Ep();Object.defineProperty(e,`defaultIfEmpty`,{enumerable:!0,get:function(){return Je.defaultIfEmpty}});var Ye=jp();Object.defineProperty(e,`delay`,{enumerable:!0,get:function(){return Ye.delay}});var Xe=Ap();Object.defineProperty(e,`delayWhen`,{enumerable:!0,get:function(){return Xe.delayWhen}});var Ze=Mp();Object.defineProperty(e,`dematerialize`,{enumerable:!0,get:function(){return Ze.dematerialize}});var Qe=Np();Object.defineProperty(e,`distinct`,{enumerable:!0,get:function(){return Qe.distinct}});var $e=Pp();Object.defineProperty(e,`distinctUntilChanged`,{enumerable:!0,get:function(){return $e.distinctUntilChanged}});var et=Fp();Object.defineProperty(e,`distinctUntilKeyChanged`,{enumerable:!0,get:function(){return et.distinctUntilKeyChanged}});var tt=Lp();Object.defineProperty(e,`elementAt`,{enumerable:!0,get:function(){return tt.elementAt}});var nt=Rp();Object.defineProperty(e,`endWith`,{enumerable:!0,get:function(){return nt.endWith}});var rt=zp();Object.defineProperty(e,`every`,{enumerable:!0,get:function(){return rt.every}});var it=Hp();Object.defineProperty(e,`exhaust`,{enumerable:!0,get:function(){return it.exhaust}});var at=Vp();Object.defineProperty(e,`exhaustAll`,{enumerable:!0,get:function(){return at.exhaustAll}});var ot=Bp();Object.defineProperty(e,`exhaustMap`,{enumerable:!0,get:function(){return ot.exhaustMap}});var st=Up();Object.defineProperty(e,`expand`,{enumerable:!0,get:function(){return st.expand}});var ct=Jf();Object.defineProperty(e,`filter`,{enumerable:!0,get:function(){return ct.filter}});var lt=Wp();Object.defineProperty(e,`finalize`,{enumerable:!0,get:function(){return lt.finalize}});var ut=Gp();Object.defineProperty(e,`find`,{enumerable:!0,get:function(){return ut.find}});var dt=Kp();Object.defineProperty(e,`findIndex`,{enumerable:!0,get:function(){return dt.findIndex}});var ft=qp();Object.defineProperty(e,`first`,{enumerable:!0,get:function(){return ft.first}});var pt=Jp();Object.defineProperty(e,`groupBy`,{enumerable:!0,get:function(){return pt.groupBy}});var mt=Op();Object.defineProperty(e,`ignoreElements`,{enumerable:!0,get:function(){return mt.ignoreElements}});var ht=Yp();Object.defineProperty(e,`isEmpty`,{enumerable:!0,get:function(){return ht.isEmpty}});var gt=Zp();Object.defineProperty(e,`last`,{enumerable:!0,get:function(){return gt.last}});var _t=bf();Object.defineProperty(e,`map`,{enumerable:!0,get:function(){return _t.map}});var vt=kp();Object.defineProperty(e,`mapTo`,{enumerable:!0,get:function(){return vt.mapTo}});var yt=Qp();Object.defineProperty(e,`materialize`,{enumerable:!0,get:function(){return yt.materialize}});var bt=$p();Object.defineProperty(e,`max`,{enumerable:!0,get:function(){return bt.max}});var xt=Af();Object.defineProperty(e,`mergeAll`,{enumerable:!0,get:function(){return xt.mergeAll}});var St=em();Object.defineProperty(e,`flatMap`,{enumerable:!0,get:function(){return St.flatMap}});var Ct=kf();Object.defineProperty(e,`mergeMap`,{enumerable:!0,get:function(){return Ct.mergeMap}});var wt=tm();Object.defineProperty(e,`mergeMapTo`,{enumerable:!0,get:function(){return wt.mergeMapTo}});var Tt=nm();Object.defineProperty(e,`mergeScan`,{enumerable:!0,get:function(){return Tt.mergeScan}});var Et=im();Object.defineProperty(e,`mergeWith`,{enumerable:!0,get:function(){return Et.mergeWith}});var Dt=am();Object.defineProperty(e,`min`,{enumerable:!0,get:function(){return Dt.min}});var Ot=om();Object.defineProperty(e,`multicast`,{enumerable:!0,get:function(){return Ot.multicast}});var kt=Zd();Object.defineProperty(e,`observeOn`,{enumerable:!0,get:function(){return kt.observeOn}});var At=sm();Object.defineProperty(e,`onErrorResumeNextWith`,{enumerable:!0,get:function(){return At.onErrorResumeNextWith}});var jt=cm();Object.defineProperty(e,`pairwise`,{enumerable:!0,get:function(){return jt.pairwise}});var Mt=lm();Object.defineProperty(e,`pluck`,{enumerable:!0,get:function(){return Mt.pluck}});var Nt=um();Object.defineProperty(e,`publish`,{enumerable:!0,get:function(){return Nt.publish}});var Pt=dm();Object.defineProperty(e,`publishBehavior`,{enumerable:!0,get:function(){return Pt.publishBehavior}});var Ft=fm();Object.defineProperty(e,`publishLast`,{enumerable:!0,get:function(){return Ft.publishLast}});var It=pm();Object.defineProperty(e,`publishReplay`,{enumerable:!0,get:function(){return It.publishReplay}});var Lt=mm();Object.defineProperty(e,`raceWith`,{enumerable:!0,get:function(){return Lt.raceWith}});var Rt=up();Object.defineProperty(e,`reduce`,{enumerable:!0,get:function(){return Rt.reduce}});var zt=hm();Object.defineProperty(e,`repeat`,{enumerable:!0,get:function(){return zt.repeat}});var Bt=gm();Object.defineProperty(e,`repeatWhen`,{enumerable:!0,get:function(){return Bt.repeatWhen}});var Vt=_m();Object.defineProperty(e,`retry`,{enumerable:!0,get:function(){return Vt.retry}});var Ht=vm();Object.defineProperty(e,`retryWhen`,{enumerable:!0,get:function(){return Ht.retryWhen}});var Ut=ud();Object.defineProperty(e,`refCount`,{enumerable:!0,get:function(){return Ut.refCount}});var Wt=ym();Object.defineProperty(e,`sample`,{enumerable:!0,get:function(){return Wt.sample}});var Gt=bm();Object.defineProperty(e,`sampleTime`,{enumerable:!0,get:function(){return Gt.sampleTime}});var Kt=xm();Object.defineProperty(e,`scan`,{enumerable:!0,get:function(){return Kt.scan}});var qt=Sm();Object.defineProperty(e,`sequenceEqual`,{enumerable:!0,get:function(){return qt.sequenceEqual}});var Jt=Cm();Object.defineProperty(e,`share`,{enumerable:!0,get:function(){return Jt.share}});var Yt=wm();Object.defineProperty(e,`shareReplay`,{enumerable:!0,get:function(){return Yt.shareReplay}});var Xt=Tm();Object.defineProperty(e,`single`,{enumerable:!0,get:function(){return Xt.single}});var Zt=Em();Object.defineProperty(e,`skip`,{enumerable:!0,get:function(){return Zt.skip}});var Qt=Dm();Object.defineProperty(e,`skipLast`,{enumerable:!0,get:function(){return Qt.skipLast}});var $t=Om();Object.defineProperty(e,`skipUntil`,{enumerable:!0,get:function(){return $t.skipUntil}});var en=km();Object.defineProperty(e,`skipWhile`,{enumerable:!0,get:function(){return en.skipWhile}});var tn=Am();Object.defineProperty(e,`startWith`,{enumerable:!0,get:function(){return tn.startWith}});var nn=Qd();Object.defineProperty(e,`subscribeOn`,{enumerable:!0,get:function(){return nn.subscribeOn}});var rn=Mm();Object.defineProperty(e,`switchAll`,{enumerable:!0,get:function(){return rn.switchAll}});var an=jm();Object.defineProperty(e,`switchMap`,{enumerable:!0,get:function(){return an.switchMap}});var on=Nm();Object.defineProperty(e,`switchMapTo`,{enumerable:!0,get:function(){return on.switchMapTo}});var sn=Pm();Object.defineProperty(e,`switchScan`,{enumerable:!0,get:function(){return sn.switchScan}});var cn=Dp();Object.defineProperty(e,`take`,{enumerable:!0,get:function(){return cn.take}});var ln=Xp();Object.defineProperty(e,`takeLast`,{enumerable:!0,get:function(){return ln.takeLast}});var un=Fm();Object.defineProperty(e,`takeUntil`,{enumerable:!0,get:function(){return un.takeUntil}});var dn=Im();Object.defineProperty(e,`takeWhile`,{enumerable:!0,get:function(){return dn.takeWhile}});var fn=Lm();Object.defineProperty(e,`tap`,{enumerable:!0,get:function(){return fn.tap}});var pn=Rm();Object.defineProperty(e,`throttle`,{enumerable:!0,get:function(){return pn.throttle}});var mn=zm();Object.defineProperty(e,`throttleTime`,{enumerable:!0,get:function(){return mn.throttleTime}});var hn=Ip();Object.defineProperty(e,`throwIfEmpty`,{enumerable:!0,get:function(){return hn.throwIfEmpty}});var gn=Bm();Object.defineProperty(e,`timeInterval`,{enumerable:!0,get:function(){return gn.timeInterval}});var _n=yf();Object.defineProperty(e,`timeout`,{enumerable:!0,get:function(){return _n.timeout}});var vn=Vm();Object.defineProperty(e,`timeoutWith`,{enumerable:!0,get:function(){return vn.timeoutWith}});var yn=Hm();Object.defineProperty(e,`timestamp`,{enumerable:!0,get:function(){return yn.timestamp}});var bn=dp();Object.defineProperty(e,`toArray`,{enumerable:!0,get:function(){return bn.toArray}});var xn=Um();Object.defineProperty(e,`window`,{enumerable:!0,get:function(){return xn.window}});var Sn=Wm();Object.defineProperty(e,`windowCount`,{enumerable:!0,get:function(){return Sn.windowCount}});var Cn=Gm();Object.defineProperty(e,`windowTime`,{enumerable:!0,get:function(){return Cn.windowTime}});var wn=Km();Object.defineProperty(e,`windowToggle`,{enumerable:!0,get:function(){return wn.windowToggle}});var Tn=qm();Object.defineProperty(e,`windowWhen`,{enumerable:!0,get:function(){return Tn.windowWhen}});var En=Jm();Object.defineProperty(e,`withLatestFrom`,{enumerable:!0,get:function(){return En.withLatestFrom}});var Dn=Ym();Object.defineProperty(e,`zipAll`,{enumerable:!0,get:function(){return Dn.zipAll}});var On=Zm();Object.defineProperty(e,`zipWith`,{enumerable:!0,get:function(){return On.zipWith}})}}),$m=class{constructor(){if(typeof window>`u`)throw Error(`WebBrowserStorage is client-only. It must not be constructed on the server — a single process-wide instance would leak tokens between HTTP requests. Wrap any code path that constructs this in "use client".`)}get(e){return localStorage.getItem(e)}set(e,t){localStorage.setItem(e,t)}delete(e){localStorage.removeItem(e)}subscribe(e){let t=t=>{t.key!==null&&e(t.key,t.newValue)};return window.addEventListener(`storage`,t),()=>{window.removeEventListener(`storage`,t)}}},eh=(0,m.createContext)(null);function th({browser:e,storage:t,sessionFactory:n,children:r}){let i=(0,m.useMemo)(()=>e??Ru({storage:t??new $m,sessionFactory:n??Iu()}),[e,t,n]);return(0,P.jsx)(eh.Provider,{value:i,children:r})}function R(){let e=(0,m.useContext)(eh);if(!e)throw Error(`useSemiont must be used within a <SemiontProvider>`);return e}var nh={success:(0,P.jsx)(`svg`,{className:`semiont-toast-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})}),error:(0,P.jsx)(`svg`,{className:`semiont-toast-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})}),warning:(0,P.jsx)(`svg`,{className:`semiont-toast-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`})}),info:(0,P.jsx)(`svg`,{className:`semiont-toast-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})})};function rh({toast:e,onClose:t}){return(0,m.useEffect)(()=>{let n=setTimeout(()=>{t(e.id)},e.duration||3e3);return()=>clearTimeout(n)},[e,t]),(0,P.jsxs)(`div`,{className:`semiont-toast`,"data-variant":e.type,role:`alert`,children:[(0,P.jsx)(`div`,{className:`semiont-toast-icon-wrapper`,children:nh[e.type]}),(0,P.jsx)(`p`,{className:`semiont-toast-message`,children:e.message}),(0,P.jsx)(`button`,{onClick:()=>t(e.id),className:`semiont-toast-close`,"aria-label":`Close`,children:(0,P.jsx)(`svg`,{className:`semiont-toast-close-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]})}function ih({toasts:e,onClose:t}){let[n,r]=(0,m.useState)(!1);return(0,m.useEffect)(()=>(r(!0),()=>r(!1)),[]),n?(0,h.createPortal)((0,P.jsx)(`div`,{className:`semiont-toast-container`,children:e.map(e=>(0,P.jsx)(rh,{toast:e,onClose:t},e.id))}),document.body):null}var ah=m.createContext(void 0);function oh({children:e}){let[t,n]=(0,m.useState)([]),r=m.useCallback((e,t=`info`,r)=>{let i=Date.now().toString(),a=r===void 0?{id:i,message:e,type:t}:{id:i,message:e,type:t,duration:r};n(e=>[...e,a])},[]),i=m.useCallback((e,t)=>r(e,`success`,t),[r]),a=m.useCallback((e,t)=>r(e,`error`,t),[r]),o=m.useCallback((e,t)=>r(e,`warning`,t),[r]),s=m.useCallback((e,t)=>r(e,`info`,t),[r]),c=m.useCallback(e=>{n(t=>t.filter(t=>t.id!==e))},[]),l=m.useMemo(()=>({showToast:r,showSuccess:i,showError:a,showWarning:o,showInfo:s}),[r,i,a,o,s]);return(0,P.jsxs)(ah.Provider,{value:l,children:[e,(0,P.jsx)(ih,{toasts:t,onClose:c})]})}function sh(){let e=m.useContext(ah);if(e===void 0)throw Error(`useToast must be used within a ToastProvider`);return e}var ch=f({"../../translations/ar.json":()=>b(()=>import(`./ar-U2EXWUMQ-Ds9Pt3_I.js`),[]),"../../translations/bn.json":()=>b(()=>import(`./bn-DRJGV772-BUYrNEk8.js`),[]),"../../translations/cs.json":()=>b(()=>import(`./cs-PTWDM23V-DfbMzFEw.js`),[]),"../../translations/da.json":()=>b(()=>import(`./da-KSNIKYSS-BMtq201F.js`),[]),"../../translations/de.json":()=>b(()=>import(`./de-F2XBEWFY-ChjoYEH0.js`),[]),"../../translations/el.json":()=>b(()=>import(`./el-DLD2GWAP-ClFunpNV.js`),[]),"../../translations/en.json":()=>b(()=>import(`./en-L45VK7BS-C9ArL-E1.js`),__vite__mapDeps([0,1])),"../../translations/es.json":()=>b(()=>import(`./es-WLPYWGB5-C53vYarX.js`),[]),"../../translations/fa.json":()=>b(()=>import(`./fa-BAXHSDZG-DJia4XF_.js`),[]),"../../translations/fi.json":()=>b(()=>import(`./fi-FCHSYVOT-D2etzjyC.js`),[]),"../../translations/fr.json":()=>b(()=>import(`./fr-3UERBSL6-Bi8o9u26.js`),[]),"../../translations/he.json":()=>b(()=>import(`./he-F6F3FV2K-CwGkucCK.js`),[]),"../../translations/hi.json":()=>b(()=>import(`./hi-4BK6IK7Q-fsSpyO-Z.js`),[]),"../../translations/id.json":()=>b(()=>import(`./id-7ECCWP3J-MhvUbYNG.js`),[]),"../../translations/it.json":()=>b(()=>import(`./it-234Z6XK6-n-8MkFtz.js`),[]),"../../translations/ja.json":()=>b(()=>import(`./ja-PJWQI4OQ-CbrcVSYZ.js`),[]),"../../translations/ko.json":()=>b(()=>import(`./ko-APUEW2RS-CLubHAbf.js`),[]),"../../translations/ms.json":()=>b(()=>import(`./ms-PJBZWZWD-Bu45eJYe.js`),[]),"../../translations/nl.json":()=>b(()=>import(`./nl-L4C3ZBCU-bLU3oN_N.js`),[]),"../../translations/no.json":()=>b(()=>import(`./no-QE5N5KNG-BCG75Nm1.js`),[]),"../../translations/pl.json":()=>b(()=>import(`./pl-5Q2D23PD-DgP2517z.js`),[]),"../../translations/pt.json":()=>b(()=>import(`./pt-AIGUOIOC-CN21pR38.js`),[]),"../../translations/ro.json":()=>b(()=>import(`./ro-T56CSHTY-mCdsn9QL.js`),[]),"../../translations/sv.json":()=>b(()=>import(`./sv-L4TJQ2UH-Cj1jmTXz.js`),[]),"../../translations/th.json":()=>b(()=>import(`./th-6O7Y6O2Q-Db0HgJLY.js`),[]),"../../translations/tr.json":()=>b(()=>import(`./tr-D4CQCSNO-B0u3f4nL.js`),[]),"../../translations/uk.json":()=>b(()=>import(`./uk-2HMQG6ND-Dx2FfvV4.js`),[]),"../../translations/vi.json":()=>b(()=>import(`./vi-XVJ4RUEJ-CeoZ1h3m.js`),[]),"../../translations/zh.json":()=>b(()=>import(`./zh-K2KDPGHK-BriluvPe.js`),[])}),lh=(0,m.createContext)(null),uh=new Map;function dh(e,t){let n=e.match(/\{(\w+),\s*plural,\s*/);if(!n)return e;let r=t[n[1]];if(r===void 0)return e;let i=n[0].length,a=1,o=i;for(let t=i;t<e.length;t++)if(e[t]===`{`)a++;else if(e[t]===`}`&&(a--,a===0)){o=t;break}let s=e.substring(i,o),c={},l=/(?:=(\d+)|(\w+))\s*\{([^}]+)\}/g,u;for(;(u=l.exec(s))!==null;){let[,e,t,n]=u,r=e===void 0?t:`=${e}`;c[r]=n}let d=c[`=${r}`];if(d!==void 0){let t=d.replace(/#/g,String(r));return e.substring(0,n.index)+t+e.substring(o+1)}let f=c.other;if(f!==void 0){let t=f.replace(/#/g,String(r));return e.substring(0,n.index)+t+e.substring(o+1)}return e}async function fh(e){if(uh.has(e))return uh.get(e);if(e===`en`)return uh.set(`en`,l),l;try{let t=await ch(`../../translations/${e}.json`),n=t.default||t;return uh.set(e,n),n}catch(t){return console.error(`Failed to load translations for locale: ${e}`,t),l}}var ph={t:(e,t,n)=>{let r=l[e]?.[t];if(!r)return console.warn(`Translation not found for ${e}.${t}`),`${e}.${t}`;if(n&&typeof r==`string`){let e=r;return e=dh(e,n),Object.entries(n).forEach(([t,n])=>{e=e.replace(RegExp(`\\{\\{${t}\\}\\}`,`g`),String(n))}),e}return r}};function mh({translationManager:e,locale:t,loadingComponent:n=null,children:r}){let[i,a]=(0,m.useState)(null),[o,s]=(0,m.useState)(!1);(0,m.useEffect)(()=>{t&&!e&&(s(!0),fh(t).then(e=>{a(e),s(!1)}).catch(e=>{console.error(`Failed to load translations:`,e),a(l),s(!1)}))},[t,e]);let c=(0,m.useMemo)(()=>i?{t:(e,n,r)=>{let a=i[e]?.[n];if(!a)return console.warn(`Translation not found for ${e}.${n} in locale ${t}`),`${e}.${n}`;if(r&&typeof a==`string`){let e=a;return e=dh(e,r),Object.entries(r).forEach(([t,n])=>{e=e.replace(RegExp(`\\{\\{${t}\\}\\}`,`g`),String(n))}),e}return a}}:null,[i,t]);return e?(0,P.jsx)(lh.Provider,{value:e,children:r}):t&&o?(0,P.jsx)(P.Fragment,{children:n}):t&&c?(0,P.jsx)(lh.Provider,{value:c,children:r}):(0,P.jsx)(lh.Provider,{value:ph,children:r})}function hh(e){let t=(0,m.useContext)(lh);return t?(n,r)=>t.t(e,n,r):(t,n)=>{let r=l[e]?.[t];if(!r)return console.warn(`Translation not found for ${e}.${t}`),`${e}.${t}`;if(n&&typeof r==`string`){let e=r;return e=dh(e,n),Object.entries(n).forEach(([t,n])=>{e=e.replace(RegExp(`\\{\\{${t}\\}\\}`,`g`),String(n))}),e}return r}}var gh=(0,m.createContext)(null),_h={didCatch:!1,error:null},vh=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=_h}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(e!==null){var t,n,r=[...arguments];(t=(n=this.props).onReset)==null||t.call(n,{args:r,reason:`imperative-api`}),this.setState(_h)}}componentDidCatch(e,t){var n,r;(n=(r=this.props).onError)==null||n.call(r,e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;if(n&&t.error!==null&&yh(e.resetKeys,r)){var i,a;(i=(a=this.props).onReset)==null||i.call(a,{next:r,prev:e.resetKeys,reason:`keys`}),this.setState(_h)}}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,m.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,m.createElement)(gh.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function yh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var bh=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),xh=t(((e,t)=>{t.exports=bh()})),Sh=t(((e,t)=>{t.exports={}})),Ch=t(((e,t)=>{var n=t.exports={},r,i;function a(){throw Error(`setTimeout has not been defined`)}function o(){throw Error(`clearTimeout has not been defined`)}(function(){try{r=typeof setTimeout==`function`?setTimeout:a}catch{r=a}try{i=typeof clearTimeout==`function`?clearTimeout:o}catch{i=o}})();function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch{try{return r.call(null,e,0)}catch{return r.call(this,e,0)}}}function c(e){if(i===clearTimeout)return clearTimeout(e);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch{try{return i.call(null,e)}catch{return i.call(this,e)}}}var l=[],u=!1,d,f=-1;function p(){!u||!d||(u=!1,d.length?l=d.concat(l):f=-1,l.length&&m())}function m(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(d=l,l=[];++f<t;)d&&d[f].run();f=-1,t=l.length}d=null,u=!1,c(e)}}n.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),l.length===1&&!u&&s(m)};function h(e,t){this.fun=e,this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)},n.title=`browser`,n.browser=!0,n.env={},n.argv=[],n.version=``,n.versions={};function g(){}n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(e){return[]},n.binding=function(e){throw Error(`process.binding is not supported`)},n.cwd=function(){return`/`},n.chdir=function(e){throw Error(`process.chdir is not supported`)},n.umask=function(){return 0}})),wh=xh(),Th=e(Sh(),1),Eh=e(Ch(),1);function Dh(e){return e.replace(/^file:\/\//,``)}var Oh=p({"../../node_modules/inline-style-parser/cjs/index.js"(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
11
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g}}),kh=p({"../../node_modules/style-to-object/cjs/index.js"(e){var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Oh());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}}}),Ah=p({"../../node_modules/style-to-js/cjs/utilities.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}}}),jh=p({"../../node_modules/style-to-js/cjs/index.js"(e,t){var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(kh()),r=Ah();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}}),Mh=p({"../../node_modules/extend/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}}),Nh=p({"../../node_modules/rxjs/dist/cjs/internal/operators/partition.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.partition=void 0;var t=qf(),n=Jf();function r(e,r){return function(i){return[n.filter(e,r)(i),n.filter(t.not(e,r))(i)]}}e.partition=r}}),Ph=p({"../../node_modules/rxjs/dist/cjs/internal/operators/race.js"(e){var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.race=void 0;var r=Wf(),i=mm();function a(){var e=[...arguments];return i.raceWith.apply(void 0,n([],t(r.argsOrArgArray(e))))}e.race=a}}),Fh=p({"../../node_modules/rxjs/dist/cjs/operators/index.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var t=tp();Object.defineProperty(e,`audit`,{enumerable:!0,get:function(){return t.audit}});var n=np();Object.defineProperty(e,`auditTime`,{enumerable:!0,get:function(){return n.auditTime}});var r=rp();Object.defineProperty(e,`buffer`,{enumerable:!0,get:function(){return r.buffer}});var i=ip();Object.defineProperty(e,`bufferCount`,{enumerable:!0,get:function(){return i.bufferCount}});var a=ap();Object.defineProperty(e,`bufferTime`,{enumerable:!0,get:function(){return a.bufferTime}});var o=op();Object.defineProperty(e,`bufferToggle`,{enumerable:!0,get:function(){return o.bufferToggle}});var s=sp();Object.defineProperty(e,`bufferWhen`,{enumerable:!0,get:function(){return s.bufferWhen}});var c=cp();Object.defineProperty(e,`catchError`,{enumerable:!0,get:function(){return c.catchError}});var l=mp();Object.defineProperty(e,`combineAll`,{enumerable:!0,get:function(){return l.combineAll}});var u=pp();Object.defineProperty(e,`combineLatestAll`,{enumerable:!0,get:function(){return u.combineLatestAll}});var d=hp();Object.defineProperty(e,`combineLatest`,{enumerable:!0,get:function(){return d.combineLatest}});var f=gp();Object.defineProperty(e,`combineLatestWith`,{enumerable:!0,get:function(){return f.combineLatestWith}});var p=yp();Object.defineProperty(e,`concat`,{enumerable:!0,get:function(){return p.concat}});var m=jf();Object.defineProperty(e,`concatAll`,{enumerable:!0,get:function(){return m.concatAll}});var h=_p();Object.defineProperty(e,`concatMap`,{enumerable:!0,get:function(){return h.concatMap}});var g=vp();Object.defineProperty(e,`concatMapTo`,{enumerable:!0,get:function(){return g.concatMapTo}});var _=bp();Object.defineProperty(e,`concatWith`,{enumerable:!0,get:function(){return _.concatWith}});var v=Sp();Object.defineProperty(e,`connect`,{enumerable:!0,get:function(){return v.connect}});var y=Cp();Object.defineProperty(e,`count`,{enumerable:!0,get:function(){return y.count}});var b=wp();Object.defineProperty(e,`debounce`,{enumerable:!0,get:function(){return b.debounce}});var x=Tp();Object.defineProperty(e,`debounceTime`,{enumerable:!0,get:function(){return x.debounceTime}});var S=Ep();Object.defineProperty(e,`defaultIfEmpty`,{enumerable:!0,get:function(){return S.defaultIfEmpty}});var C=jp();Object.defineProperty(e,`delay`,{enumerable:!0,get:function(){return C.delay}});var w=Ap();Object.defineProperty(e,`delayWhen`,{enumerable:!0,get:function(){return w.delayWhen}});var T=Mp();Object.defineProperty(e,`dematerialize`,{enumerable:!0,get:function(){return T.dematerialize}});var E=Np();Object.defineProperty(e,`distinct`,{enumerable:!0,get:function(){return E.distinct}});var D=Pp();Object.defineProperty(e,`distinctUntilChanged`,{enumerable:!0,get:function(){return D.distinctUntilChanged}});var O=Fp();Object.defineProperty(e,`distinctUntilKeyChanged`,{enumerable:!0,get:function(){return O.distinctUntilKeyChanged}});var k=Lp();Object.defineProperty(e,`elementAt`,{enumerable:!0,get:function(){return k.elementAt}});var A=Rp();Object.defineProperty(e,`endWith`,{enumerable:!0,get:function(){return A.endWith}});var ee=zp();Object.defineProperty(e,`every`,{enumerable:!0,get:function(){return ee.every}});var te=Hp();Object.defineProperty(e,`exhaust`,{enumerable:!0,get:function(){return te.exhaust}});var j=Vp();Object.defineProperty(e,`exhaustAll`,{enumerable:!0,get:function(){return j.exhaustAll}});var ne=Bp();Object.defineProperty(e,`exhaustMap`,{enumerable:!0,get:function(){return ne.exhaustMap}});var re=Up();Object.defineProperty(e,`expand`,{enumerable:!0,get:function(){return re.expand}});var ie=Jf();Object.defineProperty(e,`filter`,{enumerable:!0,get:function(){return ie.filter}});var ae=Wp();Object.defineProperty(e,`finalize`,{enumerable:!0,get:function(){return ae.finalize}});var M=Gp();Object.defineProperty(e,`find`,{enumerable:!0,get:function(){return M.find}});var oe=Kp();Object.defineProperty(e,`findIndex`,{enumerable:!0,get:function(){return oe.findIndex}});var se=qp();Object.defineProperty(e,`first`,{enumerable:!0,get:function(){return se.first}});var ce=Jp();Object.defineProperty(e,`groupBy`,{enumerable:!0,get:function(){return ce.groupBy}});var le=Op();Object.defineProperty(e,`ignoreElements`,{enumerable:!0,get:function(){return le.ignoreElements}});var ue=Yp();Object.defineProperty(e,`isEmpty`,{enumerable:!0,get:function(){return ue.isEmpty}});var N=Zp();Object.defineProperty(e,`last`,{enumerable:!0,get:function(){return N.last}});var de=bf();Object.defineProperty(e,`map`,{enumerable:!0,get:function(){return de.map}});var fe=kp();Object.defineProperty(e,`mapTo`,{enumerable:!0,get:function(){return fe.mapTo}});var pe=Qp();Object.defineProperty(e,`materialize`,{enumerable:!0,get:function(){return pe.materialize}});var me=$p();Object.defineProperty(e,`max`,{enumerable:!0,get:function(){return me.max}});var he=rm();Object.defineProperty(e,`merge`,{enumerable:!0,get:function(){return he.merge}});var ge=Af();Object.defineProperty(e,`mergeAll`,{enumerable:!0,get:function(){return ge.mergeAll}});var _e=em();Object.defineProperty(e,`flatMap`,{enumerable:!0,get:function(){return _e.flatMap}});var ve=kf();Object.defineProperty(e,`mergeMap`,{enumerable:!0,get:function(){return ve.mergeMap}});var ye=tm();Object.defineProperty(e,`mergeMapTo`,{enumerable:!0,get:function(){return ye.mergeMapTo}});var be=nm();Object.defineProperty(e,`mergeScan`,{enumerable:!0,get:function(){return be.mergeScan}});var xe=im();Object.defineProperty(e,`mergeWith`,{enumerable:!0,get:function(){return xe.mergeWith}});var Se=am();Object.defineProperty(e,`min`,{enumerable:!0,get:function(){return Se.min}});var Ce=om();Object.defineProperty(e,`multicast`,{enumerable:!0,get:function(){return Ce.multicast}});var we=Zd();Object.defineProperty(e,`observeOn`,{enumerable:!0,get:function(){return we.observeOn}});var Te=sm();Object.defineProperty(e,`onErrorResumeNext`,{enumerable:!0,get:function(){return Te.onErrorResumeNext}});var Ee=cm();Object.defineProperty(e,`pairwise`,{enumerable:!0,get:function(){return Ee.pairwise}});var De=Nh();Object.defineProperty(e,`partition`,{enumerable:!0,get:function(){return De.partition}});var Oe=lm();Object.defineProperty(e,`pluck`,{enumerable:!0,get:function(){return Oe.pluck}});var ke=um();Object.defineProperty(e,`publish`,{enumerable:!0,get:function(){return ke.publish}});var Ae=dm();Object.defineProperty(e,`publishBehavior`,{enumerable:!0,get:function(){return Ae.publishBehavior}});var je=fm();Object.defineProperty(e,`publishLast`,{enumerable:!0,get:function(){return je.publishLast}});var Me=pm();Object.defineProperty(e,`publishReplay`,{enumerable:!0,get:function(){return Me.publishReplay}});var Ne=Ph();Object.defineProperty(e,`race`,{enumerable:!0,get:function(){return Ne.race}});var Pe=mm();Object.defineProperty(e,`raceWith`,{enumerable:!0,get:function(){return Pe.raceWith}});var Fe=up();Object.defineProperty(e,`reduce`,{enumerable:!0,get:function(){return Fe.reduce}});var Ie=hm();Object.defineProperty(e,`repeat`,{enumerable:!0,get:function(){return Ie.repeat}});var Le=gm();Object.defineProperty(e,`repeatWhen`,{enumerable:!0,get:function(){return Le.repeatWhen}});var Re=_m();Object.defineProperty(e,`retry`,{enumerable:!0,get:function(){return Re.retry}});var ze=vm();Object.defineProperty(e,`retryWhen`,{enumerable:!0,get:function(){return ze.retryWhen}});var Be=ud();Object.defineProperty(e,`refCount`,{enumerable:!0,get:function(){return Be.refCount}});var Ve=ym();Object.defineProperty(e,`sample`,{enumerable:!0,get:function(){return Ve.sample}});var He=bm();Object.defineProperty(e,`sampleTime`,{enumerable:!0,get:function(){return He.sampleTime}});var Ue=xm();Object.defineProperty(e,`scan`,{enumerable:!0,get:function(){return Ue.scan}});var We=Sm();Object.defineProperty(e,`sequenceEqual`,{enumerable:!0,get:function(){return We.sequenceEqual}});var Ge=Cm();Object.defineProperty(e,`share`,{enumerable:!0,get:function(){return Ge.share}});var Ke=wm();Object.defineProperty(e,`shareReplay`,{enumerable:!0,get:function(){return Ke.shareReplay}});var qe=Tm();Object.defineProperty(e,`single`,{enumerable:!0,get:function(){return qe.single}});var Je=Em();Object.defineProperty(e,`skip`,{enumerable:!0,get:function(){return Je.skip}});var Ye=Dm();Object.defineProperty(e,`skipLast`,{enumerable:!0,get:function(){return Ye.skipLast}});var Xe=Om();Object.defineProperty(e,`skipUntil`,{enumerable:!0,get:function(){return Xe.skipUntil}});var Ze=km();Object.defineProperty(e,`skipWhile`,{enumerable:!0,get:function(){return Ze.skipWhile}});var Qe=Am();Object.defineProperty(e,`startWith`,{enumerable:!0,get:function(){return Qe.startWith}});var $e=Qd();Object.defineProperty(e,`subscribeOn`,{enumerable:!0,get:function(){return $e.subscribeOn}});var et=Mm();Object.defineProperty(e,`switchAll`,{enumerable:!0,get:function(){return et.switchAll}});var tt=jm();Object.defineProperty(e,`switchMap`,{enumerable:!0,get:function(){return tt.switchMap}});var nt=Nm();Object.defineProperty(e,`switchMapTo`,{enumerable:!0,get:function(){return nt.switchMapTo}});var rt=Pm();Object.defineProperty(e,`switchScan`,{enumerable:!0,get:function(){return rt.switchScan}});var it=Dp();Object.defineProperty(e,`take`,{enumerable:!0,get:function(){return it.take}});var at=Xp();Object.defineProperty(e,`takeLast`,{enumerable:!0,get:function(){return at.takeLast}});var ot=Fm();Object.defineProperty(e,`takeUntil`,{enumerable:!0,get:function(){return ot.takeUntil}});var st=Im();Object.defineProperty(e,`takeWhile`,{enumerable:!0,get:function(){return st.takeWhile}});var ct=Lm();Object.defineProperty(e,`tap`,{enumerable:!0,get:function(){return ct.tap}});var lt=Rm();Object.defineProperty(e,`throttle`,{enumerable:!0,get:function(){return lt.throttle}});var ut=zm();Object.defineProperty(e,`throttleTime`,{enumerable:!0,get:function(){return ut.throttleTime}});var dt=Ip();Object.defineProperty(e,`throwIfEmpty`,{enumerable:!0,get:function(){return dt.throwIfEmpty}});var ft=Bm();Object.defineProperty(e,`timeInterval`,{enumerable:!0,get:function(){return ft.timeInterval}});var pt=yf();Object.defineProperty(e,`timeout`,{enumerable:!0,get:function(){return pt.timeout}});var mt=Vm();Object.defineProperty(e,`timeoutWith`,{enumerable:!0,get:function(){return mt.timeoutWith}});var ht=Hm();Object.defineProperty(e,`timestamp`,{enumerable:!0,get:function(){return ht.timestamp}});var gt=dp();Object.defineProperty(e,`toArray`,{enumerable:!0,get:function(){return gt.toArray}});var _t=Um();Object.defineProperty(e,`window`,{enumerable:!0,get:function(){return _t.window}});var vt=Wm();Object.defineProperty(e,`windowCount`,{enumerable:!0,get:function(){return vt.windowCount}});var yt=Gm();Object.defineProperty(e,`windowTime`,{enumerable:!0,get:function(){return yt.windowTime}});var bt=Km();Object.defineProperty(e,`windowToggle`,{enumerable:!0,get:function(){return bt.windowToggle}});var xt=qm();Object.defineProperty(e,`windowWhen`,{enumerable:!0,get:function(){return xt.windowWhen}});var St=Jm();Object.defineProperty(e,`withLatestFrom`,{enumerable:!0,get:function(){return St.withLatestFrom}});var Ct=Xm();Object.defineProperty(e,`zip`,{enumerable:!0,get:function(){return Ct.zip}});var wt=Ym();Object.defineProperty(e,`zipAll`,{enumerable:!0,get:function(){return wt.zipAll}});var Tt=Zm();Object.defineProperty(e,`zipWith`,{enumerable:!0,get:function(){return Tt.zipWith}})}}),Ih={highlight:{motivation:`highlighting`,internalType:`highlight`,displayName:`Highlight`,description:`Mark text for attention`,className:`annotation-highlight`,iconEmoji:`🟡`,isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>no(e),announceOnCreate:`Highlight created`,create:{bodyBuilder:`empty`,refetchAfter:!1},detection:{sseMethod:`detectHighlights`,countField:`createdCount`,displayNamePlural:`highlights`,displayNameSingular:`highlight`,formatRequestParams:e=>{let t=[];return typeof e[0]==`string`&&e[0]&&t.push({label:`Instructions`,value:e[0]}),typeof e[2]==`number`&&t.push({label:`Density`,value:`${e[2]} per 2000 words`}),t}}},comment:{motivation:`commenting`,internalType:`comment`,displayName:`Comment`,description:`Add a comment about the text`,className:`annotation-comment`,iconEmoji:`💬`,isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>ao(e),announceOnCreate:`Comment created`,create:{bodyBuilder:`text`,refetchAfter:!1},detection:{sseMethod:`detectComments`,countField:`createdCount`,displayNamePlural:`comments`,displayNameSingular:`comment`,formatRequestParams:e=>{let t=[];return typeof e[0]==`string`&&e[0]&&t.push({label:`Instructions`,value:e[0]}),typeof e[1]==`string`&&e[1]&&t.push({label:`Tone`,value:e[1]}),typeof e[2]==`number`&&t.push({label:`Density`,value:`${e[2]} per 2000 words`}),t}}},assessment:{motivation:`assessing`,internalType:`assessment`,displayName:`Assessment`,description:`Provide evaluation or assessment`,className:`annotation-assessment`,iconEmoji:`🔴`,isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>e.motivation===`assessing`,announceOnCreate:`Assessment created`,create:{bodyBuilder:`text`,refetchAfter:!1},detection:{sseMethod:`detectAssessments`,countField:`createdCount`,displayNamePlural:`assessments`,displayNameSingular:`assessment`,formatRequestParams:e=>{let t=[];return typeof e[0]==`string`&&e[0]&&t.push({label:`Instructions`,value:e[0]}),typeof e[1]==`string`&&e[1]&&t.push({label:`Tone`,value:e[1]}),typeof e[2]==`number`&&t.push({label:`Density`,value:`${e[2]} per 2000 words`}),t}}},reference:{motivation:`linking`,internalType:`reference`,displayName:`Reference`,description:`Link to another resource`,className:`annotation-reference`,iconEmoji:`🔵`,isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>ro(e),announceOnCreate:`Reference created`,create:{bodyBuilder:`entityTag`,refetchAfter:!0},detection:{sseMethod:`detectReferences`,countField:`foundCount`,displayNamePlural:`entity references`,displayNameSingular:`entity reference`,formatRequestParams:e=>{let t=[],n=e[0];return Array.isArray(n)&&n.length>0&&t.push({label:`Entity Types`,value:n.join(`, `)}),e[1]===!0&&t.push({label:`Include Descriptive References`,value:`Yes`}),t}}},tag:{motivation:`tagging`,internalType:`tag`,displayName:`Tag`,description:`Structural role annotation`,className:`annotation-tag`,iconEmoji:`🏷️`,isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>oo(e),announceOnCreate:`Tag created`,create:{bodyBuilder:`dualTag`,refetchAfter:!1,successMessage:`Tag "{value}" created`},detection:{sseMethod:`detectTags`,countField:`tagsCreated`,displayNamePlural:`tags`,displayNameSingular:`tag`,formatRequestParams:e=>{let t=[];typeof e[0]==`string`&&e[0]&&t.push({label:`Schema`,value:{"legal-irac":`Legal (IRAC)`,"scientific-imrad":`Scientific (IMRAD)`,"argument-toulmin":`Argument (Toulmin)`}[e[0]]||e[0]});let n=e[1];return Array.isArray(n)&&n.length>0&&t.push({label:`Categories`,value:n.join(`, `)}),t}}}},Lh={primary:{base:`semiont-button semiont-button--primary`,large:`semiont-button semiont-button--primary semiont-button--large`},secondary:{base:`semiont-button semiont-button--secondary`,withScale:`semiont-button semiont-button--secondary semiont-button--scale`},tertiary:{base:`semiont-button semiont-button--tertiary`},danger:{base:`semiont-button semiont-button--danger`},warning:{base:`semiont-button semiont-button--warning`},combine:(...e)=>e.filter(Boolean).join(` `)},Rh=[],zh=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?zh:Rh).push(n+=e[t])})();function Bh(e){if(e<768)return!1;for(let t=0,n=Rh.length;;){let r=t+n>>1;if(e<Rh[r])n=r;else if(e>=zh[r])t=r+1;else return!0;if(t==n)return!1}}function Vh(e){return e>=127462&&e<=127487}var Hh=8205;function Uh(e,t,n=!0,r=!0){return(n?Wh:Gh)(e,t,r)}function Wh(e,t,n){if(t==e.length)return t;t&&qh(e.charCodeAt(t))&&Jh(e.charCodeAt(t-1))&&t--;let r=Kh(e,t);for(t+=Yh(r);t<e.length;){let i=Kh(e,t);if(r==Hh||i==Hh||n&&Bh(i))t+=Yh(i),r=i;else if(Vh(i)){let n=0,r=t-2;for(;r>=0&&Vh(Kh(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function Gh(e,t,n){for(;t>0;){let r=Wh(e,t-2,n);if(r<t)return r;t--}return 0}function Kh(e,t){let n=e.charCodeAt(t);if(!Jh(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return qh(r)?(n-55296<<10)+(r-56320)+65536:n}function qh(e){return e>=56320&&e<57344}function Jh(e){return e>=55296&&e<56320}function Yh(e){return e<65536?1:2}var Xh=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=og(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Qh.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=og(this,e,t);let n=[];return this.decompose(e,t,n,0),Qh.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new ng(this),i=new ng(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new ng(this,e)}iterRange(e,t=this.length){return new rg(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ig(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Zh(t):Qh.from(Zh.split(t,[]))}},Zh=class e extends Xh{constructor(e,t=$h(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new ag(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(tg(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=eg(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=og(this,t,n);let i=eg(this.text,eg(r.text,tg(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):Qh.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
12
|
+
`){[e,t]=og(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},Qh=class e extends Xh{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=og(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
13
|
+
`){[e,t]=og(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Zh(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Zh&&c&&(n=u[u.length-1])instanceof Zh&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Zh(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};Xh.empty=new Zh([``],0);function $h(e){let t=-1;for(let n of e)t+=n.length+1;return t}function eg(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function tg(e,t,n){return eg(e,[``],t,n)}var ng=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof Zh?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Zh?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
14
|
+
`,this;e--}else if(r instanceof Zh){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Zh?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},rg=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new ng(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},ig=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(Xh.prototype[Symbol.iterator]=function(){return this.iter()},ng.prototype[Symbol.iterator]=rg.prototype[Symbol.iterator]=ig.prototype[Symbol.iterator]=function(){return this});var ag=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function og(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function sg(e,t,n=!0,r=!0){return Uh(e,t,n,r)}function cg(e){return e>=56320&&e<57344}function lg(e){return e>=55296&&e<56320}function ug(e,t){let n=e.charCodeAt(t);if(!lg(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return cg(r)?(n-55296<<10)+(r-56320)+65536:n}function dg(e){return e<65536?1:2}var fg=/\r\n?|\n/,pg=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(pg||={}),mg=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){vg(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:bg(this,e)}mapDesc(e,t=!1){return e.empty?this:yg(this,e,t)}mapPos(e,t=-1,n=pg.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=pg.Simple&&c>=e&&(n==pg.TrackDel&&r<e&&c>e||n==pg.TrackBefore&&r<e||n==pg.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},hg=class e extends mg{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return vg(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return yg(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(Xh.empty);r.push(a?t.slice(i,i+a):Xh.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:bg(this,e,!0)}map(e,t=!1){return e.empty?this:yg(this,e,t,!0)}iterChanges(e,t=!1){vg(this,e,t)}get desc(){return mg.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new xg(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);gg(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;gg(n,e,t),t>0&&_g(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);gg(n,e,-1),gg(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:mg.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&gg(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?Xh.of(l.split(r||fg)):l:Xh.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&gg(i,e-o,-1),gg(i,s-e,d),_g(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(Xh.empty);r[e]=Xh.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function gg(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function _g(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Xh.empty);e.push(n)}}function vg(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=Xh.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function yg(e,t,n,r=!1){let i=[],a=r?[]:null,o=new xg(e),s=new xg(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);gg(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(gg(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(gg(i,0,o.ins),a&&_g(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;gg(i,t,e<o.i?o.ins:0),a&&e<o.i&&_g(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?hg.createSet(i,a):mg.create(i);else throw Error(`Mismatched change set lengths`)}function bg(e,t,n=!1){let r=[],i=n?[]:null,a=new xg(e),o=new xg(t);for(let e=!1;;)if(a.done&&o.done)return i?hg.createSet(r,i):mg.create(r);else if(a.ins==0)gg(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)gg(r,0,o.ins,e),i&&_g(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;gg(r,t,n,e),i&&n&&_g(i,r,o.text)}else o.ins==-1?(gg(r,a.off?0:a.len,t,e),i&&_g(i,r,a.textBit(t))):(gg(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&_g(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var xg=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Xh.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Xh.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Sg=class e{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return z.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return z.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return z.range(e.anchor,e.head)}static create(t,n,r){return new e(t,n,r)}},z=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>Sg.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return Sg.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(r??16777215)<<6)}static range(e,t,n,r,i){let a=(n??16777215)<<6|(r==null?7:Math.min(6,r));return!i&&e!=t&&(i=t<e?1:-1),t<e?Sg.create(t,e,48|a):Sg.create(e,t,(i?i<0?8:16:0)|a)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function Cg(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var wg=0,B=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=wg++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:Tg),!!t.static,t.enables)}of(e){return new Eg([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Eg(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Eg(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function Tg(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var Eg=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=wg++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||Og(e,c)){let r=t(e);if(a?!Dg(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Vg(o,c);if(this.dependencies.every(t=>t instanceof B?o.facet(t)===e.facet(t):t instanceof jg?o.field(t,!1)==e.field(t,!1):!0)||(a?Dg(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}};function Dg(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Og(e,t){let n=!1;for(let r of t)Bg(e,r)&1&&(n=!0);return n}function kg(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Vg(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)Bg(e,t);return e.values[o]=s(e),1},update(e,n){if(!Og(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=Og(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&Tg(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var Ag=B.define({static:!0}),jg=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(wg++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(Ag).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Ag),i=n.facet(Ag),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,Ag.of({field:this,create:e})]}get extension(){return this}},Mg={lowest:4,low:3,default:2,high:1,highest:0};function Ng(e){return t=>new Fg(t,e)}var Pg={highest:Ng(Mg.highest),high:Ng(Mg.high),default:Ng(Mg.default),low:Ng(Mg.low),lowest:Ng(Mg.lowest)},Fg=class{constructor(e,t){this.inner=e,this.prec=t}},Ig=class e{of(e){return new Lg(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Lg=class{constructor(e,t){this.compartment=e,this.inner=t}},Rg=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of zg(t,n,o))e instanceof jg?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,Tg(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>kg(e,n,t))}}return new e(t,o,l.map(e=>e(s)),s,c,a)}};function zg(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Lg&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Lg){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof Fg)a(e.inner,e.prec);else if(e instanceof jg)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof Eg)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,Mg.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,Mg.default),r.reduce((e,t)=>e.concat(t))}function Bg(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Vg(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Hg=B.define(),Ug=B.define({combine:e=>e.some(e=>e),static:!0}),Wg=B.define({combine:e=>e.length?e[0]:void 0,static:!0}),Gg=B.define(),Kg=B.define(),qg=B.define(),Jg=B.define({combine:e=>e.length?e[0]:!1}),Yg=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Xg}},Xg=class{of(e){return new Yg(this,e)}},Zg=class{constructor(e){this.map=e}of(e){return new Qg(this,e)}},Qg=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Zg(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Qg.reconfigure=Qg.define(),Qg.appendConfig=Qg.define();var $g=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&Cg(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};$g.time=Yg.define(),$g.userEvent=Yg.define(),$g.addToHistory=Yg.define(),$g.remote=Yg.define();function e_(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function t_(e,t,n){let r,i,a;return n?(r=t.changes,i=hg.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Qg.mapEffects(e.effects,r).concat(Qg.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function n_(e,t,n){let r=t.selection,i=s_(t.annotations);return t.userEvent&&(i=i.concat($g.userEvent.of(t.userEvent))),{changes:t.changes instanceof hg?t.changes:hg.of(t.changes||[],n,e.facet(Wg)),selection:r&&(r instanceof z?r:z.single(r.anchor,r.head)),effects:s_(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function r_(e,t,n){let r=n_(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=t_(r,n_(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=$g.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return a_(n?i_(i):i)}function i_(e){let t=e.startState,n=!0;for(let r of t.facet(Gg)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:e_(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=hg.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=$g.create(t,r,e.selection&&e.selection.map(i),Qg.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Kg);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof $g?i:Array.isArray(i)&&i.length==1&&i[0]instanceof $g?i[0]:r_(t,s_(i),!1)}return e}function a_(e){let t=e.startState,n=t.facet(qg),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=t_(r,n_(t,a,e.changes.newLength),!0))}return r==e?e:$g.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var o_=[];function s_(e){return e==null?o_:Array.isArray(e)?e:[e]}var c_=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(c_||={}),l_=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,u_;try{u_=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function d_(e){if(u_)return u_.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||l_.test(n)))return!0}return!1}function f_(e){return t=>{if(!/\S/.test(t))return c_.Space;if(d_(t))return c_.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return c_.Word;return c_.Other}}var p_=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Bg(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return Bg(this,n),Vg(this,n)}update(...e){return r_(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Ig.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Qg.reconfigure)?(n=null,r=e.value):e.is(Qg.appendConfig)&&(n=null,r=s_(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=Rg.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Ug)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:z.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=s_(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Qg.mapEffects(a,c).concat(Qg.mapEffects(s_(o.effects),l))}return{changes:r,selection:z.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof hg?t:hg.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return Xh.of(t.split(this.facet(e.lineSeparator)||fg))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Bg(this,t),Vg(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof jg&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:z.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=Rg.resolve(t.extensions||[],new Map),r=t.doc instanceof Xh?t.doc:Xh.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||fg)),i=t.selection?t.selection instanceof z?t.selection:z.single(t.selection.anchor,t.selection.head):z.single(0);return Cg(i,r.length),n.staticFacet(Ug)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
|
15
|
+
`}get readOnly(){return this.facet(Jg)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Hg))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return f_(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=sg(t,a,!1);if(i(t.slice(e,a))!=c_.Word)break;a=e}for(;o<r;){let e=sg(t,o);if(i(t.slice(o,e))!=c_.Word)break;o=e}return a==o?null:z.range(a+n,o+n)}};p_.allowMultipleSelections=Ug,p_.tabSize=B.define({combine:e=>e.length?e[0]:4}),p_.lineSeparator=Wg,p_.readOnly=Jg,p_.phrases=B.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),p_.languageData=Hg,p_.changeFilter=Gg,p_.transactionFilter=Kg,p_.transactionExtender=qg,Ig.reconfigure=Qg.define();function m_(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(!(a===i||i===void 0))if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var h_=class{eq(e){return this==e}range(e,t=e){return __.create(e,t,this)}};h_.prototype.startSide=h_.prototype.endSide=0,h_.prototype.point=!1,h_.prototype.mapMode=pg.TrackDel;function g_(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var __=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function v_(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var y_=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},b_=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(v_)),this.isEmpty)return n.length?e.of(n):this;let s=new w_(this,null,-1).goto(0),c=0,l=[],u=new S_;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(__.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return T_.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return T_.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=C_(a,o,n),c=new D_(a,s,i),l=new D_(o,s,i);n.iterGaps((e,t,n)=>O_(c,e,l,t,n,r)),n.empty&&n.length==0&&O_(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=999999999;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=C_(i,a),s=new D_(i,o,0).goto(n),c=new D_(a,o,0).goto(n);for(;;){if(s.to!=c.to||!k_(s.active,c.active)||s.point&&(!c.point||!g_(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new D_(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new S_;for(let r of e instanceof __?[e]:t?x_(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};b_.empty=new b_([],[],null,-1);function x_(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(v_(t,r)>0)return e.slice().sort(v_);t=r}return e}b_.empty.nextLayer=b_.empty;var S_=class e{finishChunk(e){this.chunks.push(new y_(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||=new e).add(t,n,r)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(b_.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=b_.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function C_(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var w_=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},T_=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new w_(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)E_(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)E_(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),E_(this.heap,0)}}};function E_(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var D_=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=T_.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){A_(this.active,e),A_(this.activeTo,e),A_(this.activeRank,e),this.minActive=M_(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;j_(this.active,t,n),j_(this.activeTo,t,r),j_(this.activeRank,t,i),e&&j_(e,t,this.cursor.from),this.minActive=M_(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&A_(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function O_(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&g_(e.point,n.point)&&k_(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!k_(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function k_(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!g_(e[n],t[n]))return!1;return!0}function A_(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function j_(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function M_(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function N_(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=sg(e,i));return r}function P_(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=sg(e,r)}return r===!0?-1:e.length}var F_=`ͼ`,I_=typeof Symbol>`u`?`__`+F_:Symbol.for(F_),L_=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),R_=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},z_=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
|
|
16
|
+
`)}static newName(){let e=R_[I_]||1;return R_[I_]=e+1,F_+e.toString(36)}static mount(e,t,n){let r=e[L_],i=n&&n.nonce;r?i&&r.setNonce(i):r=new V_(e,i),r.mount(Array.isArray(t)?t:[t],e)}},B_=new Map,V_=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=B_.get(n);if(t)return e[L_]=t;this.sheet=new r.CSSStyleSheet,B_.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[L_]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
|
17
|
+
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},H_={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},U_={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},W_=typeof navigator<`u`&&/Mac/.test(navigator.platform),G_=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(K_=0;K_<10;K_++)H_[48+K_]=H_[96+K_]=String(K_);var K_;for(K_=1;K_<=24;K_++)H_[K_+111]=`F`+K_;var K_;for(K_=65;K_<=90;K_++)H_[K_]=String.fromCharCode(K_+32),U_[K_]=String.fromCharCode(K_);var K_;for(q_ in H_)U_.hasOwnProperty(q_)||(U_[q_]=H_[q_]);var q_;function J_(e){var t=!(W_&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||G_&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?U_:H_)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Y_=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},X_=typeof document<`u`?document:{documentElement:{style:{}}},Z_=/Edge\/(\d+)/.exec(Y_.userAgent),Q_=/MSIE \d/.test(Y_.userAgent),$_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Y_.userAgent),ev=!!(Q_||$_||Z_),tv=!ev&&/gecko\/(\d+)/i.test(Y_.userAgent),nv=!ev&&/Chrome\/(\d+)/.exec(Y_.userAgent),rv=`webkitFontSmoothing`in X_.documentElement.style,iv=!ev&&/Apple Computer/.test(Y_.vendor),av=iv&&(/Mobile\/\w+/.test(Y_.userAgent)||Y_.maxTouchPoints>2),V={mac:av||/Mac/.test(Y_.platform),windows:/Win/.test(Y_.platform),linux:/Linux|X11/.test(Y_.platform),ie:ev,ie_version:Q_?X_.documentMode||6:$_?+$_[1]:Z_?+Z_[1]:0,gecko:tv,gecko_version:tv?+(/Firefox\/(\d+)/.exec(Y_.userAgent)||[0,0])[1]:0,chrome:!!nv,chrome_version:nv?+nv[1]:0,ios:av,android:/Android\b/.test(Y_.userAgent),webkit:rv,webkit_version:rv?+(/\bAppleWebKit\/(\d+)/.exec(Y_.userAgent)||[0,0])[1]:0,safari:iv,safari_version:iv?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Y_.userAgent)||[0,0])[1]:0,tabSize:X_.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function ov(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var sv=Object.create(null);function cv(e,t,n){if(e==t)return!0;e||=sv,t||=sv;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function lv(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function uv(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function dv(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var fv=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},pv=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(pv||={}),mv=class extends h_{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new hv(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new _v(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=vv(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new _v(e,n,r,t,e.widget||null,!0)}static line(e){return new gv(e)}static set(e,t=!1){return b_.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};mv.none=b_.empty;var hv=class e extends mv{constructor(e){let{start:t,end:n}=vv(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?ov(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||sv}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&cv(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};hv.prototype.point=!1;var gv=class e extends mv{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&cv(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};gv.prototype.mapMode=pg.TrackBefore,gv.prototype.point=!0;var _v=class e extends mv{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?pg.TrackBefore:pg.TrackAfter:pg.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?pv.WidgetBefore:pv.WidgetAfter:pv.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&yv(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};_v.prototype.point=!0;function vv(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function yv(e,t){return e==t||!!(e&&t&&e.compare(t))}function bv(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var xv=class e extends h_{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&cv(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||sv)}static set(e,t=!1){return b_.of(e,t)}};xv.prototype.startSide=xv.prototype.endSide=-1;function Sv(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Cv(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function wv(e,t){if(!t.anchorNode)return!1;try{return Cv(e,t.anchorNode)}catch{return!1}}function Tv(e){return e.nodeType==3?Bv(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function Ev(e,t,n,r){return n?kv(e,t,n,r,-1)||kv(e,t,n,r,1):!1}function Dv(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Ov(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function kv(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Av(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=Dv(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?Av(e):0}else return!1}}function Av(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function jv(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Mv(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Nv(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Pv(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=Mv(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=Nv(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function Fv(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var Iv=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Av(t):0),n,Math.min(e.focusOffset,n?Av(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},Lv=null;V.safari&&V.safari_version>=26&&(Lv=!1);function Rv(e){if(e.setActive)return e.setActive();if(Lv)return e.focus(Lv);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(Lv==null?{get preventScroll(){return Lv={preventScroll:!0},!0}}:void 0),!Lv){Lv=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}var zv;function Bv(e,t,n=t){let r=zv||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function Vv(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function Hv(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function Uv(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Av(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=Av(n))}else if(n==e)return!0;else r=Dv(n),n=n.parentNode}function Wv(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Gv(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=Av(n)}else if(n.parentNode&&!Ov(n))r=Dv(n),n=n.parentNode;else return null}function Kv(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Ov(n))r=Dv(n)+1,n=n.parentNode;else return null}var qv=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,Dv(t),n)}static after(t,n){return new e(t.parentNode,Dv(t)+1,n)}},Jv=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(Jv||={}),Yv=Jv.LTR,Xv=Jv.RTL;function Zv(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var Qv=Zv(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),$v=Zv(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),ey=Object.create(null),ty=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);ey[t]=n,ey[n]=-t}function ny(e){return e<=247?Qv[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?$v[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var ry=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,iy=class{get dir(){return this.level%2?Xv:Yv}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function ay(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!ay(r.inner,i.inner))return!1}return!0}var oy=[];function sy(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=ny(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),oy[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=oy[e];if(i==128)e<s-1&&t==oy[e+1]&&t&24?i=oy[e]=t:oy[e]=256;else if(i==64){let i=e+1;for(;i<s&&oy[i]==64;)i++;let a=e&&t==8||i<n&&oy[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)oy[t]=a;e=i-1}else i==8&&r==1&&(oy[e]=1);t=i,i&7&&(r=i)}}}function cy(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=ey[n=e.charCodeAt(t)])if(r<0){for(let e=s-3;e>=0;e-=3)if(ty[e+1]==-r){let n=ty[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(oy[t]=oy[ty[e]]=r),s=e;break}}else if(ty.length==189)break;else ty[s++]=t,ty[s++]=n,ty[s++]=c;else if((o=oy[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=ty[t+2];if(n&2)break;if(e)ty[t+2]|=2;else{if(n&4)break;ty[t+2]|=4}}}}}function ly(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=oy[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(oy[o]==256)o++;else break;let l=a==1,u=l==((o<t?oy[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),oy[--t]=u;c=o}else a=o,c++}}}function uy(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=oy[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(oy[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new iy(c,m.from,f)),dy(e,m.direction==Yv==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?oy[p]!=s:oy[p]==s))break;else p++;d?uy(e,c,p,r+1,i,d,o):c<p&&o.push(new iy(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=oy[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(oy[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new iy(m.to,c,f)),dy(e,m.direction==Yv==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?oy[p-1]!=s:oy[p-1]==s))break;else p--;d?uy(e,p,c,r+1,i,d,o):p<c&&o.push(new iy(p,c,f)),c=p}}function dy(e,t,n,r,i,a,o){let s=t%2?2:1;sy(e,i,a,r,s),cy(e,i,a,r,s),ly(i,a,r,s),uy(e,i,a,t,n,r,o)}function fy(e,t,n){if(!e)return[new iy(0,0,+(t==Xv))];if(t==Yv&&!n.length&&!ry.test(e))return py(e.length);if(n.length)for(;e.length>oy.length;)oy[oy.length]=256;let r=[],i=t==Yv?0:1;return dy(e,i,i,n,0,e.length,r),r}function py(e){return[new iy(0,e,0)]}var my=``;function hy(e,t,n,r,i){let a=r.head-e.from,o=iy.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=sg(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),my=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?z.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):z.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function gy(e,t,n){for(let r=t;r<n;r++){let t=ny(e.charCodeAt(r));if(t==1)return Yv;if(t==2||t==4)return Xv}return Yv}var _y=B.define(),vy=B.define(),yy=B.define(),by=B.define(),xy=B.define(),Sy=B.define(),Cy=B.define(),wy=B.define(),Ty=B.define(),Ey=B.define({combine:e=>e.some(e=>e)}),Dy=B.define({combine:e=>e.some(e=>e)}),Oy=B.define(),ky=class e{constructor(e,t=`nearest`,n=`nearest`,r=5,i=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(z.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Ay=Qg.define({map:(e,t)=>e.map(t)}),jy=Qg.define();function My(e,t,n){let r=e.facet(by);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Ny=B.define({combine:e=>e.length?e[0]:!0}),Py=0,Fy=B.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),Iy=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Fy.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Fy.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(Py++,t,r,i,e=>{let t=[];return o&&t.push(By.of(t=>{let n=t.plugin(e);return n?o(n):mv.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},Ly=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){My(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(My(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){My(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},Ry=B.define(),zy=B.define(),By=B.define(),Vy=B.define(),Hy=B.define(),Uy=B.define(),Wy=B.define();function Gy(e,t){let n=e.state.facet(Wy);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return b_.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=gy(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var Ky=B.define();function qy(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(Ky)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Jy=B.define(),Yy=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},Xy=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=hg.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Yy(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Zy=[],Qy=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Zy}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&lv(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=Dv(this.dom),r=this.length?e>0:t>0;return new qv(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof tb)return e;return null}static get(e){return e.cmTile}},$y=class extends Qy{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=eb(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=eb(r);this.length=a}};function eb(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var tb=class extends $y{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Qy.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof nb)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},nb=class e extends $y{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},rb=class e extends $y{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0||n&&ab(a,d)))&&(f>c||d.flags&32)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t):ib(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new qv(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new qv(e.dom,0);e==n.tile&&(a=!0)}}return new qv(this.dom,0)}};function ib(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Tv(t);return n[n.length-1]||null}function ab(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var ob=class e extends $y{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},sb=class e extends Qy{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let n=this.dom.nodeValue.length;e>n&&(e=n);let r=e,i=e,a=0;e==0&&t<0||e==n&&t>=0?V.chrome||V.gecko||(e?(r--,a=1):i<n&&(i++,a=-1)):t<0?r--:i<n&&i++;let o=Bv(this.dom,r,i).getClientRects();if(!o.length)return null;let s=o[(a?a<0:t>=0)?0:o.length-1];return V.safari&&!a&&s.width==0&&(s=Array.prototype.find.call(o,e=>e.width)||s),a?jv(s,a<0):s||null}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},cb=class e extends Qy{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return jv(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return jv(n,!r)}}get overrideDOMText(){if(!this.length)return Xh.empty;let{root:e}=this;if(!e)return Xh.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},lb=class extends Qy{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Xh.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},ub=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite())if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(e){let t=Math.min(e,r.length-i);n&&n.skip(r,i,i+t),e-=t,i+=t}else break;else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},db=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},fb=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new sb(a.dom,a.text+e);t.parent=i}else i.append(r||sb.of(e,this.cache.find(sb)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?Sb(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof ob&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(Sb(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=Qy.get(n.dom);e&&e.setDOM(Sb(n.dom))}let e=ob.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=Qy.get(e.text);i&&this.cache.reused.set(i,2);let a=new sb(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=yb;let n=rb.start(e,t||this.cache.find(rb)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof ob&&a.mark.eq(i))n=a,t--;else{let e=ob.of(i,this.cache.find(ob,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!_b(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(V.ios&&_b(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(wb,0,32)||new cb(wb.toDOM(),0,wb,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new db(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof nb&&n.wrapper.eq(t.wrapper))e=n;else{let n=nb.of(t.wrapper,this.cache.find(nb,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(lb,void 0,1);return n&&(n.flags=t),n||new lb(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},pb=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},mb=[cb,rb,sb,ob,lb,nb,tb];for(let e=0;e<mb.length;e++)mb[e].bucket=e;var hb=class{constructor(e){this.view=e,this.buckets=mb.map(()=>[]),this.index=mb.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=i.length-1;e>=0;e--){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new cb(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},gb=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new hb(e),this.text=new pb(e.state.doc),this.builder=new fb(this.cache,new tb(e,e.contentDOM),b_.iter(n)),this.cache.reused.set(t,2),this.old=new ub(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=xb(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?cb.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof lb)this.cache.add(e);else if(e instanceof ob)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof ob&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof ob&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=b_.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof _v){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?Cb.block:Cb.inline),c=vb(a),l=this.cache.findWidget(i,t-e,c)||cb.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=bb(n,a);t>e&&this.text.skip(t-e)},span:(e,t,i,a)=>{for(let o=e;o<t;){let s=this.text.next(Math.min(512,t-o));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),o++):(r.ensureLine(n),r.addText(s,i,o==e?a:i.length),o+=s.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=Qy.get(r);if(r==this.view.contentDOM)break;e instanceof ob?t.push(e):e?.isLine()?n=e:e instanceof nb||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new rb(r,yb):n||t.push(ob.of(new hv({tagName:r.nodeName.toLowerCase(),attributes:dv(r)}),r)))}return{line:n,marks:t}}};function _b(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function vb(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var yb={class:`cm-line`};function bb(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&ov(n,e),r&&(e.class+=` `+r),e)}function xb(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof ob&&t.push(r.mark)}return t}function Sb(e){let t=Qy.get(e);return t&&t.setDOM(e.cloneNode()),e}var Cb=class extends fv{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Cb.inline=new Cb(`span`),Cb.block=new Cb(`div`);var wb=new class extends fv{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},Tb=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=mv.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new tb(e,e.contentDOM),this.updateInner([new Yy(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!Ib(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?kb(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Yy(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(V.ie||V.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=Mb(i,this.decorations,e.changes);o.length&&(t=Yy.extendWithRanges(t,o));let s=Pb(a,this.blockWrappers,e.changes);return s.length&&(t=Yy.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new gb(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Qy.get(t.text)&&r.cache.reused.set(Qy.get(t.text),2),this.tile=r.run(e,t),Eb(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=V.chrome||V.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof Lb&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(jy)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Ny)||n.tabIndex>-1)&&wv(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),V.gecko&&s.empty&&!this.hasComposition&&Db(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new qv(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Ev(c.node,c.offset,u.anchorNode,u.anchorOffset)||!Ev(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{V.android&&V.chrome&&n.contains(u.focusNode)&&Fb(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=Sv(this.view.root);if(e)if(s.empty){if(V.gecko){let e=Ab(c.node,c.offset);if(e&&e!=3){let t=(e==1?Gv:Kv)(c.node,c.offset);t&&(c=new qv(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new qv(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new qv(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ev(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Sv(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=Av(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!Qy.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof Lb?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=sg(e.text,t);if(n==t)return null;let r=Bv(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==Jv.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof nb)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?Tv(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?Jv.RTL:Jv.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=Tv(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=Tv(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(mv.replace({widget:new Lb(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return mv.set(e)}updateDeco(){let e=1,t=this.view.state.facet(By).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(Hy).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(b_.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Vy).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(Oy))try{if(t(this.view,e.range,e))return!0}catch(e){My(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc??(t.empty?0:t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=qy(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(Pv(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==Jv.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);e&&e.dom.scrollIntoView({block:`nearest`})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Eb(this.tile)}};function Eb(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)Eb(n,t)}}function Db(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function Ob(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Gv(n.focusNode,n.focusOffset),i=Kv(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=Qy.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=Qy.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function kb(e,t,n){let r=Ob(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Yy(c.mapPos(a),c.mapPos(o),a,o),text:i}}function Ab(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var jb=class{constructor(){this.changes=[]}compareRange(e,t){bv(e,t,this.changes)}comparePoint(e,t){bv(e,t,this.changes)}boundChange(e){bv(e,e,this.changes)}};function Mb(e,t,n){let r=new jb;return b_.compare(e,t,n,r),r.changes}var Nb=class{constructor(){this.changes=[]}compareRange(e,t){bv(e,t,this.changes)}comparePoint(){}boundChange(e){bv(e,e,this.changes)}};function Pb(e,t,n){let r=new Nb;return b_.compare(e,t,n,r),r.changes}function Fb(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function Ib(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var Lb=class extends fv{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function Rb(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return z.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=sg(i.text,a,!1):s=sg(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=sg(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=sg(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return z.range(o+i.from,s+i.from)}function zb(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+P_(o,a,e.state.tabSize)}function Bb(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==pv.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function Vb(e,t,n,r){let i=Bb(e,t.head,t.assoc||-1),a=!r||i.type!=pv.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==Jv.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return z.cursor(o,n?-1:1)}return z.cursor(n?i.to:i.from,n?-1:1)}function Hb(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=hy(i,a,o,s,n),l=my;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
|
18
|
+
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function Ub(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==c_.Space&&(i=t),i==t}}function Wb(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return z.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=Yb(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return z.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return z.cursor(i.pos,i.assoc,void 0,o)}}function Gb(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function Kb(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=Gb(e,i.from,0);t!=i.from&&(a=z.cursor(t,-1))}else{let t=Gb(e,i.from,-1),n=Gb(e,i.to,1);(t!=i.from||n!=i.to)&&(a=z.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?z.create(n,t.mainIndex):t}function qb(e,t,n){let r=Gb(e.state.facet(Uy).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:z.cursor(r,r<n.from?1:-1)}var Jb=class{constructor(e,t){this.pos=e,this.assoc=t}};function Yb(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new Jb(0,1);if(c>e.viewState.docHeight)return new Jb(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==pv.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==pv.Text){let t=zb(e,i,l,o,s);return new Jb(t,t==l.from?1:-1)}}if(l.type!=pv.Text)return c<(l.top+l.bottom)/2?new Jb(l.from,1):new Jb(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new Xb(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var Xb=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[iy.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[iy.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),o,s,c=-1,l=1e9,u;search:for(;n<r;){let d=r-n,f=n+r>>1;adjust:if(i.has(f)){let e=n+Math.floor(Math.random()*d);for(let t=0;t<d;t++){if(!i.has(e)){f=e;break adjust}e++,e==r&&(e=n)}break search}i.add(f);let p=t(f);if(p)for(let t=0;t<p.length;t++){let i=p[t],d=0;if(!(i.width==0&&p.length>1)){if(i.bottom<this.y)(!o||o.bottom<i.bottom)&&(o=i),d=1;else if(i.top>this.y)(!s||s.top>i.top)&&(s=i),d=-1;else{let e=i.left>this.x?this.x-i.left:i.right<this.x?this.x-i.right:0,t=Math.abs(e);t<l&&(c=f,l=t,u=i),e&&(d=e<0==(this.baseDir==Jv.LTR)?-1:1)}d==-1&&(!a||this.baseDirAt(e[f],1))?r=f:d==1&&(!a||this.baseDirAt(e[f+1],-1))&&(n=f+1)}}}if(!u){let n=o&&(!s||this.y-o.bottom<s.top-this.y)?o:s;return this.y=(n.top+n.bottom)/2,this.scan(e,t)}let d=(a?this.dirAt(e[c],1):this.baseDir)==Jv.LTR;return{i:c,after:this.x>(u.left+u.right)/2==d}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=sg(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return Bv(e.dom,i,a).getClientRects()});return r.after?new Jb(n[r.i+1],-1):new Jb(n[r.i],1)}scanTile(e,t){if(!e.length)return new Jb(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:Bv(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Jb(n[r.i+1],-1):new Jb(a,1)}},Zb=``,Qb=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(p_.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Zb}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=Qy.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=Qy.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:Ov(r))||Ov(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!ex(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=Qy.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+($b(e,n.node,n.offset)?t:0))}};function $b(e,t,n){for(;;){if(!t||n<Av(t))return!1;if(t==e)return!0;n=Dv(t)+1,t=t.parentNode}}function ex(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=Qy.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var tx=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},nx=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=rx(e.docView.tile,t,n,0))){let t=i||a?[]:cx(e),n=new Qb(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=lx(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!Cv(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!Cv(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((V.ios||V.chrome)&&o.main.empty&&n!=r&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(z.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=z.create([z.cursor(n,r)])}else this.newSel=z.single(r,n)}}};function rx(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return rx(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}else if(e.isText())return{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling};else return null}function ix(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||V.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,Zb),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:Xh.of(t.text.slice(a.from-e,u).split(Zb))}:(d=sx(l,t.text,s-e,c))&&(V.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==Zb+Zb&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:Xh.of(t.text.slice(d.from,d.toB).split(Zb))})}else r&&(!e.hasFocus&&i.facet(Ny)||ux(r,a))&&(r=null);if(!n&&!r)return!1;if((V.mac||V.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=z.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Xh.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:V.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
19
|
+
`&&e.lineWrapping&&(r&&=z.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:Xh.of([` `])}),n)return ax(e,n,r,o);if(r&&!ux(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=Kb(i.facet(Uy).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function ax(e,t,n,r=-1){if(V.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(V.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&Vv(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&Vv(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Vv(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=ox(e,t,n);return e.state.facet(Sy).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function ox(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=Gb(i.facet(Uy).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:z.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&Ob(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?z.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function sx(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function cx(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new tx(n,r)),(i!=n||a!=r)&&t.push(new tx(i,a))),t}function lx(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?z.single(n+t,r+t):null}function ux(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var dx=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,V.safari&&e.contentDOM.addEventListener(`input`,()=>null),V.gecko&&qx(e.contentDOM.ownerDocument)}handleEvent(e){!wx(this.view,e)||this.ignoreDuringComposition(e)||e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=px(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&gx.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),V.android&&V.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return V.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=mx.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||hx.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Vv(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:V.safari&&!V.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function fx(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){My(n.state,e)}}}function px(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(fx(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(fx(t.value,r))}}for(let e in Tx)n(e).handlers.push(Tx[e]);for(let e in Ex)n(e).observers.push(Ex[e]);return t}var mx=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],hx=`dthko`,gx=[16,17,18,20,91,92,224,225],_x=6;function vx(e){return Math.max(0,e)*.7+8}function yx(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var bx=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Fv(e.contentDOM),this.atoms=e.state.facet(Uy).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(p_.allowMultipleSelections)&&xx(e,t),this.dragging=Cx(e,t)&&Ix(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&yx(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=qy(this.view);e.clientX-s.left<=r+_x?t=-vx(r-e.clientX):e.clientX+s.right>=a-_x&&(t=vx(e.clientX-a)),e.clientY-s.top<=i+_x?n=-vx(i-e.clientY):e.clientY+s.bottom>=o-_x&&(n=vx(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Kb(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function xx(e,t){let n=e.state.facet(_y);return n.length?n[0](t):V.mac?t.metaKey:t.ctrlKey}function Sx(e,t){let n=e.state.facet(vy);return n.length?n[0](t):V.mac?!t.altKey:!t.ctrlKey}function Cx(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Sv(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function wx(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Qy.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Tx=Object.create(null),Ex=Object.create(null),Dx=V.ie&&V.ie_version<15||V.ios&&V.webkit_version<604;function Ox(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),Ax(e,n.value)},50)}function kx(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function Ax(e,t){t=kx(e.state,wy,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(Hx!=null&&n.selection.ranges.every(e=>e.empty)&&Hx==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:z.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:z.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}Ex.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Ex.wheel=Ex.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},Tx.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),Ex.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},Ex.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},Tx.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(yy))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=Lx(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new bx(e,t,n,r)),r&&e.observer.ignore(()=>{Rv(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function jx(e,t,n,r){if(r==1)return z.cursor(t,n);if(r==2)return Rb(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,z.range(a,o)}}var Mx=V.ie&&V.ie_version<=11,Nx=null,Px=0,Fx=0;function Ix(e){if(!Mx)return e.detail;let t=Nx,n=Fx;return Nx=e,Fx=Date.now(),Px=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Px+1)%3:1}function Lx(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=Ix(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=jx(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=jx(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?z.range(i,a,l.assoc):z.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=Rx(i,s.pos))?c:o?i.addRange(l):z.create([l])}}}function Rx(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return z.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}Tx.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=z.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,kx(e.state,Ty,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},Tx.dragend=e=>(e.inputState.draggedContent=null,!1);function zx(e,t,n,r){if(n=kx(e.state,wy,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&Sx(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}Tx.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&zx(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}else{let n=t.dataTransfer.getData(`Text`);if(n)return zx(e,t,n,!0),!0}return!1},Tx.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Dx?null:t.clipboardData;return n?(Ax(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(Ox(e),!1)};function Bx(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function Vx(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:kx(e,Ty,t.join(e.lineBreak)),ranges:n,linewise:r}}var Hx=null;Tx.copy=Tx.cut=(e,t)=>{if(!wv(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=Vx(e.state);if(!n&&!i)return!1;Hx=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=Dx?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(Bx(e,n),!1)};var Ux=Yg.define();function Wx(e,t){let n=[];for(let r of e.facet(Cy)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:Ux.of(!0)}):null}function Gx(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Wx(e.state,t);n?e.dispatch(n):e.update([])}},10)}Ex.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Gx(e)},Ex.blur=e=>{e.observer.clearSelectionRange(),Gx(e)},Ex.compositionstart=Ex.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},Ex.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,V.chrome&&V.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},Ex.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Tx.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return ax(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(V.chrome&&V.android&&(n=mx.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return V.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),V.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>Ex.compositionend(e,t),20),!1};var Kx=new Set;function qx(e){Kx.has(e)||(Kx.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var Jx=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],Yx=!1;function Xx(){Yx=!1}var Zx=class{constructor(e){this.lineWrapping=e,this.doc=Xh.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Jx.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=Jx.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},Qx=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},$x=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?pv.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof _v?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},eS=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(eS||={}),tS=.001,nS=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>tS&&(Yx=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,eS.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,eS.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,eS.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=dS.build(n.setDoc(a),e,l,u);i=rS(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new oS(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break;else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new cS(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function rS(e,t){return e==t?e:(e.constructor!=t.constructor&&(Yx=!0),t)}nS.prototype.size=1;var iS=mv.replace({}),aS=class extends nS{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new $x(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new $x(r,0,n,this.spaceAbove,iS):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,eS.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},oS=class e extends aS{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new $x(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof sS&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof sS?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):nS.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},sS=class e extends nS{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new $x(a.from,a.length,l,c,0)}else{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new $x(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==eS.ByHeight)return this.blockAt(e,n,r,i);if(t==eS.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new $x(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new $x(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new $x(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return nS.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=tS&&(s=-2);let c=new oS(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=nS.of(r);return(s<0||Math.abs(c.height-this.height)>=tS||Math.abs(s-this.heightMetrics(t,n).perLine)>=tS)&&(Yx=!0),rS(this,c)}else (r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},cS=class extends nS{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==eS.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==eS.ByPosNoHeight?eS.ByPosNoHeight:eS.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,eS.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&lS(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),lS(i,e)}return nS.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?nS.of(this.break?[e,null,t]:[e,t]):(this.left=rS(this.left,e),this.right=rS(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function lS(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof sS&&(r=e[t+1])instanceof sS&&e.splice(t-1,3,new sS(n.length+1+r.length))}var uS=5,dS=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof oS?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new oS(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new aS(a,r,n)):(a||i||r>=uS)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new oS(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new sS(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof oS)return e;let t=new oS(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof oS)&&!this.isCovered?this.nodes.push(new oS(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof oS&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return b_.spans(n,r,i,a,0),a.finish(r)}};function fS(e,t,n){let r=new pS;return b_.compare(e,t,n,r,0),r.changes}var pS=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&bv(e,t,this.changes,5)}};function mS(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function hS(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function gS(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var _S=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return mv.replace({widget:new vS(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},vS=class extends fv{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},yS=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=TS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Jv.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(zy).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new Zx(n),this.stateDeco=ES(t),this.heightMap=nS.empty().applyChanges(this.stateDeco,Xh.empty,this.heightOracle.setDoc(t.doc),[new Yy(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=mv.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new bS(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?TS:new DS(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(OS(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=ES(this.state);let r=e.changedRanges,i=Yy.extendWithRanges(r,fS(n,this.stateDeco,e?e.changes:hg.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Xx(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||Yx)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Dy)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?Jv.RTL:Jv.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=Nv(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=Fv(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=Wv(this.scrollParent||e.win);let m=(this.printing?gS:mS)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!hS(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),Xx();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?nS.empty().applyChanges(this.stateDeco,Xh.empty,this.heightOracle,[new Yy(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Qx(n.from,i))}Yx&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new bS(r.lineAt(a-n*1e3,eS.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,eS.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,eS.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new bS(r.lineAt(o-1e3/2,eS.ByHeight,i,0,0).from,r.lineAt(o+n+1e3/2,eS.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new bS(this.heightMap.lineAt(n,eS.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,eS.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,eS.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,eS.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new _S(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=Jv.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=wS(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(z.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new _S(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=pv.Text)return;let i=xS(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=CS(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=SS(i,n),l=SS(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=CS(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=SS(i,f),l=SS(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=CS(r,n)-CS(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){_S.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=mv.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];b_.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||OS(this.heightMap.lineAt(e,eS.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||OS(this.heightMap.lineAt(this.scaler.fromDOM(e),eS.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return OS(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},bS=class{constructor(e,t){this.from=e,this.to=t}};function xS(e,t,n){let r=[],i=e,a=0;return b_.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function SS({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function CS(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function wS(e,t){for(let n of e)if(t(n))return n}var TS={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function ES(e){let t=e.facet(By).filter(e=>typeof e!=`function`),n=e.facet(Hy).filter(e=>typeof e!=`function`);return n.length&&t.push(b_.join(n)),t}var DS=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,eS.ByPos,e,0,0).top,o=t.lineAt(i,eS.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to):!1}};function OS(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new $x(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>OS(e,t)):e._content)}var kS=B.define({combine:e=>e.join(` `)}),AS=B.define({combine:e=>e.indexOf(!0)>-1}),jS=z_.newName(),MS=z_.newName(),NS=z_.newName(),PS={"&light":`.`+MS,"&dark":`.`+NS};function FS(e,t,n){return new z_(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var IS=FS(`.`+jS,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{backgroundImage:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)`,backgroundPosition:`center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},PS),LS={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},RS=V.ie&&V.ie_version<=11,zS=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Iv,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(V.ie&&V.ie_version<=11||V.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&V.android&&e.constructor.EDIT_CONTEXT!==!1&&!(V.chrome&&V.chrome_version<126)&&(this.editContext=new US(e),e.state.facet(Ny)&&(e.contentDOM.editContext=this.editContext.editContext)),RS&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type==`change`||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Ny)?n.root.activeElement!=this.dom:!wv(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(V.ie&&V.ie_version<=11||V.android&&V.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Ev(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Sv(e.root);if(!t)return!1;let n=V.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&HS(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=wv(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Uv(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,LS),RS&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),RS&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Vv(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&wv(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new nx(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=ix(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!ux(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=BS(t,e.previousSibling||e.target.previousSibling,-1),r=BS(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type==`characterData`)return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ny)!=e.state.facet(Ny)&&(e.view.contentDOM.editContext=e.state.facet(Ny)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function BS(e,t,n){for(;t;){let r=Qy.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function VS(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return Ev(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function HS(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return VS(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?VS(e,n):null}var US=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=sx(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=z.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));ux(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:Xh.of(n.text.slice(l.from,l.toB).split(`
|
|
20
|
+
`))};if((V.mac||V.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:Xh.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);ax(e,u,z.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(mv.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:jy.of(mv.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=Sv(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},H=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Hv(e.parent)||document,this.viewState=new yS(this,e.state||p_.create(e)),e.scrollTo&&e.scrollTo.is(Ay)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Fy).map(e=>new Ly(e));for(let e of this.plugins)e.update(this);this.observer=new zS(this),this.inputState=new dx(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Tb(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof $g?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let t=!1,n=!1,r,i=this.state;for(let t of e){if(t.startState!=i)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);i=t.state}if(this.destroyed){this.viewState.state=i;return}let a=this.hasFocus,o=0,s=null;e.some(e=>e.annotation(Ux))?(this.inputState.notifiedFocused=a,o=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,s=Wx(i,a),s||(o=1));let c=this.observer.delayedAndroidKey,l=null;if(c?(this.observer.clearDelayedAndroidKey(),l=this.observer.readChange(),(l&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(l=null)):this.observer.clear(),i.facet(p_.phrases)!=this.state.facet(p_.phrases))return this.setState(i);r=Xy.create(this,i,e),r.flags|=o;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&=u.map(t.changes),t.scrollIntoView){let{main:e}=t.state.selection;u=new ky(e.empty?e:z.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Ay)&&(u=e.value.clip(this.state))}this.viewState.update(r,u),this.bidiCache=KS.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(Jy)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(r.startState.facet(kS)!=r.state.facet(kS)&&(this.viewState.mustMeasureContent=!0),(t||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let e of this.state.facet(xy))try{e(r)}catch(e){My(this.state,e,`update listener`)}(s||l)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),l&&!ix(this,l)&&c.force&&Vv(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new yS(this,e),this.plugins=e.facet(Fy).map(e=>new Ly(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Tb(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Fy),n=e.state.facet(Fy);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new Ly(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){My(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0)if(Wv(n||this.win))i=-1,a=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}this.updateState=1;let o=this.viewState.measure();if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let s=[];o&4||([this.measureRequests,s]=[s,this.measureRequests]);let c=s.map(e=>{try{return e.read(this)}catch(e){return My(this.state,e),GS}}),l=Xy.create(this,this.state,[]),u=!1;l.flags|=o,t?t.flags|=o:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),u=this.docView.update(l),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(c[e]!=GS)try{let t=s[e];t.write&&t.write(c[e],this)}catch(e){My(this.state,e)}if(u&&this.docView.updateSelection(!0),!l.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let e=((i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-a)/this.scaleY;if((e>1||e<-1)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(xy))e(t)}get themeClasses(){return jS+` `+(this.state.facet(AS)?NS:MS)+` `+this.state.facet(kS)}updateAttrs(){let e=qS(this,Ry,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Ny)?`true`:`false`,class:`cm-content`,style:`${V.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),qS(this,zy,t);let n=this.observer.ignore(()=>{let n=uv(this.contentDOM,this.contentAttrs,t),r=uv(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Jy);let t=this.state.facet(e.cspNonce);z_.mount(this.root,this.styleModules.concat(IS).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return qb(this,e,Hb(this,e,t,n))}moveByGroup(e,t){return qb(this,e,Hb(this,e,t,t=>Ub(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return z.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return Vb(this,e,t,n)}moveVertically(e,t,n){return qb(this,e,Wb(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Yb(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Yb(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r),a=i[iy.find(i,e-r.from,-1,t)];return jv(n,a.dir==Jv.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Ey)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>WS)return py(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||ay(r.isolates,n=Gy(this,e))))return r.order;n||=Gy(this,e);let r=fy(e.text,t,n);return this.bidiCache.push(new KS(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||V.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Rv(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Ay.of(new ky(typeof e==`number`?z.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Ay.of(new ky(z.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Iy.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Iy.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=z_.newName(),r=[kS.of(n),Jy.of(FS(`.${n}`,e))];return t&&t.dark&&r.push(AS.of(!0)),r}static baseTheme(e){return Pg.lowest(Jy.of(FS(`.`+jS,e,PS)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&Qy.get(t)||Qy.get(e))?.root?.view||null}};H.styleModule=Jy,H.inputHandler=Sy,H.clipboardInputFilter=wy,H.clipboardOutputFilter=Ty,H.scrollHandler=Oy,H.focusChangeEffect=Cy,H.perLineTextDirection=Ey,H.exceptionSink=by,H.updateListener=xy,H.editable=Ny,H.mouseSelectionStyle=yy,H.dragMovesSelection=vy,H.clickAddsSelectionRange=_y,H.decorations=By,H.blockWrappers=Vy,H.outerDecorations=Hy,H.atomicRanges=Uy,H.bidiIsolatedRanges=Wy,H.scrollMargins=Ky,H.darkTheme=AS,H.cspNonce=B.define({combine:e=>e.length?e[0]:``}),H.contentAttributes=zy,H.editorAttributes=Ry,H.lineWrapping=H.contentAttributes.of({class:`cm-lineWrapping`}),H.announce=Qg.define();var WS=4096,GS={},KS=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:Jv.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function qS(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&ov(a,n)}return n}var JS=V.mac?`mac`:V.windows?`win`:V.linux?`linux`:`key`;function YS(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function XS(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var ZS=Pg.default(H.domEventHandlers({keydown(e,t){return aC(eC(t.state),e,t,`editor`)}})),QS=B.define({enables:ZS}),$S=new WeakMap;function eC(e){let t=e.facet(QS),n=$S.get(t);return n||$S.set(t,n=rC(t.reduce((e,t)=>e.concat(t),[]))),n}var tC=null,nC=4e3;function rC(e,t=JS){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>YS(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=tC={view:t,prefix:n,scope:e};return setTimeout(()=>{tC==r&&(tC=null)},nC),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,iC))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var iC=null;function aC(e,t,n,r){iC=t;let i=J_(t),a=dg(ug(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;tC&&tC.view==n&&tC.scope==r&&(o=tC.prefix+` `,gx.indexOf(t.keyCode)<0&&(c=!0,tC=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+XS(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(V.windows&&t.ctrlKey&&t.altKey)&&!(V.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=H_[t.keyCode])&&p!=i?(d(f[o+XS(p,t,!0)])||t.shiftKey&&(m=U_[t.keyCode])!=i&&m!=p&&d(f[o+XS(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+XS(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),iC=null,s}/x/.unicode;var oC=class extends h_{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};oC.prototype.elementClass=``,oC.prototype.toDOM=void 0,oC.prototype.mapMode=pg.TrackBefore,oC.prototype.startSide=oC.prototype.endSide=-1,oC.prototype.point=!0;var sC=B.define(),cC=B.define(),lC=B.define(),uC=B.define({combine:e=>e.some(e=>e)});function dC(e){let t=[fC];return e&&e.fixed===!1&&t.push(uC.of(!0)),t}var fC=Iy.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(lC).map(t=>new gC(e,t)),this.fixed=!e.state.facet(uC);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(uC)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=b_.iter(this.view.state.facet(sC),this.view.viewport.from),r=[],i=this.gutters.map(e=>new hC(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==pv.Text&&t){mC(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==pv.Text){mC(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(lC),n=e.state.facet(lC),r=e.docChanged||e.heightChanged||e.viewportChanged||!b_.eq(e.startState.facet(sC),e.state.facet(sC),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new gC(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>H.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Jv.LTR?{left:r,right:i}:{right:r,left:i}})});function pC(e){return Array.isArray(e)?e:[e]}function mC(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var hC=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=b_.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new _C(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];mC(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(cC)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},gC=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=pC(t.markers(e)),t.initialSpacer&&(this.spacer=new _C(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=pC(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!b_.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},_C=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),vC(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function vC(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var yC=B.define(),bC=B.define(),xC=B.define({combine(e){return m_(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),SC=class extends oC{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function CC(e,t){return e.state.facet(xC).formatNumber(t,e.state)}var wC=lC.compute([xC],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(yC)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new SC(CC(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(bC)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(xC)!=e.state.facet(xC),initialSpacer(e){return new SC(CC(e,EC(e.state.doc.lines)))},updateSpacer(e,t){let n=CC(t.view,EC(t.view.state.doc.lines));return n==e.number?e:new SC(n)},domEventHandlers:e.facet(xC).domEventHandlers,side:`before`}));function TC(e={}){return[xC.of(e),dC(),wC]}function EC(e){let t=9;for(;t<e;)t=t*10+9;return t}var DC=1024,OC=0,kC=class{constructor(e,t){this.from=e,this.to=t}},U=class{constructor(e={}){this.id=OC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=MC.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};U.closedBy=new U({deserialize:e=>e.split(` `)}),U.openedBy=new U({deserialize:e=>e.split(` `)}),U.group=new U({deserialize:e=>e.split(` `)}),U.isolate=new U({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),U.contextHash=new U({perNode:!0}),U.lookAhead=new U({perNode:!0}),U.mounted=new U({perNode:!0});var AC=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[U.mounted.id]}},jC=Object.create(null),MC=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):jC,r=!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(U.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(U.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};MC.none=new MC(``,Object.create(null),0,8);var NC=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new MC(e.name,r,e.id,e.flags):e)}return new e(n)}},PC=new WeakMap,FC=new WeakMap,IC;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(IC||={});var LC=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=AC.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new ZC(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new ZC(PC.get(this)||this.topNode);return r.moveTo(e,t),PC.set(this,r._tree),r}get topNode(){return new UC(this,0,0,null)}resolve(e,t=0){let n=VC(PC.get(this)||this.topNode,e,t,!1);return PC.set(this,n),n}resolveInner(e,t=0){let n=VC(FC.get(this)||this.topNode,e,t,!0);return FC.set(this,n),n}resolveStack(e,t=0){return XC(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&IC.IncludeAnonymous)>0;for(let e=this.cursor(a|IC.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:nw(MC.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(MC.none,t,n,r)))}static build(e){return $C(e)}};LC.empty=new LC(MC.none,[],[],0);var RC=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},zC=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return MC.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(BC(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function BC(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function VC(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof UC&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:IC.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof UC&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var HC=class{cursor(e=0){return new ZC(this,e)}getChild(e,t=null,n=null){let r=WC(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return WC(this,e,t,n)}resolve(e,t=0){return VC(this,e,t,!1)}resolveInner(e,t=0){return VC(this,e,t,!0)}matchContext(e){return GC(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},UC=class e extends HC{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(!(!(a&IC.EnterBracketed&&l instanceof LC&&(d=AC.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length)&&!BC(i,r,u,u+l.length))){if(l instanceof zC){if(a&IC.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new qC(new KC(o,l,t,u),null,e)}else if(a&IC.IncludeAnonymous||!l.type.isAnonymous||QC(l)){let s;if(!(a&IC.IgnoreMounts)&&(s=AC.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&IC.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&IC.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&IC.IgnoreOverlays)&&(i=AC.get(this._tree))&&i.overlay){let a=t-this.from,o=r&IC.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function WC(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function GC(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var KC=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},qC=class e extends HC{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&IC.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new LC(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function JC(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof UC&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new YC(i,n)}var YC=class{constructor(e,t){this.heads=e,this.node=t}get next(){return JC(this.heads)}};function XC(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof UC?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=AC.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new UC(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(VC(o,t,n,!1))}}return i?JC(i):r}var ZC=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~IC.EnterBracketed,e instanceof UC)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof UC?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&IC.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&IC.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&IC.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else ({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&IC.IncludeAnonymous||e instanceof zC||!e.type.isAnonymous||QC(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new qC(this.buffer,t,this.stack[e]);return this.bufferNode=new qC(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return GC(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return GC(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function QC(e){return e.children.some(e=>e instanceof zC||!e.type.isAnonymous||QC(e))}function $C(e){let{buffer:t,nodeSet:n,maxBufferLength:r=DC,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new RC(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0)if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}else if(w==-3){c=x;return}else if(w==-4){l=x;return}else throw RangeError(`Unrecognized record size: ${w}`);let D=s[x],O,k,A=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new zC(t,C-k.start,n),A=k.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,T,E),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,T,E),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(D,E);O=nw(D,t,n,0,t.length,0,C-S,e,e)}else O=m(D,t,n,C-S,T-C,E)}_.push(O),v.push(A)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new zC(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof LC){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(U.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[U.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[U.lookAhead,i];o=o?[e].concat(o):[e]}return new LC(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0)if(n.size==-3||n.size==-4)d+=4;else break scan;else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new LC(s[e.topID],_.reverse(),v.reverse(),y)}var ew=new WeakMap;function tw(e,t){if(!e.isAnonymous||t instanceof zC||t.type!=e)return 1;let n=ew.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof LC)){n=1;break}n+=tw(e,r)}ew.set(t,n)}return n}function nw(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=tw(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=tw(e,t[s]);for(s++;s<i;s++){let n=tw(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(nw(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var rw=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof qC?this.setBuffer(e.context.buffer,e.index,t):e instanceof UC&&this.map.set(e.tree,t)}get(e){return e instanceof qC?this.getBuffer(e.context.buffer,e.index):e instanceof UC?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},iw=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},aw=class{startParse(e,t,n){return typeof e==`string`&&(e=new ow(e)),n=n?n.length?n.map(e=>new kC(e.from,e.to)):[new kC(0,0)]:[new kC(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},ow=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function sw(e){return(t,n,r,i)=>new fw(t,e,n,r,i)}var cw=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function lw(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError(`Invalid inner parse ranges given: `+JSON.stringify(e))}var uw=class{constructor(e,t,n,r,i,a,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}},dw=new U({perNode:!0}),fw=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),this.stoppedAt!=null)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return this.stoppedAt!=null&&(e=new LC(e.type,e.children,e.positions,e.length,e.propValues.concat([[dw,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[U.mounted.id]=new AC(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new _w(this.fragments),t=null,n=null,r=new ZC(new UC(this.baseTree,this.ranges[0].from,0,null),IC.IncludeAnonymous|IC.IgnoreMounts);scan:for(let i,a;;){let o=!0,s;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)o=!1;else if(e.hasNode(r)){if(t){let e=t.mounts.find(e=>e.frag.from<=r.from&&e.frag.to>=r.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let i=n.from+e.pos,a=n.to+e.pos;i>=r.from&&a<=r.to&&!t.ranges.some(e=>e.from<a&&e.to>i)&&t.ranges.push({from:i,to:a})}}o=!1}else if(n&&(a=pw(n.ranges,r.from,r.to)))o=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(hw(r),t&&t.depth++,n&&n.depth++);let a=e.findMounts(r.from,i.parser);if(typeof i.overlay==`function`)t=new uw(i.parser,i.overlay,a,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let e=vw(this.ranges,i.overlay||(r.from<r.to?[new kC(r.from,r.to)]:[]));e.length&&lw(e),(e.length||!i.overlay)&&this.inner.push(new cw(i.parser,e.length?i.parser.startParse(this.input,bw(a,e),e):i.parser.startParse(``),i.overlay?i.overlay.map(e=>new kC(e.from-r.from,e.to-r.from)):null,!!i.bracketed,r.tree,e.length?e[0].from:r.from)),i.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):o=!1}}else if(t&&(s=t.predicate(r))&&(s===!0&&(s=new kC(r.from,r.to)),s.from<s.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==s.from?t.ranges[e]={from:t.ranges[e].from,to:s.to}:t.ranges.push(s)}if(o&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break scan;if(t&&!--t.depth){let e=vw(this.ranges,t.ranges);e.length&&(lw(e),this.inner.splice(t.index,0,new cw(t.parser,t.parser.startParse(this.input,bw(t.mounts,e),e),t.ranges.map(e=>new kC(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function pw(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function mw(e,t,n,r,i,a){if(t<n){let o=e.buffer[t+1];r.push(e.slice(t,n,o)),i.push(o-a)}}function hw(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),o=i.children[a],s=o.buffer,c=[a];function l(e,r,i,a,u,d){let f=n[d],p=[],m=[];mw(o,e,f,p,m,a);let h=s[f+1],g=s[f+2];c.push(p.length);let _=d?l(f+4,s[f+3],o.set.types[s[f]],h,g-h,d-1):t.toTree();return p.push(_),m.push(h-a),mw(o,s[f+3],r,p,m,a),new LC(i,p,m,u)}i.children[a]=l(0,s.length,MC.none,0,o.length,n.length-1);for(let t of c){let n=e.tree.children[t],r=e.tree.positions[t];e.yield(new UC(n,r+e.from,t,e._tree))}}var gw=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(IC.IncludeAnonymous|IC.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,IC.IgnoreOverlays|IC.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof LC)t=t.children[0];else break}return!1}},_w=class{constructor(e){if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let t=this.curFrag=e[0];this.curTo=t.tree.prop(dw)??t.to,this.inner=new gw(t.tree,-t.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=e.tree.prop(dw)??e.to,this.inner=new gw(e.tree,-e.offset)}}findMounts(e,t){let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=e.tree?.prop(U.mounted);if(r&&r.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}};function vw(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let o=e[i-1].to,s=e[i].from;for(;a<r.length;a++){let e=r[a];if(e.from>=s)break;e.to<=o||(n||(r=n=t.slice()),e.from<o?(n[a]=new kC(e.from,o),e.to>s&&n.splice(a+1,0,new kC(s,e.to))):e.to>s?n[a--]=new kC(s,e.to):n.splice(a--,1))}}return r}function yw(e,t,n,r){let i=0,a=0,o=!1,s=!1,c=-1e9,l=[];for(;;){let u=i==e.length?1e9:o?e[i].to:e[i].from,d=a==t.length?1e9:s?t[a].to:t[a].from;if(o!=s){let e=Math.max(c,n),t=Math.min(u,d,r);e<t&&l.push(new kC(e,t))}if(c=Math.min(u,d),c==1e9)break;u==c&&(o?(o=!1,i++):o=!0),d==c&&(s?(s=!1,a++):s=!0)}return l}function bw(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let e=r+(i.overlay?i.overlay[0].from:0),o=e+i.tree.length,s=Math.max(a.from,e),c=Math.min(a.to,o);if(i.overlay){let o=yw(t,i.overlay.map(e=>new kC(e.from+r,e.to+r)),s,c);for(let t=0,r=s;;t++){let s=t==o.length,l=s?c:o[t].from;if(l>r&&n.push(new iw(r,l,i.tree,-e,a.from>=r||a.openStart,a.to<=l||a.openEnd)),s)break;r=o[t].to}}else n.push(new iw(s,c,i.tree,-e,a.from>=e||a.openStart,a.to<=o||a.openEnd))}return n}var xw=0,Sw=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=xw++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new ww(e);return e=>e.modified.indexOf(t)>-1?e:ww.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Cw=0,ww=class e{constructor(e){this.name=e,this.instances=[],this.id=Cw++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&Tw(n,e.modified));if(r)return r;let i=[],a=new Sw(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=Ew(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function Tw(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Ew(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function Dw(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new kw(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return Ow.add(t)}var Ow=new U({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new kw(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),kw=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};kw.empty=new kw([],2,null);function Aw(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function jw(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function Mw(e,t,n,r=0,i=e.length){let a=new Nw(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var Nw=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=Pw(e)||kw.empty,u=jw(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(U.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function Pw(e){let t=e.type.prop(Ow);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var W=Sw.define,Fw=W(),Iw=W(),Lw=W(Iw),Rw=W(Iw),zw=W(),Bw=W(zw),Vw=W(zw),Hw=W(),Uw=W(Hw),Ww=W(),Gw=W(),Kw=W(),qw=W(Kw),Jw=W(),G={comment:Fw,lineComment:W(Fw),blockComment:W(Fw),docComment:W(Fw),name:Iw,variableName:W(Iw),typeName:Lw,tagName:W(Lw),propertyName:Rw,attributeName:W(Rw),className:W(Iw),labelName:W(Iw),namespace:W(Iw),macroName:W(Iw),literal:zw,string:Bw,docString:W(Bw),character:W(Bw),attributeValue:W(Bw),number:Vw,integer:W(Vw),float:W(Vw),bool:W(zw),regexp:W(zw),escape:W(zw),color:W(zw),url:W(zw),keyword:Ww,self:W(Ww),null:W(Ww),atom:W(Ww),unit:W(Ww),modifier:W(Ww),operatorKeyword:W(Ww),controlKeyword:W(Ww),definitionKeyword:W(Ww),moduleKeyword:W(Ww),operator:Gw,derefOperator:W(Gw),arithmeticOperator:W(Gw),logicOperator:W(Gw),bitwiseOperator:W(Gw),compareOperator:W(Gw),updateOperator:W(Gw),definitionOperator:W(Gw),typeOperator:W(Gw),controlOperator:W(Gw),punctuation:Kw,separator:W(Kw),bracket:qw,angleBracket:W(qw),squareBracket:W(qw),paren:W(qw),brace:W(qw),content:Hw,heading:Uw,heading1:W(Uw),heading2:W(Uw),heading3:W(Uw),heading4:W(Uw),heading5:W(Uw),heading6:W(Uw),contentSeparator:W(Hw),list:W(Hw),quote:W(Hw),emphasis:W(Hw),strong:W(Hw),link:W(Hw),monospace:W(Hw),strikethrough:W(Hw),inserted:W(),deleted:W(),changed:W(),invalid:W(),meta:Jw,documentMeta:W(Jw),annotation:W(Jw),processingInstruction:W(Jw),definition:Sw.defineModifier(`definition`),constant:Sw.defineModifier(`constant`),function:Sw.defineModifier(`function`),standard:Sw.defineModifier(`standard`),local:Sw.defineModifier(`local`),special:Sw.defineModifier(`special`)};for(let e in G){let t=G[e];t instanceof Sw&&(t.name=e)}Aw([{tag:G.link,class:`tok-link`},{tag:G.heading,class:`tok-heading`},{tag:G.emphasis,class:`tok-emphasis`},{tag:G.strong,class:`tok-strong`},{tag:G.keyword,class:`tok-keyword`},{tag:G.atom,class:`tok-atom`},{tag:G.bool,class:`tok-bool`},{tag:G.url,class:`tok-url`},{tag:G.labelName,class:`tok-labelName`},{tag:G.inserted,class:`tok-inserted`},{tag:G.deleted,class:`tok-deleted`},{tag:G.literal,class:`tok-literal`},{tag:G.string,class:`tok-string`},{tag:G.number,class:`tok-number`},{tag:[G.regexp,G.escape,G.special(G.string)],class:`tok-string2`},{tag:G.variableName,class:`tok-variableName`},{tag:G.local(G.variableName),class:`tok-variableName tok-local`},{tag:G.definition(G.variableName),class:`tok-variableName tok-definition`},{tag:G.special(G.variableName),class:`tok-variableName2`},{tag:G.definition(G.propertyName),class:`tok-propertyName tok-definition`},{tag:G.typeName,class:`tok-typeName`},{tag:G.namespace,class:`tok-namespace`},{tag:G.className,class:`tok-className`},{tag:G.macroName,class:`tok-macroName`},{tag:G.propertyName,class:`tok-propertyName`},{tag:G.operator,class:`tok-operator`},{tag:G.comment,class:`tok-comment`},{tag:G.meta,class:`tok-meta`},{tag:G.invalid,class:`tok-invalid`},{tag:G.punctuation,class:`tok-punctuation`}]);var Yw=new U;function Xw(e){return B.define({combine:e?t=>t.concat(e):void 0})}var Zw=new U,Qw=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,p_.prototype.hasOwnProperty(`tree`)||Object.defineProperty(p_.prototype,`tree`,{get(){return tT(this)}}),this.parser=t,this.extension=[uT.of(this),p_.languageData.of((e,t,n)=>{let r=$w(e,t,n),i=r.type.prop(Yw);if(!i)return[];let a=e.facet(i),o=r.type.prop(Zw);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return $w(e,t,n).type.prop(Yw)==this.data}findRegions(e){let t=e.facet(uT);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(Yw)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(U.mounted);if(i){if(i.tree.prop(Yw)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof LC&&r(i,e.positions[n]+t)}};return r(tT(e),0),n}get allowsNesting(){return!0}};Qw.setState=Qg.define();function $w(e,t,n){let r=e.facet(uT),i=tT(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,IC.ExcludeBuffers|IC.EnterBracketed))e.type.isTop&&(i=e);return i}var eT=class e extends Qw{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=Xw(t.languageData);return new e(n,t.parser.configure({props:[Yw.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function tT(e){let t=e.field(Qw.state,!1);return t?t.tree:LC.empty}var nT=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},rT=null,iT=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],LC.empty,0,r,[],null)}startParse(){return this.parser.startParse(new nT(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=LC.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(iw.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(iw.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=rT;rT=this;try{return e()}finally{rT=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=aT(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=iw.applyChanges(r,e),i=LC.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=aT(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends aw{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=rT;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new LC(MC.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return rT}};function aT(e,t,n){return iw.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var oT=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=iT.create(t.facet(uT).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};Qw.state=jg.define({create:oT.init,update(e,t){for(let e of t.effects)if(e.is(Qw.setState))return e.value;return t.startState.facet(uT)==t.state.facet(uT)?e.apply(t):oT.init(t.state)}});var sT=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(sT=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var cT=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,lT=Iy.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Qw.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Qw.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=sT(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(Qw.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!cT?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>cT&&cT()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Qw.setState.of(new oT(i.context))})),this.chunkBudget>0&&!(s&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>My(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),uT=B.define({combine(e){return e.length?e[0]:null},enables:e=>[Qw.state,lT,H.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),dT=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},fT=class e{constructor(e,t,n,r,i,a=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=r,this.loadFunc=i,this.support=a,this.loading=null}load(){return this.loading||=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e})}static of(t){let{load:n,support:r}=t;if(!n){if(!r)throw RangeError(`Must pass either 'load' or 'support' to LanguageDescription.of`);n=()=>Promise.resolve(r)}return new e(t.name,(t.alias||[]).concat(t.name).map(e=>e.toLowerCase()),t.extensions||[],t.filename,n,r)}static matchFilename(e,t){for(let n of e)if(n.filename&&n.filename.test(t))return n;let n=/\.([^.]+)$/.exec(t);if(n){for(let t of e)if(t.extensions.indexOf(n[1])>-1)return t}return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let n of e)if(n.alias.some(e=>e==t))return n;if(n)for(let n of e)for(let e of n.alias){let r=t.indexOf(e);if(r>-1&&(e.length>2||!/\w/.test(t[r-1])&&!/\w/.test(t[r+e.length])))return n}return null}},pT=B.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}}),mT=new U;function hT(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function gT({closing:e,align:t=!0,units:n=1}){return r=>_T(r,t,n,e)}function _T(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?hT(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var vT=e=>e.baseIndent;function yT({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var bT=B.define(),xT=new U;function ST(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}var CT=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=z_.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof Qw?e=>e.prop(Yw)==a.data:a?e=>e==a:void 0,this.style=Aw(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new z_(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},wT=B.define(),TT=B.define({combine(e){return e.length?[e[0]]:null}});function ET(e){let t=e.facet(wT);return t.length?t:e.facet(TT)}function DT(e,t){let n=[kT],r;return e instanceof CT&&(e.module&&n.push(H.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(TT.of(e)):r?n.push(wT.computeN([H.darkTheme],t=>t.facet(H.darkTheme)==(r==`dark`)?[e]:[])):n.push(wT.of(e)),n}var OT=class{constructor(e){this.markCache=Object.create(null),this.tree=tT(e.state),this.decorations=this.buildDeco(e,ET(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=tT(e.state),n=ET(e.state),r=n!=ET(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return mv.none;let n=new S_;for(let{from:r,to:i}of e.visibleRanges)Mw(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=mv.mark({class:r})))},r,i);return n.finish()}},kT=Pg.high(Iy.fromClass(OT,{decorations:e=>e.decorations}));G.meta,G.link,G.heading,G.emphasis,G.strong,G.strikethrough,G.keyword,G.atom,G.bool,G.url,G.contentSeparator,G.labelName,G.literal,G.inserted,G.string,G.deleted,G.regexp,G.escape,G.string,G.variableName,G.variableName,G.typeName,G.namespace,G.className,G.variableName,G.macroName,G.propertyName,G.comment,G.invalid;var AT=new U,jT=Object.create(null),MT=[MC.none],NT=[],PT=Object.create(null),FT=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])FT[e]=LT(jT,t);function IT(e,t){NT.indexOf(e)>-1||(NT.push(e),console.warn(t))}function LT(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||G[n];r?typeof r==`function`?t.length?t=t.map(r):IT(n,`Modifier ${n} used at start of tag`):t.length?IT(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:IT(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=PT[i];if(a)return a.id;let o=PT[i]=MC.define({id:MT.length,name:r,props:[Dw({[r]:n})]});return MT.push(o),o.id}Jv.RTL,Jv.LTR;var RT=H.theme({"&":{backgroundColor:`#ffffff`,color:`#24292e`},".cm-content":{caretColor:`#0550ae`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`#0550ae`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`#b3d7ff`},".cm-gutters":{backgroundColor:`#f6f8fa`,color:`#57606a`,border:`none`}},{dark:!1}),zT=CT.define([{tag:G.string,color:`#0a3069`},{tag:G.number,color:`#0550ae`},{tag:G.bool,color:`#8250df`},{tag:G.null,color:`#cf222e`},{tag:G.keyword,color:`#cf222e`},{tag:G.propertyName,color:`#116329`},{tag:G.punctuation,color:`#57606a`},{tag:G.bracket,color:`#6e7781`}]),BT=class extends fv{constructor(e,t,n){super(),this.annotation=e,this.targetDocumentName=t,this.isGenerating=n}eq(e){let t=$a(this.annotation.body),n=$a(e.annotation.body);return e.annotation.id===this.annotation.id&&n===t&&e.targetDocumentName===this.targetDocumentName&&e.isGenerating===this.isGenerating}toDOM(){let e=document.createElement(`span`);e.className=`reference-preview-widget`,e.style.cssText=`
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
margin-left: 4px;
|
|
24
|
+
position: relative;
|
|
25
|
+
`;let t=co(this.annotation),n=$a(this.annotation.body);e.dataset.widgetAnnotationId=this.annotation.id,e.dataset.widgetMotivation=this.annotation.motivation,e.dataset.widgetResolved=t?`true`:`false`,n&&(e.dataset.widgetBodySource=n),this.targetDocumentName&&(e.dataset.widgetTargetName=this.targetDocumentName),this.isGenerating&&(e.dataset.widgetGenerating=`true`);let r=document.createElement(`button`);if(r.className=`reference-indicator`,r.type=`button`,t)r.innerHTML=`<span aria-hidden="true">🔗</span>`,r.setAttribute(`aria-label`,this.targetDocumentName?`Reference link to ${this.targetDocumentName}`:`Reference link to document`),r.title=this.targetDocumentName?`Links to: ${this.targetDocumentName}`:`Links to document`,r.style.cssText=`
|
|
26
|
+
font-size: 10px;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
opacity: 0.6;
|
|
29
|
+
transition: opacity 0.2s ease;
|
|
30
|
+
background: none;
|
|
31
|
+
border: none;
|
|
32
|
+
padding: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
vertical-align: baseline;
|
|
35
|
+
`;else if(this.isGenerating){if(r.innerHTML=`
|
|
36
|
+
<span style="position: relative; display: inline-flex; align-items: center; justify-content: center;" aria-hidden="true">
|
|
37
|
+
<span style="position: absolute; inset: 0; border-radius: 9999px; background: rgb(250, 204, 21); opacity: 0.75; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;"></span>
|
|
38
|
+
<span style="position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; background: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); border: 2px solid rgb(250, 204, 21);">
|
|
39
|
+
<span style="font-size: 14px;">✨</span>
|
|
40
|
+
</span>
|
|
41
|
+
</span>
|
|
42
|
+
`,r.setAttribute(`aria-label`,`Generating document`),r.setAttribute(`aria-busy`,`true`),r.title=`Generating document...`,r.disabled=!0,r.style.cssText=`
|
|
43
|
+
cursor: default;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
vertical-align: middle;
|
|
46
|
+
background: none;
|
|
47
|
+
border: none;
|
|
48
|
+
padding: 0;
|
|
49
|
+
margin: 0;
|
|
50
|
+
`,document.documentElement.classList.contains(`dark`)){let e=r.querySelector(`span > span:last-child`);e&&(e.style.background=`rgb(31, 41, 55)`,e.style.borderColor=`rgb(234, 179, 8)`);let t=r.querySelector(`span > span:first-child`);t&&(t.style.background=`rgb(234, 179, 8)`)}}else r.innerHTML=`<span aria-hidden="true">❓</span>`,r.setAttribute(`aria-label`,`Stub reference - click to resolve`),r.title=`Stub reference. Click to resolve.`,r.style.cssText=`
|
|
51
|
+
font-size: 10px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
opacity: 0.6;
|
|
54
|
+
transition: opacity 0.2s ease;
|
|
55
|
+
background: none;
|
|
56
|
+
border: none;
|
|
57
|
+
padding: 0;
|
|
58
|
+
margin: 0;
|
|
59
|
+
vertical-align: baseline;
|
|
60
|
+
`;return e.appendChild(r),e}ignoreEvent(e){return e.type===`click`}};function VT(e,t){if(!t||t.trim()===``)return;let n=document.createElement(`div`);n.className=`reference-tooltip`,n.textContent=`\u2192 ${t}`,n.style.cssText=`
|
|
61
|
+
position: absolute;
|
|
62
|
+
bottom: 100%;
|
|
63
|
+
left: 50%;
|
|
64
|
+
transform: translateX(-50%) translateY(-4px);
|
|
65
|
+
padding: 4px 8px;
|
|
66
|
+
background: rgba(0, 0, 0, 0.8);
|
|
67
|
+
color: white;
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
font-size: 11px;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
z-index: 1000;
|
|
73
|
+
animation: fadeIn 0.2s ease;
|
|
74
|
+
`,e.appendChild(n)}function HT(e){let t=e.querySelector(`.reference-tooltip`);t&&t.remove()}function UT(e){return e?Lo(e)?[`rectangle`]:(e.startsWith(`image/`),[`rectangle`,`circle`,`polygon`]):[`rectangle`,`circle`,`polygon`]}function WT(e){return e?Lo(e)?`fragment`:e.startsWith(`image/`)?`svg`:`text`:`text`}function GT(e){if(e===`fragment`||e===`text`)return`rectangle`;if(typeof window<`u`){let e=localStorage.getItem(`semiont-toolbar-shape-svg`);if(e&&[`rectangle`,`circle`,`polygon`].includes(e))return e}return`rectangle`}function KT(e,t){e===`svg`&&typeof window<`u`&&localStorage.setItem(`semiont-toolbar-shape-svg`,t)}function qT(e,t){let n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),r=``;for(;n.nextNode();)r+=n.currentNode.textContent??``;let i=new Map,a=0,o=0;for(;o<e.length&&a<r.length;)e[o]===r[a]?(i.set(o,a),a++,o++):o++;for(;o<e.length;)i.set(o,a),o++;return i}function JT(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=0;for(;n.nextNode();){let e=n.currentNode,i=e.textContent?.length??0;t.push({node:e,start:r,end:r+i}),r+=i}return t}function YT(e,t){let n=0,r=e.length-1;for(;n<=r;){let i=n+r>>>1,a=e[i];if(t<a.start)r=i-1;else if(t>=a.end)n=i+1;else return{node:a.node,localOffset:t-a.start}}return null}function XT(e,t,n){let r=new Map;for(let i of e){let e=t.get(i.offset),a=t.get(i.offset+i.length-1);if(e===void 0||a===void 0)continue;let o=YT(n,e),s=YT(n,a+1);if(!o||!s)continue;let c=document.createRange();c.setStart(o.node,o.localOffset),c.setEnd(s.node,s.localOffset),r.set(i.id,{range:c,annotation:i})}return r}function ZT(e){for(let[t,{range:n,annotation:r}]of e){let e=`annotation-${r.type}`;if(n.startContainer===n.endContainer){let i=document.createElement(`span`);i.className=e,i.dataset.annotationId=t,i.dataset.annotationType=r.type;try{n.surroundContents(i)}catch{QT(n,t,r)}continue}QT(n,t,r)}}function QT(e,t,n){let r=`annotation-${n.type}`,i=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),a=[];for(;i.nextNode();){let t=i.currentNode;e.intersectsNode(t)&&a.push(t)}for(let i of a){let a=document.createRange();a.selectNodeContents(i),i===e.startContainer&&a.setStart(i,e.startOffset),i===e.endContainer&&a.setEnd(i,e.endOffset);let o=document.createElement(`span`);o.className=r,o.dataset.annotationId=t,o.dataset.annotationType=n.type;try{a.surroundContents(o)}catch{}}}function $T(e){let t=e.querySelectorAll(`[data-annotation-id]`);for(let e of t){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e),t.normalize()}}}function eE(e){return e.map(e=>{let t=to(e.target),n=Xa(t),r=n?.start??0,i=n?.end??0,a=Object.values(Ih).find(t=>t.matchesAnnotation(e))?.internalType||`highlight`;return{id:e.id,exact:lo(t),offset:r,length:i-r,type:a,source:$a(e.body)}})}function tE(e){if(!e)return`📄`;let t=e.split(`;`)[0]?.trim().toLowerCase()||``;if(t.startsWith(`image/`))return`🖼️`;switch(t){case`text/markdown`:return`📝`;case`text/html`:return`🌐`;case`text/plain`:return`📄`;default:return`📄`}}var nE={parse(e){if(typeof e!=`string`)throw Error(`URL must be a string`);let t;try{t=new URL(e)}catch{throw Error(`Invalid image URL`)}if(t.hostname!==`localhost`&&t.protocol!==`https:`)throw Error(`External images must use HTTPS`);let n=[`javascript:`,`data:text/html`,`<script`,`onerror=`,`onload=`,`onclick=`],r=e.toLowerCase();if(n.some(e=>r.includes(e)))throw Error(`Invalid or potentially unsafe image URL`);let i=[`.jpg`,`.jpeg`,`.png`,`.gif`,`.webp`,`.svg`,`.ico`].some(e=>r.includes(e)),a=r.includes(`googleusercontent.com`)||r.includes(`avatars.githubusercontent.com`);if(!i&&!a)throw Error(`URL must point to an image file`);return e},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(e){return{success:!1,error:e instanceof Error?e.message:`Invalid image URL`}}}};function rE(e){try{let t=nE.safeParse(e);if(!t.success)return console.warn(`Invalid image URL:`,t.error),null;let n=new URL(e);return`${n.protocol}//${n.hostname}${n.pathname}${n.search}`}catch(e){return console.error(`Error sanitizing image URL:`,e),null}}function iE(e){let[t]=(0,m.useState)(e);return(0,m.useEffect)(()=>()=>t.dispose(),[t]),t}function aE(e){if(!e||e<=0)return null;let t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return t>0?`${t}h ${n}m`:n>0?`${n}m`:r>30?`1m`:`Less than 1m`}var oE=typeof window<`u`&&navigator.platform.toUpperCase().indexOf(`MAC`)>=0;function sE(e){let t=(0,m.useRef)(e);t.current=e;let n=(0,m.useCallback)(e=>{if(!e.key)return;let n=e.target;if(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.contentEditable===`true`)return;let r=t.current.filter(e=>e.enabled!==!1);for(let t of r){if(e.key.toLowerCase()!==t.key.toLowerCase())continue;let n=oE?e.metaKey:e.ctrlKey;if(!(t.ctrlOrCmd&&!n)&&!(!t.ctrlOrCmd&&n)&&!(t.shift&&!e.shiftKey)&&!(!t.shift&&e.shiftKey)&&!(t.alt&&!e.altKey)&&!(!t.alt&&e.altKey)){e.preventDefault(),e.stopPropagation(),t.handler(e);break}}},[]);(0,m.useEffect)(()=>(window.addEventListener(`keydown`,n),()=>{window.removeEventListener(`keydown`,n)}),[n])}function cE(e,t,n=300){let r=(0,m.useRef)(0),i=(0,m.useRef)(t);i.current=t;let a=(0,m.useCallback)(t=>{if(t.key!==e)return;let a=Date.now();a-r.current<n?(i.current(),r.current=0):r.current=a},[e,n]);(0,m.useEffect)(()=>(window.addEventListener(`keydown`,a),()=>{window.removeEventListener(`keydown`,a)}),[a])}function lE(){let[e,t]=(0,m.useState)(()=>typeof window<`u`?localStorage.getItem(`showLineNumbers`)===`true`:!1);return{showLineNumbers:e,toggleLineNumbers:(0,m.useCallback)(()=>{let n=!e;t(n),typeof window<`u`&&localStorage.setItem(`showLineNumbers`,n.toString())},[e])}}function K(e){let[t,n]=(0,m.useState)(()=>{if(!e)return;let t=e.getValue;return typeof t==`function`?t.call(e):void 0});return(0,m.useEffect)(()=>{if(!e)return;let t=e.subscribe(n);return()=>t.unsubscribe()},[e]),t}function uE(e,t=150){let n=K(R().activeSession$),r=(0,m.useRef)(null),i=(0,m.useRef)(null),a=(0,m.useCallback)(()=>{r.current!==e&&(i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r.current=e,n?.client.beckon.hover(e)},t))},[e,t,n]),o=(0,m.useCallback)(()=>{i.current!==null&&(clearTimeout(i.current),i.current=null),r.current!==null&&(r.current=null,n?.client.beckon.hover(null))},[n]);return(0,m.useEffect)(()=>()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},[]),{onMouseEnter:a,onMouseLeave:o}}function dE(){let[e,t]=(0,m.useState)(()=>{if(typeof window<`u`){let e=localStorage.getItem(`hoverDelayMs`);return e?Number(e):150}return 150});return{hoverDelayMs:e,setHoverDelayMs:(0,m.useCallback)(e=>{t(e),typeof window<`u`&&localStorage.setItem(`hoverDelayMs`,e.toString())},[])}}function fE(){let e=R();return(0,m.useCallback)((t,n)=>{let r=setTimeout(()=>{console.warn(`[Observable Navigation] No handler cancelled nav:external fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing.`),window.location.href=t},10);e.emit(`nav:external`,{url:t,resourceId:n?.resourceId,cancelFallback:()=>clearTimeout(r)})},[e])}function pE({defaultWidth:e=384,minWidth:t=256,maxWidth:n=800,storageKey:r=`semiont-panel-width`}={}){let[i,a]=(0,m.useState)(e),o=(0,m.useRef)(!1);return(0,m.useEffect)(()=>{if(typeof window>`u`)return;let e=localStorage.getItem(r);e&&a(Math.max(t,Math.min(n,parseInt(e,10))))},[]),(0,m.useEffect)(()=>{o.current&&localStorage.setItem(r,i.toString())},[i,r]),{width:i,setWidth:e=>{let r=Math.max(t,Math.min(n,e));o.current=!0,a(r)},minWidth:t,maxWidth:n}}function mE(e,t={}){let{orientation:n=`horizontal`,loop:r=!0,cols:i=1}=t,a=(0,m.useRef)(null),o=(0,m.useRef)(0),s=(0,m.useCallback)(()=>a.current?Array.from(a.current.querySelectorAll(`[role="button"]:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])`)):[],[]),c=(0,m.useCallback)(e=>{let t=s();if(t.length===0)return;let n=e;n=r?(e%t.length+t.length)%t.length:Math.max(0,Math.min(e,t.length-1)),t.forEach((e,t)=>{e.setAttribute(`tabindex`,t===n?`0`:`-1`)}),t[n]?.focus(),o.current=n},[s,r]),l=(0,m.useCallback)(e=>{let t=s();if(t.length===0)return;let r=o.current,a=r;switch(e.key){case`ArrowRight`:(n===`horizontal`||n===`grid`)&&(e.preventDefault(),a=r+1);break;case`ArrowLeft`:(n===`horizontal`||n===`grid`)&&(e.preventDefault(),a=r-1);break;case`ArrowDown`:n===`vertical`?(e.preventDefault(),a=r+1):n===`grid`&&(e.preventDefault(),a=r+i);break;case`ArrowUp`:n===`vertical`?(e.preventDefault(),a=r-1):n===`grid`&&(e.preventDefault(),a=r-i);break;case`Home`:e.preventDefault(),a=0;break;case`End`:e.preventDefault(),a=t.length-1;break;default:return}c(a)},[n,i,s,c]);return(0,m.useEffect)(()=>{let e=s();if(e.length===0)return;e.forEach((e,t)=>{e.setAttribute(`tabindex`,t===0?`0`:`-1`)});let t=e=>()=>{o.current=e,s().forEach((t,n)=>{t.setAttribute(`tabindex`,n===e?`0`:`-1`)})},n=e.map((e,n)=>{let r=t(n);return e.addEventListener(`click`,r),r});return()=>{e.forEach((e,t)=>{let r=n[t];r&&e.removeEventListener(`click`,r)})}},[e,s]),{containerRef:a,handleKeyDown:l,focusItem:c}}function hE(){let e=K(R().activeSession$);K(e?.token$);let t=e?.expiresAt??null,[n,r]=(0,m.useState)(null),[i,a]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(!t){r(null),a(!1);return}let e=()=>{let e=t.getTime()-Date.now();r(e>0?e:0),a(e<300*1e3&&e>0)};e();let n=setInterval(e,1e3);return()=>clearInterval(n)},[t]),{timeRemaining:n,isExpiringSoon:i}}var gE=(0,m.createContext)(null);function _E({children:e}){let[t,n]=(0,m.useState)(()=>typeof window<`u`&&localStorage.getItem(`theme`)||`system`),[r,i]=(0,m.useState)(()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`),a=t===`system`?r:t;return(0,m.useEffect)(()=>{window.document.documentElement.setAttribute(`data-theme`,a)},[a]),(0,m.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>{i(e.matches?`dark`:`light`)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,P.jsx)(gE.Provider,{value:{theme:t,setTheme:e=>{n(e),typeof window<`u`&&localStorage.setItem(`theme`,e)},resolvedTheme:a,systemTheme:r},children:e})}function vE(){let e=(0,m.useContext)(gE);if(!e)throw Error(`useTheme must be used within a ThemeProvider`);return e}function yE(){let[e,t]=(0,m.useState)(!1),n=(0,m.useRef)(null),r=(0,m.useCallback)(()=>{t(e=>!e)},[]),i=(0,m.useCallback)(()=>{t(!0)},[]),a=(0,m.useCallback)(()=>{t(!1)},[]);return(0,m.useEffect)(()=>{function t(e){n.current&&!n.current.contains(e.target)&&a()}if(e)return document.addEventListener(`mousedown`,t),()=>document.removeEventListener(`mousedown`,t)},[e,a]),(0,m.useEffect)(()=>{function t(e){e.key===`Escape`&&a()}if(e)return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e,a]),{isOpen:e,toggle:r,open:i,close:a,dropdownRef:n}}function bE(e,t,n=!0){let{showError:r}=sh(),i=K(R().activeSession$)?.client,a=n?ho(t)||`text/plain`:``,[o,s]=(0,m.useState)(``),[c,l]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(!i||!n||!a)return;let t=!1;return l(!0),i.browse.resourceRepresentation(e,{accept:a}).then(({data:e})=>{t||(s(Po(e,a)),l(!1))}).catch(e=>{t||(console.error(`Failed to fetch representation:`,e),r(`Failed to load resource representation`),l(!1))}),()=>{t=!0}},[i,e,a,n,r]),{content:o,loading:c}}(0,m.createContext)(void 0);function xE(e,t){let n=R(),r=K(n.activeSession$),i=(0,m.useRef)(t);(0,m.useEffect)(()=>{i.current=t}),(0,m.useEffect)(()=>{let t=[];return t.push(n.on(e,e=>i.current(e))),r&&t.push(r.subscribe(e,e=>i.current(e))),()=>{for(let e of t)e()}},[e,n,r])}function SE(e){let t=R(),n=K(t.activeSession$),r=(0,m.useRef)(e);(0,m.useEffect)(()=>{r.current=e});let i=(0,m.useMemo)(()=>Object.keys(e).sort(),[Object.keys(e).sort().join(`,`)]);(0,m.useEffect)(()=>{let e=[];for(let a of i){let i=a,o=e=>{let t=r.current[i];t&&t(e)};e.push(t.on(i,o)),n&&e.push(n.subscribe(i,o))}return()=>{for(let t of e)t()}},[i,t,n])}var CE=(0,m.createContext)(null);function wE(){return(0,m.useContext)(CE)||{announce:()=>{}}}function TE({children:e}){let[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(``),a=(0,m.useCallback)((e,t=`polite`)=>{t===`assertive`?(i(e),setTimeout(()=>i(``),1e3)):(n(e),setTimeout(()=>n(``),1e3))},[]);return(0,P.jsxs)(CE.Provider,{value:{announce:a},children:[e,(0,P.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`semiont-sr-only`,children:t}),(0,P.jsx)(`div`,{role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,className:`semiont-sr-only`,children:r})]})}function EE(){let{announce:e}=wE();return{announceResourceLoading:(0,m.useCallback)(t=>{e(t?`Loading ${t}...`:`Loading resource...`,`polite`)},[e]),announceResourceLoaded:(0,m.useCallback)(t=>{e(`${t} loaded successfully`,`polite`)},[e]),announceResourceLoadError:(0,m.useCallback)(t=>{e(t?`Failed to load ${t}`:`Failed to load resource`,`assertive`)},[e]),announceResourceUpdating:(0,m.useCallback)(t=>{e(`Updating ${t}...`,`polite`)},[e])}}function DE(){let{announce:e}=wE();return{announceFormSubmitting:(0,m.useCallback)(()=>{e(`Submitting form...`,`polite`)},[e]),announceFormSuccess:(0,m.useCallback)(t=>{e(t||`Form submitted successfully`,`polite`)},[e]),announceFormError:(0,m.useCallback)(t=>{e(t||`Form submission failed. Please check your entries and try again.`,`assertive`)},[e]),announceFormValidationError:(0,m.useCallback)(t=>{e(t===1?`There is 1 field with an error`:`There are ${t} fields with errors`,`assertive`)},[e])}}function OE(){let{announce:e}=wE();return{announceLanguageChanging:(0,m.useCallback)(t=>{e(`Changing language to ${t}...`,`polite`)},[e]),announceLanguageChanged:(0,m.useCallback)(t=>{e(`Language changed to ${t}`,`polite`)},[e])}}var kE=(0,m.createContext)(void 0);function AE({children:e}){let[t,n]=(0,m.useState)(new Set),{announce:r}=wE(),i=K(R().activeSession$)?.client,a=(0,m.useCallback)(async(e,t,a,o=[])=>{if(!i)throw Error(`Not authenticated`);try{let s={motivation:t,target:{source:e,selector:a},body:o},c=await i.mark.annotation(s);return c.annotationId&&(n(e=>new Set(e).add(c.annotationId)),setTimeout(()=>{n(e=>{let t=new Set(e);return t.delete(c.annotationId),t})},6e3),r(`Annotation created`,`polite`)),c.annotationId}catch(e){throw console.error(`Failed to create annotation:`,e),r(`Failed to create annotation`,`assertive`),e}},[i,r]),o=(0,m.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[]),s=(0,m.useCallback)(e=>{n(t=>new Set(t).add(e)),setTimeout(()=>{n(t=>{let n=new Set(t);return n.delete(e),n})},6e3)},[]),c=(0,m.useMemo)(()=>({newAnnotationIds:t,markAnnotation:a,clearNewAnnotationId:o,triggerSparkleAnimation:s}),[t,a,o,s]);return(0,P.jsx)(kE.Provider,{value:c,children:e})}function jE(){let e=(0,m.useContext)(kE);if(!e)throw Error(`useResourceAnnotations must be used within ResourceAnnotationsProvider`);return e}var ME=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=tT(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(LE(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function NE(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function PE(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=NE(t)+NE(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function FE(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:PE(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function IE(e,t){return n=>{for(let t=tT(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}function LE(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var RE=Yg.define();typeof navigator==`object`&&navigator.platform;var zE=H.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),BE=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},VE=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,pg.TrackDel),r=t.mapPos(this.to,1,pg.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},HE=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(pT);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new VE(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1,c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new BE(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},UE=mv.widget({widget:new class extends fv{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),WE=mv.mark({class:`cm-snippetField`}),GE=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=mv.set(e.map(e=>(e.from==e.to?UE:WE).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},KE=Qg.define({map(e,t){return e&&e.map(t)}}),qE=Qg.define(),JE=jg.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(KE))return n.value;if(n.is(qE)&&e)return new GE(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>H.decorations.from(e,e=>e?e.deco:mv.none)});function YE(e,t){return z.create(e.filter(e=>e.field==t).map(e=>z.range(e.from,e.to)))}function XE(e){let t=HE.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:Xh.of(a)},scrollIntoView:!0,annotations:n?[RE.of(n),$g.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=YE(o,0)),o.some(e=>e.field>0)){let t=new GE(o,0),n=c.effects=[KE.of(t)];e.state.field(JE,!1)===void 0&&n.push(Qg.appendConfig.of([JE,eD,nD,zE]))}e.dispatch(e.state.update(c))}}function ZE(e){return({state:t,dispatch:n})=>{let r=t.field(JE,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:YE(r.ranges,i),effects:KE.of(a?null:new GE(r.ranges,i)),scrollIntoView:!0})),!0}}var QE=[{key:`Tab`,run:ZE(1),shift:ZE(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(JE,!1)?(t(e.update({effects:KE.of(null)})),!0):!1}],$E=B.define({combine(e){return e.length?e[0]:QE}}),eD=Pg.highest(QS.compute([$E],e=>e.facet($E)));function tD(e,t){return{...t,apply:XE(e)}}var nD=H.domEventHandlers({mousedown(e,t){let n=t.state.field(JE,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:YE(n.ranges,i.field),effects:KE.of(n.ranges.some(e=>e.field>i.field)?new GE(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),rD=new class extends h_{};rD.startSide=1,rD.endSide=-1,typeof navigator==`object`&&navigator.userAgent;var iD=class e{static create(t,n,r,i,a){return new e(t,n,r,i+(i<<8)+t+(n<<4)|0,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[U.contextHash,r]]}addChild(e,t){e.prop(U.contextHash)!=this.hash&&(e=new LC(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new LC(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new LC(MC.none,e,t,n,this.hashProp)})}},q;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(q||={});var aD=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},oD=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return uD(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function sD(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==q.OrderedList?_D:gD)(n,t,!1);return r>0&&(e.type!=q.BulletList||mD(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var cD={[q.Blockquote](e,t,n){return n.next==62?(n.markers.push(J(q.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(lD(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0):!1},[q.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[q.OrderedList]:sD,[q.BulletList]:sD,[q.Document](){return!0}};function lD(e){return e==32||e==9||e==10||e==13}function uD(e,t=0){for(;t<e.length&&lD(e.charCodeAt(t));)t++;return t}function dD(e,t,n){for(;t>n&&lD(e.charCodeAt(t-1));)t--;return t}function fD(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function pD(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function mD(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!lD(n))return-1}return n&&e.next==45&&yD(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(jD.SetextHeading)>-1||r<3?-1:1}function hD(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function gD(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||lD(e.text.charCodeAt(e.pos+1)))&&(!n||hD(t,q.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function _D(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!lD(e.text.charCodeAt(r+1))||n&&!hD(t,q.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function vD(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function yD(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&lD(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var bD=/^[ \t]*$/,xD=/-->/,SD=/\?>/,CD=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,xD],[/^\s*<\?/,SD],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,bD],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,bD]];function wD(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=CD.length-+!!n;e<t;e++)if(CD[e][0].test(r))return e;return-1}function TD(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function ED(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==q.CodeText?e[r].to=n:e.push(J(q.CodeText,t,n))}var DD={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(ED(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){ED(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==q.CodeText?ED(o,e.from,e.to):o.push(e);s=[]}ED(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&ED(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=q.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(q.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=fD(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=dD(t.text,t.text.length,o),c=[J(q.CodeMark,r,r+a)];o<s&&c.push(J(q.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&ED(c,e.lineStart-1,e.lineStart),c.push(J(q.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}else{o=!0,n||(ED(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(ED(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(q.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=pD(t);return n<0?!1:(e.startContext(q.Blockquote,t.pos),e.addNode(q.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(mD(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(q.HorizontalRule,n),!0},BulletList(e,t){let n=gD(t,e,!1);if(n<0)return!1;e.block.type!=q.BulletList&&e.startContext(q.BulletList,t.basePos,t.next);let r=TD(t,t.pos+1);return e.startContext(q.ListItem,t.basePos,r-t.baseIndent),e.addNode(q.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=_D(t,e,!1);if(n<0)return!1;e.block.type!=q.OrderedList&&e.startContext(q.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=TD(t,t.pos+n);return e.startContext(q.ListItem,t.basePos,r-t.baseIndent),e.addNode(q.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=vD(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=dD(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!lD(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(q.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(q.HeaderMark,o-r,a-r);let c=s.finish(q.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=wD(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=CD[n][1],a=[],o=i!=bD;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==xD?q.CommentBlock:i==SD?q.ProcessingInstructionBlock:q.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},OD=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
75
|
+
`+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&uD(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,J(q.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(nO(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(J(q.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(eO(e,uD(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=uD(e,this.pos),n=0;if(t>this.pos){let r=tO(e,t,this.start);if(r){let t=kD(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=kD(e,this.pos),n>0&&n<e.length?n:-1}else return kD(e,this.pos)}};function kD(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!lD(n))return-1}return t}var AD=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:yD(t),i=t.next;if(r<0)return!1;let a=J(q.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,J(i==61?q.SetextHeading1:q.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},jD={LinkReference(e,t){return t.content.charCodeAt(0)==91?new OD(t):null},SetextHeading(){return new AD}},MD=[(e,t)=>vD(t)>=0,(e,t)=>fD(t)>=0,(e,t)=>pD(t)>=0,(e,t)=>gD(t,e,!0)>=0,(e,t)=>_D(t,e,!0)>=0,(e,t)=>mD(t,e,!0)>=0,(e,t)=>wD(t,e,!0)>=0],ND={text:``,end:0},PD=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new oD,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=iD.create(q.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new oO(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}let t=new aD(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
76
|
+
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=sO(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=ND;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+q[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
77
|
+
`?``:t;else{let e=t.indexOf(`
|
|
78
|
+
`);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=iD.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new LC(this.parser.nodeSet.types[e],VD,VD,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(iO(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?FD(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=iO(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(q.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?J(this.parser.getNodeType(e),t,n,r):new WD(e,t)}get buffer(){return new HD(this.parser.nodeSet)}};function FD(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=FD(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new LC(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var ID=class e extends aw{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new PD(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=RD(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),u=this.endLeafBlock.slice(),d=this.wrappers;if(LD(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=q.ATXHeading1&&c<=q.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(MC.define({id:c,name:n,props:l&&[[U.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof Sw?t[n]=s:Object.assign(t,s))}r=new NC(e),t&&(r=r.extend(Dw(t)))}if(LD(n.props)&&(r=r.extend(...n.props)),LD(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(LD(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?zD(s,e.before):e.after?zD(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&u.push(e.endLeaf)}if(LD(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?zD(l,e.before):e.after?zD(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(d=d.concat(n.wrap)),new e(r,a,o,s,u,i,c,l,d)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new rO(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function LD(e){return e!=null&&e.length>0}function RD(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=RD(e[0]);if(e.length==1)return t;let n=RD(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||VD).concat(t||VD),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function zD(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var BD=[MC.none];for(let e=1,t;t=q[e];e++)BD[e]=MC.define({id:e,name:t,props:e>=q.Escape?[]:[[U.group,e in cD?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var VD=[],HD=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return LC.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},UD=class{constructor(e,t,n,r=VD){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new HD(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},WD=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return VD}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function J(e,t,n,r){return new UD(e,t,n,r)}var GD={resolve:`Emphasis`,mark:`EmphasisMark`},KD={resolve:`Emphasis`,mark:`EmphasisMark`},qD={},JD={},YD=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},XD=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,ZD=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{ZD=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var QD={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<XD.length;t++)if(XD.charCodeAt(t)==r)return e.append(J(q.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(J(q.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(J(q.InlineCode,n,r+1,[J(q.CodeMark,n,n+i),J(q.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(J(q.Autolink,n,n+1+i[0].length,[J(q.LinkMark,n,n+1),J(q.URL,n+1,n+i[0].length),J(q.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(J(q.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(J(q.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(J(q.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=ZD.test(i),s=ZD.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new YD(t==95?GD:KD,n,r,!!f|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(J(q.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(J(q.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new YD(qD,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new YD(JD,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof YD&&(r.type==qD||r.type==JD)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=$D(e,i,r.type==qD?q.Link:q.Image,r.from,n+1);if(r.type==qD)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof YD&&t.type==qD&&(t.side=0)}return a.to}}return-1}};function $D(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(J(q.LinkMark,r,r+(n==q.Image?2:1))),t.push(J(q.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=eO(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=tO(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(J(q.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(J(q.LinkMark,n,s)))}else if(o==91){let n=nO(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return J(n,r,s,t)}function eO(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return J(q.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}else{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(lD(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?J(q.URL,t+n,i+n):i==e.length?null:!1}}function tO(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return J(q.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function nO(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return r?!1:J(q.LinkLabel,t+n,a+1+n);else{if(r&&!lD(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var rO=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new YD(e,t,n,!!r|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof YD&&(t.type==qD||t.type==JD))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof YD&&n.type.resolve&&n.side&2))continue;let r=n.type==GD||n.type==KD,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof YD&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.to-e.from+i)%3==0&&((e.to-e.from)%3||i%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof UD&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new YD(a.type,a.from,l,a.side):null,(this.parts[t]=r&&n.to!=u?new YD(n.type,u,n.to,n.side):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof UD&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof YD&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof YD?t:null}skipSpace(e){return uD(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?J(this.parser.getNodeType(e),t,n,r):new WD(e,t)}};rO.linkStart=qD,rO.imageStart=JD;function iO(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof UD&&(n[r]=new UD(t.type,t.from,t.to,iO(t.children,[e])))}else n.splice(r++,0,e)}return n}var aO=[q.CodeBlock,q.ListItem,q.OrderedList,q.BulletList],oO=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
|
|
79
|
+
`;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(U.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=sO(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new LC(e.parser.nodeSet.types[q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(aO.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function sO(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var cO=Dw({"Blockquote/...":G.quote,HorizontalRule:G.contentSeparator,"ATXHeading1/... SetextHeading1/...":G.heading1,"ATXHeading2/... SetextHeading2/...":G.heading2,"ATXHeading3/...":G.heading3,"ATXHeading4/...":G.heading4,"ATXHeading5/...":G.heading5,"ATXHeading6/...":G.heading6,"Comment CommentBlock":G.comment,Escape:G.escape,Entity:G.character,"Emphasis/...":G.emphasis,"StrongEmphasis/...":G.strong,"Link/... Image/...":G.link,"OrderedList/... BulletList/...":G.list,"BlockQuote/...":G.quote,"InlineCode CodeText":G.monospace,"URL Autolink":G.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":G.processingInstruction,"CodeInfo LinkLabel":G.labelName,LinkTitle:G.string,Paragraph:G.content}),lO=new ID(new NC(BD).extend(cO),Object.keys(DD).map(e=>DD[e]),Object.keys(DD).map(e=>jD[e]),Object.keys(DD),MD,cD,Object.keys(QD).map(e=>QD[e]),Object.keys(QD),[]);function uO(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function dO(e){let{codeParser:t,htmlParser:n}=e;return{wrap:sw((e,r)=>{let i=e.type.id;if(t&&(i==q.CodeBlock||i==q.FencedCode)){let n=``;if(i==q.FencedCode){let t=e.node.getChild(q.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==q.CodeText,bracketed:i==q.FencedCode}}else if(n&&(i==q.HTMLBlock||i==q.HTMLTag||i==q.CommentBlock))return{parser:n,overlay:uO(e.node,e.from,e.to)};return null})}}var fO={resolve:`Strikethrough`,mark:`StrikethroughMark`},pO={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":G.strikethrough}},{name:`StrikethroughMark`,style:G.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=ZD.test(r),c=ZD.test(i);return e.addDelimiter(fO,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function mO(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function hO(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var gO=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,_O=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&gO.test(r=t.text.slice(t.pos))){let i=[];mO(e,n.content,0,i,n.start)==mO(e,r,t.pos)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];mO(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},vO={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":G.heading}},`TableRow`,{name:`TableCell`,style:G.content},{name:`TableDelimiter`,style:G.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return hO(t.content,0)?new _O:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof _O)||!hO(t.text,t.basePos))return!1;let r=e.peekLine();return gO.test(r)&&mO(e,t.text,t.basePos)==mO(e,r,t.basePos)},before:`SetextHeading`}]},yO=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},bO={defineNodes:[{name:`Task`,block:!0,style:G.list},{name:`TaskMarker`,style:G.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new yO:null},after:`SetextHeading`}]},xO=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,SO=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,CO=/[\w-]+\.[\w-]+($|\/)/,wO=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,TO=/\/[a-zA-Z\d@.]+/gy;function EO(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function DO(e,t){SO.lastIndex=t;let n=SO.exec(e);if(!n||CO.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&EO(e,t,r,`)`)>EO(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function OO(e,t){wO.lastIndex=t;let n=wO.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var kO=[vO,bO,pO,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;xO.lastIndex=r;let i=xO.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=DO(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=OO(e.text,r):(a=OO(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(TO.lastIndex=a,i=TO.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function AO(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),lD(s))break}return-1}}var jO={defineNodes:[{name:`Superscript`,style:G.special(G.content)},{name:`SuperscriptMark`,style:G.processingInstruction}],parseInline:[{name:`Superscript`,parse:AO(94,`Superscript`,`SuperscriptMark`)}]},MO={defineNodes:[{name:`Subscript`,style:G.special(G.content)},{name:`SubscriptMark`,style:G.processingInstruction}],parseInline:[{name:`Subscript`,parse:AO(126,`Subscript`,`SubscriptMark`)}]},NO={defineNodes:[{name:`Emoji`,style:G.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},PO=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new FO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from,c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(r==0&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&e.buffer[r-4]==0&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t){e.buffer[r-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new IO(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new FO(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},FO=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},IO=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},LO=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function RO(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var zO=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},BO=new zO,VO=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=BO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=BO,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},HO=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;GO(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};HO.prototype.contextual=HO.prototype.fallback=HO.prototype.extend=!1;var UO=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?RO(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(GO(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};UO.prototype.contextual=HO.prototype.fallback=HO.prototype.extend=!1;var WO=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function GO(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||qO(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function KO(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function qO(e,t,n,r){let i=KO(n,r,t);return i<0||KO(n,r,e)<i}var JO=typeof process<`u`&&/\bparse\b/.test({}.LOG),YO=null;function XO(e,t,n){let r=e.cursor(IC.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var ZO=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?XO(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?XO(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof LC){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(U.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},QO=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new zO)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new zO,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new zO,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=ak(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(ak(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction(ak(o,s+1),t,n,r))}return r}},$O=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new VO(t,r),this.tokens=new QO(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[PO.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new ZO(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&ok(r);if(e)return JO&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw JO&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return JO&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=JO?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(U.contextHash)||0)==n))return e.useNode(o,r),JO&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof LC)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof LC&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),JO&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),JO&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return ek(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=JO?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),JO&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(JO&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)JO&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))JO&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),JO&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),ek(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),LC.build({buffer:LO.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(YO||=new WeakMap).get(e);return t||YO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function ek(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var tk=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},nk=e=>e,rk=class{constructor(e){this.start=e.start,this.shift=e.shift||nk,this.reduce=e.reduce||nk,this.reuse=e.reuse||nk,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},ik=class e extends aw{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=U[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new NC(t.map((t,i)=>MC.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=DC;let a=RO(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(sk),this.states=RO(e.states,Uint32Array),this.data=RO(e.stateData),this.goto=RO(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new HO(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new $O(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=ak(n,i+2)];else if(n[i+1]==2)return ak(n,i+2);else break;if(a==t||a==0)return ak(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=ak(this.data,n+2);else break;r=t(ak(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=ak(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=sk(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new tk(e,n,r)}static deserialize(t){return new e(t)}};function ak(e,t){return e[t]|e[t+1]<<16}function ok(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function sk(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var ck=55,lk=1,uk=56,dk=2,fk=57,pk=3,mk=4,hk=5,gk=6,_k=7,vk=8,yk=9,bk=10,xk=11,Sk=12,Ck=13,wk=58,Tk=14,Ek=15,Dk=59,Ok=21,kk=23,Ak=24,jk=25,Mk=27,Nk=28,Pk=29,Fk=32,Ik=35,Lk=37,Rk=38,zk=0,Bk=1,Vk={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Hk={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Uk={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Wk(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Gk=null,Kk=null,qk=0;function Jk(e,t){let n=e.pos+t;if(qk==n&&Kk==e)return Gk;let r=e.peek(t),i=``;for(;Wk(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Kk=e,qk=n,Gk=i?i.toLowerCase():r==Qk||r==$k?void 0:null}var Yk=60,Xk=62,Zk=47,Qk=63,$k=33,eA=45;function tA(e,t){this.name=e,this.parent=t}var nA=[gk,bk,_k,vk,yk],rA=new rk({start:null,shift(e,t,n,r){return nA.indexOf(t)>-1?new tA(Jk(r,1)||``,e):e},reduce(e,t){return t==Ok&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==gk||i==Lk?new tA(Jk(r,1)||``,e):e},strict:!1}),iA=new WO((e,t)=>{if(e.next!=Yk){e.next<0&&t.context&&e.acceptToken(wk);return}e.advance();let n=e.next==Zk;n&&e.advance();let r=Jk(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?Ek:Tk);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(xk);if(i&&Hk[i])return e.acceptToken(wk,-2);if(t.dialectEnabled(zk))return e.acceptToken(Sk);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(Ck)}else{if(r==`script`)return e.acceptToken(_k);if(r==`style`)return e.acceptToken(vk);if(r==`textarea`)return e.acceptToken(yk);if(Vk.hasOwnProperty(r))return e.acceptToken(bk);i&&Uk[i]&&Uk[i][r]?e.acceptToken(wk,-1):e.acceptToken(gk)}},{contextual:!0}),aA=new WO(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Dk);break}if(e.next==eA)t++;else if(e.next==Xk&&t>=2){n>=3&&e.acceptToken(Dk,-2);break}else t=0;e.advance()}});function oA(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var sA=new WO((e,t)=>{if(e.next==Zk&&e.peek(1)==Xk){let n=t.dialectEnabled(Bk)||oA(t.context);e.acceptToken(n?hk:mk,2)}else e.next==Xk&&e.acceptToken(mk,1)});function cA(e,t,n){let r=2+e.length;return new WO(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==Yk||a==1&&i.next==Zk||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==Xk){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var lA=cA(`script`,ck,lk),uA=cA(`style`,uk,dk),dA=cA(`textarea`,fk,pk),fA=Dw({"Text RawText IncompleteTag IncompleteCloseTag":G.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":G.angleBracket,TagName:G.tagName,"MismatchedCloseTag/TagName":[G.tagName,G.invalid],AttributeName:G.attributeName,"AttributeValue UnquotedAttributeValue":G.attributeValue,Is:G.definitionOperator,"EntityReference CharacterReference":G.character,Comment:G.blockComment,ProcessingInst:G.processingInstruction,DoctypeDecl:G.documentMeta}),pA=ik.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&r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X![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:rA,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`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7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[lA,uA,dA,sA,iA,aA,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function mA(e,t){let n=Object.create(null);for(let r of e.getChildren(Ak)){let e=r.getChild(jk),i=r.getChild(Mk)||r.getChild(Nk);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Mk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function hA(e,t){let n=e.getChild(kk);return n?t.read(n.from,n.to):` `}function gA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=mA(e.node.parent.firstChild,t)))return{parser:i.parser,bracketed:!0};return null}function _A(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return sw((e,t)=>{let s=e.type.id;if(s==Pk)return gA(e,t,n);if(s==Fk)return gA(e,t,r);if(s==Ik)return gA(e,t,i);if(s==Ok&&a.length){let n=e.node,r=n.firstChild,i=r&&hA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=mA(r,t)))){let t=n.lastChild,i=t.type.id==Rk?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==Ak){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=hA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Mk){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}],bracketed:!0}}else if(e.type.id==Nk)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var vA=122,yA=1,bA=123,xA=124,SA=2,CA=125,wA=3,TA=4,EA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],DA=58,OA=40,kA=95,AA=91,jA=45,MA=46,NA=35,PA=37,FA=38,IA=92,LA=10,RA=42;function zA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function BA(e){return e>=48&&e<=57}function VA(e){return BA(e)||e>=97&&e<=102||e>=65&&e<=70}var HA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(zA(c)||c==jA||c==kA||a&&BA(c))!a&&(c!=jA||s>0)&&(a=!0),o===s&&c==jA&&o++,r.advance();else if(c==IA&&r.peek(1)!=LA){if(r.advance(),VA(r.next)){do r.advance();while(VA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(SA)?t:c==OA?n:e);break}}},UA=new WO(HA(bA,SA,xA)),WA=new WO(HA(CA,wA,TA)),GA=new WO(e=>{if(EA.includes(e.peek(-1))){let{next:t}=e;(zA(t)||t==kA||t==NA||t==MA||t==RA||t==AA||t==DA&&zA(e.peek(1))||t==jA||t==FA)&&e.acceptToken(vA)}}),KA=new WO(e=>{if(!EA.includes(e.peek(-1))){let{next:t}=e;if(t==PA&&(e.advance(),e.acceptToken(yA)),zA(t)){do e.advance();while(zA(e.next)||BA(e.next));e.acceptToken(yA)}}}),qA=Dw({"AtKeyword import charset namespace keyframes media supports":G.definitionKeyword,"from to selector":G.keyword,NamespaceName:G.namespace,KeyframeName:G.labelName,KeyframeRangeName:G.operatorKeyword,TagName:G.tagName,ClassName:G.className,PseudoClassName:G.constant(G.className),IdName:G.labelName,"FeatureName PropertyName":G.propertyName,AttributeName:G.attributeName,NumberLiteral:G.number,KeywordQuery:G.keyword,UnaryQueryOp:G.operatorKeyword,"CallTag ValueName":G.atom,VariableName:G.variableName,Callee:G.operatorKeyword,Unit:G.unit,"UniversalSelector NestingSelector":G.definitionOperator,"MatchOp CompareOp":G.compareOperator,"ChildOp SiblingOp, LogicOp":G.logicOperator,BinOp:G.arithmeticOperator,Important:G.modifier,Comment:G.blockComment,ColorLiteral:G.color,"ParenthesizedContent StringLiteral":G.string,":":G.punctuation,"PseudoOp #":G.derefOperator,"; ,":G.separator,"( )":G.paren,"[ ]":G.squareBracket,"{ }":G.brace}),JA={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},YA={__proto__:null,or:98,and:98,not:106,only:106,layer:170},XA={__proto__:null,selector:112,layer:166},ZA={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},QA={__proto__:null,to:207},$A=ik.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS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ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles`,maxTerm:143,nodeProps:[[`isolate`,-2,5,36,``],[`openedBy`,20,`(`,28,`[`,31,`{`],[`closedBy`,21,`)`,29,`]`,32,`}`]],propSources:[qA],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$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'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[GA,KA,UA,WA,1,2,3,4,new UO(`m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~`,28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:e=>JA[e]||-1},{term:125,get:e=>YA[e]||-1},{term:4,get:e=>XA[e]||-1},{term:25,get:e=>ZA[e]||-1},{term:123,get:e=>QA[e]||-1}],tokenPrec:1963}),ej=null;function tj(){if(!ej&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));ej=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return ej||[]}var nj=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),rj=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),ij=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),aj=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),oj=/^(\w[\w-]*|-\w[\w-]*|)$/,sj=/^-(-[\w-]*)?$/;function cj(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`?t.sliceString(n.from,n.to)==`var`:!1}var lj=new rw,uj=[`Declaration`];function dj(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function fj(e,t,n){if(t.to-t.from>4096){let r=lj.get(t);if(r)return r;let i=[],a=new Set,o=t.cursor(IC.IncludeAnonymous);if(o.firstChild())do for(let t of fj(e,o.node,n))a.has(t.label)||(a.add(t.label),i.push(t));while(o.nextSibling());return lj.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(uj)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var pj=(e=>t=>{let{state:n,pos:r}=t,i=tT(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:tj(),validFor:oj};if(i.name==`ValueName`)return{from:i.from,options:rj,validFor:oj};if(i.name==`PseudoClassName`)return{from:i.from,options:nj,validFor:oj};if(e(i)||(t.explicit||a)&&cj(i,n.doc))return{from:e(i)||a?i.from:r,options:fj(n.doc,dj(i),e),validFor:sj};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:tj(),validFor:oj};return{from:i.from,options:ij,validFor:oj}}if(i.name==`AtKeyword`)return{from:i.from,options:aj,validFor:oj};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:nj,validFor:oj}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:rj,validFor:oj}:o.name==`Block`||o.name==`Styles`?{from:r,options:tj(),validFor:oj}:null})(e=>e.name==`VariableName`),mj=eT.define({name:`css`,parser:$A.configure({props:[mT.add({Declaration:yT()}),xT.add({"Block KeyframeList":ST})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function hj(){return new dT(mj,mj.data.of({autocomplete:pj}))}var gj=316,_j=317,vj=1,yj=2,bj=3,xj=4,Sj=318,Cj=320,wj=321,Tj=5,Ej=6,Dj=0,Oj=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],kj=125,Aj=59,jj=47,Mj=42,Nj=43,Pj=45,Fj=60,Ij=44,Lj=63,Rj=46,zj=91,Bj=new rk({start:!1,shift(e,t){return t==Tj||t==Ej||t==Cj?e:t==wj},strict:!1}),Vj=new WO((e,t)=>{let{next:n}=e;(n==kj||n==-1||t.context)&&e.acceptToken(Sj)},{contextual:!0,fallback:!0}),Hj=new WO((e,t)=>{let{next:n}=e,r;Oj.indexOf(n)>-1||n==jj&&((r=e.peek(1))==jj||r==Mj)||n!=kj&&n!=Aj&&n!=-1&&!t.context&&e.acceptToken(gj)},{contextual:!0}),Uj=new WO((e,t)=>{e.next==zj&&!t.context&&e.acceptToken(_j)},{contextual:!0}),Wj=new WO((e,t)=>{let{next:n}=e;if(n==Nj||n==Pj){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(vj);e.acceptToken(n?vj:yj)}}else n==Lj&&e.peek(1)==Rj&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(bj))},{contextual:!0});function Gj(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var Kj=new WO((e,t)=>{if(e.next!=Fj||!t.dialectEnabled(Dj)||(e.advance(),e.next==jj))return;let n=0;for(;Oj.indexOf(e.next)>-1;)e.advance(),n++;if(Gj(e.next,!0)){for(e.advance(),n++;Gj(e.next,!1);)e.advance(),n++;for(;Oj.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==Ij)return;for(let t=0;;t++){if(t==7){if(!Gj(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(xj,-n)}),qj=Dw({"get set async static":G.modifier,"for while do if else switch try catch finally return throw break continue default case defer":G.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":G.operatorKeyword,"let var const using function class extends":G.definitionKeyword,"import export from":G.moduleKeyword,"with debugger new":G.keyword,TemplateString:G.special(G.string),super:G.atom,BooleanLiteral:G.bool,this:G.self,null:G.null,Star:G.modifier,VariableName:G.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":G.function(G.variableName),VariableDefinition:G.definition(G.variableName),Label:G.labelName,PropertyName:G.propertyName,PrivatePropertyName:G.special(G.propertyName),"CallExpression/MemberExpression/PropertyName":G.function(G.propertyName),"FunctionDeclaration/VariableDefinition":G.function(G.definition(G.variableName)),"ClassDeclaration/VariableDefinition":G.definition(G.className),"NewExpression/VariableName":G.className,PropertyDefinition:G.definition(G.propertyName),PrivatePropertyDefinition:G.definition(G.special(G.propertyName)),UpdateOp:G.updateOperator,"LineComment Hashbang":G.lineComment,BlockComment:G.blockComment,Number:G.number,String:G.string,Escape:G.escape,ArithOp:G.arithmeticOperator,LogicOp:G.logicOperator,BitOp:G.bitwiseOperator,CompareOp:G.compareOperator,RegExp:G.regexp,Equals:G.definitionOperator,Arrow:G.function(G.punctuation),": Spread":G.punctuation,"( )":G.paren,"[ ]":G.squareBracket,"{ }":G.brace,"InterpolationStart InterpolationEnd":G.special(G.brace),".":G.derefOperator,", ;":G.separator,"@":G.meta,TypeName:G.typeName,TypeDefinition:G.definition(G.typeName),"type enum interface implements namespace module declare":G.definitionKeyword,"abstract global Privacy readonly override":G.modifier,"is keyof unique infer asserts":G.operatorKeyword,JSXAttributeValue:G.attributeValue,JSXText:G.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":G.angleBracket,"JSXIdentifier JSXNameSpacedName":G.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":G.attributeName,"JSXBuiltin/JSXIdentifier":G.standard(G.tagName)}),Jj={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Yj={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Xj={__proto__:null,"<":193},Zj=ik.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'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Z%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:380,context:Bj,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,`Expression`,-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,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Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new UO(`j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~`,25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>Jj[e]||-1},{term:343,get:e=>Yj[e]||-1},{term:95,get:e=>Xj[e]||-1}],tokenPrec:15201}),Qj=[tD("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),tD("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),tD("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),tD(`do {
|
|
80
|
+
\${}
|
|
81
|
+
} while (\${})`,{label:`do`,detail:`loop`,type:`keyword`}),tD(`while (\${}) {
|
|
82
|
+
\${}
|
|
83
|
+
}`,{label:`while`,detail:`loop`,type:`keyword`}),tD(`try {
|
|
84
|
+
\${}
|
|
85
|
+
} catch (\${error}) {
|
|
86
|
+
\${}
|
|
87
|
+
}`,{label:`try`,detail:`/ catch block`,type:`keyword`}),tD(`if (\${}) {
|
|
88
|
+
\${}
|
|
89
|
+
}`,{label:`if`,detail:`block`,type:`keyword`}),tD(`if (\${}) {
|
|
90
|
+
\${}
|
|
91
|
+
} else {
|
|
92
|
+
\${}
|
|
93
|
+
}`,{label:`if`,detail:`/ else block`,type:`keyword`}),tD(`class \${name} {
|
|
94
|
+
constructor(\${params}) {
|
|
95
|
+
\${}
|
|
96
|
+
}
|
|
97
|
+
}`,{label:`class`,detail:`definition`,type:`keyword`}),tD('import {${names}} from "${module}"\n${}',{label:`import`,detail:`named`,type:`keyword`}),tD('import ${name} from "${module}"\n${}',{label:`import`,detail:`default`,type:`keyword`})],$j=Qj.concat([tD(`interface \${name} {
|
|
98
|
+
\${}
|
|
99
|
+
}`,{label:`interface`,detail:`definition`,type:`keyword`}),tD("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),tD(`enum \${name} {
|
|
100
|
+
\${}
|
|
101
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),eM=new rw,tM=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function nM(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var rM=[`FunctionDeclaration`],iM={FunctionDeclaration:nM(`function`),ClassDeclaration:nM(`class`),ClassExpression:()=>!0,EnumDeclaration:nM(`constant`),TypeAliasDeclaration:nM(`type`),NamespaceDeclaration:nM(`namespace`),VariableDefinition(e,t){e.matchContext(rM)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function aM(e,t){let n=eM.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(IC.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=iM[t.name];if(e&&e(t,a)||tM.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of aM(e,t.node))r.push(n);return!1}}),eM.set(t,r),r}var oM=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,sM=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function cM(e){let t=tT(e.state).resolveInner(e.pos,-1);if(sM.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&oM.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)tM.has(n.name)&&(r=r.concat(aM(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:oM}}var lM=eT.define({name:`javascript`,parser:Zj.configure({props:[mT.add({IfStatement:yT({except:/^\s*({|else\b)/}),TryStatement:yT({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:vT,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:gT({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":yT({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),xT.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ST,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),uM={test:e=>/^JSX/.test(e.name),facet:Xw({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},dM=lM.configure({dialect:`ts`},`typescript`),fM=lM.configure({dialect:`jsx`,props:[Zw.add(e=>e.isTop?[uM]:void 0)]}),pM=lM.configure({dialect:`jsx ts`,props:[Zw.add(e=>e.isTop?[uM]:void 0)]},`typescript`),mM=e=>({label:e,type:`keyword`}),hM=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(mM),gM=hM.concat([`declare`,`implements`,`private`,`protected`,`public`].map(mM));function _M(e={}){let t=e.jsx?e.typescript?pM:fM:e.typescript?dM:lM,n=e.typescript?$j.concat(gM):Qj.concat(hM);return new dT(t,[lM.data.of({autocomplete:IE(sM,FE(n))}),lM.data.of({autocomplete:cM}),e.jsx?xM:[]])}function vM(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function yM(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var bM=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),xM=H.inputHandler.of((e,t,n,r,i)=>{if((bM?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!lM.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=tT(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=yM(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:z.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=vM(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=yM(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),SM=[`_blank`,`_self`,`_top`,`_parent`],CM=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],wM=[`get`,`post`,`put`,`delete`],TM=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],EM=[`true`,`false`],Y={},DM={a:{attrs:{href:null,ping:null,type:null,media:null,target:SM,hreflang:null}},abbr:Y,address:Y,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:Y,aside:Y,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:Y,base:{attrs:{href:null,target:SM}},bdi:Y,bdo:Y,blockquote:{attrs:{cite:null}},body:Y,br:Y,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:TM,formmethod:wM,formnovalidate:[`novalidate`],formtarget:SM,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:Y,center:Y,cite:Y,code:Y,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:Y,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:Y,div:Y,dl:Y,dt:Y,em:Y,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:Y,figure:Y,footer:Y,form:{attrs:{action:null,name:null,"accept-charset":CM,autocomplete:[`on`,`off`],enctype:TM,method:wM,novalidate:[`novalidate`],target:SM}},h1:Y,h2:Y,h3:Y,h4:Y,h5:Y,h6:Y,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:Y,hgroup:Y,hr:Y,html:{attrs:{manifest:null}},i:Y,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:TM,formmethod:wM,formnovalidate:[`novalidate`],formtarget:SM,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:Y,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:Y,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:Y,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:CM,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Y,noscript:Y,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Y,param:{attrs:{name:null,value:null}},pre:Y,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Y,rt:Y,ruby:Y,samp:Y,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:CM}},section:Y,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:Y,source:{attrs:{src:null,type:null,media:null}},span:Y,strong:Y,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:Y,summary:Y,sup:Y,table:Y,tbody:Y,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Y,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:Y,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:Y,time:{attrs:{datetime:null}},title:Y,tr:Y,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:Y,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:Y},OM={accesskey:null,class:null,contenteditable:EM,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:EM,autocorrect:EM,autocapitalize:EM,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":EM,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":EM,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":EM,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":EM,"aria-hidden":EM,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":EM,"aria-multiselectable":EM,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":EM,"aria-relevant":null,"aria-required":EM,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},kM=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of kM)OM[e]=null;var AM=class{constructor(e,t){this.tags={...DM,...e},this.globalAttrs={...OM,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};AM.default=new AM;function jM(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function MM(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function NM(e,t,n){return n.tags[jM(e,MM(t))]?.children||n.allTags}function PM(e,t){let n=[];for(let r=MM(t);r&&!r.type.isTop;r=MM(r.parent)){let i=jM(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var FM=/^[:\-\.\w\u00b7-\uffff]*$/;function IM(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=MM(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:NM(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(PM(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function LM(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:PM(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:FM}}function RM(e,t,n,r){let i=[],a=0;for(let r of NM(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of PM(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function zM(e,t,n,r,i){let a=MM(n),o=a?t.tags[jM(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:FM}}function BM(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=MM(n),i=r?t.tags[jM(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function VM(e,t){let{state:n,pos:r}=t,i=tT(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?LM(n,i,i.from,r):IM(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?IM(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?LM(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?zM(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?BM(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?RM(n,e,i,r):null}function HM(e){return VM(AM.default,e)}function UM(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new AM(t,n):AM.default;return e=>VM(r,e)}var WM=lM.parser.configure({top:`SingleExpression`}),GM=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:dM.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:fM.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:pM.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:WM},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:lM.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:mj.parser}],KM=[{name:`style`,parser:mj.parser.configure({top:`Styles`})}].concat(kM.map(e=>({name:e,parser:lM.parser}))),qM=eT.define({name:`html`,parser:pA.configure({props:[mT.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),xT.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),AT.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),JM=qM.configure({wrap:_A(GM,KM)});function YM(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=_A((e.nestedLanguages||[]).concat(GM),(e.nestedAttributes||[]).concat(KM))),new dT(n?qM.configure({wrap:n,dialect:t}):t?JM.configure({dialect:t}):JM,[JM.data.of({autocomplete:UM(e)}),e.autoCloseTags===!1?[]:ZM,_M().support,hj().support])}var XM=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),ZM=H.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!JM.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=tT(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=jM(o.doc,t.parent,n))&&!XM.has(a))return{range:e,changes:{from:n,to:n+ +(o.doc.sliceString(n,n+1)===`>`),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=jM(o.doc,e,n))&&!XM.has(a)){let e=n+ +(o.doc.sliceString(n,n+1)===`>`),t=`${a}>`;return{range:z.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),QM=Xw({commentTokens:{block:{open:`<!--`,close:`-->`}}}),$M=new U,eN=lO.configure({props:[xT.add(e=>!e.is(`Block`)||e.is(`Document`)||tN(e)!=null||nN(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),$M.add(tN),mT.add({Document:()=>null}),Yw.add({Document:QM})]});function tN(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function nN(e){return e.name==`OrderedList`||e.name==`BulletList`}function rN(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=tN(e.type))!=null&&r<=t)break;n=e}return n.to}var iN=bT.of((e,t,n)=>{for(let r=tT(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop($M);if(e==null)continue;let t=rN(r,e);if(t>n)return{from:n,to:t}}return null});function aN(e){return new Qw(QM,e,[],`markdown`)}var oN=aN(eN),sN=aN(eN.configure([kO,MO,jO,NO,{props:[xT.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function cN(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):fT.matchLanguageName(e,n,!0),t instanceof fT)return t.support?t.support.language.parser:iT.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var lN=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+dN(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function uN(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new lN(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new lN(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new lN(i.parent,s,s+t,a[1],e,n,i))}}return r}function dN(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function fN(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=dN(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function pN(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(pT)!=` `)return e;let r=N_(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var mN=((e={})=>({state:t,dispatch:n})=>{let r=tT(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!sN.isActiveAt(t,n.from,-1)&&!sN.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=uN(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&fN(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&fN(e.item,i,r),{range:z.cursor(t+n.length),changes:r}}else{let e=_N(c,t,s);return{range:z.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&fN(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?N_(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=pN(p,t),gN(l.node,t.doc)&&(p=_N(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:z.cursor(m+p.length+1),changes:d}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)})();function hN(e){return e.name==`QuoteMark`||e.name==`ListMark`}function gN(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function _N(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?N_(n.text,4,e[t+1].from)-r.length:null,t<i);return pN(r,t)}function vN(e,t){let n=e.resolveInner(t,-1),r=t;hN(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(hN(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var yN=[{key:`Enter`,run:mN},{key:`Backspace`,run:({state:e,dispatch:t})=>{let n=tT(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&sN.isActiveAt(e,t.from)){let t=a.lineAt(i),r=uN(vN(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:z.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(N_(t.text,4,n.to)-N_(t.text,4,n.from));return r==t.from&&(i=pN(i,e)),{range:z.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:z.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)}}],bN=YM({matchClosingTags:!1});function xN(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=oN,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=bN}=e;if(!(i instanceof ID))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,iN],u;o&&l.push(EN),n instanceof dT?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?cN(t,u):void 0;c.push(dO({codeParser:d,htmlParser:s.language.parser})),r&&l.push(Pg.high(QS.of(yN)));let f=aN(i.configure(c));return a&&l.push(f.data.of({autocomplete:SN})),new dT(f,l)}function SN(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=tT(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:wN(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var CN=null;function wN(){if(CN)return CN;let e=HM(new ME(p_.create({extensions:bN}),0,!0));return CN=e?e.options:[]}var TN=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,EN=H.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!sN.isActiveAt(t.state,n.from,1)))return!1;let i=tT(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||TN.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function DN(e,t,n={}){if(!e)return!1;let{pulse:r=!1,behavior:i=`smooth`}=n,a=t.querySelector(`[data-annotation-id="${CSS.escape(e)}"]`);if(!a)return!1;let o=a.closest(`.semiont-browse-view__content`)||a.closest(`.semiont-annotate-view__content`)||a.closest(`.semiont-document-viewer__scrollable-body`);if(o){let e=a.getBoundingClientRect(),t=o.getBoundingClientRect();if(!(e.top>=t.top&&e.bottom<=t.bottom)){let e=a.offsetTop,t=o.clientHeight,n=a.offsetHeight,r=e-t/2+n/2;o.scrollTo({top:r,behavior:i})}}return r&&(a.classList.add(`annotation-pulse`),setTimeout(()=>{a.classList.remove(`annotation-pulse`)},2e3)),!0}function ON(e,t){if(!t.includes(`\r
|
|
102
|
+
`))return e;let n=[];for(let e=0;e<t.length-1;e++)t[e]===`\r`&&t[e+1]===`
|
|
103
|
+
`&&n.push(e);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t};return e.map(e=>({...e,start:r(e.start),end:r(e.end)}))}function kN(e){let t=ao(e),n=no(e),r=io(e),i=oo(e),a=ro(e),o=co(e);return t?`Comment`:n?`Highlight`:r?`Assessment`:i?`Tag`:o?`Resolved Reference`:a?`Unresolved Reference`:`Annotation`}function AN(e,t){let n=Object.values(Ih).find(t=>t.matchesAnnotation(e))?.className||`annotation-highlight`,r=t?`${n} annotation-sparkle`:n,i=no(e),a=ro(e),o=ao(e),s=io(e),c=oo(e),l=`highlight`;return o?l=`comment`:a?l=`reference`:s?l=`assessment`:c?l=`tag`:i&&(l=`highlight`),{className:r,annotationType:l,annotationId:e.id,tooltip:kN(e)}}function jN(e,t){return e.filter(e=>e.annotation).sort((e,t)=>e.start-t.start).map(e=>{let n=e.annotation,r=t?.has(n.id)||!1;return{start:e.start,end:e.end,meta:AN(n,r)}})}function MN(e,t,n){return e.filter(e=>e.annotation&&ro(e.annotation)).sort((e,t)=>e.end-t.end).map(e=>{let r=e.annotation,i=$a(r.body),a=i?n?.(i):void 0,o=t?r.id===t:!1;return{annotationId:r.id,position:e.end,targetName:a,isGenerating:o,bodySource:i??void 0}})}function NN(e,t,n){let r=e.closest(`[data-annotation-id]`)?.getAttribute(`data-annotation-id`);if(!r)return!1;let i=t.get(r);return i?.annotation?(n.client.browse.click(za(r),i.annotation.motivation),!0):!1}function PN(e){let t=e.closest(`.reference-preview-widget`);if(!t||t.dataset.widgetGenerating===`true`)return{handled:!1};let n=t.dataset.widgetAnnotationId,r=t.dataset.widgetBodySource,i=t.dataset.widgetResolved===`true`;return n?i&&r?{handled:!0,action:`navigate`,resourceId:r,annotationId:n}:{handled:!0,action:`browse-click`,annotationId:n,motivation:t.dataset.widgetMotivation||`linking`}:{handled:!1}}function FN(e,t){e.handled&&(e.action===`navigate`&&e.resourceId?t.client.browse.navigateReference(Ra(e.resourceId)):e.action===`browse-click`&&e.annotationId&&t.client.browse.click(za(e.annotationId),e.motivation||`linking`))}function IN(e){let t=e.closest(`.reference-preview-widget`);if(!t||t.dataset.widgetGenerating===`true`)return{showPreview:!1,widget:null};let n=t.querySelector(`.reference-indicator`);return n&&(n.style.opacity=`1`),t.dataset.widgetResolved===`true`&&t.dataset.widgetTargetName?{showPreview:!0,targetName:t.dataset.widgetTargetName,widget:t}:{showPreview:!1,widget:t}}function LN(e){let t=e.closest(`.reference-preview-widget`);if(!t)return{hidePreview:!1,widget:null};let n=t.querySelector(`.reference-indicator`);return n&&(n.style.opacity=`0.6`),t.dataset.widgetResolved===`true`?{hidePreview:!0,widget:t}:{hidePreview:!1,widget:t}}var RN=Qg.define(),zN=Qg.define();function BN(e,t){let n=new S_,r=jN(e,t);for(let{start:e,end:t,meta:i}of r){let r=mv.mark({class:i.className,attributes:{"data-annotation-id":i.annotationId,"data-annotation-type":i.annotationType,title:i.tooltip}});n.add(e,t,r)}return n.finish()}function VN(){return jg.define({create(){return mv.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is(RN)&&(e=BN(n.value.segments,n.value.newAnnotationIds));return e},provide:e=>H.decorations.from(e)})}function HN(e,t,n,r){let i=new S_,a=MN(t,n,r),o=new Map;for(let e of t)e.annotation&&ro(e.annotation)&&o.set(e.end,e);for(let e of a){let t=o.get(e.position);if(!t?.annotation)continue;let n=new BT(t.annotation,e.targetName,e.isGenerating);i.add(e.position,e.position,mv.widget({widget:n,side:1}))}return i.finish()}var UN=jg.define({create(){return mv.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is(zN)&&(e=HN(n.value.content,n.value.segments,n.value.generatingReferenceId,n.value.getTargetResourceName));return e},provide:e=>H.decorations.from(e)});function WN({content:e,segments:t=[],onChange:n,editable:r=!1,newAnnotationIds:i,hoveredAnnotationId:a,scrollToAnnotationId:o,sourceView:s=!1,showLineNumbers:c=!1,enableWidgets:l=!1,session:u,getTargetResourceName:d,generatingReferenceId:f,hoverDelayMs:p}){let h=(0,m.useRef)(null),g=(0,m.useRef)(null),_=(0,m.useRef)(e),v=ON(t,e),y=(0,m.useRef)(v),b=(0,m.useRef)(new Map),x=(0,m.useRef)(new Ig),S=(0,m.useRef)(u),C=(0,m.useRef)(d);y.current=t;let w=new Map;for(let e of t)e.annotation&&w.set(e.annotation.id,e);return b.current=w,S.current=u,C.current=d,(0,m.useEffect)(()=>{if(!h.current||g.current)return;let t=VN(),i=new H({state:p_.create({doc:e,extensions:[xN(),x.current.of(c?TC():[]),H.editable.of(r),H.lineWrapping,t,l?UN:[],H.updateListener.of(e=>{if(e.docChanged&&n){let t=e.state.doc.toString();_.current=t,n(t)}}),H.domEventHandlers({click:(e,t)=>{let n=e.target;return S.current&&NN(n,b.current,S.current)?(e.preventDefault(),!0):!1}}),H.baseTheme({"&.cm-editor":{height:`100%`,outline:`none`},"&.cm-editor.cm-focused":{outline:`none`},".cm-scroller":{overflow:`visible !important`,height:`auto !important`},".cm-content, .cm-gutters":{minHeight:`0 !important`},".cm-content":{padding:s?`1rem`:`0`,fontFamily:s?`ui-monospace, monospace`:`inherit`,fontSize:s?`0.875rem`:`inherit`,lineHeight:`1.6`,whiteSpace:s?`pre-wrap`:`pre`,caretColor:`var(--cm-cursor-color, #000000)`},".cm-line":{padding:`0`,wordBreak:s?`break-word`:`normal`},".cm-gutters":{backgroundColor:`transparent`,border:`none`,paddingRight:`0.5rem`},".cm-lineNumbers .cm-gutterElement":{minWidth:`2rem`,color:`rgb(156, 163, 175)`,opacity:`0.7`}})]}),parent:h.current});g.current=i,_.current=e,h.current.__cmView=i;let a=i.dom,{handleMouseEnter:o,handleMouseLeave:u,cleanup:d}=Hu(e=>S.current?.client.beckon.hover(e),p),f=e=>{let t=e.target.closest(`[data-annotation-id]`)?.getAttribute(`data-annotation-id`);t&&o(za(t))},m=e=>{e.target.closest(`[data-annotation-id]`)&&u()},v=e=>{let t=e.target,n=PN(t);n.handled&&(e.preventDefault(),e.stopPropagation(),S.current&&FN(n,S.current))},y=e=>{let t=e.target,n=IN(t);n.showPreview&&n.targetName&&n.widget&&VT(n.widget,n.targetName)},C=e=>{let t=e.target,n=LN(t);n.hidePreview&&n.widget&&HT(n.widget)};return a.addEventListener(`mouseover`,f),a.addEventListener(`mouseout`,m),a.addEventListener(`click`,v),a.addEventListener(`mouseenter`,y,!0),a.addEventListener(`mouseleave`,C,!0),()=>{a.removeEventListener(`mouseover`,f),a.removeEventListener(`mouseout`,m),a.removeEventListener(`click`,v),a.removeEventListener(`mouseenter`,y,!0),a.removeEventListener(`mouseleave`,C,!0),d(),i.destroy(),g.current=null}},[p]),(0,m.useEffect)(()=>{if(!g.current||e===g.current.state.doc.toString())return;let t=g.current.state.selection.main;g.current.dispatch({changes:{from:0,to:g.current.state.doc.length,insert:e},selection:t.from<=e.length?t:void 0}),_.current=e},[e]),(0,m.useEffect)(()=>{g.current&&g.current.dispatch({effects:x.current.reconfigure(c?TC():[])})},[c]),(0,m.useEffect)(()=>{g.current&&g.current.dispatch({effects:RN.of({segments:v,...i&&{newAnnotationIds:i}})})},[v,i]),(0,m.useEffect)(()=>{!g.current||!l||g.current.dispatch({effects:zN.of({content:e,segments:v,generatingReferenceId:f,getTargetResourceName:C.current})})},[e,v,l,f]),(0,m.useEffect)(()=>{if(!g.current||!a)return;let e=g.current.contentDOM.querySelector(`[data-annotation-id="${CSS.escape(a)}"]`);if(!e)return;let t=e.closest(`.semiont-annotate-view__content`)||e.closest(`.semiont-document-viewer__scrollable-body`);if(t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(n.top>=r.top&&n.bottom<=r.bottom)){let n=e.offsetTop,r=t.clientHeight,i=e.offsetHeight,a=n-r/2+i/2;t.scrollTo({top:a,behavior:`smooth`})}}let n=setTimeout(()=>{e.classList.add(`annotation-pulse`)},100);return()=>{clearTimeout(n),e.classList.remove(`annotation-pulse`)}},[a]),(0,m.useEffect)(()=>{!g.current||!o||DN(o,g.current.contentDOM)},[o]),(0,P.jsx)(`div`,{ref:h,className:s?`semiont-codemirror semiont-codemirror--source`:`semiont-codemirror`,"data-markdown-container":!0})}function GN({progress:e,annotationType:t=`reference`}){let n=hh(`ReferencesPanel`),r=K(R().activeSession$);return e?(0,P.jsxs)(`div`,{className:`semiont-annotation-progress`,"data-status":e.stage,"data-type":t,children:[(0,P.jsxs)(`div`,{className:`semiont-annotation-header`,children:[(0,P.jsxs)(`h3`,{className:`semiont-annotation-title`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-sparkle`,children:`✨`}),n(`annotationProgressTitle`)]}),e.stage!==`complete`&&(0,P.jsx)(`button`,{onClick:()=>{r?.client.job.cancelRequest(`annotation`)},className:`semiont-annotation-cancel`,title:n(`cancelAnnotation`),children:`✕`})]}),e.requestParams&&e.requestParams.length>0&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__params`,children:[(0,P.jsx)(`div`,{className:`semiont-annotation-progress__params-title`,children:`Request Parameters:`}),e.requestParams.map((e,t)=>(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__param`,children:[(0,P.jsxs)(`span`,{className:`semiont-annotation-progress__param-label`,children:[e.label,`:`]}),` `,e.value]},t))]}),e.completedEntityTypes&&e.completedEntityTypes.length>0&&(0,P.jsx)(`div`,{className:`semiont-annotation-log`,children:e.completedEntityTypes.map((e,t)=>(0,P.jsxs)(`div`,{className:`semiont-annotation-log-item`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-check`,children:`✓`}),(0,P.jsxs)(`span`,{className:`semiont-annotation-entity-type`,children:[e.entityType,`:`]}),(0,P.jsx)(`span`,{children:n(`found`,{count:e.foundCount})})]},t))}),(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__status`,children:[e.stage===`complete`?(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__message`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-progress__icon`,children:`✅`}),(0,P.jsx)(`span`,{children:n(`complete`)})]}):e.stage===`error`?(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__message`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-progress__icon`,children:`❌`}),(0,P.jsx)(`span`,{children:e.message||n(`failed`)})]}):(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__message`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-progress__icon`,children:`✨`}),(0,P.jsx)(`span`,{children:e.message||(e.currentEntityType?n(`current`,{entityType:e.currentEntityType}):n(`annotating`))})]}),e.currentEntityType&&e.stage!==`complete`&&e.stage!==`error`&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__details`,children:[`Processing: `,e.currentEntityType]})]})]}):null}var KN=class extends m.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e,errorInfo:null}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t),this.setState({errorInfo:t})}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):(0,P.jsx)(qN,{error:this.state.error,reset:this.handleReset}):this.props.children}};function qN({error:e,reset:t}){return(0,P.jsx)(`div`,{className:`semiont-error-boundary-container`,children:(0,P.jsxs)(`div`,{className:`semiont-error-boundary-content`,children:[(0,P.jsxs)(`div`,{className:`semiont-error-boundary-header`,children:[(0,P.jsx)(`h2`,{className:`semiont-error-boundary-title`,children:`Oops! Something went wrong`}),(0,P.jsx)(`p`,{className:`semiont-error-boundary-message`,children:`We encountered an unexpected error. Please try again.`})]}),!1,(0,P.jsxs)(`div`,{className:`semiont-error-boundary-actions`,children:[(0,P.jsx)(`button`,{onClick:t,className:`semiont-button`,"data-variant":`primary`,children:`Try Again`}),(0,P.jsx)(`button`,{onClick:()=>window.location.href=`/`,className:`semiont-button`,"data-variant":`secondary`,children:`Go Home`})]})]})})}function JN({children:e,resetKeys:t}){return(0,P.jsx)(vh,{FallbackComponent:YN,onError:(e,t)=>{},...t&&{resetKeys:t},children:e})}function YN({error:e,resetErrorBoundary:t}){return(0,P.jsx)(`div`,{className:`min-h-[400px] flex items-center justify-center p-4`,children:(0,P.jsxs)(`div`,{className:`max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,P.jsx)(`div`,{className:`flex-shrink-0 w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center`,children:(0,P.jsx)(`svg`,{className:`w-6 h-6 text-red-600 dark:text-red-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`})})}),(0,P.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900 dark:text-white`,children:`Something went wrong`})]}),(0,P.jsx)(`p`,{className:`text-gray-600 dark:text-gray-300 mb-6`,children:`An unexpected error occurred. Try again, or refresh the page.`}),!1,(0,P.jsxs)(`div`,{className:`flex gap-3`,children:[(0,P.jsx)(`button`,{onClick:t,className:`flex-1 px-4 py-2 text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors`,children:`Try Again`}),(0,P.jsx)(`button`,{onClick:()=>window.location.reload(),className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors`,children:`Refresh Page`})]})]})})}function XN({onResize:e,minWidth:t,maxWidth:n,position:r=`left`,ariaLabel:i=`Resize panel`}){let[a,o]=(0,m.useState)(!1),s=(0,m.useRef)(0),c=(0,m.useRef)(0),l=(0,m.useRef)(e);(0,m.useEffect)(()=>{l.current=e});let u=(0,m.useCallback)(e=>{e.preventDefault(),o(!0),s.current=e.clientX;let t=e.target.parentElement;t&&(c.current=t.offsetWidth)},[]),d=(0,m.useCallback)(e=>{if(!a)return;let i=e.clientX-s.current,o=r===`left`?-i:i,u=c.current+o,d=Math.max(t,Math.min(n,u));l.current(d)},[a,t,n,r]),f=(0,m.useCallback)(()=>{o(!1)},[]),p=(0,m.useCallback)(e=>{let i=e.target.parentElement;if(!i)return;let a=i.offsetWidth,o=e.shiftKey?50:10,s=a;if(r===`left`?e.key===`ArrowLeft`?(s=a+o,e.preventDefault()):e.key===`ArrowRight`&&(s=a-o,e.preventDefault()):e.key===`ArrowRight`?(s=a+o,e.preventDefault()):e.key===`ArrowLeft`&&(s=a-o,e.preventDefault()),s!==a){let e=Math.max(t,Math.min(n,s));l.current(e)}},[t,n,r]);return(0,m.useEffect)(()=>{if(a)return document.addEventListener(`mousemove`,d),document.addEventListener(`mouseup`,f),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`,()=>{document.removeEventListener(`mousemove`,d),document.removeEventListener(`mouseup`,f),document.body.style.userSelect=``,document.body.style.cursor=``}},[a,d,f]),(0,P.jsx)(`button`,{type:`button`,className:`semiont-resize-handle semiont-resize-handle--${r} ${a?`semiont-resize-handle--dragging`:``}`,onMouseDown:u,onKeyDown:p,"aria-label":i,role:`separator`,"aria-orientation":`vertical`,tabIndex:0})}function ZN({context:e,activePanel:t,isArchived:n=!1}){let r=hh(`Toolbar`),i=R(),a=e=>{i.emit(`panel:toggle`,{panel:e})};return(0,P.jsxs)(`div`,{className:`semiont-toolbar`,"data-context":e,children:[e===`document`&&(0,P.jsxs)(P.Fragment,{children:[!n&&(0,P.jsx)(`button`,{onClick:()=>a(`annotations`),className:`semiont-toolbar-button`,"data-active":t===`annotations`,"data-panel":`annotations`,"aria-label":r(`annotations`),"aria-pressed":t===`annotations`,title:r(`annotations`),children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon semiont-toolbar-icon-large`,"aria-hidden":`true`,children:`A`})}),(0,P.jsx)(`button`,{onClick:()=>a(`info`),className:`semiont-toolbar-button`,"data-active":t===`info`,"data-panel":`info`,"aria-label":r(`resourceInfo`),"aria-pressed":t===`info`,title:r(`resourceInfo`),children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,children:`ℹ️`})}),(0,P.jsx)(`button`,{onClick:()=>a(`history`),className:`semiont-toolbar-button`,"data-active":t===`history`,"data-panel":`history`,"aria-label":r(`history`),"aria-pressed":t===`history`,title:r(`history`),children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,children:`📒`})}),(0,P.jsx)(`button`,{onClick:()=>a(`jsonld`),className:`semiont-toolbar-button`,"data-active":t===`jsonld`,"data-panel":`jsonld`,"aria-label":`JSON-LD`,"aria-pressed":t===`jsonld`,title:`JSON-LD`,children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,children:`🌐`})}),(0,P.jsx)(`button`,{onClick:()=>a(`collaboration`),className:`semiont-toolbar-button`,"data-active":t===`collaboration`,"data-panel":`collaboration`,"aria-label":r(`collaboration`),"aria-pressed":t===`collaboration`,title:r(`collaboration`),children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,children:`👥`})})]}),(0,P.jsx)(`button`,{onClick:()=>a(`knowledge-base`),className:`semiont-toolbar-button`,"data-active":t===`knowledge-base`,"data-panel":`knowledge-base`,"aria-label":r(`knowledgeBase`),"aria-pressed":t===`knowledge-base`,title:r(`knowledgeBase`),children:(0,P.jsx)(`svg`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,width:`20`,height:`20`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 5.625c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125`})})}),(0,P.jsx)(`button`,{onClick:()=>a(`user`),className:`semiont-toolbar-button`,"data-active":t===`user`,"data-panel":`user`,"aria-label":r(`userAccount`),"aria-pressed":t===`user`,title:r(`userAccount`),children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,children:`👤`})}),(0,P.jsx)(`button`,{onClick:()=>a(`settings`),className:`semiont-toolbar-button`,"data-active":t===`settings`,"data-panel":`settings`,"aria-label":r(`settings`),"aria-pressed":t===`settings`,title:r(`settings`),children:(0,P.jsx)(`span`,{className:`semiont-toolbar-icon`,"aria-hidden":`true`,children:`⚙️`})})]})}function QN({showLineNumbers:e,theme:t,locale:n,isPendingLocaleChange:r=!1,hoverDelayMs:i}){let a=hh(`Settings`),o=R(),{announceLanguageChanging:s,announceLanguageChanged:c}=OE(),[l,u]=m.useState(n),d=e=>{s(Co.find(t=>t.code===e)?.nativeName||e),o.emit(`settings:locale-changed`,{locale:e})};return(0,m.useEffect)(()=>{n!==l&&!r&&(c(Co.find(e=>e.code===n)?.nativeName||n),u(n))},[n,l,r]),(0,P.jsxs)(`div`,{className:`semiont-settings-panel`,children:[(0,P.jsx)(`h3`,{className:`semiont-settings-panel__title`,children:a(`title`)}),(0,P.jsxs)(`div`,{className:`semiont-settings-panel__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-settings-panel__field`,children:[(0,P.jsxs)(`label`,{className:`semiont-toggle-label`,children:[(0,P.jsx)(`span`,{className:`semiont-toggle-label__text`,children:a(`lineNumbers`)}),(0,P.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,onClick:()=>o.emit(`settings:line-numbers-toggled`,void 0),className:`semiont-toggle ${e?`semiont-toggle--active`:``}`,children:(0,P.jsx)(`span`,{className:`semiont-toggle__slider ${e?`semiont-toggle__slider--active`:``}`})})]}),(0,P.jsx)(`p`,{className:`semiont-form__help`,children:a(e?`lineNumbersVisible`:`lineNumbersHidden`)})]}),(0,P.jsxs)(`div`,{className:`semiont-settings-panel__field`,children:[(0,P.jsx)(`label`,{className:`semiont-form__label`,children:a(`theme`)}),(0,P.jsxs)(`div`,{className:`semiont-settings-panel__button-group`,children:[(0,P.jsxs)(`button`,{onClick:()=>o.emit(`settings:theme-changed`,{theme:`light`}),className:`semiont-panel-button ${t===`light`?`semiont-panel-button-active`:``}`,"aria-pressed":t===`light`,children:[`☀️ `,a(`themeLight`)]}),(0,P.jsxs)(`button`,{onClick:()=>o.emit(`settings:theme-changed`,{theme:`dark`}),className:`semiont-panel-button ${t===`dark`?`semiont-panel-button-active`:``}`,"aria-pressed":t===`dark`,children:[`🌙 `,a(`themeDark`)]}),(0,P.jsxs)(`button`,{onClick:()=>o.emit(`settings:theme-changed`,{theme:`system`}),className:`semiont-panel-button ${t===`system`?`semiont-panel-button-active`:``}`,"aria-pressed":t===`system`,children:[`💻 `,a(`themeSystem`)]})]}),(0,P.jsx)(`p`,{className:`semiont-form__help`,"aria-live":`polite`,children:t===`system`?a(`themeSystemActive`):a(`themeModeActive`,{mode:t.charAt(0).toUpperCase()+t.slice(1)})})]}),(0,P.jsxs)(`div`,{className:`semiont-settings-panel__field`,children:[(0,P.jsx)(`label`,{htmlFor:`language-select`,className:`semiont-form__label`,children:a(`language`)}),(0,P.jsx)(`select`,{id:`language-select`,value:n,onChange:e=>d(e.target.value),disabled:r,className:`semiont-select`,"aria-busy":r,"aria-describedby":`language-hint`,children:Co.map(e=>(0,P.jsx)(`option`,{value:e.code,children:e.nativeName},e.code))}),(0,P.jsx)(`p`,{id:`language-hint`,className:`semiont-form__help`,children:a(`languageHint`)}),r&&(0,P.jsx)(`p`,{className:`semiont-settings-panel__loading`,role:`status`,"aria-live":`polite`,children:a(`languageChanging`)})]}),(0,P.jsxs)(`div`,{className:`semiont-settings-panel__field`,children:[(0,P.jsx)(`label`,{htmlFor:`hover-delay-slider`,className:`semiont-form__label`,children:a(`hoverDelay`)}),(0,P.jsx)(`input`,{id:`hover-delay-slider`,type:`range`,min:`0`,max:`500`,step:`50`,value:i,onChange:e=>o.emit(`settings:hover-delay-changed`,{hoverDelayMs:Number(e.target.value)}),className:`semiont-slider`,"aria-describedby":`hover-delay-description`}),(0,P.jsxs)(`div`,{className:`semiont-slider__labels`,children:[(0,P.jsx)(`span`,{children:a(`hoverDelayFast`)}),(0,P.jsx)(`span`,{children:a(`hoverDelaySlow`)})]}),(0,P.jsx)(`p`,{id:`hover-delay-description`,className:`semiont-form__help`,children:a(`hoverDelayDescription`,{delay:i})})]})]})]})}function $N({label:e,collapsedContent:t,expandedContent:n,isExpanded:r,onHoverChange:i,onPin:a,containerRef:o}){let s=(0,m.useRef)(null);return(0,P.jsxs)(`div`,{className:`semiont-dropdown-group`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,P.jsx)(`div`,{ref:o,role:`button`,tabIndex:0,"aria-haspopup":`true`,"aria-expanded":r,"aria-label":e,className:`semiont-dropdown-trigger`,onClick:a,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())},children:t}),r&&(0,P.jsx)(`div`,{ref:s,role:`menu`,"aria-orientation":`vertical`,className:`semiont-dropdown-menu`,children:(0,P.jsxs)(`div`,{className:`semiont-dropdown-content`,children:[(0,P.jsx)(`div`,{className:`semiont-dropdown-header`,children:e}),n]})})]})}function eP({selectedMotivation:e,selectedClick:t,showSelectionGroup:n=!0,showDeleteButton:r=!0,showShapeGroup:i=!1,selectedShape:a=`rectangle`,mediaType:o,annotateMode:s=!1,annotators:c}){let l=hh(`AnnotateToolbar`),u=K(R().activeSession$),d=e=>Object.values(c).find(t=>t.motivation===e)?.iconEmoji||`❓`,[f,p]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),[x,S]=(0,m.useState)(!1),[C,w]=(0,m.useState)(!1),[T,E]=(0,m.useState)(!1),[D,O]=(0,m.useState)(!1),k=(0,m.useRef)(null),A=(0,m.useRef)(null),ee=(0,m.useRef)(null),te=(0,m.useRef)(null),j=f||h,ne=_||y,re=x||C,ie=T||D;(0,m.useEffect)(()=>{let e=e=>{h&&k.current&&!k.current.contains(e.target)&&g(!1),y&&A.current&&!A.current.contains(e.target)&&b(!1),C&&ee.current&&!ee.current.contains(e.target)&&w(!1),D&&te.current&&!te.current.contains(e.target)&&O(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[h,y,C,D]),(0,m.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(g(!1),b(!1),w(!1),O(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let ae=t=>{t===null?u?.client.mark.changeSelection(null):u?.client.mark.changeSelection(e===t?null:t),w(!1),S(!1)},M=e=>{u?.client.mark.changeClick(e),b(!1),v(!1)},oe=e=>{u?.client.mark.changeShape(e),O(!1),E(!1)},se=()=>{u?.client.mark.toggleMode(),g(!1),p(!1)},ce=()=>{s&&se()},le=()=>{s||se()},ue=(e,t,n,r,i=!1)=>(0,P.jsxs)(`button`,{role:`menuitem`,onClick:e=>{e.stopPropagation(),r()},className:`semiont-toolbar-menu-button`,"data-selected":n,"data-delete":i,"aria-pressed":n,"aria-label":t,children:[(0,P.jsx)(`span`,{className:`semiont-toolbar-menu-icon`,"aria-hidden":`true`,children:e}),(0,P.jsx)(`span`,{className:`semiont-toolbar-menu-label`,children:t})]}),N=[{action:`detail`,icon:`🔍`,label:l(`detail`)},{action:`follow`,icon:`➡️`,label:l(`follow`)},{action:`jsonld`,icon:`🌐`,label:l(`jsonld`)}];r&&N.push({action:`deleting`,icon:`🗑️`,label:l(`deleting`),isDelete:!0});let de=[{motivation:`linking`,label:l(`linking`)},{motivation:`highlighting`,label:l(`highlighting`)},{motivation:`assessing`,label:l(`assessing`)},{motivation:`commenting`,label:l(`commenting`)},{motivation:`tagging`,label:l(`tagging`)}],fe=[{shape:`rectangle`,icon:`▭`,label:l(`rectangle`)},{shape:`circle`,icon:`○`,label:l(`circle`)},{shape:`polygon`,icon:`⬡`,label:l(`polygon`)}],pe=UT(o),me=fe.filter(e=>pe.includes(e.shape));return(0,P.jsxs)(`div`,{className:`semiont-annotate-toolbar`,children:[(0,P.jsx)($N,{label:l(`clickGroup`),isExpanded:ne,onHoverChange:v,onPin:()=>b(!y),containerRef:A,collapsedContent:(0,P.jsxs)(`div`,{className:`semiont-dropdown-display`,"data-delete":N.find(e=>e.action===t)?.isDelete?`true`:`false`,children:[(0,P.jsx)(`span`,{className:`semiont-dropdown-icon`,children:N.find(e=>e.action===t)?.icon}),(0,P.jsx)(`span`,{className:`semiont-dropdown-label`,children:N.find(e=>e.action===t)?.label})]}),expandedContent:(0,P.jsx)(P.Fragment,{children:N.map(({action:e,icon:n,label:r,isDelete:i})=>(0,P.jsx)(m.Fragment,{children:ue(n,r,t===e,()=>M(e),i)},e))})}),(0,P.jsx)(`div`,{className:`semiont-toolbar-separator`}),(0,P.jsx)($N,{label:l(`modeGroup`),isExpanded:j,onHoverChange:p,onPin:()=>g(!h),containerRef:k,collapsedContent:(0,P.jsxs)(`div`,{className:`semiont-dropdown-display`,children:[(0,P.jsx)(`span`,{className:`semiont-dropdown-icon`,children:s?`✏️`:`📖`}),(0,P.jsx)(`span`,{className:`semiont-dropdown-label`,children:l(s?`annotate`:`browse`)})]}),expandedContent:(0,P.jsxs)(P.Fragment,{children:[ue(`📖`,l(`browse`),!s,ce),ue(`✏️`,l(`annotate`),s,le)]})}),n&&(0,P.jsx)(`div`,{className:`semiont-toolbar-separator`}),n&&(0,P.jsx)($N,{label:l(`selectionGroup`),isExpanded:re,onHoverChange:S,onPin:()=>w(!C),containerRef:ee,collapsedContent:(0,P.jsxs)(`div`,{className:`semiont-dropdown-display`,children:[(0,P.jsx)(`span`,{className:`semiont-dropdown-icon`,children:e?d(e):`—`}),(0,P.jsx)(`span`,{className:`semiont-dropdown-label`,children:e?de.find(t=>t.motivation===e)?.label:l(`none`)})]}),expandedContent:(0,P.jsxs)(P.Fragment,{children:[ue(`—`,l(`none`),e===null,()=>ae(null)),de.map(({motivation:t,label:n})=>(0,P.jsx)(m.Fragment,{children:ue(d(t),n,e===t,()=>ae(t))},t))]})}),i&&(0,P.jsx)(`div`,{className:`semiont-toolbar-separator`}),i&&me.length>0&&(0,P.jsx)($N,{label:l(`shapeGroup`),isExpanded:ie,onHoverChange:E,onPin:()=>O(!D),containerRef:te,collapsedContent:(0,P.jsxs)(`div`,{className:`semiont-dropdown-display`,children:[(0,P.jsx)(`span`,{className:`semiont-dropdown-icon`,children:me.find(e=>e.shape===a)?.icon}),(0,P.jsx)(`span`,{className:`semiont-dropdown-label`,children:me.find(e=>e.shape===a)?.label})]}),expandedContent:(0,P.jsx)(P.Fragment,{children:me.map(({shape:e,icon:t,label:n})=>(0,P.jsx)(m.Fragment,{children:ue(t,n,a===e,()=>oe(e))},e))})})]})}var tP=Dw({String:G.string,Number:G.number,"True False":G.bool,PropertyName:G.propertyName,Null:G.null,", :":G.separator,"[ ]":G.squareBracket,"{ }":G.brace}),nP=ik.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:`#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O`,goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:`⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array`,maxTerm:25,nodeProps:[[`isolate`,-2,6,11,``],[`openedBy`,7,`{`,14,`[`],[`closedBy`,8,`}`,15,`]`]],propSources:[tP],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),rP=eT.define({name:`json`,parser:nP.configure({props:[mT.add({Object:yT({except:/^\s*\}/}),Array:yT({except:/^\s*\]/})}),xT.add({"Object Array":ST})]}),languageData:{closeBrackets:{brackets:[`[`,`{`,`"`]},indentOnInput:/^\s*[\}\]]$/}});function iP(){return new dT(rP)}var aP=`#e5c07b`,oP=`#e06c75`,sP=`#56b6c2`,cP=`#ffffff`,lP=`#abb2bf`,uP=`#7d8799`,dP=`#61afef`,fP=`#98c379`,pP=`#d19a66`,mP=`#c678dd`,hP=`#21252b`,gP=`#2c313a`,_P=`#282c34`,vP=`#353a42`,yP=`#3E4451`,bP=`#528bff`,xP=[H.theme({"&":{color:lP,backgroundColor:_P},".cm-content":{caretColor:bP},".cm-cursor, .cm-dropCursor":{borderLeftColor:bP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:yP},".cm-panels":{backgroundColor:hP,color:lP},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:_P,color:uP,border:`none`},".cm-activeLineGutter":{backgroundColor:gP},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:vP},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:vP,borderBottomColor:vP},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:gP,color:lP}}},{dark:!0}),DT(CT.define([{tag:G.keyword,color:mP},{tag:[G.name,G.deleted,G.character,G.propertyName,G.macroName],color:oP},{tag:[G.function(G.variableName),G.labelName],color:dP},{tag:[G.color,G.constant(G.name),G.standard(G.name)],color:pP},{tag:[G.definition(G.name),G.separator],color:lP},{tag:[G.typeName,G.className,G.number,G.changed,G.annotation,G.modifier,G.self,G.namespace],color:aP},{tag:[G.operator,G.operatorKeyword,G.url,G.escape,G.regexp,G.link,G.special(G.string)],color:sP},{tag:[G.meta,G.comment],color:uP},{tag:G.strong,fontWeight:`bold`},{tag:G.emphasis,fontStyle:`italic`},{tag:G.strikethrough,textDecoration:`line-through`},{tag:G.link,color:uP,textDecoration:`underline`},{tag:G.heading,fontWeight:`bold`,color:oP},{tag:[G.atom,G.bool,G.special(G.variableName)],color:pP},{tag:[G.processingInstruction,G.string,G.inserted],color:fP},{tag:G.invalid,color:cP}]))];function SP({annotation:e,onBack:t}){let n=(0,m.useRef)(null),r=(0,m.useRef)(null),{showLineNumbers:i}=lE(),a=(0,m.useRef)(t);return(0,m.useEffect)(()=>{a.current=t}),(0,m.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a.current()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,m.useEffect)(()=>{if(!n.current)return;let t=document.documentElement.classList.contains(`dark`),a=JSON.stringify(e,null,2),o=[iP(),H.editable.of(!1),p_.readOnly.of(!0)];i&&o.push(TC()),t?o.push(xP):(o.push(RT),o.push(DT(zT)));let s=new H({state:p_.create({doc:a,extensions:o}),parent:n.current});return r.current=s,()=>{s.destroy(),r.current=null}},[e,i]),(0,P.jsxs)(`div`,{className:`semiont-jsonld-view`,children:[(0,P.jsxs)(`div`,{className:`semiont-jsonld-view__header`,children:[(0,P.jsx)(`button`,{onClick:t,className:`semiont-jsonld-view__back-button`,title:`Go back (Escape)`,children:`<`}),(0,P.jsx)(`h3`,{className:`semiont-jsonld-view__title`,children:`JSON-LD`}),(0,P.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(e){console.error(`Failed to copy JSON-LD:`,e)}},className:`semiont-jsonld-view__copy-button`,title:`Copy to clipboard`,children:`📋 Copy`})]}),(0,P.jsx)(`div`,{ref:n,className:`semiont-jsonld-view__editor`})]})}var CP=Object.defineProperty,wP=(e,t,n)=>t in e?CP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TP=(e,t,n)=>(wP(e,typeof t==`symbol`?t:t+``,n),n),EP=new class{constructor(){TP(this,`current`,this.detect()),TP(this,`handoffState`,`pending`),TP(this,`currentId`,0)}set(e){this.current!==e&&(this.handoffState=`pending`,this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}handoff(){this.handoffState===`pending`&&(this.handoffState=`complete`)}get isHandoffComplete(){return this.handoffState===`complete`}};function DP(e){return EP.isServer?null:e==null?document:e?.ownerDocument??document}function OP(e){return EP.isServer?null:e==null?document:(e?.getRootNode)?.call(e)??document}function kP(e){return OP(e)?.activeElement??null}function AP(e){return kP(e)===e}function jP(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function MP(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return jP(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=MP();return e(t),this.add(()=>t.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function NP(){let[e]=(0,m.useState)(MP);return(0,m.useEffect)(()=>()=>e.dispose(),[e]),e}var PP=(e,t)=>{EP.isServer?(0,m.useEffect)(e,t):(0,m.useLayoutEffect)(e,t)};function FP(e){let t=(0,m.useRef)(e);return PP(()=>{t.current=e},[e]),t}var IP=function(e){let t=FP(e);return m.useCallback((...e)=>t.current(...e),[t])};function LP(e){return(0,m.useMemo)(()=>e,Object.values(e))}var RP=(0,m.createContext)(void 0);function zP(){return(0,m.useContext)(RP)}function BP(...e){return Array.from(new Set(e.flatMap(e=>typeof e==`string`?e.split(` `):[]))).filter(Boolean).join(` `)}function VP(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,VP),r}var HP=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(HP||{}),UP=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(UP||{});function WP(){let e=qP();return(0,m.useCallback)(t=>GP({mergeRefs:e,...t}),[e])}function GP({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:o,mergeRefs:s}){s??=JP;let c=YP(t,e);if(a)return KP(c,n,r,o,s);let l=i??0;if(l&2){let{static:e=!1,...t}=c;if(e)return KP(t,n,r,o,s)}if(l&1){let{unmount:e=!0,...t}=c;return VP(+!e,{0(){return null},1(){return KP({...t,hidden:!0,style:{display:`none`}},n,r,o,s)}})}return KP(c,n,r,o,s)}function KP(e,t={},n,r,i){let{as:a=n,children:o,refName:s=`ref`,...c}=QP(e,[`unmount`,`static`]),l=e.ref===void 0?{}:{[s]:e.ref},u=typeof o==`function`?o(t):o;`className`in c&&c.className&&typeof c.className==`function`&&(c.className=c.className(t)),c[`aria-labelledby`]&&c[`aria-labelledby`]===c.id&&(c[`aria-labelledby`]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))typeof i==`boolean`&&(e=!0),i===!0&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){d[`data-headlessui-state`]=n.join(` `);for(let e of n)d[`data-${e}`]=``}}if(eF(a)&&(Object.keys(ZP(c)).length>0||Object.keys(ZP(d)).length>0))if(!(0,m.isValidElement)(u)||Array.isArray(u)&&u.length>1||tF(u)){if(Object.keys(ZP(c)).length>0)throw Error([`Passing props on "Fragment"!`,``,`The current component <${r} /> is rendering a "Fragment".`,`However we need to passthrough the following props:`,Object.keys(ZP(c)).concat(Object.keys(ZP(d))).map(e=>` - ${e}`).join(`
|
|
104
|
+
`),``,`You can apply a few solutions:`,['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',`Render a single element as the child so that we can forward the props onto that element.`].map(e=>` - ${e}`).join(`
|
|
105
|
+
`)].join(`
|
|
106
|
+
`))}else{let e=u.props?.className,t=typeof e==`function`?(...t)=>BP(e(...t),c.className):BP(e,c.className),n=t?{className:t}:{},r=YP(u.props,ZP(QP(c,[`ref`])));for(let e in d)e in r&&delete d[e];return(0,m.cloneElement)(u,Object.assign({},r,d,l,{ref:i($P(u),l.ref)},n))}return(0,m.createElement)(a,Object.assign({},QP(c,[`ref`]),!eF(a)&&l,!eF(a)&&d),u)}function qP(){let e=(0,m.useRef)([]),t=(0,m.useCallback)(t=>{for(let n of e.current)n!=null&&(typeof n==`function`?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>e==null))return e.current=n,t}}function JP(...e){return e.every(e=>e==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n==`function`?n(t):n.current=t)}}function YP(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>(e?.preventDefault)?.call(e)]);for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function XP(e){return Object.assign((0,m.forwardRef)(e),{displayName:e.displayName??e.name})}function ZP(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}function QP(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function $P(e){return`19.2.4`.split(`.`)[0]>=`19`?e.props.ref:e.ref}function eF(e){return e===m.Fragment||e===Symbol.for(`react.fragment`)}function tF(e){return eF(e.type)}var nF=`span`,rF=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(rF||{});function iF(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)==2?!0:r[`aria-hidden`]??void 0,hidden:(n&4)==4?!0:void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(n&4)==4&&(n&2)!=2&&{display:`none`}}};return WP()({ourProps:i,theirProps:r,slot:{},defaultTag:nF,name:`Hidden`})}var aF=XP(iF);function oF(e){return typeof e!=`object`||!e?!1:`nodeType`in e}function sF(e){return oF(e)&&`tagName`in e}function cF(e){return sF(e)&&`accessKey`in e}function lF(e){return sF(e)&&`tabIndex`in e}function uF(e){return sF(e)&&`style`in e}function dF(e){return cF(e)&&e.nodeName===`IFRAME`}function fF(e){return cF(e)&&e.nodeName===`INPUT`}var pF=Symbol();function mF(e,t=!0){return Object.assign(e,{[pF]:t})}function hF(...e){let t=(0,m.useRef)(e);(0,m.useEffect)(()=>{t.current=e},[e]);let n=IP(e=>{for(let n of t.current)n!=null&&(typeof n==`function`?n(e):n.current=e)});return e.every(e=>e==null||e?.[pF])?void 0:n}var gF=(0,m.createContext)(null);gF.displayName=`DescriptionContext`;function _F(){let e=(0,m.useContext)(gF);if(e===null){let e=Error(`You used a <Description /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,_F),e}return e}function vF(){let[e,t]=(0,m.useState)([]);return[e.length>0?e.join(` `):void 0,(0,m.useMemo)(()=>function(e){let n=IP(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),r=(0,m.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return m.createElement(gF.Provider,{value:r},e.children)},[t])]}var yF=`p`;function bF(e,t){let n=(0,m.useId)(),r=zP(),{id:i=`headlessui-description-${n}`,...a}=e,o=_F(),s=hF(t);PP(()=>o.register(i),[i,o.register]);let c=LP({...o.slot,disabled:r||!1}),l={ref:s,...o.props,id:i};return WP()({ourProps:l,theirProps:a,slot:c,defaultTag:yF,name:o.name||`Description`})}var xF=XP(bF),SF=Object.assign(xF,{}),CF=(e=>(e.Space=` `,e.Enter=`Enter`,e.Escape=`Escape`,e.Backspace=`Backspace`,e.Delete=`Delete`,e.ArrowLeft=`ArrowLeft`,e.ArrowUp=`ArrowUp`,e.ArrowRight=`ArrowRight`,e.ArrowDown=`ArrowDown`,e.Home=`Home`,e.End=`End`,e.PageUp=`PageUp`,e.PageDown=`PageDown`,e.Tab=`Tab`,e))(CF||{}),wF=(0,m.createContext)(()=>{});function TF({value:e,children:t}){return m.createElement(wF.Provider,{value:e},t)}var EF=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},DF=Object.defineProperty,OF=(e,t,n)=>t in e?DF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kF=(e,t,n)=>(OF(e,typeof t==`symbol`?t:t+``,n),n),AF=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},jF=(e,t,n)=>(AF(e,t,`read from private field`),n?n.call(e):t.get(e)),MF=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},NF=(e,t,n,r)=>(AF(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),PF,FF,IF,LF=class{constructor(e){MF(this,PF,{}),MF(this,FF,new EF(()=>new Set)),MF(this,IF,new Set),kF(this,`disposables`,MP()),NF(this,PF,e),EP.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return jF(this,PF)}subscribe(e,t){if(EP.isServer)return()=>{};let n={selector:e,callback:t,current:e(jF(this,PF))};return jF(this,IF).add(n),this.disposables.add(()=>{jF(this,IF).delete(n)})}on(e,t){return EP.isServer?()=>{}:(jF(this,FF).get(e).add(t),this.disposables.add(()=>{jF(this,FF).get(e).delete(t)}))}send(e){let t=this.reduce(jF(this,PF),e);if(t!==jF(this,PF)){NF(this,PF,t);for(let e of jF(this,IF)){let t=e.selector(jF(this,PF));RF(e.current,t)||(e.current=t,e.callback(t))}for(let t of jF(this,FF).get(e.type))t(jF(this,PF),e)}}};PF=new WeakMap,FF=new WeakMap,IF=new WeakMap;function RF(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length?zF(e[Symbol.iterator](),t[Symbol.iterator]()):!1:e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size?zF(e.entries(),t.entries()):!1:BF(e)&&BF(t)?zF(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function zF(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function BF(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var VF=Object.defineProperty,HF=(e,t,n)=>t in e?VF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UF=(e,t,n)=>(HF(e,typeof t==`symbol`?t:t+``,n),n),WF=(e=>(e[e.Push=0]=`Push`,e[e.Pop=1]=`Pop`,e))(WF||{}),GF={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let t=e.stack.slice();return t.splice(i,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},KF=class e extends LF{constructor(){super(...arguments),UF(this,`actions`,{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),UF(this,`selectors`,{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return VP(t.type,GF,e,t)}},qF=new EF(()=>KF.new());function JF(e,t,n=RF){return(0,wh.useSyncExternalStoreWithSelector)(IP(t=>e.subscribe(YF,t)),IP(()=>e.state),IP(()=>e.state),IP(t),n)}function YF(e){return e}function XF(e,t){let n=(0,m.useId)(),r=qF.get(t),[i,a]=JF(r,(0,m.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return PP(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}var ZF=new Map,QF=new Map;function $F(e){let t=QF.get(e)??0;return QF.set(e,t+1),t===0?(ZF.set(e,{"aria-hidden":e.getAttribute(`aria-hidden`),inert:e.inert}),e.setAttribute(`aria-hidden`,`true`),e.inert=!0,()=>eI(e)):()=>eI(e)}function eI(e){let t=QF.get(e)??1;if(t===1?QF.delete(e):QF.set(e,t-1),t!==1)return;let n=ZF.get(e);n&&(n[`aria-hidden`]===null?e.removeAttribute(`aria-hidden`):e.setAttribute(`aria-hidden`,n[`aria-hidden`]),e.inert=n.inert,ZF.delete(e))}function tI(e,{allowed:t,disallowed:n}={}){let r=XF(e,`inert-others`);PP(()=>{if(!r)return;let e=MP();for(let t of n?.()??[])t&&e.add($F(t));let i=t?.()??[];for(let t of i){if(!t)continue;let n=DP(t);if(!n)continue;let r=t.parentElement;for(;r&&r!==n.body;){for(let t of r.children)i.some(e=>t.contains(e))||e.add($F(t));r=r.parentElement}}return e.dispose},[r,t,n])}function nI(e,t,n){let r=FP(e=>{let t=e.getBoundingClientRect();t.x===0&&t.y===0&&t.width===0&&t.height===0&&n()});(0,m.useEffect)(()=>{if(!e)return;let n=t===null?null:cF(t)?t:t.current;if(!n)return;let i=MP();if(typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}if(typeof IntersectionObserver<`u`){let e=new IntersectionObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}return()=>i.dispose()},[t,r,e])}var rI=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`details>summary`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),iI=[`[data-autofocus]`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),aI=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e[e.AutoFocus=64]=`AutoFocus`,e))(aI||{}),oI=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(oI||{}),sI=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(sI||{});function cI(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rI)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}function lI(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(iI)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}var uI=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(uI||{});function dI(e,t=0){return e===DP(e)?.body?!1:VP(t,{0(){return e.matches(rI)},1(){let t=e;for(;t!==null;){if(t.matches(rI))return!0;t=t.parentElement}return!1}})}var fI=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(fI||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0));function pI(e){e?.focus({preventScroll:!0})}var mI=[`textarea`,`input`].join(`,`);function hI(e){return(e?.matches)?.call(e,mI)??!1}function gI(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function _I(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?OP(e[0]):document:OP(e),o=Array.isArray(e)?n?gI(e):e:t&64?lI(e):cI(e);i.length>0&&o.length>1&&(o=o.filter(e=>!i.some(t=>t!=null&&`current`in t?t?.current===e:t===e))),r??=a?.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),l=t&32?{preventScroll:!0}:{},u=0,d=o.length,f;do{if(u>=d||u+d<=0)return 0;let e=c+u;if(t&16)e=(e+d)%d;else{if(e<0)return 3;if(e>=d)return 1}f=o[e],f?.focus(l),u+=s}while(f!==kP(f));return t&6&&hI(f)&&f.select(),2}function vI(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yI(){return/Android/gi.test(window.navigator.userAgent)}function bI(){return vI()||yI()}function xI(e,t,n,r){let i=FP(n);(0,m.useEffect)(()=>{if(!e)return;function n(e){i.current(e)}return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r)},[e,t,r])}function SI(e,t,n,r){let i=FP(n);(0,m.useEffect)(()=>{if(!e)return;function n(e){i.current(e)}return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r)},[e,t,r])}var CI=30;function wI(e,t,n){let r=FP(n),i=(0,m.useCallback)(function(e,n){if(e.defaultPrevented)return;let i=n(e);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let a=(function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]})(t);for(let t of a)if(t!==null&&(t.contains(i)||e.composed&&e.composedPath().includes(t)))return;return!dI(i,uI.Loose)&&i.tabIndex!==-1&&e.preventDefault(),r.current(e,i)},[r,t]),a=(0,m.useRef)(null);xI(e,`pointerdown`,e=>{bI()||(a.current=e.composedPath?.call(e)?.[0]||e.target)},!0),xI(e,`pointerup`,e=>{if(bI()||!a.current)return;let t=a.current;return a.current=null,i(e,()=>t)},!0);let o=(0,m.useRef)({x:0,y:0});xI(e,`touchstart`,e=>{o.current.x=e.touches[0].clientX,o.current.y=e.touches[0].clientY},!0),xI(e,`touchend`,e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-o.current.x)>=CI||Math.abs(t.y-o.current.y)>=CI))return i(e,()=>lF(e.target)?e.target:null)},!0),SI(e,`blur`,e=>i(e,()=>dF(window.document.activeElement)?window.document.activeElement:null),!0)}function TI(...e){return(0,m.useMemo)(()=>DP(...e),[...e])}function EI(e,t,n,r){let i=FP(n);(0,m.useEffect)(()=>{e??=window;function n(e){i.current(e)}return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}function DI(e){return(0,m.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}function OI(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(e){return r.add(e),()=>r.delete(e)},dispatch(e,...i){let a=t[e].call(n,...i);a&&(n=a,r.forEach(e=>e()))}}}function kI(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,`paddingRight`,`${a}px`)}}}function AI(){return vI()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!==`auto`){let n=MP();n.style(e.documentElement,`scrollBehavior`,`auto`),t.add(()=>t.microTask(()=>n.dispose()))}let n=window.scrollY??window.pageYOffset,i=null;t.addEventListener(e,`click`,t=>{if(lF(t.target))try{let n=t.target.closest(`a`);if(!n)return;let{hash:a}=new URL(n.href),o=e.querySelector(a);lF(o)&&!r(o)&&(i=o)}catch{}},!0),t.group(n=>{t.addEventListener(e,`touchstart`,e=>{if(n.dispose(),lF(e.target)&&uF(e.target))if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,`overscrollBehavior`,`contain`)}else n.style(e.target,`touchAction`,`none`)})}),t.addEventListener(e,`touchmove`,e=>{if(lF(e.target)){if(fF(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&t.dataset.headlessuiPortal!==``&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;t.dataset.headlessuiPortal===``&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{n!==(window.scrollY??window.pageYOffset)&&window.scrollTo(0,n),i&&i.isConnected&&(i.scrollIntoView({block:`nearest`}),i=null)})})}}:{}}function jI(){return{before({doc:e,d:t}){t.style(e.documentElement,`overflow`,`hidden`)}}}function MI(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var NI=OI(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:MP(),meta:new Set,computedMeta:{}};return n.count++,n.meta.add(t),n.computedMeta=MI(n.meta),this.set(e,n),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=MI(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[AI(),kI(),jI()];n.forEach(({before:e})=>e?.(t)),n.forEach(({after:e})=>e?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});NI.subscribe(()=>{let e=NI.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e=t.get(n.doc)===`hidden`,r=n.count!==0;(r&&!e||!r&&e)&&NI.dispatch(n.count>0?`SCROLL_PREVENT`:`SCROLL_ALLOW`,n),n.count===0&&NI.dispatch(`TEARDOWN`,n)}});function PI(e,t,n=()=>({containers:[]})){let r=DI(NI),i=t?r.get(t):void 0,a=i?i.count>0:!1;return PP(()=>{if(!(!t||!e))return NI.dispatch(`PUSH`,t,n),()=>NI.dispatch(`POP`,t,n)},[e,t]),a}function FI(e,t,n=()=>[document.body]){PI(XF(e,`scroll-lock`),t,e=>({containers:[...e.containers??[],n]}))}function II(e=0){let[t,n]=(0,m.useState)(e);return{flags:t,setFlag:(0,m.useCallback)(e=>n(e),[]),addFlag:(0,m.useCallback)(e=>n(t=>t|e),[]),hasFlag:(0,m.useCallback)(e=>(t&e)===e,[t]),removeFlag:(0,m.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,m.useCallback)(e=>n(t=>t^e),[])}}typeof process<`u`&&typeof globalThis<`u`&&typeof Element<`u`&&(process==null?void 0:{})?.NODE_ENV===`test`&&(Element==null?void 0:Element.prototype)?.getAnimations===void 0&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.",``,`Example usage:`,"```js",`import { mockAnimationsApi } from 'jsdom-testing-mocks'`,`mockAnimationsApi()`,"```"].join(`
|
|
107
|
+
`)),[]});var LI=(e=>(e[e.None=0]=`None`,e[e.Closed=1]=`Closed`,e[e.Enter=2]=`Enter`,e[e.Leave=4]=`Leave`,e))(LI||{});function RI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]=``);return t}function zI(e,t,n,r){let[i,a]=(0,m.useState)(n),{hasFlag:o,addFlag:s,removeFlag:c}=II(e&&i?3:0),l=(0,m.useRef)(!1),u=(0,m.useRef)(!1);return PP(()=>{var i;if(e){if(n&&a(!0),!t){n&&s(3);return}return(i=r?.start)==null||i.call(r,n),BI(t,{inFlight:l,prepare(){u.current?u.current=!1:u.current=l.current,l.current=!0,!u.current&&(n?(s(3),c(4)):(s(4),c(2)))},run(){u.current?n?(c(3),s(4)):(c(4),s(3)):n?c(1):s(1)},done(){var e;u.current&&UI(t)||(l.current=!1,c(7),n||a(!1),(e=r?.end)==null||e.call(r,n))}})}},[e,n,t,NP()]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function BI(e,{prepare:t,run:n,done:r,inFlight:i}){let a=MP();return HI(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(VI(e,r))})}),a.dispose}function VI(e,t){let n=MP();if(!e)return n.dispose;let r=!1;n.add(()=>{r=!0});let i=e.getAnimations?.call(e).filter(e=>e instanceof CSSTransition)??[];return i.length===0?(t(),n.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{r||t()}),n.dispose)}function HI(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition=`none`,n(),e.offsetHeight,e.style.transition=r}function UI(e){return(e.getAnimations?.call(e)??[]).some(e=>e instanceof CSSTransition&&e.playState!==`finished`)}function WI(e,t){let n=(0,m.useRef)([]),r=IP(e);(0,m.useEffect)(()=>{let e=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let i=r(t,e);return n.current=t,i}},[r,...t])}var GI=(0,m.createContext)(null);GI.displayName=`OpenClosedContext`;var KI=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(KI||{});function qI(){return(0,m.useContext)(GI)}function JI({value:e,children:t}){return m.createElement(GI.Provider,{value:e},t)}function YI({children:e}){return m.createElement(GI.Provider,{value:null},e)}function XI(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var ZI=[];XI(()=>{function e(e){if(!lF(e.target)||e.target===document.body||ZI[0]===e.target)return;let t=e.target;t=t.closest(rI),ZI.unshift(t??e.target),ZI=ZI.filter(e=>e!=null&&e.isConnected),ZI.splice(10)}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});function QI(e){let t=IP(e),n=(0,m.useRef)(!1);(0,m.useEffect)(()=>(n.current=!1,()=>{n.current=!0,jP(()=>{n.current&&t()})}),[t])}var $I=(0,m.createContext)(!1);function eL(){return(0,m.useContext)($I)}function tL(e){return m.createElement($I.Provider,{value:e.force},e.children)}function nL(e){let t=eL(),n=(0,m.useContext)(sL),[r,i]=(0,m.useState)(()=>{if(!t&&n!==null)return n.current??null;if(EP.isServer)return null;let r=e?.getElementById(`headlessui-portal-root`);if(r)return r;if(e===null)return null;let i=e.createElement(`div`);return i.setAttribute(`id`,`headlessui-portal-root`),e.body.appendChild(i)});return(0,m.useEffect)(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),(0,m.useEffect)(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var rL=m.Fragment,iL=XP(function(e,t){let{ownerDocument:n=null,...r}=e,i=(0,m.useRef)(null),a=hF(mF(e=>{i.current=e}),t),o=TI(i.current),s=nL(n??o),c=(0,m.useContext)(lL),l=NP(),u=WP();return QI(()=>{var e;s&&s.childNodes.length<=0&&((e=s.parentElement)==null||e.removeChild(s))}),s?(0,h.createPortal)(m.createElement(`div`,{"data-headlessui-portal":``,ref:e=>{l.dispose(),c&&e&&l.add(c.register(e))}},u({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:rL,name:`Portal`})),s):null});function aL(e,t){let n=hF(t),{enabled:r=!0,ownerDocument:i,...a}=e,o=WP();return r?m.createElement(iL,{...a,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:rL,name:`Portal`})}var oL=m.Fragment,sL=(0,m.createContext)(null);function cL(e,t){let{target:n,...r}=e,i={ref:hF(t)},a=WP();return m.createElement(sL.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:oL,name:`Popover.Group`}))}var lL=(0,m.createContext)(null);function uL(){let e=(0,m.useContext)(lL),t=(0,m.useRef)([]),n=IP(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=IP(n=>{let r=t.current.indexOf(n);r!==-1&&t.current.splice(r,1),e&&e.unregister(n)}),i=(0,m.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,m.useMemo)(()=>function({children:e}){return m.createElement(lL.Provider,{value:i},e)},[i])]}var dL=XP(aL),fL=XP(cL),pL=Object.assign(dL,{Group:fL});function mL(e,t=typeof document<`u`?document.defaultView:null,n){let r=XF(e,`escape`);EI(t,`keydown`,e=>{r&&(e.defaultPrevented||e.key===CF.Escape&&n(e))})}function hL(){let[e]=(0,m.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null),[t,n]=(0,m.useState)(e?.matches??!1);return PP(()=>{if(!e)return;function t(e){n(e.matches)}return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[e]),t}function gL({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=IP(()=>{let r=DP(n),i=[];for(let t of e)t!==null&&(sF(t)?i.push(t):`current`in t&&sF(t.current)&&i.push(t.current));if(t!=null&&t.current)for(let e of t.current)i.push(e);for(let e of r?.querySelectorAll(`html > *, body > *`)??[])e!==document.body&&e!==document.head&&sF(e)&&e.id!==`headlessui-portal-root`&&(n&&(e.contains(n)||e.contains(n?.getRootNode()?.host))||i.some(t=>e.contains(t))||i.push(e));return i});return{resolveContainers:r,contains:IP(e=>r().some(t=>t.contains(e)))}}var _L=(0,m.createContext)(null);function vL({children:e,node:t}){let[n,r]=(0,m.useState)(null),i=yL(t??n);return m.createElement(_L.Provider,{value:i},e,i===null&&m.createElement(aF,{features:rF.Hidden,ref:e=>{if(e){for(let t of DP(e)?.querySelectorAll(`html > *, body > *`)??[])if(t!==document.body&&t!==document.head&&sF(t)&&t!=null&&t.contains(e)){r(t);break}}}}))}function yL(e=null){return(0,m.useContext)(_L)??e}function bL(){let e=typeof document>`u`;return`useSyncExternalStore`in m?(e=>e.useSyncExternalStore)(m)(()=>()=>{},()=>!1,()=>!e):!1}function xL(){let e=bL(),[t,n]=m.useState(EP.isHandoffComplete);return t&&EP.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>EP.handoff(),[]),e?!1:t}function SL(){let e=(0,m.useRef)(!1);return PP(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var CL=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(CL||{});function wL(){let e=(0,m.useRef)(0);return SI(!0,`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function TL(e){if(!e)return new Set;if(typeof e==`function`)return new Set(e());let t=new Set;for(let n of e.current)sF(n.current)&&t.add(n.current);return t}var EL=`div`,DL=(e=>(e[e.None=0]=`None`,e[e.InitialFocus=1]=`InitialFocus`,e[e.TabLock=2]=`TabLock`,e[e.FocusLock=4]=`FocusLock`,e[e.RestoreFocus=8]=`RestoreFocus`,e[e.AutoFocus=16]=`AutoFocus`,e))(DL||{});function OL(e,t){let n=(0,m.useRef)(null),r=hF(n,t),{initialFocus:i,initialFocusFallback:a,containers:o,features:s=15,...c}=e;xL()||(s=0);let l=TI(n.current);ML(s,{ownerDocument:l});let u=NL(s,{ownerDocument:l,container:n,initialFocus:i,initialFocusFallback:a});PL(s,{ownerDocument:l,container:n,containers:o,previousActiveElement:u});let d=wL(),f=IP(e=>{if(!cF(n.current))return;let t=n.current;(e=>e())(()=>{VP(d.current,{[CL.Forwards]:()=>{_I(t,aI.First,{skipElements:[e.relatedTarget,a]})},[CL.Backwards]:()=>{_I(t,aI.Last,{skipElements:[e.relatedTarget,a]})}})})}),p=XF(!!(s&2),`focus-trap#tab-lock`),h=NP(),g=(0,m.useRef)(!1),_={ref:r,onKeyDown(e){e.key==`Tab`&&(g.current=!0,h.requestAnimationFrame(()=>{g.current=!1}))},onBlur(e){if(!(s&4))return;let t=TL(o);cF(n.current)&&t.add(n.current);let r=e.relatedTarget;lF(r)&&r.dataset.headlessuiFocusGuard!==`true`&&(FL(t,r)||(g.current?_I(n.current,VP(d.current,{[CL.Forwards]:()=>aI.Next,[CL.Backwards]:()=>aI.Previous})|aI.WrapAround,{relativeTo:e.target}):lF(e.target)&&pI(e.target)))}},v=WP();return m.createElement(m.Fragment,null,p&&m.createElement(aF,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:rF.Focusable}),v({ourProps:_,theirProps:c,defaultTag:EL,name:`FocusTrap`}),p&&m.createElement(aF,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:rF.Focusable}))}var kL=XP(OL),AL=Object.assign(kL,{features:DL});function jL(e=!0){let t=(0,m.useRef)(ZI.slice());return WI(([e],[n])=>{n===!0&&e===!1&&jP(()=>{t.current.splice(0)}),n===!1&&e===!0&&(t.current=ZI.slice())},[e,ZI,t]),IP(()=>t.current.find(e=>e!=null&&e.isConnected)??null)}function ML(e,{ownerDocument:t}){let n=!!(e&8),r=jL(n);WI(()=>{n||AP(t?.body)&&pI(r())},[n]),QI(()=>{n&&pI(r())})}function NL(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=(0,m.useRef)(null),o=XF(!!(e&1),`focus-trap#initial-focus`),s=SL();return WI(()=>{if(e===0)return;if(!o){i!=null&&i.current&&pI(i.current);return}let c=n.current;c&&jP(()=>{if(!s.current)return;let n=t?.activeElement;if(r!=null&&r.current){if(r?.current===n){a.current=n;return}}else if(c.contains(n)){a.current=n;return}if(r!=null&&r.current)pI(r.current);else{if(e&16){if(_I(c,aI.First|aI.AutoFocus)!==oI.Error)return}else if(_I(c,aI.First)!==oI.Error)return;if(i!=null&&i.current&&(pI(i.current),t?.activeElement===i.current))return;console.warn(`There are no focusable elements inside the <FocusTrap />`)}a.current=t?.activeElement})},[i,o,e]),a}function PL(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=SL(),o=!!(e&4);EI(t?.defaultView,`focus`,e=>{if(!o||!a.current)return;let t=TL(r);cF(n.current)&&t.add(n.current);let s=i.current;if(!s)return;let c=e.target;cF(c)?FL(t,c)?(i.current=c,pI(c)):(e.preventDefault(),e.stopPropagation(),pI(s)):pI(i.current)},!0)}function FL(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function IL(e){return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!eF(e.as??WL)||m.Children.count(e.children)===1}var LL=(0,m.createContext)(null);LL.displayName=`TransitionContext`;var RL=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(RL||{});function zL(){let e=(0,m.useContext)(LL);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function BL(){let e=(0,m.useContext)(VL);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var VL=(0,m.createContext)(null);VL.displayName=`NestingContext`;function HL(e){return`children`in e?HL(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function UL(e,t){let n=FP(e),r=(0,m.useRef)([]),i=SL(),a=NP(),o=IP((e,t=UP.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(VP(t,{[UP.Unmount](){r.current.splice(o,1)},[UP.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!HL(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),s=IP(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,UP.Unmount)}),c=(0,m.useRef)([]),l=(0,m.useRef)(Promise.resolve()),u=(0,m.useRef)({enter:[],leave:[]}),d=IP((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?l.current=l.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),f=IP((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=c.current.shift())==null||e()}).then(()=>n(t))});return(0,m.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:l,chains:u}),[s,o,r,d,f,u,l])}var WL=m.Fragment,GL=HP.RenderStrategy;function KL(e,t){var n;let{transition:r=!0,beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:c,enterFrom:l,enterTo:u,entered:d,leave:f,leaveFrom:p,leaveTo:h,...g}=e,[_,v]=(0,m.useState)(null),y=(0,m.useRef)(null),b=IL(e),x=hF(...b?[y,t,v]:t===null?[]:[t]),S=(n=g.unmount)==null||n?UP.Unmount:UP.Hidden,{show:C,appear:w,initial:T}=zL(),[E,D]=(0,m.useState)(C?`visible`:`hidden`),O=BL(),{register:k,unregister:A}=O;PP(()=>k(y),[k,y]),PP(()=>{if(S===UP.Hidden&&y.current){if(C&&E!==`visible`){D(`visible`);return}return VP(E,{hidden:()=>A(y),visible:()=>k(y)})}},[E,y,k,A,C,S]);let ee=xL();PP(()=>{if(b&&ee&&E===`visible`&&y.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,E,ee,b]);let te=T&&!w,j=w&&C&&T,ne=(0,m.useRef)(!1),re=UL(()=>{ne.current||(D(`hidden`),A(y))},O),ie=IP(e=>{ne.current=!0;let t=e?`enter`:`leave`;re.onStart(y,t,e=>{e===`enter`?i?.():e===`leave`&&o?.()})}),ae=IP(e=>{let t=e?`enter`:`leave`;ne.current=!1,re.onStop(y,t,e=>{e===`enter`?a?.():e===`leave`&&s?.()}),t===`leave`&&!HL(re)&&(D(`hidden`),A(y))});(0,m.useEffect)(()=>{b&&r||(ie(C),ae(C))},[C,b,r]);let[,M]=zI(!(!r||!b||!ee||te),_,C,{start:ie,end:ae}),oe=ZP({ref:x,className:BP(g.className,j&&c,j&&l,M.enter&&c,M.enter&&M.closed&&l,M.enter&&!M.closed&&u,M.leave&&f,M.leave&&!M.closed&&p,M.leave&&M.closed&&h,!M.transition&&C&&d)?.trim()||void 0,...RI(M)}),se=0;E===`visible`&&(se|=KI.Open),E===`hidden`&&(se|=KI.Closed),C&&E===`hidden`&&(se|=KI.Opening),!C&&E===`visible`&&(se|=KI.Closing);let ce=WP();return m.createElement(VL.Provider,{value:re},m.createElement(JI,{value:se},ce({ourProps:oe,theirProps:g,defaultTag:WL,features:GL,visible:E===`visible`,name:`Transition.Child`})))}function qL(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,m.useRef)(null),s=hF(...IL(e)?[o,t]:t===null?[]:[t]);xL();let c=qI();if(n===void 0&&c!==null&&(n=(c&KI.Open)===KI.Open),n===void 0)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=(0,m.useState)(n?`visible`:`hidden`),d=UL(()=>{n||u(`hidden`)}),[f,p]=(0,m.useState)(!0),h=(0,m.useRef)([n]);PP(()=>{f!==!1&&h.current[h.current.length-1]!==n&&(h.current.push(n),p(!1))},[h,n]);let g=(0,m.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);PP(()=>{n?u(`visible`):!HL(d)&&o.current!==null&&u(`hidden`)},[n,d]);let _={unmount:i},v=IP(()=>{var t;f&&p(!1),(t=e.beforeEnter)==null||t.call(e)}),y=IP(()=>{var t;f&&p(!1),(t=e.beforeLeave)==null||t.call(e)}),b=WP();return m.createElement(VL.Provider,{value:d},m.createElement(LL.Provider,{value:g},b({ourProps:{..._,as:m.Fragment,children:m.createElement(XL,{ref:s,..._,...a,beforeEnter:v,beforeLeave:y})},theirProps:{},defaultTag:m.Fragment,features:GL,visible:l===`visible`,name:`Transition`})))}function JL(e,t){let n=(0,m.useContext)(LL)!==null,r=qI()!==null;return m.createElement(m.Fragment,null,!n&&r?m.createElement(YL,{ref:t,...e}):m.createElement(XL,{ref:t,...e}))}var YL=XP(qL),XL=XP(KL),ZL=XP(JL),QL=Object.assign(YL,{Child:ZL,Root:YL}),$L=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))($L||{}),eR=(e=>(e[e.SetTitleId=0]=`SetTitleId`,e))(eR||{}),tR={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},nR=(0,m.createContext)(null);nR.displayName=`DialogContext`;function rR(e){let t=(0,m.useContext)(nR);if(t===null){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,rR),t}return t}function iR(e,t){return VP(t.type,tR,e,t)}var aR=XP(function(e,t){let n=(0,m.useId)(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:o,role:s=`dialog`,autoFocus:c=!0,__demoMode:l=!1,unmount:u=!1,...d}=e,f=(0,m.useRef)(!1);s=(function(){return s===`dialog`||s===`alertdialog`?s:(f.current||(f.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),`dialog`)})();let p=qI();i===void 0&&p!==null&&(i=(p&KI.Open)===KI.Open);let h=(0,m.useRef)(null),g=hF(h,t),_=TI(h.current),v=+!i,[y,b]=(0,m.useReducer)(iR,{titleId:null,descriptionId:null,panelRef:(0,m.createRef)()}),x=IP(()=>a(!1)),S=IP(e=>b({type:0,id:e})),C=xL()?v===0:!1,[w,T]=uL(),E={get current(){return y.panelRef.current??h.current}},D=yL(),{resolveContainers:O}=gL({mainTreeNode:D,portals:w,defaultContainers:[E]}),k=p===null?!1:(p&KI.Closing)===KI.Closing;tI(l||k?!1:C,{allowed:IP(()=>[h.current?.closest(`[data-headlessui-portal]`)??null]),disallowed:IP(()=>[D?.closest(`body > *:not(#headlessui-portal-root)`)??null])});let A=qF.get(null);PP(()=>{if(C)return A.actions.push(r),()=>A.actions.pop(r)},[A,r,C]);let ee=JF(A,(0,m.useCallback)(e=>A.selectors.isTop(e,r),[A,r]));wI(ee,O,e=>{e.preventDefault(),x()}),mL(ee,_?.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&`blur`in document.activeElement&&typeof document.activeElement.blur==`function`&&document.activeElement.blur(),x()}),FI(l||k?!1:C,_,O),nI(C,h,x);let[te,j]=vF(),ne=(0,m.useMemo)(()=>[{dialogState:v,close:x,setTitleId:S,unmount:u},y],[v,x,S,u,y]),re=LP({open:v===0}),ie={ref:g,id:r,role:s,tabIndex:-1,"aria-modal":l?void 0:v===0?!0:void 0,"aria-labelledby":y.titleId,"aria-describedby":te,unmount:u},ae=!hL(),M=DL.None;C&&!l&&(M|=DL.RestoreFocus,M|=DL.TabLock,c&&(M|=DL.AutoFocus),ae&&(M|=DL.InitialFocus));let oe=WP();return m.createElement(YI,null,m.createElement(tL,{force:!0},m.createElement(pL,null,m.createElement(nR.Provider,{value:ne},m.createElement(fL,{target:h},m.createElement(tL,{force:!1},m.createElement(j,{slot:re},m.createElement(T,null,m.createElement(AL,{initialFocus:o,initialFocusFallback:h,containers:O,features:M},m.createElement(TF,{value:x},oe({ourProps:ie,theirProps:d,slot:re,defaultTag:oR,features:sR,visible:v===0,name:`Dialog`})))))))))))}),oR=`div`,sR=HP.RenderStrategy|HP.Static;function cR(e,t){let{transition:n=!1,open:r,...i}=e,a=qI(),o=e.hasOwnProperty(`open`)||a!==null,s=e.hasOwnProperty(`onClose`);if(!o&&!s)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!=`boolean`)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!=`function`)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?m.createElement(vL,null,m.createElement(QL,{show:r,transition:n,unmount:i.unmount},m.createElement(aR,{ref:t,...i}))):m.createElement(vL,null,m.createElement(aR,{ref:t,open:r,...i}))}var lR=`div`;function uR(e,t){let n=(0,m.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:o,unmount:s},c]=rR(`Dialog.Panel`),l=hF(t,c.panelRef),u=LP({open:o===0}),d={ref:l,id:r,onClick:IP(e=>{e.stopPropagation()})},f=i?ZL:m.Fragment,p=i?{unmount:s}:{},h=WP();return m.createElement(f,{...p},h({ourProps:d,theirProps:a,slot:u,defaultTag:lR,name:`Dialog.Panel`}))}var dR=`div`;function fR(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=rR(`Dialog.Backdrop`),o=LP({open:i===0}),s={ref:t,"aria-hidden":!0},c=n?ZL:m.Fragment,l=n?{unmount:a}:{},u=WP();return m.createElement(c,{...l},u({ourProps:s,theirProps:r,slot:o,defaultTag:dR,name:`Dialog.Backdrop`}))}var pR=`h2`;function mR(e,t){let n=(0,m.useId)(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:o}]=rR(`Dialog.Title`),s=hF(t);(0,m.useEffect)(()=>(o(r),()=>o(null)),[r,o]);let c=LP({open:a===0}),l={ref:s,id:r};return WP()({ourProps:l,theirProps:i,slot:c,defaultTag:pR,name:`Dialog.Title`})}var hR=XP(cR),gR=XP(uR);XP(fR);var _R=XP(mR),vR=Object.assign(hR,{Panel:gR,Title:_R,Description:SF});function yR({children:e,position:t,onClose:n,isOpen:r,wide:i=!1}){let a=i?800:400,o=i?700:500,s={position:`fixed`,left:`${Math.min(t.x,typeof window<`u`?window.innerWidth-a:t.x)}px`,top:`${Math.min(t.y,typeof window<`u`?window.innerHeight-o:t.y)}px`};return(0,P.jsx)(QL,{appear:!0,show:r,children:(0,P.jsxs)(vR,{as:`div`,className:`semiont-popup-overlay`,onClose:n,children:[(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,P.jsx)(`div`,{className:`semiont-popup-backdrop`})}),(0,P.jsx)(`div`,{className:`semiont-popup-container`,children:(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,P.jsx)(gR,{className:`semiont-popup-panel`,style:s,"data-annotation-ui":!0,"data-wide":i?`true`:`false`,children:(0,P.jsx)(P.Fragment,{children:e})})})})]})})}function bR(e){return no(e)?{stroke:`rgb(250, 204, 21)`,fill:`rgba(250, 204, 21, 0.2)`}:ro(e)?{stroke:`rgb(59, 130, 246)`,fill:`rgba(59, 130, 246, 0.2)`}:io(e)?{stroke:`rgb(239, 68, 68)`,fill:`rgba(239, 68, 68, 0.2)`}:ao(e)?{stroke:`rgb(255, 255, 255)`,fill:`rgba(255, 255, 255, 0.2)`}:oo(e)?{stroke:`rgb(234, 88, 12)`,fill:`rgba(234, 88, 12, 0.2)`}:{stroke:`rgb(156, 163, 175)`,fill:`rgba(156, 163, 175, 0.2)`}}function xR(e){return ao(e)?`Comment`:no(e)?`Highlight`:io(e)?`Assessment`:oo(e)?`Tag`:co(e)?`Resolved Reference`:ro(e)?`Unresolved Reference`:`Annotation`}function SR({annotations:e,imageWidth:t,imageHeight:n,displayWidth:r,displayHeight:i,session:a,hoveredAnnotationId:o,selectedAnnotationId:s,hoverDelayMs:c}){let l=r/t,u=i/n,{handleMouseEnter:d,handleMouseLeave:f}=(0,m.useMemo)(()=>Hu(e=>a?.client.beckon.hover(e),c),[a,c]);return(0,P.jsx)(`svg`,{className:`semiont-annotation-overlay`,style:{width:r,height:i},children:e.map(e=>{if(typeof e.target==`string`)return null;let t=Za(e.target.selector);if(!t)return null;let n=Ao(t.value);if(!n)return null;let r=e.id===o,i=e.id===s,c=bR(e),p=ro(e),m=p&&eo(e.body),h=p?m?`🔗`:`❓`:null;switch(n.type){case`rect`:{let{x:t,y:o,width:s,height:p}=n.data,m=(t+s)*l+8,g=(o+p)*u+4;return(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`title`,{children:xR(e)}),(0,P.jsx)(`rect`,{x:t*l,y:o*u,width:s*l,height:p*u,fill:r||i?c.fill:`transparent`,stroke:c.stroke,strokeWidth:r||i?3:2,opacity:r||i?1:.7,className:`semiont-annotation-overlay__shape`,"data-hovered":r?`true`:`false`,"data-selected":i?`true`:`false`,onClick:()=>a?.client.browse.click(e.id,e.motivation),onMouseEnter:()=>d(e.id),onMouseLeave:f}),h&&(0,P.jsx)(`text`,{x:m,y:g,fontSize:`16`,className:`semiont-annotation-overlay__status-indicator`,style:{userSelect:`none`},onClick:t=>{t.stopPropagation(),a?.client.browse.click(e.id,e.motivation)},onMouseEnter:()=>d(e.id),onMouseLeave:f,children:h})]},e.id)}case`circle`:{let{cx:t,cy:o,r:s}=n.data,p=s*Math.min(l,u),m=Math.PI/4,g=t*l+p*Math.cos(m)+8,_=o*u+p*Math.sin(m)+4;return(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`title`,{children:xR(e)}),(0,P.jsx)(`circle`,{cx:t*l,cy:o*u,r:p,fill:r||i?c.fill:`transparent`,stroke:c.stroke,strokeWidth:r||i?3:2,opacity:r||i?1:.7,className:`semiont-annotation-overlay__shape`,"data-hovered":r?`true`:`false`,"data-selected":i?`true`:`false`,onClick:()=>a?.client.browse.click(e.id,e.motivation),onMouseEnter:()=>d(e.id),onMouseLeave:f}),h&&(0,P.jsx)(`text`,{x:g,y:_,fontSize:`16`,className:`semiont-annotation-overlay__status-indicator`,style:{userSelect:`none`},onClick:t=>{t.stopPropagation(),a?.client.browse.click(e.id,e.motivation)},onMouseEnter:()=>d(e.id),onMouseLeave:f,children:h})]},e.id)}case`polygon`:{let t=n.data.points.map(e=>`${e.x*l},${e.y*u}`).join(` `),o=[...n.data.points.map(e=>({x:e.x*l,y:e.y*u,sum:e.x*l+e.y*u}))].sort((e,t)=>t.sum-e.sum),s=o[0],p=o[1],m=(s.x+p.x)/2+8,g=(s.y+p.y)/2+4;return(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`title`,{children:xR(e)}),(0,P.jsx)(`polygon`,{points:t,fill:r||i?c.fill:`transparent`,stroke:c.stroke,strokeWidth:r||i?3:2,opacity:r||i?1:.7,className:`semiont-annotation-overlay__shape`,"data-hovered":r?`true`:`false`,"data-selected":i?`true`:`false`,onClick:()=>a?.client.browse.click(e.id,e.motivation),onMouseEnter:()=>d(e.id),onMouseLeave:f}),h&&(0,P.jsx)(`text`,{x:m,y:g,fontSize:`16`,className:`semiont-annotation-overlay__status-indicator`,style:{userSelect:`none`},onClick:t=>{t.stopPropagation(),a?.client.browse.click(e.id,e.motivation)},onMouseEnter:()=>d(e.id),onMouseLeave:f,children:h})]},e.id)}default:return null}})})}function CR(e){if(!e)return{stroke:`rgb(156, 163, 175)`,fill:`rgba(156, 163, 175, 0.2)`};switch(e){case`highlighting`:return{stroke:`rgb(250, 204, 21)`,fill:`rgba(250, 204, 21, 0.2)`};case`linking`:return{stroke:`rgb(59, 130, 246)`,fill:`rgba(59, 130, 246, 0.2)`};case`assessing`:return{stroke:`rgb(239, 68, 68)`,fill:`rgba(239, 68, 68, 0.2)`};case`commenting`:return{stroke:`rgb(255, 255, 255)`,fill:`rgba(255, 255, 255, 0.2)`};default:return{stroke:`rgb(156, 163, 175)`,fill:`rgba(156, 163, 175, 0.2)`}}}function wR({imageUrl:e,existingAnnotations:t=[],drawingMode:n,selectedMotivation:r,session:i,hoveredAnnotationId:a,selectedAnnotationId:o}){let{hoverDelayMs:s}=dE(),c=(0,m.useRef)(null),l=(0,m.useRef)(null),[u,d]=(0,m.useState)(null),[f,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(!1),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(null);(0,m.useEffect)(()=>{let t=new Image;t.onload=()=>{d({width:t.naturalWidth,height:t.naturalHeight})},t.src=e},[e]),(0,m.useEffect)(()=>{let e=()=>{l.current&&p({width:l.current.clientWidth,height:l.current.clientHeight})};e();let t=null;try{t=new ResizeObserver(e),l.current&&t.observe(l.current)}catch{console.warn(`ResizeObserver not supported, falling back to window resize listener`),window.addEventListener(`resize`,e)}return()=>{t?t.disconnect():window.removeEventListener(`resize`,e)}},[]);let x=(0,m.useCallback)(e=>{if(!l.current)return null;let t=l.current.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},[]);return(0,P.jsxs)(`div`,{ref:c,className:`semiont-svg-drawing-canvas`,onMouseDown:(0,m.useCallback)(e=>{if(!n)return;let t=x(e);t&&(g(!0),v(t),b(t))},[n,x]),onMouseMove:(0,m.useCallback)(e=>{if(!h||!_)return;let t=x(e);t&&b(t)},[h,_,x]),onMouseUp:(0,m.useCallback)(e=>{if(!h||!_||!n)return;let a=x(e);if(!a||!f||!u)return;if(Math.sqrt((a.x-_.x)**2+(a.y-_.y)**2)<10){if(t.length>0){let e=t.find(e=>{if(typeof e.target==`string`)return!1;let t=e.target.selector;if(!t)return!1;let n=(Array.isArray(t)?t:[t]).find(e=>e.type===`SvgSelector`);if(!n||n.type!==`SvgSelector`)return!1;let r=Ao(n.value);if(!r)return!1;let i=f.width/u.width,o=f.height/u.height;if(r.type===`rect`){let{x:e,y:t,width:n,height:s}=r.data,c=e*i,l=t*o,u=n*i,d=s*o;return a.x>=c&&a.x<=c+u&&a.y>=l&&a.y<=l+d}return!1});if(e){i?.client.browse.click(e.id,e.motivation),g(!1),v(null),b(null);return}}g(!1),v(null),b(null);return}let o;switch(n){case`circle`:o=ko(_,Math.sqrt((a.x-_.x)**2+(a.y-_.y)**2));break;case`polygon`:{let e=(_.x+a.x)/2,t=(_.y+a.y)/2,n=Math.abs(a.x-_.x)/2,r=Math.abs(a.y-_.y)/2;o=Oo([{x:e,y:t-r},{x:e+n,y:t},{x:e,y:t+r},{x:e-n,y:t}]);break}default:o=Do(_,a);break}let s=jo(o,f.width,f.height,u.width,u.height);i&&r&&i.client.mark.request({type:`SvgSelector`,value:s},r),g(!1),v(null),b(null)},[h,_,n,f,u,x,r,t]),onMouseLeave:(0,m.useCallback)(()=>{h&&(g(!1),v(null),b(null))},[h]),"data-drawing-mode":n||`none`,children:[(0,P.jsx)(`img`,{ref:l,src:e,alt:`Annotatable content`,className:`semiont-svg-drawing-canvas__image`,draggable:!1}),f&&u&&(0,P.jsx)(`div`,{className:`semiont-svg-drawing-canvas__overlay-container`,children:(0,P.jsxs)(`div`,{className:`semiont-svg-drawing-canvas__overlay`,style:{width:f.width,height:f.height},children:[(0,P.jsx)(SR,{annotations:t,imageWidth:u.width,imageHeight:u.height,displayWidth:f.width,displayHeight:f.height,hoverDelayMs:s,...i&&{session:i},...a!==void 0&&{hoveredAnnotationId:a},...o!==void 0&&{selectedAnnotationId:o}}),h&&_&&y&&(()=>{let e=CR(r||null);return(0,P.jsxs)(`svg`,{className:`semiont-svg-drawing-canvas__preview`,style:{width:f.width,height:f.height},children:[n===`circle`&&(()=>{let t=Math.sqrt((y.x-_.x)**2+(y.y-_.y)**2);return(0,P.jsx)(`circle`,{cx:_.x,cy:_.y,r:t,fill:e.fill,stroke:e.stroke,strokeWidth:`2`,strokeDasharray:`5,5`})})(),n===`polygon`&&(()=>{let t=(_.x+y.x)/2,n=(_.y+y.y)/2,r=Math.abs(y.x-_.x)/2,i=Math.abs(y.y-_.y)/2;return(0,P.jsx)(`polygon`,{points:[{x:t,y:n-i},{x:t+r,y:n},{x:t,y:n+i},{x:t-r,y:n}].map(e=>`${e.x},${e.y}`).join(` `),fill:e.fill,stroke:e.stroke,strokeWidth:`2`,strokeDasharray:`5,5`})})(),n===`rectangle`&&(0,P.jsx)(`rect`,{x:Math.min(_.x,y.x),y:Math.min(_.y,y.y),width:Math.abs(y.x-_.x),height:Math.abs(y.y-_.y),fill:e.fill,stroke:e.stroke,strokeWidth:`2`,strokeDasharray:`5,5`})]})})()]})})]})}var TR=[{titleKey:`navigationTitle`,shortcuts:[{keys:[`⌘K`,`Ctrl K`],descriptionKey:`navOpenSearch`},{keys:[`/`],descriptionKey:`navOpenSearchAlt`},{keys:[`⌘N`,`Ctrl N`],descriptionKey:`navCreateResource`},{keys:[`Esc Esc`],descriptionKey:`navCloseOverlays`},{keys:[`?`],descriptionKey:`navShowHelp`}]},{titleKey:`sidebarTitle`,shortcuts:[{keys:[`Click <`],descriptionKey:`sidebarCollapse`},{keys:[`Click ☰`],descriptionKey:`sidebarExpand`},{keys:[`Space`],descriptionKey:`sidebarPickup`},{keys:[`↑`,`↓`],descriptionKey:`sidebarMove`},{keys:[`Space`],descriptionKey:`sidebarDrop`},{keys:[`Esc`],descriptionKey:`sidebarCancel`}]},{titleKey:`annotationsTitle`,shortcuts:[{keys:[`H`],descriptionKey:`annotHighlight`},{keys:[`R`],descriptionKey:`annotReference`},{keys:[`Delete`],descriptionKey:`annotDelete`},{keys:[`Tab`],descriptionKey:`annotNavigate`},{keys:[`Shift Tab`],descriptionKey:`annotNavigateBack`}]},{titleKey:`listsTitle`,shortcuts:[{keys:[`←`,`→`],descriptionKey:`listsFilterNav`},{keys:[`↑`,`↓`,`←`,`→`],descriptionKey:`listsGridNav`},{keys:[`Home`],descriptionKey:`listsJumpFirst`},{keys:[`End`],descriptionKey:`listsJumpLast`}]},{titleKey:`searchModalTitle`,shortcuts:[{keys:[`↑`,`↓`],descriptionKey:`searchNav`},{keys:[`Enter`],descriptionKey:`searchSelect`},{keys:[`Esc`],descriptionKey:`searchClose`}]},{titleKey:`modalTitle`,shortcuts:[{keys:[`Esc`],descriptionKey:`modalClose`},{keys:[`Tab`],descriptionKey:`modalNavForward`},{keys:[`Shift Tab`],descriptionKey:`modalNavBackward`},{keys:[`Enter`],descriptionKey:`modalActivate`},{keys:[`Space`],descriptionKey:`modalActivate`}]},{titleKey:`accessibilityTitle`,shortcuts:[{keys:[`Tab`],descriptionKey:`a11ySkipLinks`},{keys:[`Enter`],descriptionKey:`a11yFollowLink`}]}];function ER({isOpen:e,onClose:t}){let n=hh(`KeyboardShortcuts`),r=typeof window<`u`&&navigator.platform.toUpperCase().indexOf(`MAC`)>=0;return(0,P.jsx)(QL,{appear:!0,show:e,children:(0,P.jsxs)(vR,{as:`div`,className:`semiont-modal`,onClose:t,children:[(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,P.jsx)(`div`,{className:`semiont-modal__backdrop`})}),(0,P.jsx)(`div`,{className:`semiont-modal__container`,children:(0,P.jsx)(`div`,{className:`semiont-modal__wrapper`,children:(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,P.jsxs)(gR,{className:`semiont-modal__panel semiont-modal__panel--large`,children:[(0,P.jsx)(`div`,{className:`semiont-modal__header`,children:(0,P.jsxs)(`div`,{className:`semiont-modal__header-content`,children:[(0,P.jsx)(_R,{className:`semiont-modal__title`,children:n(`title`)}),(0,P.jsx)(`button`,{onClick:t,"aria-label":n(`closeDialog`),className:`semiont-modal__close`,children:(0,P.jsx)(`svg`,{className:`semiont-modal__close-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]})}),(0,P.jsxs)(`div`,{className:`semiont-modal__body`,children:[(0,P.jsx)(`div`,{className:`semiont-shortcuts`,children:TR.map(e=>(0,P.jsxs)(`div`,{className:`semiont-shortcuts__group`,children:[(0,P.jsx)(`h3`,{className:`semiont-shortcuts__group-title`,children:n(e.titleKey)}),(0,P.jsx)(`div`,{className:`semiont-shortcuts__list`,children:e.shortcuts.map((e,t)=>(0,P.jsxs)(`div`,{className:`semiont-shortcuts__item`,children:[(0,P.jsx)(`span`,{className:`semiont-shortcuts__description`,children:n(e.descriptionKey)}),(0,P.jsx)(`div`,{className:`semiont-shortcuts__keys`,children:e.keys.map((e,t)=>e.includes(`⌘`)&&!r||e.includes(`Ctrl`)&&r?null:(0,P.jsxs)(m.Fragment,{children:[t>0&&!e.includes(`⌘`)&&!e.includes(`Ctrl`)&&(0,P.jsx)(`span`,{className:`semiont-shortcuts__separator`,children:n(`or`)}),(0,P.jsx)(`kbd`,{className:`semiont-shortcuts__key`,children:e})]},t))})]},t))})]},e.titleKey))}),(0,P.jsx)(`div`,{className:`semiont-shortcuts__note`,children:(0,P.jsx)(`p`,{className:`semiont-shortcuts__note-text`,children:n(r?`macNote`:`windowsNote`)})})]}),(0,P.jsx)(`div`,{className:`semiont-modal__footer`,children:(0,P.jsxs)(`div`,{className:`semiont-modal__footer-content`,children:[(0,P.jsx)(`div`,{className:`semiont-modal__hint`,children:n(`footerHint`,{key:`?`}).split(`?`).map((e,t,n)=>(0,P.jsxs)(m.Fragment,{children:[e,t<n.length-1&&(0,P.jsx)(`kbd`,{className:`semiont-modal__hint-key`,children:`?`})]},t))}),(0,P.jsx)(`button`,{onClick:t,className:`semiont-button semiont-button--secondary`,children:n(`close`)})]})})]})})})})]})})}function DR(){let e=K(R().activeSignals$),t=K(e?.permissionDeniedAt$)??null,n=K(e?.permissionDeniedMessage$)??null,r=()=>e?.acknowledgePermissionDenied(),i=t!==null,a=n??`You do not have permission to perform this action.`,o=()=>{r(),window.history.back()};return(0,P.jsx)(QL,{appear:!0,show:i,children:(0,P.jsxs)(vR,{as:`div`,className:`semiont-modal`,onClose:o,children:[(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,P.jsx)(`div`,{className:`semiont-modal__backdrop`})}),(0,P.jsx)(`div`,{className:`semiont-modal__container`,children:(0,P.jsx)(`div`,{className:`semiont-modal__wrapper`,children:(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,P.jsxs)(gR,{className:`semiont-modal__panel semiont-modal__panel--medium`,children:[(0,P.jsx)(`div`,{className:`semiont-modal__icon-wrapper`,children:(0,P.jsx)(`div`,{className:`semiont-modal__icon`,children:(0,P.jsx)(`svg`,{style:{width:`1.5rem`,height:`1.5rem`,color:`var(--semiont-color-amber-600, #d97706)`},fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`})})})}),(0,P.jsxs)(`div`,{className:`semiont-modal__content`,children:[(0,P.jsx)(_R,{className:`semiont-modal__title semiont-modal__title--centered`,children:`Access Denied`}),(0,P.jsx)(`p`,{className:`semiont-modal__description`,children:a})]}),(0,P.jsxs)(`div`,{style:{padding:`0.75rem`,backgroundColor:`var(--semiont-bg-secondary)`,borderRadius:`var(--semiont-radius-md, 0.375rem)`,border:`1px solid var(--semiont-border-primary)`,fontSize:`var(--semiont-text-sm, 0.875rem)`,marginBottom:`1rem`},children:[(0,P.jsx)(`p`,{style:{color:`var(--semiont-text-secondary)`,marginBottom:`0.5rem`},children:`This could be because:`}),(0,P.jsxs)(`ul`,{style:{listStyle:`disc`,listStylePosition:`inside`,color:`var(--semiont-text-tertiary)`,display:`flex`,flexDirection:`column`,gap:`0.25rem`},children:[(0,P.jsx)(`li`,{children:`You don't have the required permissions`}),(0,P.jsx)(`li`,{children:`The resource is restricted to specific users or teams`}),(0,P.jsx)(`li`,{children:`Your account type doesn't include this feature`})]})]}),(0,P.jsxs)(`div`,{className:`semiont-modal__actions`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:o,className:`semiont-button--primary semiont-button--flex`,children:`Go Back`}),(0,P.jsx)(`button`,{type:`button`,onClick:()=>{r(),window.location.href=`/`},className:`semiont-button--secondary semiont-button--flex`,children:`Go to Home`})]}),(0,P.jsx)(`div`,{className:`semiont-modal__actions`,style:{marginTop:`0.5rem`,paddingTop:`0.5rem`,borderTop:`1px solid var(--semiont-border-primary)`},children:(0,P.jsx)(`button`,{type:`button`,onClick:()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`},className:`semiont-button--secondary semiont-button--flex`,style:{fontSize:`var(--semiont-text-sm, 0.875rem)`},children:`Switch Account`})})]})})})})]})})}function OR(){let e=K(R().activeSignals$),t=K(e?.sessionExpiredAt$)??null,n=K(e?.sessionExpiredMessage$)??null,r=()=>e?.acknowledgeSessionExpired(),i=t!==null,a=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`},o=()=>{r(),window.location.href=`/`};return(0,P.jsx)(QL,{appear:!0,show:i,children:(0,P.jsxs)(vR,{as:`div`,className:`semiont-modal`,onClose:o,children:[(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,P.jsx)(`div`,{className:`semiont-modal__backdrop`})}),(0,P.jsx)(`div`,{className:`semiont-modal__container`,children:(0,P.jsx)(`div`,{className:`semiont-modal__wrapper`,children:(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,P.jsxs)(gR,{className:`semiont-modal__panel semiont-modal__panel--medium`,children:[(0,P.jsx)(`div`,{className:`semiont-modal__icon-wrapper`,children:(0,P.jsx)(`div`,{className:`semiont-modal__icon`,style:{background:`linear-gradient(to bottom right, var(--semiont-color-red-100, #fee2e2), var(--semiont-color-red-300, #fca5a5))`},children:(0,P.jsx)(`svg`,{style:{width:`1.5rem`,height:`1.5rem`,color:`var(--semiont-color-red-600, #dc2626)`},fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})})})}),(0,P.jsxs)(`div`,{className:`semiont-modal__content`,children:[(0,P.jsx)(_R,{className:`semiont-modal__title semiont-modal__title--centered`,children:`Session Expired`}),(0,P.jsx)(`p`,{className:`semiont-modal__description`,children:n??`Your session has expired for security reasons. Please sign in again to continue working.`})]}),(0,P.jsxs)(`div`,{className:`semiont-modal__actions`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:o,className:`semiont-button--secondary semiont-button--flex`,children:`Go to Home`}),(0,P.jsx)(`button`,{type:`button`,onClick:a,className:`semiont-button--primary semiont-button--flex`,children:`Sign In Again`})]})]})})})})]})})}function kR(e,t){if(!e)return[{exact:``,start:0,end:0}];let n=bo(e),r=t.map(t=>{let r=to(t.target),i=Xa(r),a=r?fo(r):null,o;return a&&(o=So(e,a.exact,a.prefix,a.suffix,i?.start,n)),{annotation:t,start:o?.start??i?.start??0,end:o?.end??i?.end??0}}).filter(t=>t.start>=0&&t.end<=e.length&&t.start<t.end).sort((e,t)=>e.start-t.start);if(r.length===0)return[{exact:e,start:0,end:e.length}];let i=[],a=0;for(let{annotation:t,start:n,end:o}of r)n<a||(n>a&&i.push({exact:e.slice(a,n),start:a,end:n}),i.push({exact:e.slice(n,o),annotation:t,start:n,end:o}),a=o);return a<e.length&&i.push({exact:e.slice(a),start:a,end:e.length}),i}function AR(e,t,n,r){if(!t||n<0||r<=n||r>e.length)return null;let i=Mo(e,n,r);return[{type:`TextPositionSelector`,start:n,end:r},{type:`TextQuoteSelector`,exact:t,...i.prefix&&{prefix:i.prefix},...i.suffix&&{suffix:i.suffix}}]}function jR(e,t){let n=e.indexOf(t);return n===-1?null:{start:n,end:n+t.length}}var MR=(0,m.lazy)(()=>b(()=>import(`./PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js`).then(e=>({default:e.PdfAnnotationCanvas})),__vite__mapDeps([2,3,4,5])));function NR({content:e,mimeType:t=`text/plain`,resourceUri:n,annotations:r,uiState:i,onUIStateChange:a,enableWidgets:o=!1,getTargetResourceName:s,generatingReferenceId:c,showLineNumbers:l=!1,hoverDelayMs:u=150,annotateMode:d}){let{newAnnotationIds:f}=jE(),p=(0,m.useRef)(null),h=K(R().activeSession$),g=Ro(t),{highlights:_,references:v,assessments:y,comments:b,tags:x}=r,S=[..._,...v,...y,...b,...x],C=kR(e,S),{selectedMotivation:w,selectedClick:T,selectedShape:E,hoveredAnnotationId:D,scrollToAnnotationId:O}=i,k=(0,m.useRef)(a);switch(k.current=a,SE({"mark:selection-changed":(0,m.useCallback)(({motivation:e})=>{k.current?.({selectedMotivation:e})},[]),"mark:click-changed":(0,m.useCallback)(({action:e})=>{k.current?.({selectedClick:e})},[]),"mark:shape-changed":(0,m.useCallback)(({shape:e})=>{k.current?.({selectedShape:e})},[]),"beckon:hover":(0,m.useCallback)(({annotationId:e})=>{k.current?.({hoveredAnnotationId:e})},[])}),(0,m.useEffect)(()=>{let t=p.current;if(!t)return;let n=!1,r=e=>{let t=e.target;n=!!t.closest(`[data-annotation-id]`),t.closest(`[data-annotation-ui]`)},i=r=>{let i=r.target;if(i.closest(`.semiont-pdf-annotation-canvas`)||i.closest(`.semiont-svg-drawing-canvas`))return;let a=window.getSelection();if(!a||a.isCollapsed||!a.toString()){n=!1;return}if(n){n=!1;return}n=!1;let o=a.getRangeAt(0),s=a.toString(),c=t.querySelector(`.codemirror-renderer`)?.__cmView,l,u;if(!c||!c.posAtDOM){let t=jR(e,s);if(!t)return;l=t.start,u=t.end}else l=c.posAtDOM(o.startContainer,o.startOffset),u=l+s.length;if(l>=0&&w){let t=AR(e,s,l,u);if(!t)return;h?.client.mark.request(t,w),a.removeAllRanges()}};return t.addEventListener(`mouseup`,i),t.addEventListener(`mousedown`,r),()=>{t.removeEventListener(`mouseup`,i),t.removeEventListener(`mousedown`,r)}},[w,e]),g){case`text`:return(0,P.jsxs)(`div`,{className:`semiont-annotate-view`,"data-mime-type":`text`,ref:p,children:[(0,P.jsx)(eP,{selectedMotivation:w,selectedClick:T,mediaType:t,annotateMode:d,annotators:Ih}),(0,P.jsx)(`div`,{className:`semiont-annotate-view__content`,children:(0,P.jsx)(WN,{content:e,segments:C,editable:!1,newAnnotationIds:f,...D!==void 0&&{hoveredAnnotationId:D},...O!==void 0&&{scrollToAnnotationId:O},sourceView:!0,showLineNumbers:l,hoverDelayMs:u,enableWidgets:o,session:h,...s&&{getTargetResourceName:s},...c!==void 0&&{generatingReferenceId:c}})})]});case`image`:return Lo(t)?(0,P.jsxs)(`div`,{className:`semiont-annotate-view`,"data-mime-type":`pdf`,ref:p,children:[(0,P.jsx)(eP,{selectedMotivation:w,selectedClick:T,showShapeGroup:!0,selectedShape:E,mediaType:t,annotateMode:d,annotators:Ih}),(0,P.jsx)(`div`,{className:`semiont-annotate-view__content`,children:e&&(0,P.jsx)(m.Suspense,{fallback:(0,P.jsx)(`div`,{className:`semiont-annotate-view__loading`,children:`Loading PDF viewer...`}),children:(0,P.jsx)(MR,{pdfUrl:e,existingAnnotations:S,drawingMode:w?E:null,selectedMotivation:w,session:h,hoveredAnnotationId:D||null,hoverDelayMs:u})})})]}):(0,P.jsxs)(`div`,{className:`semiont-annotate-view`,"data-mime-type":`image`,ref:p,children:[(0,P.jsx)(eP,{selectedMotivation:w,selectedClick:T,showShapeGroup:!0,selectedShape:E,mediaType:t,annotateMode:d,annotators:Ih}),(0,P.jsx)(`div`,{className:`semiont-annotate-view__content`,children:e&&(0,P.jsx)(wR,{imageUrl:e,existingAnnotations:S,drawingMode:w?E:null,selectedMotivation:w,session:h,hoveredAnnotationId:D||null,hoverDelayMs:u})})]});default:return(0,P.jsx)(`div`,{ref:p,className:`semiont-annotate-view semiont-annotate-view--unsupported`,"data-mime-type":`unsupported`,children:(0,P.jsxs)(`div`,{className:`semiont-annotate-view__empty`,children:[(0,P.jsxs)(`p`,{className:`semiont-annotate-view__empty-message`,children:[`Annotation not supported for `,t]}),n&&(0,P.jsx)(`a`,{href:`/api/resources/${n}`,download:!0,className:`semiont-button semiont-button--primary`,children:`Download File`})]})})}}function PR(e){if(!e.startsWith(`did:`))return e;let t=e.match(/^did:web:system:(.+)$/);if(t){let e=t[1];return e.charAt(0).toUpperCase()+e.slice(1)}let n=e.match(/^did:web:[^:]+:users:(.+)$/);return n?decodeURIComponent(n[1]):e}function FR(e,t,n){switch(e){case`yield:created`:return t(`resourceCreated`);case`yield:cloned`:return t(`resourceCloned`);case`mark:archived`:return t(`resourceArchived`);case`mark:unarchived`:return t(`resourceUnarchived`);case`mark:added`:{let e=n?.annotation?.motivation;return t(e===`highlighting`?`highlightAdded`:e===`linking`?`referenceCreated`:e===`assessing`?`assessmentAdded`:`annotationAdded`)}case`mark:removed`:return t(`annotationRemoved`);case`mark:body-updated`:return t(`annotationBodyUpdated`);case`mark:entity-tag-added`:return t(`entitytagAdded`);case`mark:entity-tag-removed`:return t(`entitytagRemoved`);case`job:completed`:case`job:started`:case`job:progress`:case`job:failed`:return t(`jobEvent`);case`yield:representation-added`:case`yield:representation-removed`:return t(`representationEvent`);default:return e}}function IR(e,t){switch(e){case`yield:created`:case`yield:cloned`:case`mark:archived`:case`mark:unarchived`:return`📄`;case`mark:added`:{let e=t?.annotation?.motivation;return e===`highlighting`?Ih.highlight.iconEmoji||`📝`:e===`linking`?Ih.reference.iconEmoji||`📝`:e===`assessing`&&Ih.assessment.iconEmoji||`📝`}case`mark:removed`:return`🗑️`;case`mark:body-updated`:return`✏️`;case`mark:entity-tag-added`:case`mark:entity-tag-removed`:return`🏷️`;case`job:completed`:return`🔗`;case`job:started`:case`job:progress`:return`⚙️`;case`job:failed`:return`❌`;case`yield:representation-added`:case`yield:representation-removed`:return`📄`;default:return`📝`}}function LR(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/6e4),a=Math.floor(r/36e5),o=Math.floor(r/864e5);return i<1?t(`justNow`):i<60?t(`minutesAgo`,{count:i}):a<24?t(`hoursAgo`,{count:a}):o<7?t(`daysAgo`,{count:o}):n.toLocaleDateString()}function RR(e,t=50){let n=e.trim();return n.length>t?n.substring(0,t)+`...`:n}function zR(e,t,n){let r=e,i=r.payload;switch(r.type){case`yield:created`:case`yield:cloned`:return{exact:i.name,isQuoted:!1,isTag:!1};case`mark:body-updated`:{let e=t.find(e=>e.id.endsWith(`/annotations/${i.annotationId}`));if(e?.target)try{let t=lo(to(e.target));if(t)return{exact:RR(t),isQuoted:!0,isTag:!1}}catch{}return null}case`mark:removed`:{let e=n.find(e=>e.type===`mark:added`&&e.payload.annotation.id.endsWith(`/annotations/${i.annotationId}`));if(e&&e.type===`mark:added`)try{let t=e.payload.annotation.target;if(typeof t!=`string`&&t.selector){let e=lo(t.selector);if(e)return{exact:RR(e),isQuoted:!0,isTag:!1}}}catch{}return null}case`mark:added`:try{let e=i.annotation.target;if(typeof e!=`string`&&e.selector){let t=lo(e.selector);if(t)return{exact:RR(t),isQuoted:!0,isTag:!1}}}catch{}return null;case`mark:entity-tag-added`:case`mark:entity-tag-removed`:return{exact:i.entityType,isQuoted:!1,isTag:!0};case`job:completed`:if(i.annotationUri){let e=t.find(e=>e.id===i.annotationUri);if(e?.target)try{let t=lo(to(e.target));if(t)return{exact:RR(t),isQuoted:!0,isTag:!1}}catch{}}return null;case`job:started`:case`job:progress`:case`job:failed`:case`yield:representation-added`:case`yield:representation-removed`:return null;default:return null}}function BR(e){let t=e,n=t.payload;if(t.type===`mark:added`){let e=n.annotation.motivation,t=n.annotation.body;if(e===`linking`&&t&&`entityTypes`in t)return t.entityTypes??[]}return[]}function VR(e){let t=e,n=t.payload;return t.type===`yield:created`?{type:`created`,userId:t.userId,metadata:void 0}:t.type===`yield:cloned`?{type:`cloned`,userId:t.userId,sourceDocId:n.parentResourceId,parentResourceId:n.parentResourceId,metadata:void 0}:null}function HR({event:e,annotations:t,allEvents:n,isRelated:r,t:i,Link:a,routes:o,onEventRef:s,onEventClick:c,onEventHover:l}){let u=zR(e,t,n),d=Ha(e),f=VR(e),p=BR(e),h=(0,m.useRef)(null),g=(0,m.useRef)(l);(0,m.useEffect)(()=>{g.current=l});let _=(0,m.useCallback)(()=>{!d||!g.current||(h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{g.current?.(d)},300))},[d]),v=(0,m.useCallback)(()=>{h.current&&=(clearTimeout(h.current),null),g.current&&g.current(null)},[]);return(0,P.jsxs)(d?`button`:`div`,{ref:e=>{s&&s(d,e)},...d?{type:`button`,onClick:()=>c?.(d),"aria-label":i(`viewAnnotation`,{content:u?.exact||FR(e.type,i)}),className:`semiont-history-event`,"data-related":r?`true`:`false`,"data-interactive":`true`}:{className:`semiont-history-event`,"data-related":r?`true`:`false`},children:[(0,P.jsxs)(`div`,{className:`semiont-history-event__content`,children:[(0,P.jsx)(`span`,{className:`semiont-history-event__emoji`,onMouseEnter:_,onMouseLeave:v,children:IR(e.type,e.payload)}),u?u.isTag?(0,P.jsx)(`span`,{className:`semiont-history-event__tag`,children:u.exact}):u.isQuoted?(0,P.jsxs)(`span`,{className:`semiont-history-event__text semiont-history-event__text--quoted`,children:[`“`,u.exact,`”`]}):(0,P.jsx)(`span`,{className:`semiont-history-event__text`,children:u.exact}):(0,P.jsx)(`span`,{className:`semiont-history-event__text`,children:FR(e.type,i,e.payload)}),e.userId&&(0,P.jsx)(`span`,{className:`semiont-history-event__user`,children:PR(e.userId)}),(0,P.jsx)(`span`,{className:`semiont-history-event__timestamp`,children:LR(e.timestamp,i)})]}),p.length>0&&(0,P.jsx)(`div`,{className:`semiont-history-event__entity-types`,children:p.map(e=>(0,P.jsx)(`span`,{className:`semiont-tag semiont-tag--small`,"data-variant":`blue`,children:e},e))}),f&&(0,P.jsxs)(`div`,{className:`semiont-history-event__details`,children:[(0,P.jsxs)(`span`,{className:`semiont-history-event__detail`,children:[i(`user`),`: `,(0,P.jsx)(`span`,{className:`semiont-history-event__detail-value`,children:f.userId?PR(f.userId):``})]}),f.type===`cloned`&&f.sourceDocId&&(0,P.jsx)(a,{href:o.resourceDetail(f.sourceDocId),className:`semiont-history-event__link`,onClick:e=>e.stopPropagation(),children:i(`viewOriginal`)})]})]})}function UR({rUri:e,hoveredAnnotationId:t,onEventHover:n,onEventClick:r,Link:i,routes:a}){let o=hh(`AnnotationHistory`),s=K(R().activeSession$)?.client,c=K(s?.browse.events(e)),l=K(s?.browse.annotations(e)),u=c===void 0,d=l??[],f=(0,m.useRef)(new Map),p=(0,m.useRef)(null),h=c?c.filter(e=>e.type!==`job:started`&&e.type!==`job:progress`&&e.type!==`job:completed`).sort((e,t)=>e.metadata.sequenceNumber-t.metadata.sequenceNumber):[];return(0,m.useEffect)(()=>{p.current&&h.length>0&&requestAnimationFrame(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)})},[h.length]),(0,m.useEffect)(()=>{if(!t)return;let e=f.current.get(t);e&&p.current&&(e.scrollIntoView({behavior:`smooth`,block:`nearest`}),e.classList.add(`bg-blue-100`,`dark:bg-blue-900/30`),setTimeout(()=>{e.classList.remove(`bg-blue-100`,`dark:bg-blue-900/30`)},1500))},[t]),u?(0,P.jsxs)(`div`,{className:`semiont-history-panel`,children:[(0,P.jsx)(`h3`,{className:`semiont-history-panel__title`,children:o(`history`)}),(0,P.jsx)(`div`,{className:`semiont-history-panel__loading`,children:o(`loading`)})]}):h.length===0?null:(0,P.jsxs)(`div`,{className:`semiont-history-panel`,children:[(0,P.jsx)(`h3`,{className:`semiont-history-panel__title`,children:o(`history`)}),(0,P.jsx)(`div`,{ref:p,className:`semiont-history-panel__list`,children:h.map(e=>(0,P.jsx)(HR,{event:e,annotations:d,allEvents:h,isRelated:t?(()=>{let n=Ha(e);return n?n===t:!1})():!1,t:o,Link:i,routes:a,onEventRef:(e,t)=>{t&&e?f.current.set(e,t):!t&&e&&f.current.delete(e)},...r&&{onEventClick:r},...n&&{onEventHover:n}},e.id))})]})}function WR(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var GR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qR={};function JR(e,t){return((t||qR).jsx?KR:GR).test(e)}var YR=/[ \t\n\f\r]/g;function XR(e){return typeof e==`object`?e.type===`text`?ZR(e.value):!1:ZR(e)}function ZR(e){return e.replace(YR,``)===``}var QR=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};QR.prototype.normal={},QR.prototype.property={},QR.prototype.space=void 0;function $R(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new QR(n,r,t)}function ez(e){return e.toLowerCase()}var tz=class{constructor(e,t){this.attribute=t,this.property=e}};tz.prototype.attribute=``,tz.prototype.booleanish=!1,tz.prototype.boolean=!1,tz.prototype.commaOrSpaceSeparated=!1,tz.prototype.commaSeparated=!1,tz.prototype.defined=!1,tz.prototype.mustUseProperty=!1,tz.prototype.number=!1,tz.prototype.overloadedBoolean=!1,tz.prototype.property=``,tz.prototype.spaceSeparated=!1,tz.prototype.space=void 0;var nz={};d(nz,{boolean:()=>X,booleanish:()=>iz,commaOrSpaceSeparated:()=>cz,commaSeparated:()=>sz,number:()=>Z,overloadedBoolean:()=>az,spaceSeparated:()=>oz});var rz=0,X=lz(),iz=lz(),az=lz(),Z=lz(),oz=lz(),sz=lz(),cz=lz();function lz(){return 2**++rz}var uz=Object.keys(nz),dz=class extends tz{constructor(e,t,n,r){let i=-1;if(super(e,t),fz(this,`space`,r),typeof n==`number`)for(;++i<uz.length;){let e=uz[i];fz(this,uz[i],(n&nz[e])===nz[e])}}};dz.prototype.defined=!0;function fz(e,t,n){n&&(e[t]=n)}function pz(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new dz(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ez(r)]=r,n[ez(a.attribute)]=r}return new QR(t,n,e.space)}var mz=pz({properties:{ariaActiveDescendant:null,ariaAtomic:iz,ariaAutoComplete:null,ariaBusy:iz,ariaChecked:iz,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:oz,ariaCurrent:null,ariaDescribedBy:oz,ariaDetails:null,ariaDisabled:iz,ariaDropEffect:oz,ariaErrorMessage:null,ariaExpanded:iz,ariaFlowTo:oz,ariaGrabbed:iz,ariaHasPopup:null,ariaHidden:iz,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oz,ariaLevel:Z,ariaLive:null,ariaModal:iz,ariaMultiLine:iz,ariaMultiSelectable:iz,ariaOrientation:null,ariaOwns:oz,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:iz,ariaReadOnly:iz,ariaRelevant:null,ariaRequired:iz,ariaRoleDescription:oz,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:iz,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function hz(e,t){return t in e?e[t]:t}function gz(e,t){return hz(e,t.toLowerCase())}var _z=pz({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:sz,acceptCharset:oz,accessKey:oz,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:oz,autoFocus:X,autoPlay:X,blocking:oz,capture:null,charSet:null,checked:X,cite:null,className:oz,cols:Z,colSpan:null,content:null,contentEditable:iz,controls:X,controlsList:oz,coords:Z|sz,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:az,draggable:iz,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:oz,height:Z,hidden:az,high:Z,href:null,hrefLang:null,htmlFor:oz,httpEquiv:oz,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:oz,itemRef:oz,itemScope:X,itemType:oz,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:Z,pattern:null,ping:oz,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:oz,required:X,reversed:X,rows:Z,rowSpan:Z,sandbox:oz,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:iz,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:iz,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:oz,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:iz,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:gz}),vz=pz({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:cz,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:oz,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:sz,g2:sz,glyphName:sz,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:cz,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:oz,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cz,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cz,rev:cz,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cz,requiredFeatures:cz,requiredFonts:cz,requiredFormats:cz,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:cz,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cz,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cz,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:hz}),yz=pz({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),bz=pz({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:gz}),xz=pz({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Sz={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Cz=/[A-Z]/g,wz=/-[a-z]/g,Tz=/^data[-\w.:]+$/i;function Ez(e,t){let n=ez(t),r=t,i=tz;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Tz.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(wz,Oz);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!wz.test(e)){let n=e.replace(Cz,Dz);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=dz}return new i(r,t)}function Dz(e){return`-`+e.toLowerCase()}function Oz(e){return e.charAt(1).toUpperCase()}var kz=$R([mz,_z,yz,bz,xz],`html`),Az=$R([mz,vz,yz,bz,xz],`svg`);function jz(e){return e.join(` `).trim()}var Mz=u(jh(),1),Nz=Fz(`end`),Pz=Fz(`start`);function Fz(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Iz(e){let t=Pz(e),n=Nz(e);if(t&&n)return{start:t,end:n}}function Lz(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?zz(e.position):`start`in e||`end`in e?zz(e):`line`in e||`column`in e?Rz(e):``}function Rz(e){return Bz(e&&e.line)+`:`+Bz(e&&e.column)}function zz(e){return Rz(e&&e.start)+`-`+Rz(e&&e.end)}function Bz(e){return e&&typeof e==`number`?e:1}var Vz=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Lz(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Vz.prototype.file=``,Vz.prototype.name=``,Vz.prototype.reason=``,Vz.prototype.message=``,Vz.prototype.stack=``,Vz.prototype.column=void 0,Vz.prototype.line=void 0,Vz.prototype.ancestors=void 0,Vz.prototype.cause=void 0,Vz.prototype.fatal=void 0,Vz.prototype.place=void 0,Vz.prototype.ruleId=void 0,Vz.prototype.source=void 0;var Hz={}.hasOwnProperty,Uz=new Map,Wz=/[A-Z]/g,Gz=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Kz=new Set([`td`,`th`]),qz=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Jz(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=aB(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=iB(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Az:kz,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Yz(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Yz(e,t,n){if(t.type===`element`)return Xz(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Zz(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return $z(e,t,n);if(t.type===`mdxjsEsm`)return Qz(e,t);if(t.type===`root`)return eB(e,t,n);if(t.type===`text`)return tB(e,t)}function Xz(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Az,e.schema=i),e.ancestors.push(t);let a=dB(e,t.tagName,!1),o=oB(e,t),s=cB(e,t);return Gz.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!XR(e):!0})),nB(e,o,a,t),rB(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Zz(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}fB(e,t.position)}function Qz(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fB(e,t.position)}function $z(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Az,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:dB(e,t.name,!0),o=sB(e,t),s=cB(e,t);return nB(e,o,a,t),rB(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function eB(e,t,n){let r={};return rB(r,cB(e,t)),e.create(t,e.Fragment,r,n)}function tB(e,t){return t.value}function nB(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rB(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function iB(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function aB(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Pz(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function oB(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Hz.call(t.properties,i)){let a=lB(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Kz.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function sB(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else fB(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else fB(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function cB(e,t){let n=[],r=-1,i=e.passKeys?new Map:Uz;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Yz(e,a,o);s!==void 0&&n.push(s)}return n}function lB(e,t,n){let r=Ez(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?WR(n):jz(n)),r.property===`style`){let t=typeof n==`object`?n:uB(e,String(n));return e.stylePropertyNameCase===`css`&&(t=pB(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Sz[r.property]||r.property:r.attribute,n]}}function uB(e,t){try{return(0,Mz.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Vz("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=qz+`#cannot-parse-style-attribute`,r}}function dB(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=JR(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=JR(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Hz.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);fB(e)}function fB(e,t){let n=new Vz("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=qz+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function pB(e){let t={},n;for(n in e)Hz.call(e,n)&&(t[mB(n)]=e[n]);return t}function mB(e){let t=e.replace(Wz,hB);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function hB(e){return`-`+e.toLowerCase()}var gB={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},_B={};function vB(e,t){let n=t||_B;return yB(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function yB(e,t,n){if(xB(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return bB(e.children,t,n)}return Array.isArray(e)?bB(e,t,n):``}function bB(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=yB(e[i],t,n);return r.join(``)}function xB(e){return!!(e&&typeof e==`object`)}var SB={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:``,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:``,InvisibleTimes:``,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
108
|
+
`,Nfr:`𝔑`,NoBreak:``,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:` `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:``,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:``,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:``,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:``,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:``,zwnj:``},CB={}.hasOwnProperty;function wB(e){return CB.call(SB,e)?SB[e]:!1}function TB(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function EB(e,t){return e.length>0?(TB(e,e.length,0,t),e):t}var DB={}.hasOwnProperty;function OB(e){let t={},n=-1;for(;++n<e.length;)kB(t,e[n]);return t}function kB(e,t){let n;for(n in t){let r=(DB.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){DB.call(r,a)||(r[a]=[]);let e=i[a];AB(r[a],Array.isArray(e)?e:e?[e]:[])}}}function AB(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);TB(e,0,0,r)}function jB(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function MB(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var NB=UB(/[A-Za-z]/),PB=UB(/[\dA-Za-z]/),FB=UB(/[#-'*+\--9=?A-Z^-~]/);function IB(e){return e!==null&&(e<32||e===127)}var LB=UB(/\d/),RB=UB(/[\dA-Fa-f]/),zB=UB(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function BB(e){return e!==null&&(e<0||e===32)}function $(e){return e===-2||e===-1||e===32}var VB=UB(/\p{P}|\p{S}/u),HB=UB(/\s/);function UB(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function WB(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&PB(e.charCodeAt(n+1))&&PB(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function GB(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $(r)?(e.enter(n),s(r)):t(r)}function s(r){return $(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var KB={tokenize:qB};function qB(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),GB(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var JB={tokenize:XB},YB={tokenize:ZB};function XB(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return TB(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(YB,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(YB,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;TB(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ZB(e,t,n){return GB(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function QB(e){if(e===null||BB(e)||HB(e))return 1;if(VB(e))return 2}function $B(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var eV={name:`attention`,resolveAll:tV,tokenize:nV};function tV(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};rV(d,-c),rV(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=EB(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=EB(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=EB(l,$B(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=EB(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=EB(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,TB(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function nV(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=QB(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=QB(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function rV(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var iV={name:`autolink`,tokenize:aV};function aV(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return NB(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||PB(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||PB(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||IB(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):FB(t)?(e.consume(t),l):n(t)}function u(e){return PB(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||PB(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var oV={partial:!0,tokenize:sV};function sV(e,t,n){return r;function r(t){return $(t)?GB(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var cV={continuation:{tokenize:uV},exit:dV,name:`blockQuote`,tokenize:lV};function lV(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function uV(e,t,n){let r=this;return i;function i(t){return $(t)?GB(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(cV,t,n)(r)}}function dV(e){e.exit(`blockQuote`)}var fV={name:`characterEscape`,tokenize:pV};function pV(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return zB(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var mV={name:`characterReference`,tokenize:hV};function hV(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=PB,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=RB,u):(e.enter(`characterReferenceValue`),a=7,o=LB,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===PB&&!wB(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var gV={partial:!0,tokenize:yV},_V={concrete:!0,name:`codeFenced`,tokenize:vV};function vV(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$(t)?GB(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(gV,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),GB(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$(t)?GB(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(gV,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$(t)?GB(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$(t)?GB(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function yV(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var bV={name:`codeIndented`,tokenize:SV},xV={partial:!0,tokenize:CV};function SV(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),GB(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Q(t)?e.attempt(xV,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function CV(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):GB(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Q(e)?i(e):n(e)}}var wV={name:`codeText`,previous:EV,resolve:TV,tokenize:DV};function TV(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function EV(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function DV(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var OV=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&kV(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),kV(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),kV(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);kV(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);kV(this.left,t.reverse())}}};function kV(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function AV(e){let t={},n=-1,r,i,a,o,s,c,l,u=new OV(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,jV(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return TB(e,0,1/0,u.slice(0)),!l}function jV(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var MV={resolve:PV,tokenize:FV},NV={partial:!0,tokenize:IV};function PV(e){return AV(e),e}function FV(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(NV,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function IV(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),GB(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function LV(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||IB(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||BB(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||IB(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function RV(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function zV(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),GB(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function BV(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$(i)?GB(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var VV={name:`definition`,tokenize:UV},HV={partial:!0,tokenize:WV};function UV(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return RV.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=MB(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return BB(t)?BV(e,l)(t):l(t)}function l(t){return LV(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(HV,d,d)(t)}function d(t){return $(t)?GB(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function WV(e,t,n){return r;function r(t){return BB(t)?BV(e,i)(t):n(t)}function i(t){return zV(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $(t)?GB(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var GV={name:`hardBreakEscape`,tokenize:KV};function KV(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var qV={name:`headingAtx`,resolve:JV,tokenize:YV};function JV(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},TB(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function YV(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||BB(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):$(n)?GB(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||BB(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var XV=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ZV=[`pre`,`script`,`style`,`textarea`],QV={concrete:!0,name:`htmlFlow`,resolveTo:tH,tokenize:nH},$V={partial:!0,tokenize:iH},eH={partial:!0,tokenize:rH};function tH(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function nH(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ie):NB(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):NB(a)?(e.consume(a),i=4,r.interrupt?t:ie):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ie):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return NB(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||BB(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ZV.includes(l)?(i=1,r.interrupt?t(s):O(s)):XV.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||PB(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||NB(t)?(e.consume(t),b):$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||PB(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||BB(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):$(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),te):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),ie):t===93&&i===5?(e.consume(t),re):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check($V,M,k)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(eH,A,M)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||Q(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function te(t){return t===45?(e.consume(t),ie):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return ZV.includes(n)?(e.consume(t),ae):O(t)}return NB(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),ie):O(t)}function ie(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),ie):O(t)}function ae(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),M(t)):(e.consume(t),ae)}function M(n){return e.exit(`htmlFlow`),t(n)}}function rH(e,t,n){let r=this;return i;function i(t){return Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function iH(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(oV,t,n)}}var aH={name:`htmlText`,tokenize:oH};function oH(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):NB(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):NB(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?te(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?te(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?te(t):Q(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?te(e):y(e)}function x(t){return NB(t)?(e.consume(t),S):n(t)}function S(t){return t===45||PB(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,j(t)):$(t)?(e.consume(t),C):te(t)}function w(t){return t===45||PB(t)?(e.consume(t),w):t===47||t===62||BB(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),te):t===58||t===95||NB(t)?(e.consume(t),E):Q(t)?(o=T,j(t)):$(t)?(e.consume(t),T):te(t)}function E(t){return t===45||t===46||t===58||t===95||PB(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,j(t)):$(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Q(t)?(o=O,j(t)):$(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):Q(t)?(o=k,j(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||BB(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||BB(e)?T(e):n(e)}function te(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return $(t)?GB(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var sH={name:`labelEnd`,resolveAll:dH,resolveTo:fH,tokenize:pH},cH={tokenize:mH},lH={tokenize:hH},uH={tokenize:gH};function dH(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&TB(e,0,e.length,n),e}function fH(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=EB(s,e.slice(a+1,a+r+3)),s=EB(s,[[`enter`,u,t]]),s=EB(s,$B(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=EB(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=EB(s,e.slice(o+1)),s=EB(s,[[`exit`,c,t]]),TB(e,a,e.length,s),e}function pH(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(MB(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(cH,u,o?u:d)(t):t===91?e.attempt(lH,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(uH,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function mH(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return BB(t)?BV(e,a)(t):a(t)}function a(t){return t===41?u(t):LV(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return BB(t)?BV(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?zV(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return BB(t)?BV(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function hH(e,t,n){let r=this;return i;function i(t){return RV.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(MB(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function gH(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var _H={name:`labelStartImage`,resolveAll:sH.resolveAll,tokenize:vH};function vH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var yH={name:`labelStartLink`,resolveAll:sH.resolveAll,tokenize:bH};function bH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var xH={name:`lineEnding`,tokenize:SH};function SH(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),GB(e,t,`linePrefix`)}}var CH={name:`thematicBreak`,tokenize:wH};function wH(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$(t)?GB(e,s,`whitespace`)(t):s(t))}}var TH={continuation:{tokenize:kH},exit:jH,name:`list`,tokenize:OH},EH={partial:!0,tokenize:MH},DH={partial:!0,tokenize:AH};function OH(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:LB(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(CH,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return LB(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(oV,r.interrupt?n:u,e.attempt(EH,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function kH(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(oV,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,GB(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(DH,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,GB(e,e.attempt(TH,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function AH(e,t,n){let r=this;return GB(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function jH(e){e.exit(this.containerState.type)}function MH(e,t,n){let r=this;return GB(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var NH={name:`setextUnderline`,resolveTo:PH,tokenize:FH};function PH(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function FH(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$(t)?GB(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var IH={tokenize:LH};function LH(e){let t=this,n=e.attempt(oV,r,e.attempt(this.parser.constructs.flowInitial,i,GB(e,e.attempt(this.parser.constructs.flow,i,e.attempt(MV,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var RH={resolveAll:HH()},zH=VH(`string`),BH=VH(`text`);function VH(e){return{resolveAll:HH(e===`text`?UH:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function HH(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function UH(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var WH={};d(WH,{attentionMarkers:()=>QH,contentInitial:()=>KH,disable:()=>$H,document:()=>GH,flow:()=>JH,flowInitial:()=>qH,insideSpan:()=>ZH,string:()=>YH,text:()=>XH});var GH={42:TH,43:TH,45:TH,48:TH,49:TH,50:TH,51:TH,52:TH,53:TH,54:TH,55:TH,56:TH,57:TH,62:cV},KH={91:VV},qH={[-2]:bV,[-1]:bV,32:bV},JH={35:qV,42:CH,45:[NH,CH],60:QV,61:NH,95:CH,96:_V,126:_V},YH={38:mV,92:fV},XH={[-5]:xH,[-4]:xH,[-3]:xH,33:_H,38:mV,42:eV,60:[iV,aH],91:yH,92:[GV,fV],93:sH,95:eV,96:wV},ZH={null:[eV,RH]},QH={null:[42,95]},$H={null:[]};function eU(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=EB(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=$B(a,l.events,l),l.events):[]}function f(e,t){return nU(p(e),t)}function p(e){return tU(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&TB(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tU(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function nU(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
109
|
+
`;break;case-3:o=`\r
|
|
110
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function rU(e){let t={constructs:OB([WH,...(e||{}).extensions||[]]),content:n(KB),defined:[],document:n(JB),flow:n(IH),lazy:{},string:n(zH),text:n(BH)};return t;function n(e){return n;function n(n){return eU(t,e,n)}}}function iU(e){for(;!AV(e););return e}var aU=/[\0\t\n\r]/g;function oU(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(aU.lastIndex=u,c=aU.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var sU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cU(e){return e.replace(sU,lU)}function lU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return jB(n.slice(t?2:1),t?16:10)}return wB(n)||e}var uU={}.hasOwnProperty;function dU(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),fU(n)(iU(rU(n).document().write(oU()(e,t,!0))))}function fU(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(xe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(_e),blockQuote:a(fe),characterEscape:T,characterReference:T,codeFenced:a(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(pe,o),codeText:a(me,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(he),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ge),hardBreakEscape:a(ve),hardBreakTrailing:a(ve),htmlFlow:a(ye,o),htmlFlowData:T,htmlText:a(ye,o),htmlTextData:T,image:a(be),label:o,link:a(xe),listItem:a(Ce),listItemValue:f,listOrdered:a(Se,d),listUnordered:a(Se),paragraph:a(we),reference:oe,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(_e),strong:a(Te),thematicBreak:a(De)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:de,autolinkProtocol:N,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:le,characterReference:ue,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(te),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:ie,resourceTitleString:ae,resource:M,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};mU(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];uU.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||gU).call(a,void 0,e[0])}for(r.position={start:pU(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:pU(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:pU(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||gU).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Lz({start:e.start,end:e.end})+`): it’s not open`);n.position.end=pU(e.end)}function u(){return vB(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=MB(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ee(),n.position={start:pU(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=pU(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=pU(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=cU(t),n.identifier=MB(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function M(){this.data.inReference=void 0}function oe(){this.data.referenceType=`collapsed`}function se(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=MB(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ce(e){this.data.characterReferenceType=e.type}function le(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=jB(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=wB(t);let i=this.stack[this.stack.length-1];i.value+=r}function ue(e){let t=this.stack.pop();t.position.end=pU(e.end)}function N(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function fe(){return{type:`blockquote`,children:[]}}function pe(){return{type:`code`,lang:null,meta:null,value:``}}function me(){return{type:`inlineCode`,value:``}}function he(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ge(){return{type:`emphasis`,children:[]}}function _e(){return{type:`heading`,depth:0,children:[]}}function ve(){return{type:`break`}}function ye(){return{type:`html`,value:``}}function be(){return{type:`image`,title:null,url:``,alt:null}}function xe(){return{type:`link`,title:null,url:``,children:[]}}function Se(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function we(){return{type:`paragraph`,children:[]}}function Te(){return{type:`strong`,children:[]}}function Ee(){return{type:`text`,value:``}}function De(){return{type:`thematicBreak`}}}function pU(e){return{line:e.line,column:e.column,offset:e.offset}}function mU(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?mU(e,r):hU(e,r)}}function hU(e,t){let n;for(n in t)if(uU.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function gU(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Lz({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Lz({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Lz({start:t.start,end:t.end})+`) is still open`)}function _U(e){let t=this;t.parser=n;function n(n){return dU(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function vU(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yU(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
111
|
+
`}]}function bU(e,t){let n=t.value?t.value+`
|
|
112
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function xU(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SU(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CU(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=WB(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function wU(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TU(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function EU(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function DU(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return EU(e,t);let i={src:WB(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function OU(e,t){let n={src:WB(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function kU(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function AU(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return EU(e,t);let i={href:WB(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jU(e,t){let n={href:WB(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function MU(e,t,n){let r=e.all(t),i=n?NU(n):PU(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
113
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
114
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function NU(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=PU(n[r])}return t}function PU(e){return e.spread??e.children.length>1}function FU(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function IU(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LU(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function RU(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zU(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Pz(t.children[1]),o=Nz(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function BU(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function VU(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var HU=9,UU=32;function WU(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(GU(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(GU(t.slice(i),i>0,!1)),a.join(``)}function GU(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===HU||t===UU;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===HU||t===UU;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function KU(e,t){let n={type:`text`,value:WU(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function qU(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var JU={blockquote:vU,break:yU,code:bU,delete:xU,emphasis:SU,footnoteReference:CU,heading:wU,html:TU,imageReference:DU,image:OU,inlineCode:kU,linkReference:AU,link:jU,listItem:MU,list:FU,paragraph:IU,root:LU,strong:RU,table:zU,tableCell:VU,tableRow:BU,text:KU,thematicBreak:qU,toml:YU,yaml:YU,definition:YU,footnoteDefinition:YU};function YU(){}var XU=-1,ZU=0,QU=1,$U=2,eW=3,tW=4,nW=5,rW=6,iW=7,aW=8,oW=typeof self==`object`?self:globalThis,sW=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case ZU:case XU:return n(o,i);case QU:{let e=n([],i);for(let t of o)e.push(r(t));return e}case $U:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case eW:return n(new Date(o),i);case tW:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case nW:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case rW:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case iW:{let{name:e,message:t}=o;return n(new oW[e](t),i)}case aW:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new oW[a](o),i)};return r},cW=e=>sW(new Map,e)(0),lW=``,{toString:uW}={},{keys:dW}=Object,fW=e=>{let t=typeof e;if(t!==`object`||!e)return[ZU,t];let n=uW.call(e).slice(8,-1);switch(n){case`Array`:return[QU,lW];case`Object`:return[$U,lW];case`Date`:return[eW,lW];case`RegExp`:return[tW,lW];case`Map`:return[nW,lW];case`Set`:return[rW,lW];case`DataView`:return[QU,n]}return n.includes(`Array`)?[QU,n]:n.includes(`Error`)?[iW,n]:[$U,n]},pW=([e,t])=>e===ZU&&(t===`function`||t===`symbol`),mW=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=fW(r);switch(o){case ZU:{let t=r;switch(s){case`bigint`:o=aW,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([XU],r)}return i([o,t],r)}case QU:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case $U:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of dW(r))(e||!pW(fW(r[t])))&&n.push([a(t),a(r[t])]);return c}case eW:return i([o,r.toISOString()],r);case tW:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case nW:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(pW(fW(n))||pW(fW(i))))&&t.push([a(n),a(i)]);return n}case rW:{let t=[],n=i([o,t],r);for(let n of r)(e||!pW(fW(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},hW=(e,{json:t,lossy:n}={})=>{let r=[];return mW(!(t||n),!!t,new Map,r)(e),r},gW=typeof structuredClone==`function`?((e,t)=>t&&(`json`in t||`lossy`in t)?cW(hW(e,t)):structuredClone(e)):(e,t)=>cW(hW(e,t));function _W(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function vW(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function yW(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||_W,r=e.options.footnoteBackLabel||vW,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=WB(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...gW(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
115
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
116
|
+
`}]}}var bW=(function(e){if(e==null)return TW;if(typeof e==`function`)return wW(e);if(typeof e==`object`)return Array.isArray(e)?xW(e):SW(e);if(typeof e==`string`)return CW(e);throw Error(`Expected function, string, or object as test`)});function xW(e){let t=[],n=-1;for(;++n<e.length;)t[n]=bW(e[n]);return wW(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function SW(e){let t=e;return wW(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function CW(e){return wW(t);function t(t){return t&&t.type===e}}function wW(e){return t;function t(t,n,r){return!!(EW(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function TW(){return!0}function EW(e){return typeof e==`object`&&!!e&&`type`in e}function DW(e){return`\x1B[33m`+e+`\x1B[39m`}var OW=[],kW=!0,AW=!1,jW=`skip`;function MW(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=bW(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+DW(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=OW,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=NW(n(e,c)),l[0]===AW))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==jW)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===AW)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function NW(e){return Array.isArray(e)?e:typeof e==`number`?[kW,e]:e==null?OW:[e]}function PW(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),MW(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var FW={}.hasOwnProperty,IW={};function LW(e,t){let n=t||IW,r=new Map,i=new Map,a={all:s,applyData:zW,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...JU,...n.handlers},one:o,options:n,patch:RW,wrap:VW};return PW(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(FW.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=gW(n);return r.children=a.all(e),r}return gW(e)}return(a.options.unknownHandler||BW)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=HW(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=HW(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function RW(e,t){e.position&&(t.position=Iz(e))}function zW(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,gW(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function BW(e,t){let n=t.data||{},r=`value`in t&&!(FW.call(n,`hProperties`)||FW.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function VW(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
117
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
118
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
119
|
+
`}),n}function HW(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function UW(e,t){let n=LW(e,t),r=n.one(e,void 0),i=yW(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
120
|
+
`},i)),a}function WW(e,t){return e&&`run`in e?async function(n,r){let i=UW(n,{file:r,...t});await e.run(i,r)}:function(n,r){return UW(n,{file:r,...e||t})}}function GW(e){if(e)throw e}var KW=u(Mh(),1);function qW(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function JW(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?YW(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function YW(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}function XW(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}var ZW=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],QW=class{constructor(e){let t;t=e?XW(e)?{path:e}:typeof e==`string`||nG(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Eh.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ZW.length;){let e=ZW[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)ZW.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Th.default.basename(this.path):void 0}set basename(e){eG(e,`basename`),$W(e,`basename`),this.path=Th.default.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Th.default.dirname(this.path):void 0}set dirname(e){tG(this.basename,`dirname`),this.path=Th.default.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Th.default.extname(this.path):void 0}set extname(e){if($W(e,`extname`),tG(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Th.default.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){XW(e)&&(e=Dh(e)),eG(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Th.default.basename(this.path,this.extname):void 0}set stem(e){eG(e,`stem`),$W(e,`stem`),this.path=Th.default.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Vz(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function $W(e,t){if(e&&e.includes(Th.default.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Th.default.sep+"`")}function eG(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function tG(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function nG(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var rG=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),iG={}.hasOwnProperty,aG=new class e extends rG{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=JW()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,KW.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(cG(`data`,this.frozen),this.namespace[e]=t,this):iG.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cG(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=dG(e),n=this.parser||this.Parser;return oG(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),oG(`process`,this.parser||this.Parser),sG(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=dG(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);pG(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),oG(`processSync`,this.parser||this.Parser),sG(`processSync`,this.compiler||this.Compiler),this.process(e,r),uG(`processSync`,`process`,t),n;function r(e,r){t=!0,GW(e),n=r}}run(e,t,n){lG(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=dG(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),uG(`runSync`,`run`,n),r;function i(e,t){GW(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=dG(t),r=this.compiler||this.Compiler;return sG(`stringify`,r),lG(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(cG(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,KW.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];qW(o)&&qW(r)&&(r=(0,KW.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function oG(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function sG(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function cG(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lG(e){if(!qW(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function uG(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function dG(e){return fG(e)?e:new QW(e)}function fG(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function pG(e){return typeof e==`string`||mG(e)}function mG(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hG=`https://github.com/remarkjs/react-markdown/blob/main/changelog.md`,gG=[],_G={allowDangerousHtml:!0},vG=/^(https?|ircs?|mailto|xmpp)$/i,yG=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function bG(e){let t=xG(e),n=SG(e);return CG(t.runSync(t.parse(n),n),e)}function xG(e){let t=e.rehypePlugins||gG,n=e.remarkPlugins||gG,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._G}:_G;return aG().use(_U).use(n).use(WW,r).use(t)}function SG(e){let t=e.children||``,n=new QW;return typeof t==`string`?n.value=t:``+t,n}function CG(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||wG;for(let e of yG)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+hG+e.id;return PW(e,l),Jz(e,{Fragment:P.Fragment,components:i,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in gB)if(Object.hasOwn(gB,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=gB[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function wG(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||vG.test(e.slice(0,t))?e:``}function TG(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function EG(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function DG(e,t,n){let r=bW((n||{}).ignore||[]),i=OG(t),a=-1;for(;++a<i.length;)MW(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function OG(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([kG(e[0]),AG(e[1])])}return t}function kG(e){return typeof e==`string`?new RegExp(EG(e),`g`):e}function AG(e){return typeof e==`function`?e:function(){return e}}var jG=`phrasing`,MG=[`autolink`,`link`,`image`,`label`];function NG(){return{transforms:[VG],enter:{literalAutolink:FG,literalAutolinkEmail:IG,literalAutolinkHttp:IG,literalAutolinkWww:IG},exit:{literalAutolink:BG,literalAutolinkEmail:zG,literalAutolinkHttp:LG,literalAutolinkWww:RG}}}function PG(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:jG,notInConstruct:MG},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:jG,notInConstruct:MG},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:jG,notInConstruct:MG}]}}function FG(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function IG(e){this.config.enter.autolinkProtocol.call(this,e)}function LG(e){this.config.exit.autolinkProtocol.call(this,e)}function RG(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function zG(e){this.config.exit.autolinkEmail.call(this,e)}function BG(e){this.exit(e)}function VG(e){DG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HG],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,UG]],{ignore:[`link`,`linkReference`]})}function HG(e,t,n,r,i){let a=``;if(!KG(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!WG(n)))return!1;let o=GG(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function UG(e,t,n,r){return!KG(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function WG(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function GG(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=TG(e,`(`),a=TG(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function KG(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||HB(n)||VB(n))&&(!t||n!==47)}nK.peek=tK;function qG(){this.buffer()}function JG(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function YG(){this.buffer()}function XG(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function ZG(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=MB(this.sliceSerialize(e)).toLowerCase(),n.label=t}function QG(e){this.exit(e)}function $G(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=MB(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eK(e){this.exit(e)}function tK(){return`[`}function nK(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function rK(){return{enter:{gfmFootnoteCallString:qG,gfmFootnoteCall:JG,gfmFootnoteDefinitionLabelString:YG,gfmFootnoteDefinition:XG},exit:{gfmFootnoteCallString:ZG,gfmFootnoteCall:QG,gfmFootnoteDefinitionLabelString:$G,gfmFootnoteDefinition:eK}}}function iK(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:nK},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
121
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?oK:aK))),s(),o}}function aK(e,t,n){return t===0?e:oK(e,t,n)}function oK(e,t,n){return(n?``:` `)+e}var sK=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];fK.peek=pK;function cK(){return{canContainEols:[`delete`],enter:{strikethrough:uK},exit:{strikethrough:dK}}}function lK(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:sK}],handlers:{delete:fK}}}function uK(e){this.enter({type:`delete`,children:[]},e)}function dK(e){this.exit(e)}function fK(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function pK(){return`~`}function mK(e){return e.length}function hK(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||mK,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=gK(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=_K(r[d]);else{let e=_K(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
122
|
+
`)}function gK(e){return e==null?``:String(e)}function _K(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function vK(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),yK);return i(),o}function yK(e,t,n){return`>`+(n?``:` `)+e}function bK(e,t){return xK(e,t.inConstruct,!0)&&!xK(e,t.notInConstruct,!1)}function xK(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function SK(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
123
|
+
`&&bK(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
124
|
+
`}function CK(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function wK(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function TK(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function EK(e,t,n,r){let i=TK(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(wK(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,DK);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(CK(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
125
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
126
|
+
`),a&&(u+=s.move(a+`
|
|
127
|
+
`)),u+=s.move(c),l(),u}function DK(e,t,n){return(n?``:` `)+e}function OK(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function kK(e,t,n,r){let i=OK(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
128
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function AK(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function jK(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function MK(e,t,n){let r=QB(e),i=QB(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}NK.peek=PK;function NK(e,t,n,r){let i=AK(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=MK(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=jK(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=MK(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+jK(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function PK(e,t,n){return n.options.emphasis||`*`}function FK(e,t){let n=!1;return PW(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,AW}),!!((!e.depth||e.depth<3)&&vB(e)&&(t.options.setext||n))}function IK(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(FK(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
129
|
+
`,after:`
|
|
130
|
+
`});return r(),t(),o+`
|
|
131
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
132
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
133
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=jK(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}LK.peek=RK;function LK(e){return e.value||``}function RK(){return`<`}zK.peek=BK;function zK(e,t,n,r){let i=OK(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function BK(){return`!`}VK.peek=HK;function VK(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function HK(){return`!`}UK.peek=WK;function UK(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function WK(){return"`"}function GK(e,t){let n=vB(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}KK.peek=qK;function KK(e,t,n,r){let i=OK(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(GK(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function qK(e,t,n){return GK(e,n)?`<`:`[`}JK.peek=YK;function JK(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function YK(){return`[`}function XK(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ZK(e){let t=XK(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function QK(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $K(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function eq(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?QK(n):XK(n),s=e.ordered?o===`.`?`)`:`.`:ZK(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),$K(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function tq(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nq(e,t,n,r){let i=tq(n),a=n.bulletCurrent||XK(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function rq(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var iq=bW([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function aq(e,t,n,r){return(e.children.some(function(e){return iq(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function oq(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sq.peek=cq;function sq(e,t,n,r){let i=oq(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=MK(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=jK(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=MK(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+jK(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function cq(e,t,n){return n.options.strong||`*`}function lq(e,t,n,r){return n.safe(e.value,r)}function uq(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function dq(e,t,n){let r=($K(n)+(n.options.ruleSpaces?` `:``)).repeat(uq(n));return n.options.ruleSpaces?r.slice(0,-1):r}var fq={blockquote:vK,break:SK,code:EK,definition:kK,emphasis:NK,hardBreak:SK,heading:IK,html:LK,image:zK,imageReference:VK,inlineCode:UK,link:KK,linkReference:JK,list:eq,listItem:nq,paragraph:rq,root:aq,strong:sq,text:lq,thematicBreak:dq};function pq(){return{enter:{table:mq,tableData:vq,tableHeader:vq,tableRow:gq},exit:{codeText:yq,table:hq,tableData:_q,tableHeader:_q,tableRow:_q}}}function mq(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function hq(e){this.exit(e),this.data.inTable=void 0}function gq(e){this.enter({type:`tableRow`,children:[]},e)}function _q(e){this.exit(e)}function vq(e){this.enter({type:`tableCell`,children:[]},e)}function yq(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,bq));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function bq(e,t){return t===`|`?t:e}function xq(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
134
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
135
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return hK(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=fq.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Sq(){return{exit:{taskListCheckValueChecked:wq,taskListCheckValueUnchecked:wq,paragraph:Tq}}}function Cq(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Eq}}}function wq(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Tq(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Eq(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=fq.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Dq(){return[NG(),rK(),cK(),pq(),Sq()]}function Oq(e){return{extensions:[PG(),iK(e),lK(),xq(e),Cq()]}}var kq={tokenize:Uq,partial:!0},Aq={tokenize:Wq,partial:!0},jq={tokenize:Gq,partial:!0},Mq={tokenize:Kq,partial:!0},Nq={tokenize:qq,partial:!0},Pq={name:`wwwAutolink`,tokenize:Vq,previous:Jq},Fq={name:`protocolAutolink`,tokenize:Hq,previous:Yq},Iq={name:`emailAutolink`,tokenize:Bq,previous:Xq},Lq={};function Rq(){return{text:Lq}}for(var zq=48;zq<123;)Lq[zq]=Iq,zq++,zq===58?zq=65:zq===91&&(zq=97);Lq[43]=Iq,Lq[45]=Iq,Lq[46]=Iq,Lq[95]=Iq,Lq[72]=[Iq,Fq],Lq[104]=[Iq,Fq],Lq[87]=[Iq,Pq],Lq[119]=[Iq,Pq];function Bq(e,t,n){let r=this,i,a;return o;function o(t){return!Zq(t)||!Xq.call(r,r.previous)||Qq(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Zq(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Nq,u,l)(t):t===45||t===95||PB(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&NB(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Vq(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Jq.call(r,r.previous)||Qq(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(kq,e.attempt(Aq,e.attempt(jq,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Hq(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Yq.call(r,r.previous)&&!Qq(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(NB(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||IB(t)||BB(t)||HB(t)||VB(t)?n(t):e.attempt(Aq,e.attempt(jq,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Uq(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Wq(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Mq,c,s)(t):t===null||BB(t)||HB(t)||t!==45&&VB(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Gq(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Mq,t,a)(o):o===null||BB(o)||HB(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Kq(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||BB(o)||HB(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||BB(e)||HB(e)?t(e):r(e)}function a(e){return NB(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):NB(t)?(e.consume(t),o):n(t)}}function qq(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return PB(e)?n(e):t(e)}}function Jq(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||BB(e)}function Yq(e){return!NB(e)}function Xq(e){return!(e===47||Zq(e))}function Zq(e){return e===43||e===45||e===46||e===95||PB(e)}function Qq(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var $q={tokenize:sJ,partial:!0};function eJ(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:iJ,continuation:{tokenize:aJ},exit:oJ}},text:{91:{name:`gfmFootnoteCall`,tokenize:rJ},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tJ,resolveTo:nJ}}}}function tJ(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=MB(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function nJ(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function rJ(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||BB(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(MB(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return BB(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function iJ(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||BB(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=MB(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return BB(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),GB(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function aJ(e,t,n){return e.check(oV,t,e.attempt($q,t,n))}function oJ(e){e.exit(`gfmFootnoteDefinition`)}function sJ(e,t,n){let r=this;return GB(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function cJ(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&TB(o,o.length,0,$B(s,e.slice(r+1,n),t)),TB(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),TB(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=QB(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=QB(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var lJ=class{constructor(){this.map=[]}add(e,t,n){uJ(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function uJ(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function dJ(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function fJ(){return{flow:{null:{name:`table`,tokenize:pJ,resolveAll:mJ}}}}function pJ(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?GB(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||BB(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?GB(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?GB(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?GB(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?GB(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||BB(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function mJ(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new lJ;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(gJ(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=hJ(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=hJ(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=hJ(f,t,o,i,n,d)):(o[0]=o[1],d=hJ(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&gJ(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=dJ(t.events,n))}return e}function hJ(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},_J(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=_J(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=_J(t.events,n[2]),a=_J(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},_J(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function gJ(e,t,n,r,i){let a=[],o=_J(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function _J(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var vJ={name:`tasklistCheck`,tokenize:bJ};function yJ(){return{text:{91:vJ}}}function bJ(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return BB(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:xJ},t,n)(r):n(r)}}function xJ(e,t,n){return GB(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function SJ(e){return OB([Rq(),eJ(),cJ(e),fJ(),yJ()])}var CJ={};function wJ(e){let t=this,n=e||CJ,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(SJ(n)),a.push(Dq()),o.push(Oq(n))}function TJ({imageUrl:e,alt:t=`Resource image`}){return(0,P.jsx)(`div`,{className:`semiont-image-viewer`,children:(0,P.jsx)(`img`,{src:e,alt:t,className:`semiont-image-viewer__image`,style:{imageRendering:`auto`}})})}var EJ=(0,m.lazy)(()=>b(()=>import(`./PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js`).then(e=>({default:e.PdfAnnotationCanvas})),__vite__mapDeps([2,3,4,5]))),DJ=(0,m.memo)(function({content:e}){return(0,P.jsx)(bG,{remarkPlugins:[wJ],children:e})}),OJ=(0,m.memo)(function({content:e,mimeType:t,resourceUri:n,annotations:r,selectedClick:i=`detail`,annotateMode:a,hoverDelayMs:o=150}){let{newAnnotationIds:s}=jE(),c=K(R().activeSession$),l=(0,m.useRef)(null),u=Ro(t),{highlights:d,references:f,assessments:p,comments:h,tags:g}=r,_=(0,m.useMemo)(()=>[...d,...f,...p,...h,...g],[d,f,p,h,g]),v=(0,m.useMemo)(()=>eE(_),[_]),y=(0,m.useRef)(null);(0,m.useEffect)(()=>{l.current&&(y.current=qT(e,l.current))},[e]),(0,m.useEffect)(()=>{if(!l.current||!y.current||v.length===0)return;let e=l.current,t=JT(e);return ZT(XT(v,y.current,t)),()=>$T(e)},[v]),(0,m.useEffect)(()=>{if(!l.current||!c)return;let e=l.current,t=e=>{let t=e.target.closest(`[data-annotation-id]`);if(!t)return;let n=t.getAttribute(`data-annotation-id`),r=t.getAttribute(`data-annotation-type`);if(n&&r===`reference`){let e=_.find(e=>e.id===n);e&&c.client.browse.click(e.id,e.motivation)}},{handleMouseEnter:n,handleMouseLeave:r,cleanup:i}=Hu(e=>c.client.beckon.hover(e),o),a=e=>{let t=e.target.closest(`[data-annotation-id]`)?.getAttribute(`data-annotation-id`);t&&n(za(t))},u=e=>{e.target.closest(`[data-annotation-id]`)&&r()};return s&&e.querySelectorAll(`[data-annotation-id]`).forEach(e=>{let t=e.getAttribute(`data-annotation-id`);t&&s.has(t)&&e.classList.add(`annotation-sparkle`)}),e.addEventListener(`click`,t),e.addEventListener(`mouseover`,a),e.addEventListener(`mouseout`,u),()=>{e.removeEventListener(`click`,t),e.removeEventListener(`mouseover`,a),e.removeEventListener(`mouseout`,u),i()}},[e,_,s,o,c]);let b=(0,m.useCallback)((e,t=!1)=>{l.current&&DN(e,l.current,{pulse:t})},[]);switch(SE({"beckon:hover":(0,m.useCallback)(({annotationId:e})=>{b(e)},[b]),"beckon:focus":(0,m.useCallback)(({annotationId:e})=>{b(e??null,!0)},[b])}),u){case`text`:return(0,P.jsxs)(`div`,{className:`semiont-browse-view`,"data-mime-type":`text`,children:[(0,P.jsx)(eP,{selectedMotivation:null,selectedClick:i,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:a,annotators:Ih}),(0,P.jsx)(`div`,{ref:l,className:`semiont-browse-view__content`,children:(0,P.jsx)(DJ,{content:e})})]});case`image`:return Lo(t)?(0,P.jsxs)(`div`,{className:`semiont-browse-view`,"data-mime-type":`pdf`,children:[(0,P.jsx)(eP,{selectedMotivation:null,selectedClick:i,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:a,annotators:Ih}),(0,P.jsx)(`div`,{ref:l,className:`semiont-browse-view__content`,children:(0,P.jsx)(m.Suspense,{fallback:(0,P.jsx)(`div`,{className:`semiont-browse-view__loading`,children:`Loading PDF viewer...`}),children:(0,P.jsx)(EJ,{pdfUrl:e,existingAnnotations:_,drawingMode:null,selectedMotivation:null})})})]}):(0,P.jsxs)(`div`,{className:`semiont-browse-view`,"data-mime-type":`image`,children:[(0,P.jsx)(eP,{selectedMotivation:null,selectedClick:i,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:a,annotators:Ih}),(0,P.jsx)(`div`,{ref:l,className:`semiont-browse-view__content`,children:(0,P.jsx)(TJ,{imageUrl:e,mimeType:t,alt:`Resource content`})})]});case`unsupported`:return(0,P.jsx)(`div`,{ref:l,className:`semiont-browse-view semiont-browse-view--unsupported`,"data-mime-type":`unsupported`,children:(0,P.jsxs)(`div`,{className:`semiont-browse-view__empty`,children:[(0,P.jsxs)(`p`,{className:`semiont-browse-view__empty-message`,children:[`Preview not available for `,t]}),(0,P.jsx)(`a`,{href:`/api/resources/${n}`,download:!0,className:`semiont-button semiont-button--primary`,children:`Download File`})]})})}});function kJ({resource:e,annotations:t,generatingReferenceId:n,showLineNumbers:r=!1,hoverDelayMs:i,hoveredAnnotationId:a}){let o=hh(`ResourceViewer`),s=(0,m.useRef)(null),c=R(),l=K(c.activeSession$),u=fE(),{highlights:d,references:f,assessments:p,comments:h,tags:g}=t;if(!e[`@id`])throw Error(`Resource has no @id`);let _=e[`@id`],v=(()=>{let t=e.representations;return Array.isArray(t)&&t.length>0&&t[0]?t[0].mediaType:`text/plain`})(),[y,b]=(0,m.useState)(()=>typeof window<`u`?localStorage.getItem(`annotateMode`)===`true`:!1);(0,m.useEffect)(()=>{typeof window<`u`&&localStorage.setItem(`annotateMode`,y.toString())},[y]);let x=(0,m.useCallback)(()=>{b(e=>!e)},[]),S=y?`annotate`:`browse`,C=l?.client,w=(0,m.useCallback)(()=>{C?.browse.invalidateAnnotationList(_)},[C,_]),T=(0,m.useCallback)(()=>{C?.browse.invalidateAnnotationList(_)},[C,_]),E=(0,m.useCallback)(()=>{C?.browse.invalidateAnnotationList(_)},[C,_]),[D,O]=(0,m.useState)(()=>{if(typeof window<`u`){let e=localStorage.getItem(`semiont-toolbar-selection`);if(e===`null`)return null;if(e&&[`linking`,`highlighting`,`assessing`,`commenting`,`tagging`].includes(e))return e}return`linking`}),[k,A]=(0,m.useState)(()=>{if(typeof window<`u`){let e=localStorage.getItem(`semiont-toolbar-click`);if(e&&[`detail`,`follow`,`jsonld`,`deleting`].includes(e))return e}return`detail`}),ee=WT(v),[te,j]=(0,m.useState)(()=>GT(ee)),ne=(0,m.useCallback)(({motivation:e})=>{O(e)},[]),re=(0,m.useCallback)(({action:e})=>{A(e)},[]),ie=(0,m.useCallback)(({shape:e})=>{j(e)},[]);(0,m.useEffect)(()=>{D===null?localStorage.setItem(`semiont-toolbar-selection`,`null`):localStorage.setItem(`semiont-toolbar-selection`,D)},[D]),(0,m.useEffect)(()=>{localStorage.setItem(`semiont-toolbar-click`,k)},[k]),(0,m.useEffect)(()=>{KT(ee,te)},[ee,te]),(0,m.useEffect)(()=>{let e=GT(ee);e!==te&&j(e)},[ee]);let[ae,M]=(0,m.useState)(!1),[oe,se]=(0,m.useState)(null),[ce,le]=(0,m.useState)(null),ue=a??null,[N,de]=(0,m.useState)(null),[fe,pe]=(0,m.useState)(null),me=(0,m.useCallback)(e=>{pe(e),de(e),setTimeout(()=>pe(null),3e3)},[]),he=()=>typeof window>`u`?{x:0,y:0}:{x:Math.max(0,(window.innerWidth-800)/2),y:Math.max(0,(window.innerHeight-700)/2)},ge=(0,m.useCallback)(e=>{l?.client.mark.delete(_,e)},[l,_]),_e=(0,m.useCallback)((e,t)=>{if(Object.values(Ih).find(t=>t.matchesAnnotation(e))?.hasSidePanel){if(k===`detail`){me(e.id);return}if(k!==`deleting`&&k!==`jsonld`&&k!==`follow`)return}let n=no(e)||io(e)||ao(e)||ro(e)||oo(e);if(k===`follow`&&ro(e)){let t=$a(e.body);t&&u(`/know/resource/${t}`,{resourceId:t});return}if(k===`jsonld`&&n){se(e),M(!0);return}if(y&&k===`deleting`&&n){le({annotation:e,position:t?{x:t.clientX,y:t.clientY+10}:{x:window.innerWidth/2-150,y:window.innerHeight/2-75}});return}},[y,k,me]);SE({"mark:mode-toggled":x,"mark:added":w,"mark:removed":T,"mark:body-updated":E,"mark:selection-changed":ne,"mark:click-changed":re,"mark:shape-changed":ie,"browse:click":(0,m.useCallback)(({annotationId:e,motivation:t})=>{if(!Object.values(Ih).find(e=>e.matchesAnnotation({motivation:t}))?.hasSidePanel){let t=[...d,...f,...p,...h,...g].find(t=>t.id===e);t&&_e(t);return}if(k!==`detail`){let t=[...d,...f,...p,...h,...g].find(t=>t.id===e);t&&_e(t);return}c.emit(`panel:open`,{panel:`annotations`,scrollToAnnotationId:e,motivation:t})},[d,f,p,h,g,_e,k,l])});let ve=(0,m.useMemo)(()=>({highlights:d,references:f,assessments:p,comments:h,tags:g}),[d,f,p,h,g]),ye={selectedMotivation:D,selectedClick:k,selectedShape:te,hoveredAnnotationId:ue,scrollToAnnotationId:N},be=(0,m.useCallback)(e=>{let t=f.find(t=>$a(t.body)===e);return t?lo(to(t.target)):void 0},[f]);return(0,P.jsxs)(`div`,{ref:s,className:`semiont-resource-viewer`,children:[S===`annotate`?(0,P.jsx)(NR,{content:e.content,mimeType:v,resourceUri:e[`@id`],annotations:ve,uiState:ye,onUIStateChange:e=>{`selectedMotivation`in e&&O(e.selectedMotivation),`selectedClick`in e&&A(e.selectedClick),`selectedShape`in e&&j(e.selectedShape)},enableWidgets:!0,getTargetResourceName:be,...n!==void 0&&{generatingReferenceId:n},showLineNumbers:r,hoverDelayMs:i,annotateMode:y}):(0,P.jsx)(OJ,{content:e.content,mimeType:v,resourceUri:e[`@id`],annotations:ve,selectedClick:k,hoverDelayMs:i,annotateMode:y}),oe&&(0,P.jsx)(yR,{isOpen:ae,onClose:()=>M(!1),position:he(),wide:!0,children:(0,P.jsx)(SP,{annotation:oe,onBack:()=>{M(!1),se(null)}})}),ce&&(()=>{let e=ce.annotation,t=Object.values(Ih).find(t=>t.matchesAnnotation(e)),n=lo(to(e.target)),r=t?.iconEmoji||`📝`;return(0,P.jsx)(yR,{isOpen:!!ce,onClose:()=>le(null),position:ce.position,children:(0,P.jsxs)(`div`,{className:`semiont-delete-confirmation`,children:[(0,P.jsxs)(`div`,{className:`semiont-delete-confirmation__header`,children:[(0,P.jsx)(`span`,{className:`semiont-delete-confirmation__icon`,children:r}),(0,P.jsx)(`h3`,{className:`semiont-delete-confirmation__title`,children:o(`deleteConfirmationTitle`)})]}),n&&(0,P.jsx)(`div`,{className:`semiont-delete-confirmation__quote`,children:(0,P.jsxs)(`p`,{className:`semiont-delete-confirmation__text`,children:[`"`,n.length>100?n.substring(0,100)+`...`:n,`"`]})}),(0,P.jsx)(`p`,{className:`semiont-delete-confirmation__message`,children:o(`deleteConfirmationMessage`)}),(0,P.jsxs)(`div`,{className:`semiont-delete-confirmation__actions`,children:[(0,P.jsx)(`button`,{onClick:()=>le(null),className:`semiont-button semiont-button--secondary`,children:o(`deleteConfirmationCancel`)}),(0,P.jsx)(`button`,{onClick:()=>{ge(ce.annotation.id),le(null)},className:`semiont-button semiont-button--danger`,children:o(`deleteConfirmationDelete`)})]})]})})})()]})}function AJ(e){if(e[`@type`]===`Software`){let t=e.provider,n=e.model;if(t&&n)return`${t} ${n}`;if(n)return n;if(t)return t}return e.name||e[`@id`]||`unknown`}function jJ(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24);return r<60?`just now`:i<60?`${i} minute${i>1?`s`:``} ago`:a<24?`${a} hour${a>1?`s`:``} ago`:o<7?`${o} day${o>1?`s`:``} ago`:t.toLocaleDateString()}function MJ(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`TextualBody`&&`value`in e&&typeof e.value==`string`}function NJ(e){return e.body?MJ(e.body)?e.body.value||null:Array.isArray(e.body)&&e.body.length>0&&e.body.find(MJ)?.value||null:null}function PJ({assessment:e,isFocused:t,isHovered:n=!1,ref:r}){let i=K(R().activeSession$),a=uE(e.id),o=uo(e),s=NJ(e);return(0,P.jsxs)(`div`,{ref:r,className:`semiont-annotation-entry${n?` semiont-annotation-pulse`:``}`,"data-type":`assessment`,"data-focused":t?`true`:`false`,onClick:()=>{i?.client.browse.click(e.id,e.motivation)},...a,children:[o&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__quote`,"data-type":`assessment`,children:[`"`,o.substring(0,100),o.length>100?`...`:``,`"`]}),s&&(0,P.jsx)(`div`,{className:`semiont-annotation-entry__body`,"data-type":`assessment`,children:s}),(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`By `,typeof e.creator==`string`?e.creator:e.creator?.name||`Unknown`,` • `,jJ(e.created||new Date().toISOString())]}),e.generator&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`Via `,Array.isArray(e.generator)?e.generator.map(AJ).join(`, `):AJ(e.generator)]})]})}function FJ({annotationType:e,isAssisting:t,locale:n,sourceLanguage:r,progress:i}){let a=hh(e===`highlight`?`HighlightPanel`:e===`assessment`?`AssessmentPanel`:`CommentsPanel`),o=K(R().activeSession$),[s,c]=(0,m.useState)(``),[l,u]=(0,m.useState)(``),[d,f]=(0,m.useState)(e===`comment`?5:e===`assessment`?4:5),[p,h]=(0,m.useState)(!0),[g,_]=(0,m.useState)(()=>{if(typeof window>`u`)return!0;let t=localStorage.getItem(`assist-section-expanded-${e}`);return t?t===`true`:!0});(0,m.useEffect)(()=>{typeof window>`u`||localStorage.setItem(`assist-section-expanded-${e}`,String(g))},[g,e]);let v=(0,m.useCallback)(()=>{let t=e===`highlight`?`highlighting`:e===`assessment`?`assessing`:`commenting`;o?.client.mark.requestAssist(t,{instructions:s.trim()||void 0,tone:(e===`comment`||e===`assessment`)&&l?l:void 0,density:(e===`comment`||e===`assessment`||e===`highlight`)&&p?d:void 0,language:e===`comment`||e===`assessment`?n:void 0,sourceLanguage:r}),c(``),u(``)},[e,s,l,p,d,n,r,o]),y=(0,m.useCallback)(()=>{o?.client.mark.dismissProgress()},[o]);return(0,P.jsxs)(`div`,{className:`semiont-panel__section`,children:[(0,P.jsxs)(`button`,{onClick:()=>_(!g),className:`semiont-panel__section-title semiont-panel__section-title--collapsible`,"aria-expanded":g,type:`button`,children:[(0,P.jsx)(`span`,{children:a(e===`highlight`?`annotateHighlights`:e===`assessment`?`annotateAssessments`:`annotateComments`)}),(0,P.jsx)(`span`,{className:`semiont-panel__section-chevron`,"data-expanded":g,children:`›`})]}),g&&(0,P.jsxs)(`div`,{className:`semiont-assist-widget`,"data-assisting":t&&i?`true`:`false`,"data-type":e,children:[!i&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsxs)(`label`,{className:`semiont-form-field__label`,children:[a(`instructions`),` `,a(`optional`)]}),(0,P.jsx)(`textarea`,{value:s,onChange:e=>c(e.target.value),className:`semiont-textarea`,rows:3,placeholder:a(`instructionsPlaceholder`),maxLength:500}),(0,P.jsxs)(`div`,{className:`semiont-form-field__char-count`,children:[s.length,`/500`]})]}),(e===`comment`||e===`assessment`)&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsxs)(`label`,{className:`semiont-form-field__label`,children:[a(`toneLabel`),` `,a(`toneOptional`)]}),(0,P.jsxs)(`select`,{value:l,onChange:e=>u(e.target.value),className:`semiont-select`,children:[(0,P.jsx)(`option`,{value:``,children:`Default`}),e===`comment`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`option`,{value:`scholarly`,children:a(`toneScholarly`)}),(0,P.jsx)(`option`,{value:`explanatory`,children:a(`toneExplanatory`)}),(0,P.jsx)(`option`,{value:`conversational`,children:a(`toneConversational`)}),(0,P.jsx)(`option`,{value:`technical`,children:a(`toneTechnical`)})]}),e===`assessment`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`option`,{value:`analytical`,children:a(`toneAnalytical`)}),(0,P.jsx)(`option`,{value:`critical`,children:a(`toneCritical`)}),(0,P.jsx)(`option`,{value:`balanced`,children:a(`toneBalanced`)}),(0,P.jsx)(`option`,{value:`constructive`,children:a(`toneConstructive`)})]})]})]}),(e===`comment`||e===`assessment`||e===`highlight`)&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsxs)(`div`,{className:`semiont-form-field__header`,children:[(0,P.jsxs)(`label`,{className:`semiont-form-field__label semiont-form-field__label--with-checkbox`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>h(e.target.checked),className:`semiont-checkbox`,"data-variant":e}),(0,P.jsx)(`span`,{children:a(`densityLabel`)})]}),p&&(0,P.jsxs)(`span`,{className:`semiont-form-field__info`,children:[d,` per 2000 words`]})]}),p&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`input`,{type:`range`,min:e===`comment`?`2`:`1`,max:e===`comment`?`12`:e===`assessment`?`10`:`15`,value:d,onChange:e=>f(Number(e.target.value)),className:`semiont-slider`}),(0,P.jsxs)(`div`,{className:`semiont-slider__labels`,children:[(0,P.jsx)(`span`,{children:a(`densitySparse`)}),(0,P.jsx)(`span`,{children:a(`densityDense`)})]})]})]}),(0,P.jsxs)(`button`,{onClick:v,className:`semiont-button`,"data-variant":`assist`,"data-type":e,children:[(0,P.jsx)(`span`,{className:`semiont-button-icon`,children:`✨`}),(0,P.jsx)(`span`,{children:a(`annotate`)})]})]}),i&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress`,"data-type":e,children:[i.requestParams&&i.requestParams.length>0&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__params`,"data-type":e,children:[(0,P.jsx)(`div`,{className:`semiont-annotation-progress__params-title`,children:`Request Parameters:`}),i.requestParams.map((e,t)=>(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__param`,children:[(0,P.jsxs)(`span`,{className:`semiont-annotation-progress__param-label`,children:[e.label,`:`]}),` `,e.value]},t))]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__status`,children:[(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__message`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-progress__icon`,children:`✨`}),(0,P.jsx)(`span`,{children:i.message})]}),!t&&(0,P.jsx)(`button`,{onClick:y,className:`semiont-annotation-progress__close`,"aria-label":a(`closeProgress`),title:a(`closeProgress`),type:`button`,children:`×`})]})]})]})]})}function IJ({count:e,title:t}){return(0,P.jsx)(`div`,{className:`semiont-panel-header`,children:(0,P.jsxs)(`h2`,{className:`semiont-panel-header__title`,children:[(0,P.jsx)(`span`,{className:`semiont-panel-header__text`,children:t}),(0,P.jsxs)(`span`,{className:`semiont-panel-header__count`,children:[`(`,e,`)`]})]})})}function LJ(e){if(Array.isArray(e)){let t=e.find(e=>e.type===`TextQuoteSelector`);if(t&&`exact`in t)return t.exact}else if(e.type===`TextQuoteSelector`&&`exact`in e)return e.exact;return null}function RJ({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,locale:i,sourceLanguage:a,annotateMode:o=!0,scrollToAnnotationId:s,onScrollCompleted:c,hoveredAnnotationId:l}){let u=hh(`AssessmentPanel`),d=K(R().activeSession$),[f,p]=(0,m.useState)(``),[h,g]=(0,m.useState)(null),_=(0,m.useRef)(null),v=(0,m.useRef)(new Map),y=(0,m.useMemo)(()=>[...e].sort((e,t)=>{let n=Xa(to(e.target)),r=Xa(to(t.target));return!n||!r?0:n.start-r.start}),[e]),b=(0,m.useCallback)((e,t)=>{t?v.current.set(e,t):v.current.delete(e)},[]);return(0,m.useEffect)(()=>{if(!s)return;let e=v.current.get(s);if(e&&_.current){let t=e.offsetTop,n=_.current.clientHeight,r=e.offsetHeight,i=t-n/2+r/2;_.current.scrollTo({top:i,behavior:`smooth`}),e.classList.remove(`semiont-annotation-pulse`),e.offsetWidth,e.classList.add(`semiont-annotation-pulse`),c&&c()}},[s]),(0,m.useEffect)(()=>{if(!l)return;let e=v.current.get(l);if(!e||!_.current)return;let t=_.current,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(n.top>=r.top&&n.bottom<=r.bottom)){let n=e.offsetTop,r=t.clientHeight,i=e.offsetHeight,a=n-r/2+i/2;t.scrollTo({top:a,behavior:`smooth`})}},[l]),(0,m.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&(d?.client.mark.cancelPending(),p(``))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,d]),SE({"browse:click":(0,m.useCallback)(({annotationId:e})=>{g(e),setTimeout(()=>g(null),3e3)},[])}),(0,P.jsxs)(`div`,{className:`semiont-panel`,children:[(0,P.jsx)(IJ,{annotationType:`assessment`,count:e.length,title:u(`title`)}),t&&t.motivation===`assessing`&&(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt`,"data-type":`assessment`,children:[(0,P.jsx)(`div`,{className:`semiont-annotation-prompt__quote`,children:(()=>{let e=LJ(t.selector);return e?`"${e.substring(0,100)}${e.length>100?`...`:``}"`:u(`fragmentSelected`)})()}),(0,P.jsx)(`textarea`,{value:f,onChange:e=>p(e.target.value),className:`semiont-textarea`,rows:3,placeholder:u(`assessmentPlaceholder`),autoFocus:!0,maxLength:2e3}),(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt__footer`,children:[(0,P.jsxs)(`span`,{className:`semiont-annotation-prompt__char-count`,children:[f.length,`/2000`]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt__actions`,children:[(0,P.jsx)(`button`,{onClick:()=>{d?.client.mark.cancelPending(),p(``)},className:`semiont-button semiont-button--secondary`,"data-type":`assessment`,children:u(`cancel`)}),(0,P.jsx)(`button`,{onClick:()=>{if(t){let e=f.trim(),n=e?{type:`TextualBody`,value:e,purpose:`assessing`}:void 0;d?.client.mark.submit({motivation:`assessing`,selector:t.selector,...n===void 0?{}:{body:n}}),p(``)}},className:`semiont-button semiont-button--primary`,"data-type":`assessment`,children:u(`save`)})]})]})]}),(0,P.jsxs)(`div`,{ref:_,className:`semiont-panel__content`,children:[o&&(0,P.jsx)(FJ,{annotationType:`assessment`,isAssisting:n,locale:i,sourceLanguage:a,progress:r}),(0,P.jsx)(`div`,{className:`semiont-panel__list`,children:y.length===0?(0,P.jsx)(`p`,{className:`semiont-panel__empty`,children:u(`noAssessments`)}):y.map(e=>(0,P.jsx)(PJ,{assessment:e,isFocused:e.id===h,isHovered:e.id===l,ref:t=>b(e.id,t)},e.id))})]})]})}function zJ({state:e,eventCount:t,lastEventTimestamp:n,knowledgeBaseName:r}){let i=hh(`CollaborationPanel`),a=e===`open`||e===`reconnecting`||e===`initial`||e===`connecting`,o;if(!n)o=i(`noActivity`);else{let e=new Date,t=new Date(n),r=e.getTime()-t.getTime(),a=Math.floor(r/1e3),s=Math.floor(a/60),c=Math.floor(s/60);o=a<10?i(`justNow`):a<60?i(`secondsAgo`,{count:a}):s===1?i(`minuteAgo`):s<60?i(`minutesAgo`,{count:s}):c===1?i(`hourAgo`):c<24?i(`hoursAgo`,{count:c}):t.toLocaleDateString()}return(0,P.jsxs)(`div`,{className:`semiont-collaboration-panel`,children:[(0,P.jsx)(`h3`,{className:`semiont-collaboration-panel__title`,children:i(`title`)}),r&&(0,P.jsx)(`div`,{style:{padding:`0 0.75rem 0.5rem`,fontSize:`0.8rem`,color:`var(--semiont-color-neutral-400)`},children:r}),(0,P.jsxs)(`div`,{className:`semiont-collaboration-panel__section`,children:[(0,P.jsx)(`h3`,{className:`semiont-collaboration-panel__heading`,children:i(`connectionStatus`)}),(0,P.jsxs)(`div`,{className:`semiont-collaboration-panel__status`,children:[(0,P.jsxs)(`span`,{className:`semiont-collaboration-panel__indicator`,children:[(0,P.jsx)(`span`,{className:`semiont-collaboration-panel__dot`,"data-connected":a?`true`:`false`}),(0,P.jsx)(`span`,{className:`semiont-collaboration-panel__status-text`,"data-connected":a?`true`:`false`,children:i(a?`live`:`disconnected`)})]}),a&&t>0&&(0,P.jsxs)(`span`,{className:`semiont-collaboration-panel__event-count`,children:[`(`,i(`events`,{count:t}),`)`]})]}),(0,P.jsxs)(`div`,{className:`semiont-collaboration-panel__details`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-collaboration-panel__label`,children:i(`lastSync`)}),` `,o]}),(0,P.jsx)(`div`,{children:i(a?`realtimeActive`:`reconnecting`)})]})]}),(0,P.jsxs)(`div`,{className:`semiont-collaboration-panel__section semiont-collaboration-panel__section--bordered`,children:[(0,P.jsx)(`h3`,{className:`semiont-collaboration-panel__heading`,children:i(`sharing`)}),(0,P.jsx)(`p`,{className:`semiont-collaboration-panel__description`,children:i(`collaborationComingSoon`)})]})]})}function BJ(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24);return r<60?`just now`:i<60?`${i} minute${i>1?`s`:``} ago`:a<24?`${a} hour${a>1?`s`:``} ago`:o<7?`${o} day${o>1?`s`:``} ago`:t.toLocaleDateString()}function VJ({comment:e,isFocused:t,isHovered:n=!1,annotateMode:r=!0,ref:i}){let a=hh(`CommentsPanel`),o=K(R().activeSession$),s=uE(e.id),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(``),f=(0,m.useRef)(null);(0,m.useImperativeHandle)(i,()=>f.current);let p=so(e)||``,h=uo(e);(0,m.useEffect)(()=>{t&&f.current&&f.current.scrollIntoView({behavior:`smooth`,block:`center`})},[t]);let g=()=>{d(p),l(!0)},_=()=>{l(!1)},v=()=>{l(!1),d(``)};return(0,P.jsxs)(`div`,{ref:f,className:`semiont-annotation-entry${n?` semiont-annotation-pulse`:``}`,"data-type":`comment`,"data-focused":t?`true`:`false`,onClick:()=>{o?.client.browse.click(e.id,e.motivation)},...s,children:[h&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__quote`,"data-type":`comment`,children:[`"`,h.substring(0,100),h.length>100?`...`:``,`"`]}),c?(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__edit`,onClick:e=>e.stopPropagation(),children:[(0,P.jsx)(`textarea`,{value:u,onChange:e=>d(e.target.value),className:`semiont-textarea`,rows:3,autoFocus:!0,maxLength:2e3}),(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__edit-footer`,children:[(0,P.jsxs)(`span`,{className:`semiont-annotation-entry__char-count`,children:[u.length,`/2000`]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__button-group`,children:[(0,P.jsx)(`button`,{onClick:_,className:`semiont-button semiont-button--primary`,"data-type":`comment`,children:a(`save`)}),(0,P.jsx)(`button`,{onClick:v,className:`semiont-button semiont-button--secondary`,children:a(`cancel`)})]})]})]}):(0,P.jsx)(`div`,{className:`semiont-annotation-entry__body`,children:p}),!c&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__footer`,children:[(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`By `,typeof e.creator==`string`?e.creator:e.creator?.name||`Unknown`,` • `,BJ(e.created||new Date().toISOString())]}),e.generator&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`Via `,Array.isArray(e.generator)?e.generator.map(AJ).join(`, `):AJ(e.generator)]}),r&&(0,P.jsx)(`div`,{className:`semiont-annotation-entry__actions`,onClick:e=>e.stopPropagation(),children:(0,P.jsx)(`button`,{onClick:g,className:`semiont-text-button`,"data-variant":`comment`,children:a(`edit`)})})]})]})}function HJ(e){if(Array.isArray(e)){let t=e.find(e=>e.type===`TextQuoteSelector`);if(t&&`exact`in t)return t.exact}else if(e.type===`TextQuoteSelector`&&`exact`in e)return e.exact;return null}function UJ({annotations:e,pendingAnnotation:t,annotateMode:n=!0,isAssisting:r=!1,progress:i,locale:a,sourceLanguage:o,scrollToAnnotationId:s,onScrollCompleted:c,hoveredAnnotationId:l}){let u=hh(`CommentsPanel`),d=K(R().activeSession$),[f,p]=(0,m.useState)(``),[h,g]=(0,m.useState)(null),_=(0,m.useRef)(null),v=(0,m.useRef)(new Map),y=(0,m.useMemo)(()=>[...e].sort((e,t)=>{let n=Xa(to(e.target)),r=Xa(to(t.target));return!n||!r?0:n.start-r.start}),[e]),b=(0,m.useCallback)((e,t)=>{t?v.current.set(e,t):v.current.delete(e)},[]);return(0,m.useEffect)(()=>{if(!s)return;let e=v.current.get(s);if(e&&_.current){let t=e.offsetTop,n=_.current.clientHeight,r=e.offsetHeight,i=t-n/2+r/2;_.current.scrollTo({top:i,behavior:`smooth`}),e.classList.remove(`semiont-annotation-pulse`),e.offsetWidth,e.classList.add(`semiont-annotation-pulse`),c&&c()}},[s]),(0,m.useEffect)(()=>{if(!l)return;let e=v.current.get(l);if(!e||!_.current)return;let t=_.current,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(n.top>=r.top&&n.bottom<=r.bottom)){let n=e.offsetTop,r=t.clientHeight,i=e.offsetHeight,a=n-r/2+i/2;t.scrollTo({top:a,behavior:`smooth`})}},[l]),SE({"browse:click":(0,m.useCallback)(({annotationId:e})=>{g(e),setTimeout(()=>g(null),3e3)},[])}),(0,m.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&(d?.client.mark.cancelPending(),p(``))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,d]),(0,P.jsxs)(`div`,{className:`semiont-panel`,children:[(0,P.jsx)(IJ,{annotationType:`comment`,count:e.length,title:u(`title`)}),t&&t.motivation===`commenting`&&(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt`,"data-type":`comment`,children:[(0,P.jsx)(`div`,{className:`semiont-annotation-prompt__quote`,children:(()=>{let e=HJ(t.selector);return e?`"${e.substring(0,100)}${e.length>100?`...`:``}"`:u(`fragmentSelected`)})()}),(0,P.jsx)(`textarea`,{value:f,onChange:e=>p(e.target.value),className:`semiont-textarea`,rows:3,placeholder:u(`commentPlaceholder`),autoFocus:!0,maxLength:2e3}),(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt__footer`,children:[(0,P.jsxs)(`span`,{className:`semiont-annotation-prompt__char-count`,children:[f.length,`/2000`]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt__actions`,children:[(0,P.jsx)(`button`,{onClick:()=>{d?.client.mark.cancelPending(),p(``)},className:`semiont-button semiont-button--secondary`,"data-type":`comment`,children:u(`cancel`)}),(0,P.jsx)(`button`,{onClick:()=>{f.trim()&&t&&(d?.client.mark.submit({motivation:`commenting`,selector:t.selector,body:[{type:`TextualBody`,value:f,purpose:`commenting`}]}),p(``))},disabled:!f.trim(),className:`semiont-button semiont-button--primary`,"data-type":`comment`,children:u(`save`)})]})]})]}),(0,P.jsxs)(`div`,{ref:_,className:`semiont-panel__content`,children:[n&&(0,P.jsx)(FJ,{annotationType:`comment`,isAssisting:r,locale:a,sourceLanguage:o,progress:i}),(0,P.jsx)(`div`,{className:`semiont-panel__list`,children:y.length===0?(0,P.jsx)(`p`,{className:`semiont-panel__empty`,children:u(`noComments`)}):y.map(e=>(0,P.jsx)(VJ,{comment:e,isFocused:e.id===h,isHovered:e.id===l,annotateMode:n,ref:t=>b(e.id,t)},e.id))})]})]})}function WJ(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),a=Math.floor(i/60),o=Math.floor(a/24);return r<60?`just now`:i<60?`${i} minute${i>1?`s`:``} ago`:a<24?`${a} hour${a>1?`s`:``} ago`:o<7?`${o} day${o>1?`s`:``} ago`:t.toLocaleDateString()}function GJ({highlight:e,isFocused:t,isHovered:n=!1,ref:r}){let i=K(R().activeSession$),a=uE(e.id),o=uo(e);return(0,P.jsxs)(`div`,{ref:r,className:`semiont-annotation-entry${n?` semiont-annotation-pulse`:``}`,"data-type":`highlight`,"data-focused":t?`true`:`false`,onClick:()=>{i?.client.browse.click(e.id,e.motivation)},...a,children:[o&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__quote`,"data-type":`highlight`,children:[`"`,o.substring(0,200),o.length>200?`...`:``,`"`]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`By `,typeof e.creator==`string`?e.creator:e.creator?.name||`Unknown`,` • `,WJ(e.created||new Date().toISOString())]}),e.generator&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`Via `,Array.isArray(e.generator)?e.generator.map(AJ).join(`, `):AJ(e.generator)]})]})}function KJ({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,annotateMode:i=!0,scrollToAnnotationId:a,onScrollCompleted:o,hoveredAnnotationId:s,sourceLanguage:c}){let l=hh(`HighlightPanel`),u=K(R().activeSession$),[d,f]=(0,m.useState)(null),p=(0,m.useRef)(null),h=(0,m.useRef)(new Map),g=(0,m.useMemo)(()=>[...e].sort((e,t)=>{let n=Xa(to(e.target)),r=Xa(to(t.target));return!n||!r?0:n.start-r.start}),[e]),_=(0,m.useCallback)((e,t)=>{t?h.current.set(e,t):h.current.delete(e)},[]);return(0,m.useEffect)(()=>{if(!a)return;let e=h.current.get(a);if(e&&p.current){let t=e.offsetTop,n=p.current.clientHeight,r=e.offsetHeight,i=t-n/2+r/2;p.current.scrollTo({top:i,behavior:`smooth`}),e.classList.remove(`semiont-annotation-pulse`),e.offsetWidth,e.classList.add(`semiont-annotation-pulse`),o&&o()}},[a]),(0,m.useEffect)(()=>{if(!s)return;let e=h.current.get(s);if(!e||!p.current)return;let t=p.current,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(n.top>=r.top&&n.bottom<=r.bottom)){let n=e.offsetTop,r=t.clientHeight,i=e.offsetHeight,a=n-r/2+i/2;t.scrollTo({top:a,behavior:`smooth`})}},[s]),SE({"browse:click":(0,m.useCallback)(({annotationId:e})=>{f(e),setTimeout(()=>f(null),3e3)},[])}),(0,m.useEffect)(()=>{t&&t.motivation===`highlighting`&&u?.client.mark.submit({motivation:`highlighting`,selector:t.selector})},[t,u]),(0,P.jsxs)(`div`,{className:`semiont-panel`,children:[(0,P.jsx)(IJ,{annotationType:`highlight`,count:e.length,title:l(`title`)}),(0,P.jsxs)(`div`,{ref:p,className:`semiont-panel__content`,children:[i&&(0,P.jsx)(FJ,{annotationType:`highlight`,isAssisting:n,progress:r,sourceLanguage:c}),(0,P.jsx)(`div`,{className:`semiont-panel__list`,children:g.length===0?(0,P.jsx)(`p`,{className:`semiont-panel__empty`,children:l(`noHighlights`)}):g.map(e=>(0,P.jsx)(GJ,{highlight:e,isFocused:e.id===d,isHovered:e.id===s,ref:t=>_(e.id,t)},e.id))})]})]})}function qJ({resource:e}){let t=(0,m.useRef)(null),n=(0,m.useRef)(null),{showLineNumbers:r}=lE();return(0,m.useEffect)(()=>{if(!t.current)return;let i=document.documentElement?.classList.contains(`dark`)??!1,a=JSON.stringify(e,null,2),o=[iP(),H.editable.of(!1),p_.readOnly.of(!0)];r&&o.push(TC()),i?o.push(xP):(o.push(RT),o.push(DT(zT)));let s=new H({state:p_.create({doc:a,extensions:o}),parent:t.current});return n.current=s,()=>{s.destroy(),n.current=null}},[e,r]),(0,P.jsxs)(`div`,{className:`semiont-jsonld-panel`,children:[(0,P.jsxs)(`div`,{className:`semiont-jsonld-panel__header`,children:[(0,P.jsx)(`h3`,{className:`semiont-jsonld-panel__title`,children:`JSON-LD`}),(0,P.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(e){console.error(`Failed to copy JSON-LD:`,e)}},className:`semiont-button semiont-button--icon`,title:`Copy to clipboard`,children:`📋 Copy`})]}),(0,P.jsx)(`div`,{ref:t,className:`semiont-jsonld-panel__editor`})]})}function JJ(e){if(Array.isArray(e.body)){let t=[];for(let n of e.body)if(typeof n==`object`&&n&&`type`in n&&`value`in n&&`purpose`in n){let e=n.type,r=n.value,i=n.purpose;e===`TextualBody`&&i===`tagging`&&typeof r==`string`&&r.length>0&&t.push(r)}return t}return[]}function YJ(e){return e.motivation===`tagging`}function XJ(e){if(!YJ(e))return;let t=(Array.isArray(e.body)?e.body:[e.body]).find(e=>typeof e==`object`&&!!e&&`purpose`in e&&e.purpose===`tagging`);if(t&&`value`in t)return t.value}function ZJ(e){if(!YJ(e))return;let t=(Array.isArray(e.body)?e.body:[e.body]).find(e=>typeof e==`object`&&!!e&&`purpose`in e&&e.purpose===`classifying`);if(t&&`value`in t)return t.value}function QJ({reference:e,isFocused:t,isHovered:n=!1,routes:r,annotateMode:i=!0,isGenerating:a=!1,ref:o}){let s=hh(`ReferencesPanel`),c=K(R().activeSession$),l=c?.client,u=fE(),d=uE(e.id),f=uo(e)||``,p=eo(e.body),m=p?$a(e.body):null,h=JJ(e),g=to(e.target),_=Qa(g),v=Za(g),y=_?`Fragment annotation`:v?`Image annotation`:`Annotation`,b=e,x=b._resolvedDocumentName,S=b._resolvedDocumentMediaType,C=tE(S),w=()=>{m&&u(r.resourceDetail(m),{resourceId:m})},T=typeof e.target==`object`&&`source`in e.target?e.target.source:``,E=()=>{T&&m&&l&&l.bind.body(Ra(T),e.id,[{op:`remove`,item:{type:`SpecificResource`,source:m,purpose:`linking`}}]).catch(()=>{})},D=()=>{c?.client.bind.initiate({annotationId:e.id,resourceId:Ra(T),defaultTitle:f,entityTypes:h})},O=e=>{e.stopPropagation(),p?w():i&&D()},k=p||i;return(0,P.jsxs)(`div`,{ref:o,className:`semiont-annotation-entry${n?` semiont-annotation-pulse`:``}`,"data-type":`reference`,"data-focused":t?`true`:`false`,onClick:()=>{c?.client.browse.click(e.id,e.motivation)},...d,children:[(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__header`,children:[(0,P.jsxs)(`div`,{className:`semiont-reference-icon-group`,children:[(0,P.jsx)(`button`,{className:`semiont-reference-icon${k?` semiont-reference-icon--clickable`:``}`,title:s(p?`open`:i?`resolve`:`stub`),onClick:k?O:void 0,"data-generating":!p&&a?`true`:`false`,tabIndex:k?0:-1,children:p?`🔗`:`❓`}),i&&p&&(0,P.jsx)(`button`,{className:`semiont-reference-unlink`,title:s(`unlink`),onClick:e=>{e.stopPropagation(),E()},children:`⛓️💥`})]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__content`,children:[f&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__quote`,"data-type":`reference`,children:[`"`,f.substring(0,100),f.length>100?`...`:``,`"`]}),!f&&(0,P.jsx)(`div`,{className:`semiont-annotation-entry__meta`,children:y}),x&&(0,P.jsx)(`div`,{className:`semiont-reference-link`,children:(0,P.jsxs)(`span`,{children:[`→ `,C,` `,x]})})]})]}),h.length>0&&(0,P.jsx)(`div`,{className:`semiont-annotation-entry__tags`,children:h.map((e,t)=>(0,P.jsx)(`span`,{className:`semiont-tag`,"data-variant":`blue`,children:e},t))}),e.generator&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`Via `,Array.isArray(e.generator)?e.generator.map(AJ).join(`, `):AJ(e.generator)]})]})}function $J(e){if(Array.isArray(e)){let t=e.find(e=>e.type===`TextQuoteSelector`);if(t&&`exact`in t)return t.exact}else if(e.type===`TextQuoteSelector`&&`exact`in e)return e.exact;return null}function eY({annotations:e=[],isAssisting:t,progress:n,annotateMode:r=!0,Link:i,routes:a,allEntityTypes:o,generatingReferenceId:s,referencedBy:c=[],referencedByLoading:l=!1,pendingAnnotation:u,scrollToAnnotationId:d,onScrollCompleted:f,hoveredAnnotationId:p,locale:h,sourceLanguage:g}){let _=hh(`ReferencesPanel`),v=K(R().activeSession$),[y,b]=(0,m.useState)([]),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)([]),[T,E]=(0,m.useState)(!1),[D,O]=(0,m.useState)(null),k=(0,m.useRef)(null),[A,ee]=(0,m.useState)(()=>{if(typeof window>`u`)return!0;let e=localStorage.getItem(`assist-section-expanded-reference`);return e?e===`true`:!0});(0,m.useEffect)(()=>{typeof window>`u`||localStorage.setItem(`assist-section-expanded-reference`,String(A))},[A]);let te=(0,m.useRef)(new Map),j=(0,m.useMemo)(()=>[...e].sort((e,t)=>{let n=Xa(to(e.target)),r=Xa(to(t.target));return!n||!r?0:n.start-r.start}),[e]),ne=(0,m.useCallback)((e,t)=>{t?te.current.set(e,t):te.current.delete(e)},[]);(0,m.useEffect)(()=>{if(!d)return;let e=te.current.get(d);if(e&&k.current){let t=e.offsetTop,n=k.current.clientHeight,r=e.offsetHeight,i=t-n/2+r/2;k.current.scrollTo({top:i,behavior:`smooth`}),e.classList.remove(`semiont-annotation-pulse`),e.offsetWidth,e.classList.add(`semiont-annotation-pulse`),f&&f()}else console.warn(`[ReferencesPanel] Element not found for scrollToAnnotationId:`,d)},[d]),(0,m.useEffect)(()=>{if(!p)return;let e=te.current.get(p);if(!e||!k.current)return;let t=k.current,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(n.top>=r.top&&n.bottom<=r.bottom)){let n=e.offsetTop,r=t.clientHeight,i=e.offsetHeight,a=n-r/2+i/2;t.scrollTo({top:a,behavior:`smooth`})}},[p]),SE({"browse:click":(0,m.useCallback)(({annotationId:e})=>{O(e),setTimeout(()=>O(null),3e3)},[])});let re=()=>{S(null),v?.client.mark.requestAssist(`linking`,{entityTypes:y,includeDescriptiveReferences:T,language:h,sourceLanguage:g})},ie=(0,m.useRef)(!1);(0,m.useEffect)(()=>{if(t){ie.current=!1;return}!t&&!ie.current&&n?.completedEntityTypes&&(ie.current=!0,S(n.completedEntityTypes),b([]))},[t,n?.completedEntityTypes]);let ae=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])};return(0,m.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&(v?.client.mark.cancelPending(),w([]))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u,v]),(0,P.jsxs)(`div`,{className:`semiont-panel`,children:[(0,P.jsx)(IJ,{annotationType:`reference`,count:e.length,title:_(`title`)}),u&&u.motivation===`linking`&&(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt`,"data-type":`reference`,children:[(0,P.jsx)(`div`,{className:`semiont-annotation-prompt__quote`,children:(()=>{let e=$J(u.selector);return e?`"${e.substring(0,100)}${e.length>100?`...`:``}"`:_(`fragmentSelected`)})()}),o.length>0&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsx)(`p`,{className:`semiont-form-field__label`,children:_(`entityTypesOptional`)}),(0,P.jsx)(`div`,{className:`semiont-tag-selector`,children:o.map(e=>(0,P.jsx)(`button`,{onClick:()=>ae(e),className:`semiont-tag-selector__item`,"data-selected":C.includes(e)?`true`:`false`,children:e},e))})]}),(0,P.jsx)(`div`,{className:`semiont-annotation-prompt__footer`,children:(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt__actions`,children:[(0,P.jsx)(`button`,{onClick:()=>{v?.client.mark.cancelPending(),w([])},className:`semiont-button semiont-button--secondary`,"data-type":`reference`,children:_(`cancel`)}),(0,P.jsxs)(`button`,{onClick:()=>{if(u){let e=C.join(`,`)||void 0;v?.client.mark.submit({motivation:`linking`,selector:u.selector,body:e?[{type:`TextualBody`,value:e,purpose:`tagging`}]:[]}),w([])}},className:`semiont-button semiont-button--primary`,"data-type":`reference`,children:[`🔗 `,_(`createReference`)]})]})})]}),(0,P.jsxs)(`div`,{ref:k,className:`semiont-panel__content`,children:[r&&(0,P.jsxs)(`div`,{className:`semiont-panel__section`,children:[(0,P.jsxs)(`button`,{onClick:()=>ee(!A),className:`semiont-panel__section-title semiont-panel__section-title--collapsible`,"aria-expanded":A,type:`button`,children:[(0,P.jsx)(`span`,{children:_(`annotateReferences`)}),(0,P.jsx)(`span`,{className:`semiont-panel__section-chevron`,"data-expanded":A,children:`›`})]}),A&&(0,P.jsxs)(P.Fragment,{children:[!t&&(0,P.jsx)(`div`,{className:`semiont-assist-widget`,"data-type":`reference`,children:(0,P.jsxs)(P.Fragment,{children:[x&&x.length>0&&(0,P.jsx)(`div`,{className:`semiont-assist-widget__log`,children:(0,P.jsx)(`div`,{className:`semiont-assist-widget__log-items`,children:x.map((e,t)=>(0,P.jsxs)(`div`,{className:`semiont-assist-widget__log-item`,children:[(0,P.jsx)(`span`,{className:`semiont-assist-widget__log-check`,children:`✓`}),(0,P.jsxs)(`span`,{className:`semiont-assist-widget__log-type`,children:[e.entityType,`:`]}),(0,P.jsx)(`span`,{children:_(`found`,{count:e.foundCount})})]},t))})}),(0,P.jsxs)(`div`,{className:`semiont-assist-widget__entity-types`,children:[(0,P.jsx)(`p`,{className:`semiont-assist-widget__label`,children:_(`selectEntityTypes`)}),(0,P.jsx)(`div`,{className:`semiont-assist-widget__chips`,children:o.length>0?o.map(e=>(0,P.jsx)(`button`,{onClick:()=>{b(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":y.includes(e),"aria-label":`${y.includes(e)?_(`deselect`):_(`select`)} ${e}`,className:`semiont-chip semiont-chip--selectable`,"data-selected":y.includes(e),children:e},e)):(0,P.jsx)(`p`,{className:`semiont-assist-widget__no-types`,children:_(`noEntityTypes`)})})]}),y.length>0&&(0,P.jsx)(`p`,{className:`semiont-assist-widget__count`,children:_(`typesSelected`,{count:y.length})}),(0,P.jsxs)(`div`,{className:`semiont-assist-widget__checkbox-group`,children:[(0,P.jsxs)(`label`,{className:`semiont-assist-widget__checkbox-label`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:T,onChange:e=>E(e.target.checked),className:`semiont-assist-widget__checkbox`}),(0,P.jsx)(`span`,{children:_(`includeDescriptiveReferences`)})]}),(0,P.jsx)(`p`,{className:`semiont-assist-widget__checkbox-hint`,children:_(`descriptiveReferencesTooltip`)})]}),(0,P.jsxs)(`button`,{onClick:re,disabled:y.length===0,title:_(`annotate`),className:`semiont-button`,"data-variant":`assist`,"data-type":`reference`,children:[(0,P.jsx)(`span`,{className:`semiont-button-icon`,children:`✨`}),(0,P.jsx)(`span`,{children:_(`annotate`)})]})]})}),t&&n&&(0,P.jsx)(GN,{progress:n,annotationType:`reference`})]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`semiont-panel__divider`,children:(0,P.jsxs)(`h3`,{className:`semiont-panel__subtitle`,children:[_(`outgoingReferences`),` (`,j.length,`)`]})}),(0,P.jsx)(`div`,{className:`semiont-panel__list`,children:j.length===0?(0,P.jsx)(`p`,{className:`semiont-panel__empty-message`,children:_(`noReferences`)}):j.map(e=>(0,P.jsx)(QJ,{reference:e,isFocused:e.id===D,isHovered:e.id===p,routes:a,annotateMode:r,isGenerating:e.id===s,ref:t=>ne(e.id,t)},e.id))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`semiont-panel__divider`,children:(0,P.jsxs)(`h3`,{className:`semiont-panel__subtitle`,children:[_(`incomingReferences`),` (`,c.length,`)`,l&&(0,P.jsxs)(`span`,{className:`semiont-panel__loading-indicator`,children:[`(`,_(`loading`),`)`]})]})}),c.length>0?(0,P.jsx)(`div`,{className:`semiont-panel__list`,children:c.map(e=>{let t=e.target.source;return(0,P.jsxs)(`div`,{className:`semiont-reference-item semiont-reference-item--incoming`,children:[(0,P.jsxs)(`div`,{className:`semiont-reference-item__header`,children:[(0,P.jsx)(`span`,{className:`semiont-reference-item__title`,children:e.resourceName||_(`untitledResource`)}),(0,P.jsx)(i,{href:a.resourceDetail(t),className:`semiont-reference-item__link`,title:_(`open`),children:`🔗`})]}),(0,P.jsxs)(`span`,{className:`semiont-reference-item__excerpt`,children:[`"`,e.target.selector?.exact||_(`noText`),`"`]})]},e.id)})}):(0,P.jsx)(`p`,{className:`semiont-panel__empty-message semiont-panel__empty-message--small`,children:_(l?`loadingEllipsis`:`noIncomingReferences`)})]})]})]})}function tY({resourceId:e,documentEntityTypes:t,documentLocale:n,primaryMediaType:r,primaryByteSize:i,storageUri:a,isArchived:o=!1,dateCreated:s,dateModified:c,wasAttributedTo:l,wasDerivedFrom:u,generator:d}){let f=hh(`ResourceInfoPanel`),p=K(R().activeSession$),m=l?Array.isArray(l)?l:[l]:d?Array.isArray(d)?d:[d]:[];return(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel`,children:[(0,P.jsx)(`h3`,{className:`semiont-resource-info-panel__title`,children:f(`title`)}),(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__section`,children:[(0,P.jsx)(`h3`,{className:`semiont-resource-info-panel__heading`,children:f(`locale`)}),n?(0,P.jsx)(`div`,{className:`semiont-resource-info-panel__value`,children:Eo(n)}):(0,P.jsx)(`div`,{className:`semiont-resource-info-panel__value semiont-resource-info-panel__value--empty`,children:f(`notSpecified`)})]}),(r||i!==void 0)&&(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__section`,children:[(0,P.jsx)(`h3`,{className:`semiont-resource-info-panel__heading`,children:f(`representation`)}),(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__field-group`,children:[r&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`mediaType`)}),(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__value`,children:r})]}),i!==void 0&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`byteSize`)}),(0,P.jsxs)(`span`,{className:`semiont-resource-info-panel__value`,children:[i.toLocaleString(),` bytes`]})]}),a&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`storageUri`)}),(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__value`,children:a})]})]})]}),(s||c||m.length>0||u)&&(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__section`,children:[(0,P.jsx)(`h3`,{className:`semiont-resource-info-panel__heading`,children:f(`provenance`)}),(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__field-group`,children:[s&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`createdAt`)}),(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__value`,children:new Date(s).toLocaleString()})]}),c&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`modifiedAt`)}),(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__value`,children:new Date(c).toLocaleString()})]}),m.length>0&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`attributedTo`)}),(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__value`,children:m.map(AJ).join(`, `)})]}),u&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__label`,children:f(`derivedFrom`)}),(0,P.jsx)(`span`,{className:`semiont-resource-info-panel__value`,children:(Array.isArray(u)?u:[u]).map((e,t)=>(0,P.jsxs)(`button`,{className:`semiont-resource-info-panel__link`,onClick:()=>p?.client.browse.navigateReference(Ra(e)),children:[t>0&&`, `,e]},e))})]})]})]}),t.length>0&&(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__section`,children:[(0,P.jsx)(`h3`,{className:`semiont-resource-info-panel__heading`,children:f(`entityTypeTags`)}),(0,P.jsx)(`div`,{className:`semiont-resource-info-panel__tag-list`,children:t.map(e=>(0,P.jsx)(`span`,{className:`semiont-tag`,"data-variant":`blue`,children:e},e))})]}),(0,P.jsxs)(`div`,{className:`semiont-resource-info-panel__action-section`,children:[(0,P.jsxs)(`button`,{onClick:()=>p?.client.yield.clone(),className:`semiont-resource-button semiont-resource-button--secondary`,children:[`🔗 `,f(`clone`)]}),(0,P.jsx)(`p`,{className:`semiont-resource-info-panel__description`,children:f(`cloneDescription`)})]}),(0,P.jsx)(`div`,{className:`semiont-resource-info-panel__action-section`,children:o?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`button`,{onClick:()=>p?.client.mark.unarchive(Ra(e)),className:`semiont-resource-button semiont-resource-button--secondary`,children:[`📤 `,f(`unarchive`)]}),(0,P.jsx)(`p`,{className:`semiont-resource-info-panel__description`,children:f(`unarchiveDescription`)})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`button`,{onClick:()=>p?.client.mark.archive(Ra(e)),className:`semiont-resource-button semiont-resource-button--archive`,children:[`📦 `,f(`archive`)]}),(0,P.jsx)(`p`,{className:`semiont-resource-info-panel__description`,children:f(`archiveDescription`)})]})})]})}function nY({highlights:e,comments:t,assessments:n,references:r,tags:i}){let a=hh(`StatisticsPanel`),o=r.filter(e=>!eo(e.body)).length,s=r.filter(e=>eo(e.body)).length,c=new Map;r.forEach(e=>{JJ(e).forEach(e=>{c.set(e,(c.get(e)||0)+1)})});let l=Array.from(c.entries()).sort((e,t)=>t[1]-e[1]);return(0,P.jsx)(`div`,{className:`semiont-statistics-panel`,children:(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__content`,children:[(0,P.jsx)(`h2`,{className:`semiont-statistics-panel__title`,children:a(`title`)}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__list`,children:[(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__item`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__label`,children:a(`highlights`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__value`,children:e.length})]}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__item`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__label`,children:a(`comments`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__value`,children:t.length})]}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__item`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__label`,children:a(`assessments`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__value`,children:n.length})]}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__item`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__label`,children:a(`tags`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__value`,children:i.length})]}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__item`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__label`,children:a(`references`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__value`,children:r.length}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__subitems`,children:[(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__subitem`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__sublabel`,children:a(`stub`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__subvalue`,children:o})]}),(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__subitem`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__sublabel`,children:a(`resolved`)}),(0,P.jsx)(`span`,{className:`semiont-statistics-panel__subvalue`,children:s})]})]})]}),l.length>0&&(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__entity-types`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__label`,children:a(`entityTypes`)}),(0,P.jsx)(`div`,{className:`semiont-statistics-panel__entity-list`,children:l.map(([e,t])=>(0,P.jsxs)(`div`,{className:`semiont-statistics-panel__entity-item`,children:[(0,P.jsx)(`span`,{className:`semiont-statistics-panel__entity-name`,children:e}),(0,P.jsx)(`span`,{className:`semiont-tag`,"data-variant":`blue`,children:t})]},e))})]})]})]})})}function rY({tag:e,isFocused:t,isHovered:n=!1,ref:r}){let i=K(R().activeSession$),a=uE(e.id),o=uo(e),s=XJ(e),c=ZJ(e),l=K((0,m.useMemo)(()=>i?.client.browse.tagSchemas()??null,[i])),u=c&&l?l.find(e=>e.id===c)??null:null;return(0,P.jsxs)(`div`,{ref:r,onClick:()=>{i?.client.browse.click(e.id,e.motivation)},...a,className:`semiont-annotation-entry${n?` semiont-annotation-pulse`:``}`,"data-type":`tag`,"data-focused":t?`true`:`false`,children:[(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__header`,children:[(0,P.jsx)(`span`,{className:`semiont-tag-badge`,"data-variant":`tag`,children:s}),u&&(0,P.jsx)(`span`,{className:`semiont-annotation-entry__meta`,children:u.name})]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__quote`,"data-type":`tag`,children:[`"`,o.substring(0,150),o.length>150?`...`:``,`"`]}),e.generator&&(0,P.jsxs)(`div`,{className:`semiont-annotation-entry__metadata`,children:[`Via `,Array.isArray(e.generator)?e.generator.map(AJ).join(`, `):AJ(e.generator)]})]})}function iY(e){if(Array.isArray(e)){let t=e.find(e=>e.type===`TextQuoteSelector`);if(t&&`exact`in t)return t.exact}else if(e.type===`TextQuoteSelector`&&`exact`in e)return e.exact;return null}function aY({annotations:e,annotateMode:t=!0,isAssisting:n=!1,progress:r,pendingAnnotation:i,scrollToAnnotationId:a,onScrollCompleted:o,hoveredAnnotationId:s,locale:c,sourceLanguage:l}){let u=hh(`TaggingPanel`),d=K(R().activeSession$),f=K((0,m.useMemo)(()=>d?.client.browse.tagSchemas()??null,[d])),p=f??[],h=f!==void 0&&f.length===0,[g,_]=(0,m.useState)(``),[v,y]=(0,m.useState)(new Set);(0,m.useEffect)(()=>{!g&&p.length>0&&_(p[0].id)},[p,g]);let[b,x]=(0,m.useState)(null),S=(0,m.useRef)(null),[C,w]=(0,m.useState)(()=>{if(typeof window>`u`)return!0;let e=localStorage.getItem(`assist-section-expanded-tag`);return e?e===`true`:!0});(0,m.useEffect)(()=>{typeof window>`u`||localStorage.setItem(`assist-section-expanded-tag`,String(C))},[C]),SE({"browse:click":(0,m.useCallback)(({annotationId:e})=>{x(e),setTimeout(()=>x(null),3e3)},[])});let T=(0,m.useRef)(new Map),E=(0,m.useMemo)(()=>[...e].sort((e,t)=>{let n=Xa(to(e.target)),r=Xa(to(t.target));return!n||!r?0:n.start-r.start}),[e]),D=(0,m.useCallback)((e,t)=>{t?T.current.set(e,t):T.current.delete(e)},[]);(0,m.useEffect)(()=>{if(!a)return;let e=T.current.get(a);if(e&&S.current){let t=e.offsetTop,n=S.current.clientHeight,r=e.offsetHeight,i=t-n/2+r/2;S.current.scrollTo({top:i,behavior:`smooth`}),e.classList.remove(`semiont-annotation-pulse`),e.offsetWidth,e.classList.add(`semiont-annotation-pulse`),o&&o()}},[a]),(0,m.useEffect)(()=>{if(!s)return;let e=T.current.get(s);if(!e||!S.current)return;let t=S.current,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(n.top>=r.top&&n.bottom<=r.bottom)){let n=e.offsetTop,r=t.clientHeight,i=e.offsetHeight,a=n-r/2+i/2;t.scrollTo({top:a,behavior:`smooth`})}},[s]);let O=p.find(e=>e.id===g),k=e=>{_(e),y(new Set)},A=e=>{let t=new Set(v);t.has(e)?t.delete(e):t.add(e),y(t)};return(0,m.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&d?.client.mark.cancelPending()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i,d]),(0,P.jsxs)(`div`,{className:`semiont-panel`,children:[(0,P.jsx)(IJ,{annotationType:`tag`,count:e.length,title:u(`title`)}),(0,P.jsxs)(`div`,{ref:S,className:`semiont-panel__content`,children:[i&&i.motivation===`tagging`&&(0,P.jsxs)(`div`,{className:`semiont-annotation-prompt`,"data-type":`tag`,children:[(0,P.jsx)(`h3`,{className:`semiont-annotation-prompt__title`,children:u(`createTagForSelection`)}),(0,P.jsx)(`div`,{className:`semiont-annotation-prompt__quote`,children:(0,P.jsx)(`p`,{className:`semiont-annotation-prompt__text`,children:(()=>{let e=iY(i.selector);return e?`"${e.substring(0,100)}${e.length>100?`...`:``}"`:u(`fragmentSelected`)})()})}),h&&(0,P.jsx)(`p`,{className:`semiont-form__help`,"data-type":`tag-no-schemas`,children:u(`noSchemas`)}),!h&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsx)(`label`,{className:`semiont-form-field__label`,children:u(`selectSchema`)}),(0,P.jsx)(`select`,{value:g,onChange:e=>k(e.target.value),className:`semiont-select`,children:p.map(e=>(0,P.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),O&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsx)(`label`,{className:`semiont-form-field__label`,children:u(`selectCategory`)}),(0,P.jsxs)(`select`,{className:`semiont-select`,onChange:e=>{e.target.value&&i&&d?.client.mark.submit({motivation:`tagging`,selector:i.selector,body:[{type:`TextualBody`,value:e.target.value,purpose:`tagging`},{type:`TextualBody`,value:g,purpose:`classifying`}]})},defaultValue:``,children:[(0,P.jsx)(`option`,{value:``,children:u(`chooseCategory`)}),O.tags.map(e=>(0,P.jsx)(`option`,{value:e.name,children:e.name},e.name))]})]}),(0,P.jsx)(`div`,{className:`semiont-annotation-prompt__footer`,children:(0,P.jsx)(`button`,{onClick:()=>d?.client.mark.cancelPending(),className:`semiont-button semiont-button--secondary`,"data-type":`tag`,children:u(`cancel`)})})]}),t&&(0,P.jsxs)(`div`,{className:`semiont-panel__section`,children:[(0,P.jsxs)(`button`,{onClick:()=>w(!C),className:`semiont-panel__section-title semiont-panel__section-title--collapsible`,"aria-expanded":C,type:`button`,children:[(0,P.jsx)(`span`,{children:u(`annotateTags`)}),(0,P.jsx)(`span`,{className:`semiont-panel__section-chevron`,"data-expanded":C,children:`›`})]}),C&&(0,P.jsxs)(`div`,{className:`semiont-assist-widget`,"data-assisting":n&&r?`true`:`false`,"data-type":`tag`,children:[!n&&!r&&(0,P.jsxs)(P.Fragment,{children:[h&&(0,P.jsx)(`p`,{className:`semiont-form__help`,"data-type":`tag-no-schemas`,children:u(`noSchemas`)}),!h&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsx)(`label`,{className:`semiont-form-field__label`,children:u(`selectSchema`)}),(0,P.jsx)(`select`,{value:g,onChange:e=>k(e.target.value),className:`semiont-select`,children:p.map(e=>(0,P.jsx)(`option`,{value:e.id,children:e.name},e.id))}),O&&(0,P.jsx)(`p`,{className:`semiont-form__help`,children:O.description})]}),O&&(0,P.jsxs)(`div`,{className:`semiont-form-field`,children:[(0,P.jsx)(`label`,{className:`semiont-form-field__label`,children:u(`selectCategories`)}),(0,P.jsxs)(`div`,{style:{display:`flex`,gap:`0.5rem`,marginBottom:`0.75rem`},children:[(0,P.jsx)(`button`,{onClick:()=>{O&&y(new Set(O.tags.map(e=>e.name)))},type:`button`,className:`semiont-button--secondary`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.25rem 0.5rem`},children:u(`selectAll`)}),(0,P.jsx)(`button`,{onClick:()=>{y(new Set)},type:`button`,className:`semiont-button--secondary`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.25rem 0.5rem`},children:u(`deselectAll`)})]}),(0,P.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`0.75rem`},children:O.tags.map(e=>(0,P.jsxs)(`div`,{className:`semiont-form__checkbox-field`,children:[(0,P.jsx)(`input`,{type:`checkbox`,id:`category-${e.name.replace(/\s+/g,`-`)}`,checked:v.has(e.name),onChange:()=>A(e.name),className:`semiont-checkbox`}),(0,P.jsxs)(`label`,{htmlFor:`category-${e.name.replace(/\s+/g,`-`)}`,className:`semiont-form__checkbox-label`,style:{display:`flex`,flexDirection:`column`,gap:`0.25rem`},children:[(0,P.jsx)(`span`,{style:{fontWeight:500},children:e.name}),(0,P.jsx)(`span`,{style:{fontSize:`var(--semiont-text-xs)`,color:`var(--semiont-text-secondary)`},children:e.description})]})]},e.name))}),(0,P.jsx)(`p`,{className:`semiont-form__help`,children:u(`categoriesSelected`,{count:v.size})})]})]}),(0,P.jsxs)(`button`,{onClick:()=>{v.size>0&&(d?.client.mark.requestAssist(`tagging`,{schemaId:g,categories:Array.from(v),language:c,sourceLanguage:l}),y(new Set))},disabled:v.size===0||n,className:`semiont-button`,"data-variant":`assist`,"data-type":`tag`,children:[(0,P.jsx)(`span`,{className:`semiont-button-icon`,children:`✨`}),(0,P.jsx)(`span`,{children:u(`annotate`)})]}),n&&r&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress`,"data-type":`tag`,children:[r.requestParams&&r.requestParams.length>0&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__params`,"data-type":`tag`,children:[(0,P.jsx)(`div`,{className:`semiont-annotation-progress__params-title`,children:`Request Parameters:`}),r.requestParams.map((e,t)=>(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__param`,children:[(0,P.jsxs)(`span`,{className:`semiont-annotation-progress__param-label`,children:[e.label,`:`]}),` `,e.value]},t))]}),(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__status`,children:[(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__message`,children:[(0,P.jsx)(`span`,{className:`semiont-annotation-progress__icon`,children:`✨`}),(0,P.jsx)(`span`,{children:r.message})]}),r.currentCategory&&(0,P.jsxs)(`div`,{className:`semiont-annotation-progress__details`,children:[`Processing: `,r.currentCategory,r.processedCategories!==void 0&&r.totalCategories!==void 0&&(0,P.jsxs)(P.Fragment,{children:[` (`,r.processedCategories,`/`,r.totalCategories,`)`]})]})]}),r.percentage!==void 0&&(0,P.jsx)(`div`,{className:`semiont-progress-bar`,children:(0,P.jsx)(`div`,{className:`semiont-progress-bar__fill`,"data-type":`tag`,style:{width:`${r.percentage}%`}})})]})]})]}),(0,P.jsx)(`div`,{className:`semiont-panel__list`,children:E.length===0?(0,P.jsx)(`p`,{className:`semiont-panel__empty`,children:u(`noTags`)}):E.map(e=>(0,P.jsx)(rY,{tag:e,isFocused:e.id===b,isHovered:e.id===s,ref:t=>D(e.id,t)},e.id))})]})]})}var oY=[`statistics`,`reference`,`highlight`,`assessment`,`comment`,`tag`];function sY(e){let t=hh(`UnifiedAnnotationsPanel`),n={highlight:[],comment:[],assessment:[],reference:[],tag:[]};for(let t of e.annotations){let r=Object.values(e.annotators).find(e=>e.matchesAnnotation(t));r&&(n[r.internalType]||(n[r.internalType]=[]),n[r.internalType].push(t))}let r=n,[i,a]=(0,m.useState)(()=>{if(typeof window>`u`)return e.initialTab||`statistics`;let t=e.resourceId?`annotations-tab-${e.resourceId}`:`annotations-tab-global`,n=localStorage.getItem(t);return n&&oY.includes(n)?n:e.initialTab||`statistics`});(0,m.useEffect)(()=>{if(typeof window>`u`)return;let t=e.resourceId?`annotations-tab-${e.resourceId}`:`annotations-tab-global`;localStorage.setItem(t,i)},[i,e.resourceId]),(0,m.useEffect)(()=>{e.initialTab&&e.initialTabGeneration!==void 0&&a(e.initialTab)},[e.initialTabGeneration]),(0,m.useEffect)(()=>{if(e.pendingAnnotation){let t={linking:`reference`,commenting:`comment`,tagging:`tag`,assessing:`assessment`,highlighting:`highlight`}[e.pendingAnnotation.motivation];t&&a(t)}},[e.pendingAnnotation]);let o=e=>{a(e)},s=e=>`semiont-unified-panel__tab-button${i===e?` semiont-unified-panel__tab-button--active`:``}`;return(0,P.jsxs)(`div`,{className:`semiont-unified-panel`,children:[(0,P.jsx)(`h3`,{className:`semiont-unified-panel__title`,children:t(`title`)}),(0,P.jsx)(`div`,{className:`semiont-unified-panel__tabs`,children:oY.map(n=>{if(n===`statistics`)return(0,P.jsx)(`button`,{onClick:()=>o(n),className:s(n),title:t(n),"aria-pressed":i===n,children:(0,P.jsx)(`span`,{className:`semiont-unified-panel__tab-icon`,children:`📊`})},n);let r=e.annotators[n];return r?(0,P.jsx)(`button`,{onClick:()=>o(n),className:s(n),title:t(n),"aria-pressed":i===n,children:(0,P.jsx)(`span`,{className:`semiont-unified-panel__tab-icon`,children:r.iconEmoji})},n):null})}),(0,P.jsx)(`div`,{className:`semiont-unified-panel__content`,children:(()=>{if(i===`statistics`)return(0,P.jsx)(nY,{highlights:r.highlight||[],comments:r.comment||[],assessments:r.assessment||[],references:r.reference||[],tags:r.tag||[]});let t=e.annotators[i];if(!t)return null;let n=r[i]||[],a=e.assistingMotivation===t.motivation,o=a?e.progress??null:null,s={annotations:n,pendingAnnotation:e.pendingAnnotation,isAssisting:a,progress:o,annotateMode:e.annotateMode,locale:e.locale,sourceLanguage:e.sourceLanguage,scrollToAnnotationId:e.scrollToAnnotationId,onScrollCompleted:e.onScrollCompleted,hoveredAnnotationId:e.hoveredAnnotationId};return i===`highlight`?(0,P.jsx)(KJ,{...s}):i===`reference`?(0,P.jsx)(eY,{annotations:s.annotations,pendingAnnotation:s.pendingAnnotation,isAssisting:s.isAssisting,progress:s.progress,annotateMode:s.annotateMode,scrollToAnnotationId:s.scrollToAnnotationId,onScrollCompleted:s.onScrollCompleted,hoveredAnnotationId:s.hoveredAnnotationId,locale:s.locale,sourceLanguage:s.sourceLanguage,allEntityTypes:e.allEntityTypes||[],generatingReferenceId:e.generatingReferenceId,referencedBy:e.referencedBy,referencedByLoading:e.referencedByLoading,Link:e.Link,routes:e.routes}):i===`assessment`?(0,P.jsx)(RJ,{...s}):i===`comment`?(0,P.jsx)(UJ,{...s}):i===`tag`?(0,P.jsx)(aY,{...s}):null})()})]})}function cY({Link:e,routes:t,t:n,CookiePreferences:r,onOpenKeyboardHelp:i,sourceCodeUrl:a=`https://github.com/The-AI-Alliance/semiont`,showPolicyLinks:o=!0}){let[s,c]=(0,m.useState)(!1);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`footer`,{role:`contentinfo`,className:`semiont-footer`,children:(0,P.jsx)(`div`,{className:`semiont-footer__container`,children:(0,P.jsxs)(`div`,{className:`semiont-footer__content`,children:[(0,P.jsx)(`div`,{className:`semiont-footer__copyright`,children:n(`copyright`,{year:new Date().getFullYear()})}),(0,P.jsxs)(`div`,{className:`semiont-footer__links`,children:[o&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(e,{href:t.about?.()||`/about`,className:`semiont-footer__link`,children:n(`about`)}),(0,P.jsx)(e,{href:t.privacy?.()||`/privacy`,className:`semiont-footer__link`,children:n(`privacyPolicy`)}),r&&(0,P.jsx)(`button`,{onClick:()=>c(!0),className:`semiont-footer__link`,children:n(`cookiePreferences`)}),(0,P.jsx)(e,{href:t.terms?.()||`/terms`,className:`semiont-footer__link`,children:n(`termsOfService`)})]}),i&&(0,P.jsxs)(`button`,{onClick:i,className:`semiont-footer__link semiont-footer__link--keyboard`,children:[n(`keyboardShortcuts`),(0,P.jsx)(`kbd`,{className:`semiont-footer__kbd`,children:`?`})]}),(0,P.jsx)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer`,className:`semiont-footer__link`,children:n(`sourceCode`)})]})]})})}),o&&r&&(0,P.jsx)(r,{isOpen:s,onClose:()=>c(!1)})]})}function lY({Link:e,routes:t,t:n,isAdmin:r=!1,isModerator:i=!1,onItemClick:a,className:o=``,currentPath:s}){let c=o?`semiont-navigation-menu ${o}`:`semiont-navigation-menu`,l=e=>s?s===e||s.startsWith(e+`/`):!1;return(0,P.jsxs)(`nav`,{className:c,"aria-label":`Main navigation`,children:[(0,P.jsx)(e,{href:t.knowledge?.()||`/know`,...a&&{onClick:a},className:`semiont-navigation-menu__link`,"aria-current":l(t.knowledge?.()||`/know`)?`page`:void 0,children:n(`know`)}),(i||r)&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`hr`,{className:`semiont-navigation-menu__divider`}),(0,P.jsx)(e,{href:t.moderate?.()||`/moderate`,...a&&{onClick:a},className:`semiont-navigation-menu__link`,"aria-current":l(t.moderate?.()||`/moderate`)?`page`:void 0,children:n(`moderate`)})]}),r&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`hr`,{className:`semiont-navigation-menu__divider`}),(0,P.jsx)(e,{href:t.admin?.()||`/admin`,...a&&{onClick:a},className:`semiont-navigation-menu__link`,"aria-current":l(t.admin?.()||`/admin`)?`page`:void 0,children:n(`administer`)})]})]})}function uY({title:e,items:t,currentPath:n,LinkComponent:r,dropdownContent:i,isCollapsed:a,icons:o,collapseSidebarLabel:s,expandSidebarLabel:c}){let l=o.chevronLeft,u=o.bars,[d,f]=(0,m.useState)(!1),p=(0,m.useRef)(null),h=R(),g=()=>f(!d),_=()=>f(!1);return(0,m.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&_()};if(d)return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[d]),(0,P.jsxs)(`div`,{className:`semiont-simple-nav`,children:[(0,P.jsxs)(`div`,{style:{position:`relative`},ref:i?p:void 0,children:[(0,P.jsxs)(`div`,{className:`semiont-nav-section__header`,children:[i?(0,P.jsx)(`button`,{onClick:g,className:`semiont-nav-section__header-button`,"aria-expanded":d,"aria-haspopup":`true`,type:`button`,children:!a&&(0,P.jsx)(`span`,{className:`semiont-nav-section__header-text`,children:e})}):!a&&(0,P.jsx)(`span`,{className:`semiont-nav-section__header-text`,children:e}),(0,P.jsx)(`button`,{onClick:()=>h.emit(`shell:sidebar-toggle`,void 0),className:`semiont-nav-section__header-icon`,title:a?c:s,"aria-label":a?c:s,type:`button`,children:a?(0,P.jsx)(u,{}):(0,P.jsx)(l,{})})]}),d&&i&&!a&&(0,P.jsx)(`div`,{className:`semiont-nav-section__dropdown`,children:i(_)})]}),!a&&(0,P.jsx)(`nav`,{className:`semiont-nav-tabs`,children:t.map(e=>{let t=n===e.href;return(0,P.jsxs)(r,{href:e.href,className:`semiont-nav-tab ${t?`semiont-nav-tab--active`:``}`,title:e.description||e.name,"aria-current":t?`page`:void 0,children:[(0,P.jsx)(e.icon,{className:`semiont-nav-tab__icon`,"aria-hidden":`true`}),(0,P.jsx)(`span`,{className:`semiont-nav-tab__text`,children:e.name})]},e.href)})}),a&&(0,P.jsx)(`nav`,{className:`semiont-nav-tabs`,children:t.map(e=>{let t=n===e.href;return(0,P.jsx)(r,{href:e.href,className:`semiont-nav-tab ${t?`semiont-nav-tab--active`:``}`,title:e.description||e.name,"aria-current":t?`page`:void 0,"aria-label":e.name,children:(0,P.jsx)(e.icon,{className:`semiont-nav-tab__icon`,"aria-hidden":`true`})},e.href)})})]})}function dY(){var e=[...arguments];return(0,m.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var fY=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function pY(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function mY(e){return`nodeType`in e}function hY(e){return e?pY(e)?e:mY(e)?e.ownerDocument?.defaultView??window:window:window}function gY(e){let{Document:t}=hY(e);return e instanceof t}function _Y(e){return pY(e)?!1:e instanceof hY(e).HTMLElement}function vY(e){return e instanceof hY(e).SVGElement}function yY(e){return e?pY(e)?e.document:mY(e)?gY(e)?e:_Y(e)||vY(e)?e.ownerDocument:document:document:document}var bY=fY?m.useLayoutEffect:m.useEffect;function xY(e){let t=(0,m.useRef)(e);return bY(()=>{t.current=e}),(0,m.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function SY(){let e=(0,m.useRef)(null);return[(0,m.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,m.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function CY(e,t){t===void 0&&(t=[e]);let n=(0,m.useRef)(e);return bY(()=>{n.current!==e&&(n.current=e)},t),n}function wY(e,t){let n=(0,m.useRef)();return(0,m.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function TY(e){let t=xY(e),n=(0,m.useRef)(null);return[n,(0,m.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function EY(e){let t=(0,m.useRef)();return(0,m.useEffect)(()=>{t.current=e},[e]),t.current}var DY={};function OY(e,t){return(0,m.useMemo)(()=>{if(t)return t;let n=DY[e]==null?0:DY[e]+1;return DY[e]=n,e+`-`+n},[e,t])}function kY(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var AY=kY(1),jY=kY(-1);function MY(e){return`clientX`in e&&`clientY`in e}function NY(e){if(!e)return!1;let{KeyboardEvent:t}=hY(e.target);return t&&e instanceof t}function PY(e){if(!e)return!1;let{TouchEvent:t}=hY(e.target);return t&&e instanceof t}function FY(e){if(PY(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return MY(e)?{x:e.clientX,y:e.clientY}:null}var IY=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[IY.Translate.toString(e),IY.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),LY=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function RY(e){return e.matches(LY)?e:e.querySelector(LY)}var zY={display:`none`};function BY(e){let{id:t,value:n}=e;return m.createElement(`div`,{id:t,style:zY},n)}function VY(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return m.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function HY(){let[e,t]=(0,m.useState)(``);return{announce:(0,m.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var UY=(0,m.createContext)(null);function WY(e){let t=(0,m.useContext)(UY);(0,m.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function GY(){let[e]=(0,m.useState)(()=>new Set),t=(0,m.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,m.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var KY={draggable:`
|
|
136
|
+
To pick up a draggable item, press the space bar.
|
|
137
|
+
While dragging, use the arrow keys to move the item.
|
|
138
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
139
|
+
`},qY={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function JY(e){let{announcements:t=qY,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=KY}=e,{announce:a,announcement:o}=HY(),s=OY(`DndLiveRegion`),[c,l]=(0,m.useState)(!1);if((0,m.useEffect)(()=>{l(!0)},[]),WY((0,m.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=m.createElement(m.Fragment,null,m.createElement(BY,{id:r,value:i.draggable}),m.createElement(VY,{id:s,announcement:o}));return n?(0,h.createPortal)(u,n):u}var YY;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(YY||={});function XY(){}function ZY(e,t){return(0,m.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function QY(){var e=[...arguments];return(0,m.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var $Y=Object.freeze({x:0,y:0});function eX(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function tX(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function nX(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function rX(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function iX(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function aX(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var oX=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=aX(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=eX(aX(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(tX)},sX=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=rX(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=rX(r),o=i.reduce((e,t,r)=>e+eX(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(tX)};function cX(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var lX=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=cX(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(nX)};function uX(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function dX(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:$Y}function fX(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var pX=fX(1);function mX(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function hX(e,t,n){let r=mX(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var gX={ignoreTransform:!1};function _X(e,t){t===void 0&&(t=gX);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=hY(e).getComputedStyle(e);t&&(n=hX(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function vX(e){return _X(e,{ignoreTransform:!0})}function yX(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function bX(e,t){return t===void 0&&(t=hY(e).getComputedStyle(e)),t.position===`fixed`}function xX(e,t){t===void 0&&(t=hY(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function SX(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(gY(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!_Y(i)||vY(i)||n.includes(i))return n;let a=hY(e).getComputedStyle(i);return i!==e&&xX(i,a)&&n.push(i),bX(i,a)?n:r(i.parentNode)}return e?r(e):n}function CX(e){let[t]=SX(e,1);return t??null}function wX(e){return!fY||!e?null:pY(e)?e:mY(e)?gY(e)||e===yY(e).scrollingElement?window:_Y(e)?e:null:null}function TX(e){return pY(e)?e.scrollX:e.scrollLeft}function EX(e){return pY(e)?e.scrollY:e.scrollTop}function DX(e){return{x:TX(e),y:EX(e)}}var OX;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(OX||={});function kX(e){return!fY||!e?!1:e===document.scrollingElement}function AX(e){let t={x:0,y:0},n=kX(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var jX={x:.2,y:.2};function MX(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=jX);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=AX(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=OX.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=OX.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=OX.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=OX.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function NX(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function PX(e){return e.reduce((e,t)=>AY(e,DX(t)),$Y)}function FX(e){return e.reduce((e,t)=>e+TX(t),0)}function IX(e){return e.reduce((e,t)=>e+EX(t),0)}function LX(e,t){if(t===void 0&&(t=_X),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);CX(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var RX=[[`x`,[`left`,`right`],FX],[`y`,[`top`,`bottom`],IX]],zX=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=SX(t),r=PX(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of RX)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},BX=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function VX(e){let{EventTarget:t}=hY(e);return e instanceof t?e:yY(e)}function HX(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var UX;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(UX||={});function WX(e){e.preventDefault()}function GX(e){e.stopPropagation()}var KX;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(KX||={});var qX={start:[KX.Space,KX.Enter],cancel:[KX.Esc],end:[KX.Space,KX.Enter,KX.Tab]},JX=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case KX.Right:return{...n,x:n.x+25};case KX.Left:return{...n,x:n.x-25};case KX.Down:return{...n,y:n.y+25};case KX.Up:return{...n,y:n.y-25}}},YX=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new BX(yY(t)),this.windowListeners=new BX(hY(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(UX.Resize,this.handleCancel),this.windowListeners.add(UX.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(UX.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&LX(n),t($Y)}handleKeyDown(e){if(NY(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=qX,coordinateGetter:a=JX,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:$Y;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=jY(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=AX(n),p=NX(n),m={x:Math.min(i===KX.Right?p.right-p.width/2:p.right,Math.max(i===KX.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===KX.Down?p.bottom-p.height/2:p.bottom,Math.max(i===KX.Down?p.top:p.top+p.height/2,u.y))},h=i===KX.Right&&!s||i===KX.Left&&!c,g=i===KX.Down&&!l||i===KX.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===KX.Right&&e<=d.x||i===KX.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===KX.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===KX.Down&&e<=d.y||i===KX.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===KX.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,AY(jY(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};YX.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=qX,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function XX(e){return!!(e&&`distance`in e)}function ZX(e){return!!(e&&`delay`in e)}var QX=class{constructor(e,t,n){n===void 0&&(n=VX(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=yY(i),this.documentListeners=new BX(this.document),this.listeners=new BX(n),this.windowListeners=new BX(hY(i)),this.initialCoordinates=FY(r)??$Y,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(UX.Resize,this.handleCancel),this.windowListeners.add(UX.DragStart,WX),this.windowListeners.add(UX.VisibilityChange,this.handleCancel),this.windowListeners.add(UX.ContextMenu,WX),this.documentListeners.add(UX.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ZX(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(XX(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(UX.Click,GX,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(UX.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=FY(e)??$Y,s=jY(n,o);if(!t&&a){if(XX(a)){if(a.tolerance!=null&&HX(s,a.tolerance))return this.handleCancel();if(HX(s,a.distance))return this.handleStart()}if(ZX(a)&&HX(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===KX.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},$X={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},eZ=class extends QX{constructor(e){let{event:t}=e,n=yY(t.target);super(e,$X,n)}};eZ.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var tZ={move:{name:`mousemove`},end:{name:`mouseup`}},nZ;(function(e){e[e.RightClick=2]=`RightClick`})(nZ||={});var rZ=class extends QX{constructor(e){super(e,tZ,yY(e.event.target))}};rZ.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===nZ.RightClick?!1:(r?.({event:n}),!0)}}];var iZ={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},aZ=class extends QX{constructor(e){super(e,iZ)}static setup(){return window.addEventListener(iZ.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(iZ.move.name,e)};function e(){}}};aZ.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var oZ;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(oZ||={});var sZ;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(sZ||={});function cZ(e){let{acceleration:t,activator:n=oZ.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=sZ.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=uZ({delta:d,disabled:!a}),[h,g]=SY(),_=(0,m.useRef)({x:0,y:0}),v=(0,m.useRef)({x:0,y:0}),y=(0,m.useMemo)(()=>{switch(n){case oZ.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case oZ.DraggableRect:return i}},[n,i,c]),b=(0,m.useRef)(null),x=(0,m.useCallback)(()=>{let e=b.current;if(!e)return;let t=_.current.x*v.current.x,n=_.current.y*v.current.y;e.scrollBy(t,n)},[]),S=(0,m.useMemo)(()=>s===sZ.TreeOrder?[...l].reverse():l,[s,l]);(0,m.useEffect)(()=>{if(!a||!l.length||!y){g();return}for(let e of S){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=MX(e,n,y,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){g(),b.current=e,h(x,o),_.current=a,v.current=i;return}}_.current={x:0,y:0},v.current={x:0,y:0},g()},[t,x,r,g,a,o,JSON.stringify(y),JSON.stringify(p),h,l,S,u,JSON.stringify(f)])}var lZ={x:{[OX.Backward]:!1,[OX.Forward]:!1},y:{[OX.Backward]:!1,[OX.Forward]:!1}};function uZ(e){let{delta:t,disabled:n}=e,r=EY(t);return wY(e=>{if(n||!r||!e)return lZ;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[OX.Backward]:e.x[OX.Backward]||i.x===-1,[OX.Forward]:e.x[OX.Forward]||i.x===1},y:{[OX.Backward]:e.y[OX.Backward]||i.y===-1,[OX.Forward]:e.y[OX.Forward]||i.y===1}}},[n,t,r])}function dZ(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return wY(e=>t==null?null:r??e??null,[r,t])}function fZ(e,t){return(0,m.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var pZ;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(pZ||={});var mZ;(function(e){e.Optimized=`optimized`})(mZ||={});var hZ=new Map;function gZ(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,m.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,m.useRef)(e),d=_(),f=CY(d),p=(0,m.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),h=(0,m.useRef)(null),g=wY(t=>{if(d&&!n)return hZ;if(!t||t===hZ||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new zX(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,m.useEffect)(()=>{u.current=e},[e]),(0,m.useEffect)(()=>{d||p()},[n,d]),(0,m.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,m.useEffect)(()=>{d||typeof s!=`number`||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:a!=null};function _(){switch(l){case pZ.Always:return!1;case pZ.BeforeDragging:return n;default:return!n}}}function _Z(e,t){return wY(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function vZ(e,t){return _Z(e,t)}function yZ(e){let{callback:t,disabled:n}=e,r=xY(t),i=(0,m.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,m.useEffect)(()=>()=>i?.disconnect(),[i]),i}function bZ(e){let{callback:t,disabled:n}=e,r=xY(t),i=(0,m.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,m.useEffect)(()=>()=>i?.disconnect(),[i]),i}function xZ(e){return new zX(_X(e),e)}function SZ(e,t,n){t===void 0&&(t=xZ);let[r,i]=(0,m.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=yZ({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=bZ({callback:a});return bY(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function CZ(e){return dX(e,_Z(e))}var wZ=[];function TZ(e){let t=(0,m.useRef)(e),n=wY(n=>e?n&&n!==wZ&&e&&t.current&&e.parentNode===t.current.parentNode?n:SX(e):wZ,[e]);return(0,m.useEffect)(()=>{t.current=e},[e]),n}function EZ(e){let[t,n]=(0,m.useState)(null),r=(0,m.useRef)(e),i=(0,m.useCallback)(e=>{let t=wX(e.target);t&&n(e=>e?(e.set(t,DX(t)),new Map(e)):null)},[]);return(0,m.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=wX(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,DX(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{wX(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,m.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>AY(e,t),$Y):PX(e):$Y,[e,t])}function DZ(e,t){t===void 0&&(t=[]);let n=(0,m.useRef)(null);return(0,m.useEffect)(()=>{n.current=null},t),(0,m.useEffect)(()=>{let t=e!==$Y;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?jY(e,n.current):$Y}function OZ(e){(0,m.useEffect)(()=>{if(!fY)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function kZ(e,t){return(0,m.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function AZ(e){return(0,m.useMemo)(()=>e?yX(e):null,[e])}var jZ=[];function MZ(e,t){t===void 0&&(t=_X);let[n]=e,r=AZ(n?hY(n):null),[i,a]=(0,m.useState)(jZ);function o(){a(()=>e.length?e.map(e=>kX(e)?r:new zX(t(e),e)):jZ)}let s=bZ({callback:o});return bY(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function NZ(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return _Y(t)?t:e}function PZ(e){let{measure:t}=e,[n,r]=(0,m.useState)(null),i=bZ({callback:(0,m.useCallback)(e=>{for(let{target:n}of e)if(_Y(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=TY((0,m.useCallback)(e=>{let n=NZ(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,m.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var FZ=[{sensor:eZ,options:{}},{sensor:YX,options:{}}],IZ={current:{}},LZ={draggable:{measure:vX},droppable:{measure:vX,strategy:pZ.WhileDragging,frequency:mZ.Optimized},dragOverlay:{measure:_X}},RZ=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},zZ={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new RZ,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:XY},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:LZ,measureDroppableContainers:XY,windowRect:null,measuringScheduled:!1},BZ=(0,m.createContext)({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:XY,draggableNodes:new Map,over:null,measureDroppableContainers:XY}),VZ=(0,m.createContext)(zZ);function HZ(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new RZ}}}function UZ(e,t){switch(t.type){case YY.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case YY.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case YY.DragEnd:case YY.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case YY.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new RZ(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case YY.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new RZ(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case YY.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new RZ(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function WZ(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,m.useContext)(BZ),a=EY(r),o=EY(n?.id);return(0,m.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!NY(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=RY(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function GZ(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function KZ(e){return(0,m.useMemo)(()=>({draggable:{...LZ.draggable,...e?.draggable},droppable:{...LZ.droppable,...e?.droppable},dragOverlay:{...LZ.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function qZ(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,m.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;bY(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=dX(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=CX(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var JZ=(0,m.createContext)({...$Y,scaleX:1,scaleY:1}),YZ;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(YZ||={});var XZ=(0,m.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=FZ,collisionDetection:o=lX,measuring:s,modifiers:c,...l}=e,[u,d]=(0,m.useReducer)(UZ,void 0,HZ),[f,p]=GY(),[g,_]=(0,m.useState)(YZ.Uninitialized),v=g===YZ.Initialized,{draggable:{active:y,nodes:b,translate:x},droppable:{containers:S}}=u,C=y==null?null:b.get(y),w=(0,m.useRef)({initial:null,translated:null}),T=(0,m.useMemo)(()=>y==null?null:{id:y,data:C?.data??IZ,rect:w},[y,C]),E=(0,m.useRef)(null),[D,O]=(0,m.useState)(null),[k,A]=(0,m.useState)(null),ee=CY(l,Object.values(l)),te=OY(`DndDescribedBy`,t),j=(0,m.useMemo)(()=>S.getEnabled(),[S]),ne=KZ(s),{droppableRects:re,measureDroppableContainers:ie,measuringScheduled:ae}=gZ(j,{dragging:v,dependencies:[x.x,x.y],config:ne.droppable}),M=dZ(b,y),oe=(0,m.useMemo)(()=>k?FY(k):null,[k]),se=Le(),ce=vZ(M,ne.draggable.measure);qZ({activeNode:y==null?null:b.get(y),config:se.layoutShiftCompensation,initialRect:ce,measure:ne.draggable.measure});let le=SZ(M,ne.draggable.measure,ce),ue=SZ(M?M.parentElement:null),N=(0,m.useRef)({activatorEvent:null,active:null,activeNode:M,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:b,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),de=S.getNodeFor(N.current.over?.id),fe=PZ({measure:ne.dragOverlay.measure}),pe=fe.nodeRef.current??M,me=v?fe.rect??le:null,he=!!(fe.nodeRef.current&&fe.rect),ge=CZ(he?null:le),_e=AZ(pe?hY(pe):null),ve=TZ(v?de??M:null),ye=MZ(ve),be=GZ(c,{transform:{x:x.x-ge.x,y:x.y-ge.y,scaleX:1,scaleY:1},activatorEvent:k,active:T,activeNodeRect:le,containerNodeRect:ue,draggingNodeRect:me,over:N.current.over,overlayNodeRect:fe.rect,scrollableAncestors:ve,scrollableAncestorRects:ye,windowRect:_e}),xe=oe?AY(oe,x):null,Se=EZ(ve),Ce=DZ(Se),we=DZ(Se,[le]),Te=AY(be,Ce),Ee=me?pX(me,be):null,De=T&&Ee?o({active:T,collisionRect:Ee,droppableRects:re,droppableContainers:j,pointerCoordinates:xe}):null,Oe=iX(De,`id`),[ke,Ae]=(0,m.useState)(null),je=uX(he?be:AY(be,we),ke?.rect??null,le),Me=(0,m.useRef)(null),Ne=(0,m.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(E.current==null)return;let i=b.get(E.current);if(!i)return;let a=e.nativeEvent;Me.current=new n({active:E.current,activeNode:i,event:a,options:r,context:N,onAbort(e){if(!b.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!b.get(e))return;let{onDragPending:i}=ee.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=E.current;if(t==null)return;let n=b.get(t);if(!n)return;let{onDragStart:r}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:w}};(0,h.unstable_batchedUpdates)(()=>{r?.(i),_(YZ.Initializing),d({type:YY.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),O(Me.current),A(a)})},onMove(e){d({type:YY.DragMove,coordinates:e})},onEnd:o(YY.DragEnd),onCancel:o(YY.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=N.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===YY.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=YY.DragCancel)}E.current=null,(0,h.unstable_batchedUpdates)(()=>{d({type:e}),_(YZ.Uninitialized),Ae(null),O(null),A(null),Me.current=null;let t=e===YY.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[b]),Pe=fZ(a,(0,m.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=b.get(r);if(E.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},E.current=r,Ne(n,t))},[b,Ne]));OZ(a),bY(()=>{le&&g===YZ.Initializing&&_(YZ.Initialized)},[le,g]),(0,m.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=N.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:Te.x,y:Te.y},over:i};(0,h.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[Te.x,Te.y]),(0,m.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=N.current;if(!e||E.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(Oe),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,h.unstable_batchedUpdates)(()=>{Ae(s),a?.(c),f({type:`onDragOver`,event:c})})},[Oe]),bY(()=>{N.current={activatorEvent:k,active:T,activeNode:M,collisionRect:Ee,collisions:De,droppableRects:re,draggableNodes:b,draggingNode:pe,draggingNodeRect:me,droppableContainers:S,over:ke,scrollableAncestors:ve,scrollAdjustedTranslate:Te},w.current={initial:me,translated:Ee}},[T,M,De,Ee,b,pe,me,re,S,ke,ve,Te]),cZ({...se,delta:x,draggingRect:Ee,pointerCoordinates:xe,scrollableAncestors:ve,scrollableAncestorRects:ye});let Fe=(0,m.useMemo)(()=>({active:T,activeNode:M,activeNodeRect:le,activatorEvent:k,collisions:De,containerNodeRect:ue,dragOverlay:fe,draggableNodes:b,droppableContainers:S,droppableRects:re,over:ke,measureDroppableContainers:ie,scrollableAncestors:ve,scrollableAncestorRects:ye,measuringConfiguration:ne,measuringScheduled:ae,windowRect:_e}),[T,M,le,k,De,ue,fe,b,S,re,ke,ie,ve,ye,ne,ae,_e]),Ie=(0,m.useMemo)(()=>({activatorEvent:k,activators:Pe,active:T,activeNodeRect:le,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:b,over:ke,measureDroppableContainers:ie}),[k,Pe,T,le,d,te,b,ke,ie]);return m.createElement(UY.Provider,{value:p},m.createElement(BZ.Provider,{value:Ie},m.createElement(VZ.Provider,{value:Fe},m.createElement(JZ.Provider,{value:je},i)),m.createElement(WZ,{disabled:n?.restoreFocus===!1})),m.createElement(JY,{...n,hiddenTextDescribedById:te}));function Le(){let e=D?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=v&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),ZZ=(0,m.createContext)(null),QZ=`button`,$Z=`Draggable`;function eQ(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=OY($Z),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,m.useContext)(BZ),{role:p=QZ,roleDescription:h=`draggable`,tabIndex:g=0}=i??{},_=c?.id===t,v=(0,m.useContext)(_?JZ:ZZ),[y,b]=TY(),[x,S]=TY(),C=kZ(o,t),w=CY(n);return bY(()=>(d.set(t,{id:t,key:a,node:y,activatorNode:x,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,m.useMemo)(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":_&&p===QZ?!0:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,g,_,h,u.draggable]),isDragging:_,listeners:r?void 0:C,node:y,over:f,setNodeRef:b,setActivatorNodeRef:S,transform:v}}function tQ(){return(0,m.useContext)(VZ)}var nQ=`Droppable`,rQ={timeout:25};function iQ(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=OY(nQ),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,m.useContext)(BZ),u=(0,m.useRef)({disabled:n}),d=(0,m.useRef)(!1),f=(0,m.useRef)(null),p=(0,m.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:_}={...rQ,...i},v=CY(g??r),y=bZ({callback:(0,m.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),p.current=null},_)},[_]),disabled:h||!o}),[b,x]=TY((0,m.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y])),S=CY(t);return(0,m.useEffect)(()=>{!y||!b.current||(y.disconnect(),d.current=!1,y.observe(b.current))},[b,y]),(0,m.useEffect)(()=>(s({type:YY.RegisterDroppable,element:{id:r,key:a,disabled:n,node:b,rect:f,data:S}}),()=>s({type:YY.UnregisterDroppable,key:a,id:r})),[r]),(0,m.useEffect)(()=>{n!==u.current.disabled&&(s({type:YY.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:b,over:c,setNodeRef:x}}function aQ(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function oQ(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function sQ(e){return e!==null&&e>=0}function cQ(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function lQ(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var uQ=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=aQ(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},dQ={scaleX:1,scaleY:1},fQ=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...dQ}:null}let s=pQ(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...dQ}:r<t&&r>=a?{x:0,y:o.height+s,...dQ}:{x:0,y:0,...dQ}};function pQ(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var mQ=`Sortable`,hQ=m.createContext({activeIndex:-1,containerId:mQ,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:uQ,disabled:{draggable:!1,droppable:!1}});function gQ(e){let{children:t,id:n,items:r,strategy:i=uQ,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=tQ(),d=OY(mQ,n),f=s.rect!==null,p=(0,m.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),h=o!=null,g=o?p.indexOf(o.id):-1,_=l?p.indexOf(l.id):-1,v=(0,m.useRef)(p),y=!cQ(p,v.current),b=_!==-1&&g===-1||y,x=lQ(a);bY(()=>{y&&h&&u(p)},[y,p,h,u]),(0,m.useEffect)(()=>{v.current=p},[p]);let S=(0,m.useMemo)(()=>({activeIndex:g,containerId:d,disabled:x,disableTransforms:b,items:p,overIndex:_,useDragOverlay:f,sortedRects:oQ(p,c),strategy:i}),[g,d,x.draggable,x.droppable,b,p,_,c,f,i]);return m.createElement(hQ.Provider,{value:S},t)}var _Q=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return aQ(n,r,i).indexOf(t)},vQ=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},yQ={duration:200,easing:`ease`},bQ=`transform`,xQ=IY.Transition.toString({property:bQ,duration:0,easing:`linear`}),SQ={roleDescription:`sortable`};function CQ(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,m.useState)(null),s=(0,m.useRef)(n);return bY(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=_X(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,m.useEffect)(()=>{a&&o(null)},[a]),a}function wQ(e){let{animateLayoutChanges:t=vQ,attributes:n,disabled:r,data:i,getNewIndex:a=_Q,id:o,strategy:s,resizeObserverConfig:c,transition:l=yQ}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:g,overIndex:_,useDragOverlay:v,strategy:y}=(0,m.useContext)(hQ),b=TQ(r,p),x=u.indexOf(o),S=(0,m.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...i}),[d,i,x,u]),C=(0,m.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=iQ({id:o,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:ee,setNodeRef:te,listeners:j,isDragging:ne,over:re,setActivatorNodeRef:ie,transform:ae}=eQ({id:o,data:S,attributes:{...SQ,...n},disabled:b.draggable}),M=dY(D,te),oe=!!O,se=oe&&!h&&sQ(f)&&sQ(_),ce=!v&&ne,le=se?(ce&&se?ae:null)??(s??y)({rects:g,activeNodeRect:A,activeIndex:f,overIndex:_,index:x}):null,ue=sQ(f)&&sQ(_)?a({id:o,items:u,activeIndex:f,overIndex:_}):x,N=O?.id,de=(0,m.useRef)({activeId:N,items:u,newIndex:ue,containerId:d}),fe=u!==de.current.items,pe=t({active:O,containerId:d,isDragging:ne,isSorting:oe,id:o,index:x,items:u,newIndex:de.current.newIndex,previousItems:de.current.items,previousContainerId:de.current.containerId,transition:l,wasDragging:de.current.activeId!=null}),me=CQ({disabled:!pe,index:x,node:T,rect:w});return(0,m.useEffect)(()=>{oe&&de.current.newIndex!==ue&&(de.current.newIndex=ue),d!==de.current.containerId&&(de.current.containerId=d),u!==de.current.items&&(de.current.items=u)},[oe,ue,d,u]),(0,m.useEffect)(()=>{if(N===de.current.activeId)return;if(N!=null&&de.current.activeId==null){de.current.activeId=N;return}let e=setTimeout(()=>{de.current.activeId=N},50);return()=>clearTimeout(e)},[N]),{active:O,activeIndex:f,attributes:ee,data:S,rect:w,index:x,newIndex:ue,items:u,isOver:E,isSorting:oe,isDragging:ne,listeners:j,node:T,overIndex:_,over:re,setNodeRef:M,setActivatorNodeRef:ie,setDroppableNodeRef:D,setDraggableNodeRef:te,transform:me??le,transition:he()};function he(){if(me||fe&&de.current.newIndex===x)return xQ;if(!(ce&&!NY(k)||!l)&&(oe||pe))return IY.Transition.toString({...l,property:bQ})}}function TQ(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function EQ(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var DQ=[KX.Down,KX.Right,KX.Up,KX.Left],OQ=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(DQ.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case KX.Down:r.top<a.top&&t.push(n);break;case KX.Up:r.top>a.top&&t.push(n);break;case KX.Left:r.left>a.left&&t.push(n);break;case KX.Right:r.left<a.left&&t.push(n);break}});let c=sX({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=iX(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=SX(c).some((e,t)=>s[t]!==e),i=kQ(e,t),a=AQ(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:jY(u,l)}}}};function kQ(e,t){return!EQ(e)||!EQ(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function AQ(e,t){return!EQ(e)||!EQ(t)||!kQ(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function jQ({resource:e,isCollapsed:t,isActive:n,href:r,onClose:i,onReorder:a,index:o,totalCount:s,LinkComponent:c,translations:l={},isDragging:u=!1}){let{attributes:d,listeners:f,setNodeRef:p,transform:h,transition:g,isDragging:_}=wQ({id:e.id}),v=(0,m.useRef)(a);(0,m.useEffect)(()=>{v.current=a});let y={transform:IY.Transform.toString(h),transition:g,opacity:_||u?.5:1},b=tE(e.mediaType),x=_||u,S=e.storageUri?e.storageUri.replace(/^file:\/\//,``):e.name,C=(0,m.useCallback)(t=>{v.current&&t.altKey&&(t.key===`ArrowUp`?(t.preventDefault(),v.current(e.id,`up`)):t.key===`ArrowDown`&&(t.preventDefault(),v.current(e.id,`down`)))},[e.id]);return(0,P.jsxs)(`div`,{ref:p,style:y,...d,...f,"aria-selected":n,onKeyDown:C,"aria-label":`${e.name}, position ${o===void 0?``:o+1} of ${s||``}`,className:`semiont-resource-tab ${n?`semiont-resource-tab--active`:``} ${x?`semiont-resource-tab--dragging`:``}`,role:`tab`,children:[(0,P.jsxs)(c,{href:r,className:`semiont-resource-tab__link`,title:S,children:[(0,P.jsx)(`span`,{className:`semiont-resource-tab__icon`,"aria-hidden":`true`,children:b}),!t&&(0,P.jsx)(`span`,{className:`semiont-resource-tab__text`,children:e.name})]}),!t&&(0,P.jsx)(`button`,{onClick:t=>i(e.id,t),className:`semiont-resource-tab__close`,title:l.closeResource||`Close resource`,"aria-label":`Close ${e.name}`,type:`button`,children:(0,P.jsx)(`svg`,{fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,width:`16`,height:`16`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]})}function MQ(){let{announce:e}=wE();return{announceReorder:(0,m.useCallback)(t=>{e(t,`assertive`)},[e]),announcePickup:(0,m.useCallback)((t,n,r)=>{e(`Picked up ${t}. Position ${n} of ${r}. Use arrow keys to move, space to drop.`,`assertive`)},[e]),announceDrop:(0,m.useCallback)((t,n,r)=>{e(`Dropped ${t} at position ${n} of ${r}.`,`assertive`)},[e]),announceMove:(0,m.useCallback)((t,n,r,i)=>{e(`Moved ${t} ${n} to position ${r} of ${i}.`,`polite`)},[e]),announceKeyboardReorder:(0,m.useCallback)((t,n,r,i)=>{e(`${t} moved ${n} to position ${r} of ${i}.`,`assertive`)},[e]),announceCannotMove:(0,m.useCallback)(t=>{e(`Cannot move ${t}. Already at the ${t===`up`?`top`:`bottom`} of the list.`,`polite`)},[e])}}function NQ({fixedItems:e,resources:t,isCollapsed:n,currentPath:r,LinkComponent:i,onNavigate:a,getResourceHref:o,className:s=``,translations:c={},icons:l,navigationMenu:u}){let d=l.chevronLeft,f=l.bars,[p,h]=(0,m.useState)(!1),g=(0,m.useRef)(null),{announcePickup:_,announceDrop:v,announceKeyboardReorder:y,announceCannotMove:b}=MQ(),x=hh(`CollapsibleResourceNavigation`),S=R(),C={title:c?.title||x(`title`),collapseSidebar:c?.collapseSidebar||x(`collapseSidebar`),expandSidebar:c?.expandSidebar||x(`expandSidebar`),dragToReorder:c?.dragToReorder||x(`dragToReorder`),dragToReorderDoc:c?.dragToReorderDoc||x(`dragToReorderDoc`),closeResource:c?.closeResource||x(`closeResource`),dragInstructions:c?.dragInstructions||x(`dragInstructions`)},w=()=>h(!p),T=()=>h(!1);(0,m.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&T()};if(p)return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[p]);let E=QY(ZY(eZ,{activationConstraint:{distance:8}}),ZY(YX,{coordinateGetter:OQ})),D=(0,m.useCallback)((e,n)=>{let r=t.findIndex(t=>t.id===e);if(r===-1)return;let i=n===`up`?r-1:r+1;if(i<0||i>=t.length){b(n);return}S.emit(`tabs:reorder`,{oldIndex:r,newIndex:i});let a=t[r];y(a.name,n,i+1,t.length)},[t,S]),O=(t,n)=>{n.preventDefault(),n.stopPropagation(),S.emit(`tabs:close`,{resourceId:t}),r===o(t)&&a&&e.length>0&&a(e[0].href)};return(0,P.jsxs)(`div`,{className:`semiont-collapsible-nav ${s}`,children:[(0,P.jsx)(`div`,{id:`drag-instructions`,className:`sr-only`,"aria-live":`polite`,children:C.dragInstructions}),(0,P.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-atomic":`true`,children:`Resources can be reordered using Alt+Up or Alt+Down arrow keys.`}),(0,P.jsxs)(`div`,{className:`semiont-collapsible-nav__container`,children:[(0,P.jsxs)(`div`,{style:{position:`relative`},ref:u?g:void 0,children:[(0,P.jsxs)(`div`,{className:`semiont-nav-section__header`,children:[!n&&u&&(0,P.jsx)(`button`,{onClick:w,className:`semiont-nav-section__header-text`,"aria-expanded":p,"aria-haspopup":`true`,type:`button`,children:C.title}),!n&&!u&&(0,P.jsx)(`span`,{className:`semiont-nav-section__header-text`,children:C.title}),(0,P.jsx)(`button`,{onClick:()=>S.emit(`shell:sidebar-toggle`,void 0),className:`semiont-nav-section__header-icon`,title:n?C.expandSidebar:C.collapseSidebar,"aria-label":n?C.expandSidebar:C.collapseSidebar,type:`button`,children:n?(0,P.jsx)(f,{}):(0,P.jsx)(d,{})})]}),p&&u&&!n&&(0,P.jsx)(`div`,{className:`semiont-nav-section__dropdown`,children:u(T)})]}),!n&&(0,P.jsx)(`nav`,{className:`semiont-nav-tabs`,children:e.map(e=>{let t=r===e.href;return(0,P.jsxs)(i,{href:e.href,className:`semiont-nav-tab ${t?`semiont-nav-tab--active`:``}`,title:e.description||e.name,"aria-current":t?`page`:void 0,children:[(0,P.jsx)(e.icon,{className:`semiont-nav-tab__icon`,"aria-hidden":`true`}),(0,P.jsx)(`span`,{className:`semiont-nav-tab__text`,children:e.name})]},e.href)})}),n&&(0,P.jsx)(`nav`,{className:`semiont-nav-tabs`,children:e.map(e=>{let t=r===e.href;return(0,P.jsx)(i,{href:e.href,className:`semiont-nav-tab ${t?`semiont-nav-tab--active`:``}`,title:e.description||e.name,"aria-current":t?`page`:void 0,"aria-label":e.name,children:(0,P.jsx)(e.icon,{className:`semiont-nav-tab__icon`,"aria-hidden":`true`})},e.href)})}),(0,P.jsx)(`div`,{className:`semiont-resource-tabs`,role:`tablist`,"aria-label":`Open resources`,children:n?t.map(e=>{let t=o(e.id);return(0,P.jsx)(jQ,{resource:e,isCollapsed:n,isActive:r===t,href:t,onClose:O,LinkComponent:i,translations:{dragToReorder:C.dragToReorder,dragToReorderDoc:C.dragToReorderDoc,closeResource:C.closeResource}},e.id)}):(0,P.jsx)(XZ,{sensors:E,collisionDetection:oX,onDragStart:e=>{let{active:n}=e,r=t.find(e=>e.id===n.id);if(r){let e=t.indexOf(r);_(r.name,e+1,t.length)}},onDragEnd:e=>{let{active:n,over:r}=e;if(r&&n.id!==r.id){let e=t.findIndex(e=>e.id===n.id),i=t.findIndex(e=>e.id===r.id);if(e!==-1&&i!==-1){S.emit(`tabs:reorder`,{oldIndex:e,newIndex:i});let n=t[e];v(n.name,i+1,t.length)}}},children:(0,P.jsx)(gQ,{items:t.map(e=>e.id),strategy:fQ,children:t.map((e,a)=>{let s=o(e.id);return(0,P.jsx)(jQ,{resource:e,isCollapsed:n,isActive:r===s,href:s,onClose:O,onReorder:D,index:a,totalCount:t.length,LinkComponent:i,translations:{dragToReorder:C.dragToReorder,dragToReorderDoc:C.dragToReorderDoc,closeResource:C.closeResource}},e.id)})})})})]})]})}function PQ({context:e,translations:t}){let n=e.graphContext,r=n?.connections??[],i=n?.citedBy??[],a=n?.citedByCount??0;return(0,P.jsx)(P.Fragment,{children:n&&(r.length>0||a>0)&&(0,P.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`1rem`},children:[r.length>0&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{style:{fontSize:`var(--semiont-text-xs)`,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--semiont-text-tertiary)`,marginBottom:`0.375rem`},children:t.connectionsLabel}),(0,P.jsx)(`ul`,{style:{display:`flex`,flexDirection:`column`,gap:`0.375rem`,listStyle:`none`,padding:0,margin:0},children:r.map(e=>(0,P.jsxs)(`li`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`0.375rem`,fontSize:`var(--semiont-text-sm)`},children:[(0,P.jsx)(`span`,{style:{color:`var(--semiont-text-primary)`,fontWeight:500},children:e.resourceName}),e.bidirectional&&(0,P.jsx)(`span`,{className:`semiont-chip`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.125rem 0.375rem`},children:`mutual`}),e.entityTypes&&e.entityTypes.map(e=>(0,P.jsx)(`span`,{className:`semiont-chip`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.125rem 0.375rem`},children:e},e))]},e.resourceId))})]}),a>0&&(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`div`,{style:{fontSize:`var(--semiont-text-xs)`,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--semiont-text-tertiary)`,marginBottom:`0.375rem`},children:[t.citedByLabel,` (`,a,`)`]}),i.length>0&&(0,P.jsx)(`ul`,{style:{display:`flex`,flexDirection:`column`,gap:`0.25rem`,listStyle:`none`,padding:0,margin:0},children:i.map(e=>(0,P.jsx)(`li`,{style:{fontSize:`var(--semiont-text-sm)`,color:`var(--semiont-text-primary)`,fontWeight:500},children:e.resourceName},e.resourceId))})]})]})})}function FQ({context:e,contextLoading:t,contextError:n,userHint:r,onUserHintChange:i,onBind:a,onGenerate:o,onCompose:s,translations:c}){let[l,u]=(0,m.useState)(!1),d=!t&&!n&&!!e,f=e?.sourceContext,p=(0,m.useRef)(null);return(0,m.useEffect)(()=>{p.current&&p.current.scrollIntoView({block:`center`,behavior:`instant`})},[e]),(0,P.jsxs)(`div`,{className:`semiont-gather__outer`,children:[t&&(0,P.jsxs)(`div`,{className:`semiont-gather__loading`,children:[(0,P.jsxs)(`div`,{style:{display:`flex`,gap:`0.5rem`},children:[(0,P.jsx)(`span`,{className:`semiont-gather__loading-dot`}),(0,P.jsx)(`span`,{className:`semiont-gather__loading-dot`}),(0,P.jsx)(`span`,{className:`semiont-gather__loading-dot`})]}),(0,P.jsx)(`span`,{className:`semiont-gather__loading-text`,children:c.loadingContext})]}),!!n&&(0,P.jsx)(`div`,{style:{textAlign:`center`,padding:`1rem 0`,color:`var(--semiont-color-red-600)`},children:c.failedContext}),e&&(0,P.jsxs)(P.Fragment,{children:[f&&(0,P.jsxs)(`div`,{className:`semiont-gather__source-strip`,children:[(0,P.jsxs)(`label`,{className:`semiont-form__label`,style:{marginBottom:`0.375rem`},children:[c.sourceContextLabel,e.sourceResource?.name?` "${e.sourceResource.name}"`:``]}),(0,P.jsxs)(`div`,{className:`semiont-gather__source-box${l?` semiont-gather__source-box--expanded`:``}`,children:[(0,P.jsx)(`div`,{className:`semiont-gather__source-context`,children:(0,P.jsxs)(`div`,{style:{fontSize:`var(--semiont-text-sm)`,fontFamily:`monospace`,whiteSpace:`pre-wrap`,color:`var(--semiont-text-secondary)`},children:[f.before&&(0,P.jsx)(`span`,{children:f.before}),(0,P.jsx)(`span`,{ref:p,style:{backgroundColor:`var(--semiont-color-primary-100)`,padding:`0 0.25rem`,fontWeight:600,color:`var(--semiont-color-primary-900)`},children:f.selected}),(e.metadata?.entityTypes??[]).map(e=>(0,P.jsx)(`span`,{className:`semiont-chip`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.125rem 0.375rem`,fontWeight:400,verticalAlign:`middle`,marginLeft:`0.25rem`},children:e},e)),e.annotation?.motivation&&(0,P.jsx)(`span`,{className:`semiont-chip`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.125rem 0.375rem`,fontWeight:400,verticalAlign:`middle`,marginLeft:`0.25rem`},children:e.annotation.motivation}),f.after&&(0,P.jsx)(`span`,{children:f.after})]})}),(0,P.jsx)(`button`,{type:`button`,className:`semiont-gather__expand-btn`,onClick:()=>u(e=>!e),children:l?`▲ less`:`▼ more`})]})]}),(0,P.jsxs)(`div`,{className:`semiont-gather__body`,children:[(0,P.jsx)(`div`,{className:`semiont-gather__left`,children:(0,P.jsx)(PQ,{context:e,translations:c})}),(0,P.jsx)(`div`,{className:`semiont-gather__right`,children:(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{className:`semiont-form__label`,children:c.userHintLabel}),(0,P.jsx)(`textarea`,{value:r,onChange:e=>i(e.target.value),placeholder:c.userHintPlaceholder,className:`semiont-search-modal__search-input semiont-gather__hint-textarea`,style:{resize:`vertical`,fontFamily:`inherit`}})]})})]}),(0,P.jsxs)(`div`,{className:`semiont-gather__footer`,children:[(0,P.jsx)(`div`,{className:`semiont-gather__footer-label`,children:c.resolutionStrategyLabel}),(0,P.jsxs)(`div`,{className:`semiont-gather__actions`,children:[(0,P.jsxs)(`button`,{type:`button`,onClick:a,disabled:!d,className:`semiont-button--primary semiont-button--flex`,children:[`🔍 `,c.search,`…`]}),(0,P.jsxs)(`button`,{type:`button`,onClick:o,disabled:!d,className:`semiont-button--primary semiont-button--flex`,children:[`✨ `,c.generate,`…`]}),(0,P.jsxs)(`button`,{type:`button`,onClick:s,disabled:!d,className:`semiont-button--secondary semiont-button--flex`,children:[`✍️ `,c.compose]})]})]})]})]})}function IQ({defaultTitle:e,locale:t,context:n,onBack:r,onCancel:i,onGenerate:a,translations:o}){let[s,c]=(0,m.useState)(e),[l,u]=(0,m.useState)(``),[d,f]=(0,m.useState)(``),[p,h]=(0,m.useState)(t),[g,_]=(0,m.useState)(.7),[v,y]=(0,m.useState)(500);return(0,P.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=d.trim();a({title:s,storagePath:`file://${l}`,...t?{prompt:t}:{},language:p,temperature:g,maxTokens:v,context:n})},className:`semiont-form semiont-form--scrollable`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`wizard-title`,className:`semiont-form__label`,children:o.resourceTitle}),(0,P.jsx)(`input`,{id:`wizard-title`,type:`text`,value:s,onChange:e=>c(e.target.value),required:!0,className:`semiont-input`,placeholder:o.resourceTitlePlaceholder})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`wizard-storagePath`,className:`semiont-form__label`,children:`Save location`}),(0,P.jsxs)(`div`,{className:`semiont-input-addon`,children:[(0,P.jsx)(`span`,{className:`semiont-input-addon__prefix`,children:`file://`}),(0,P.jsx)(`input`,{id:`wizard-storagePath`,type:`text`,value:l,onChange:e=>u(e.target.value),required:!0,className:`semiont-input semiont-input--addon`,placeholder:`generated/my-resource.md`})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`wizard-prompt`,className:`semiont-form__label`,children:o.additionalInstructions}),(0,P.jsx)(`textarea`,{id:`wizard-prompt`,value:d,onChange:e=>f(e.target.value),rows:2,className:`semiont-textarea`,placeholder:o.additionalInstructionsPlaceholder})]}),(0,P.jsxs)(`div`,{className:`semiont-form__inline-row`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__field semiont-form__field--inline`,children:[(0,P.jsx)(`label`,{htmlFor:`wizard-language`,className:`semiont-form__label`,children:o.language}),(0,P.jsx)(`select`,{id:`wizard-language`,value:p,onChange:e=>h(e.target.value),className:`semiont-select`,children:Co.map(e=>(0,P.jsx)(`option`,{value:e.code,children:e.nativeName},e.code))})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field semiont-form__field--inline semiont-form__field--grow`,children:[(0,P.jsxs)(`label`,{htmlFor:`wizard-temperature`,className:`semiont-form__label`,children:[o.creativity,` (`,g.toFixed(1),`)`]}),(0,P.jsx)(`input`,{id:`wizard-temperature`,type:`range`,min:`0`,max:`1`,step:`0.1`,value:g,onChange:e=>_(parseFloat(e.target.value)),className:`semiont-slider`}),(0,P.jsxs)(`div`,{className:`semiont-slider__labels semiont-slider__labels--small`,children:[(0,P.jsx)(`span`,{children:o.creativityFocused}),(0,P.jsx)(`span`,{children:o.creativityCreative})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field semiont-form__field--inline semiont-form__field--narrow`,children:[(0,P.jsx)(`label`,{htmlFor:`wizard-maxTokens`,className:`semiont-form__label`,children:o.maxLength}),(0,P.jsx)(`input`,{id:`wizard-maxTokens`,type:`number`,min:`100`,max:`4000`,step:`100`,value:v,onChange:e=>y(parseInt(e.target.value)),className:`semiont-input`})]})]}),(0,P.jsxs)(`div`,{className:`semiont-modal__actions`,style:{paddingTop:`0.5rem`},children:[(0,P.jsxs)(`button`,{type:`button`,onClick:i,className:`semiont-button--secondary semiont-button--flex`,children:[`✕ `,o.cancel]}),(0,P.jsxs)(`button`,{type:`button`,onClick:r,className:`semiont-button--secondary semiont-button--flex`,children:[`◀ `,o.back]}),(0,P.jsxs)(`button`,{type:`submit`,className:`semiont-button--primary semiont-button--flex`,children:[`✨ `,o.generate]})]})]})}function LQ({isSearching:e=!1,onBack:t,onCancel:n,onSearch:r,translations:i}){let[a,o]=(0,m.useState)(10),[s,c]=(0,m.useState)(!0);return(0,P.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),r({limit:a,useSemanticScoring:s})},className:`semiont-form`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`wizard-limit`,className:`semiont-form__label`,children:i.maxResults}),(0,P.jsxs)(`select`,{id:`wizard-limit`,value:a,onChange:e=>o(parseInt(e.target.value)),className:`semiont-select`,children:[(0,P.jsx)(`option`,{value:1,children:`1`}),(0,P.jsx)(`option`,{value:5,children:`5`}),(0,P.jsx)(`option`,{value:10,children:`10`}),(0,P.jsx)(`option`,{value:20,children:`20`})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsxs)(`label`,{className:`semiont-form__label`,style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)}),i.semanticScoring]}),(0,P.jsx)(`p`,{className:`semiont-form__help`,children:i.semanticScoringHelp})]}),(0,P.jsxs)(`div`,{className:`semiont-modal__actions`,style:{paddingTop:`0.5rem`},children:[(0,P.jsxs)(`button`,{type:`button`,onClick:n,className:`semiont-button--secondary semiont-button--flex`,disabled:e,children:[`✕ `,i.cancel]}),(0,P.jsxs)(`button`,{type:`button`,onClick:t,className:`semiont-button--secondary semiont-button--flex`,disabled:e,children:[`◀ `,i.back]}),(0,P.jsx)(`button`,{type:`submit`,className:`semiont-button--primary semiont-button--flex`,disabled:e,"data-generating":e?`true`:`false`,children:e?`\u2728 ${i.searching}`:`\u{1F50D} ${i.search}`})]})]})}function RQ({results:e,context:t,onLink:n,onBack:r,onCancel:i,translations:a}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`semiont-search-results__two-pane`,children:[(0,P.jsx)(`div`,{className:`semiont-search-results__context-pane`,children:(0,P.jsx)(PQ,{context:t,translations:a})}),(0,P.jsx)(`div`,{className:`semiont-search-results__results-pane`,children:e.length===0?(0,P.jsx)(`div`,{className:`semiont-modal__empty-state`,style:{textAlign:`center`,padding:`2rem 0`},children:a.noResults}):e.map(e=>{let t=e[`@id`];return(0,P.jsxs)(`div`,{style:{padding:`0.75rem`,borderBottom:`1px solid var(--semiont-border-primary)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`0.75rem`},children:[(0,P.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,P.jsx)(`div`,{style:{fontWeight:500,color:`var(--semiont-text-primary)`},children:e.name}),e.description&&(0,P.jsx)(`div`,{style:{fontSize:`var(--semiont-text-sm)`,color:`var(--semiont-text-secondary)`,marginTop:`0.25rem`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.description}),(0,P.jsxs)(`div`,{style:{fontSize:`var(--semiont-text-xs)`,color:`var(--semiont-text-tertiary)`,marginTop:`0.25rem`,display:`flex`,gap:`0.5rem`},children:[e.score!==void 0&&(0,P.jsxs)(`span`,{children:[a.score,`: `,e.score]}),e.matchReason&&(0,P.jsx)(`span`,{children:e.matchReason})]})]}),(0,P.jsxs)(`button`,{type:`button`,onClick:()=>n(t),className:`semiont-button--primary`,style:{flexShrink:0},children:[`🔗 `,a.link]})]},t)})})]}),(0,P.jsxs)(`div`,{className:`semiont-modal__actions`,style:{paddingTop:`0.5rem`},children:[(0,P.jsxs)(`button`,{type:`button`,onClick:i,className:`semiont-button--secondary semiont-button--flex`,children:[`✕ `,a.cancel]}),(0,P.jsxs)(`button`,{type:`button`,onClick:r,className:`semiont-button--secondary semiont-button--flex`,children:[`◀ `,a.back]})]})]})}function zQ({isOpen:e,onClose:t,annotationId:n,resourceId:r,defaultTitle:i,entityTypes:a,locale:o,context:s,contextLoading:c,contextError:l,onGenerateSubmit:u,onLinkResource:d,onComposeNavigate:f,translations:p}){let h=K(R().activeSession$),[g,_]=(0,m.useState)({step:`gather`}),[v,y]=(0,m.useState)(!1),[b,x]=(0,m.useState)(``);(0,m.useEffect)(()=>{e&&(_({step:`gather`}),y(!1),x(``))},[e]),xE(`match:search-results`,t=>{e&&n&&t.referenceId===n&&(y(!1),_({step:`search-results`,results:t.response}))});let S=(0,m.useCallback)(()=>{_({step:`configure-search`})},[]),C=(0,m.useCallback)(()=>{_({step:`configure-generation`})},[]),w=(0,m.useCallback)(()=>{!s||!n||!r||(f(b?{...s,userHint:b}:s,n,r,i,a),t())},[s,n,r,i,a,f,t,b]),T=(0,m.useCallback)(()=>{_({step:`gather`})},[]),E=(0,m.useCallback)(e=>{if(!n||!s||!r)return;y(!0);let t=b?{...s,userHint:b}:s;h?.client.match.requestSearch({correlationId:crypto.randomUUID(),resourceId:r,referenceId:n,context:t,limit:e.limit,useSemanticScoring:e.useSemanticScoring})},[n,r,s,h,b]),D=(0,m.useCallback)(e=>{n&&(u(n,e),t())},[n,u,t]),O=(0,m.useCallback)(e=>{n&&(d(n,e),t())},[n,d,t]),k=g.step===`gather`?p.gatherTitle:g.step===`configure-generation`?p.configureGenerationTitle:g.step===`configure-search`?p.configureSearchTitle:p.searchResultsTitle;return(0,P.jsx)(QL,{appear:!0,show:e,children:(0,P.jsxs)(vR,{as:`div`,className:`semiont-search-modal`,onClose:t,children:[(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,P.jsx)(`div`,{className:`semiont-search-modal__backdrop`})}),(0,P.jsx)(`div`,{className:`semiont-search-modal__wrapper`,children:(0,P.jsx)(`div`,{className:`semiont-search-modal__centering semiont-search-modal__centering--center`,children:(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,P.jsxs)(gR,{className:`semiont-search-modal__panel semiont-search-modal__panel--with-border${g.step===`search-results`?` semiont-search-modal__panel--wide`:``}${g.step===`gather`?` semiont-search-modal__panel--gather`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-search-modal__header`,children:[(0,P.jsx)(_R,{className:`semiont-search-modal__title`,children:k}),(0,P.jsx)(`button`,{onClick:t,className:`semiont-search-modal__close-button`,"aria-label":`Close`,children:`✕`})]}),g.step===`gather`&&(0,P.jsx)(FQ,{context:s,contextLoading:c,contextError:l,userHint:b,onUserHintChange:x,onBind:S,onGenerate:C,onCompose:w,translations:{title:p.gatherTitle,sourceContextLabel:p.sourceContextLabel,connectionsLabel:p.connectionsLabel,citedByLabel:p.citedByLabel,userHintLabel:p.userHintLabel,userHintPlaceholder:p.userHintPlaceholder,loadingContext:p.loadingContext,failedContext:p.failedContext,search:p.search,generate:p.generate,compose:p.compose,resolutionStrategyLabel:p.resolutionStrategyLabel}}),g.step===`configure-generation`&&s&&(0,P.jsx)(IQ,{defaultTitle:i,locale:o,context:s,onBack:T,onCancel:t,onGenerate:D,translations:{resourceTitle:p.resourceTitle,resourceTitlePlaceholder:p.resourceTitlePlaceholder,additionalInstructions:p.additionalInstructions,additionalInstructionsPlaceholder:p.additionalInstructionsPlaceholder,language:p.language,languageHelp:p.languageHelp,creativity:p.creativity,creativityFocused:p.creativityFocused,creativityCreative:p.creativityCreative,maxLength:p.maxLength,maxLengthHelp:p.maxLengthHelp,cancel:p.cancel,back:p.back,generate:p.generate}}),g.step===`configure-search`&&(0,P.jsx)(LQ,{isSearching:v,onBack:T,onCancel:t,onSearch:E,translations:{maxResults:p.maxResults,semanticScoring:p.semanticScoring,semanticScoringHelp:p.semanticScoringHelp,cancel:p.cancel,back:p.back,search:p.search,searching:p.searching}}),g.step===`search-results`&&s&&(0,P.jsx)(RQ,{results:g.results,context:s,onLink:O,onBack:T,onCancel:t,translations:{noResults:p.noResults,link:p.link,back:p.back,cancel:p.cancel,score:p.score,sourceContextLabel:p.sourceContextLabel,connectionsLabel:p.connectionsLabel,citedByLabel:p.citedByLabel,userHintLabel:p.userHintLabel,userHintPlaceholder:p.userHintPlaceholder}})]})})})})]})})}var BQ=u(Fh(),1);function VQ(){let{announce:e}=wE();return{announceSearching:(0,m.useCallback)(()=>{e(`Searching...`,`polite`)},[e]),announceSearchResults:(0,m.useCallback)((t,n)=>{e(t===0?`No results found for ${n}`:t===1?`1 result found for ${n}`:`${t} results found for ${n}`,`polite`)},[e]),announceSelection:(0,m.useCallback)((t,n)=>{e(`Selected ${n}: ${t}. Press Enter to navigate.`,`polite`)},[e]),announceNavigation:(0,m.useCallback)((t,n)=>{e(`Navigating to ${n}: ${t}`,`assertive`)},[e])}}var HQ=300,UQ=5;function WQ({isOpen:e,onClose:t,onNavigate:n,translations:r={}}){let{announceSearchResults:i,announceSearching:a}=VQ(),o=K(R().activeSession$)?.client,s=(0,m.useRef)(o);s.current=o;let[c,l]=(0,m.useState)(0),u={placeholder:r.placeholder||`Search resources, entities...`,searching:r.searching||`Searching...`,noResults:r.noResults||`No results found for`,startTyping:r.startTyping||`Start typing to search...`,navigate:r.navigate||`Navigate`,select:r.select||`Select`,close:r.close||`Close`,enter:r.enter||`Enter`,esc:r.esc||`ESC`},[d]=(0,m.useState)(()=>Bu(e=>s.current.browse.resources({search:e,limit:UQ}).pipe((0,BQ.map)(e=>{if(e!==void 0)return e.map(e=>{let t=po(e);return t?{type:`resource`,id:t,name:e.name,content:e.content?.substring(0,150)}:null}).filter(e=>e!==null)})),{debounceMs:HQ}));(0,m.useEffect)(()=>()=>d.dispose(),[d]);let f=K(d.query$)??``,p=K(d.state$),h=p?.results??[],g=p?.isSearching??!1;(0,m.useEffect)(()=>{e&&(d.setQuery(``),l(0))},[e,d]),(0,m.useEffect)(()=>{l(0)},[h.length]),(0,m.useEffect)(()=>{f.trim()&&(g?a():i(h.length,f))},[g,h.length]);let _=e=>{e.key===`ArrowDown`?(e.preventDefault(),l(e=>(e+1)%Math.max(1,h.length))):e.key===`ArrowUp`?(e.preventDefault(),l(e=>(e-1+Math.max(1,h.length))%Math.max(1,h.length))):e.key===`Enter`&&h[c]&&(e.preventDefault(),v(h[c]))},v=e=>{t(),n(e.type,e.id)};return(0,P.jsx)(QL,{appear:!0,show:e,children:(0,P.jsxs)(vR,{as:`div`,className:`semiont-search-modal`,onClose:t,children:[(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,P.jsx)(`div`,{className:`semiont-search-modal__backdrop`})}),(0,P.jsx)(`div`,{className:`semiont-search-modal__wrapper`,children:(0,P.jsx)(`div`,{className:`semiont-search-modal__centering`,children:(0,P.jsx)(ZL,{enter:`ease-out duration-200`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-150`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,P.jsxs)(gR,{className:`semiont-search-modal__panel`,children:[(0,P.jsxs)(`div`,{className:`semiont-search-modal__input-container`,children:[(0,P.jsx)(`div`,{className:`semiont-search-modal__search-icon-wrapper`,children:(0,P.jsx)(`svg`,{className:`semiont-search-modal__search-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`})})}),(0,P.jsx)(`input`,{type:`text`,value:f,onChange:e=>d.setQuery(e.target.value),onKeyDown:_,placeholder:u.placeholder,className:`semiont-search-modal__input`,autoFocus:!0}),(0,P.jsx)(`div`,{className:`semiont-search-modal__esc-wrapper`,children:(0,P.jsx)(`kbd`,{className:`semiont-search-modal__kbd`,children:u.esc})})]}),(0,P.jsxs)(`div`,{className:`semiont-search-modal__results`,children:[g&&(0,P.jsx)(`div`,{className:`semiont-search-modal__empty`,children:u.searching}),!g&&f&&h.length===0&&(0,P.jsxs)(`div`,{className:`semiont-search-modal__empty`,children:[u.noResults,` "`,f,`"`]}),!g&&h.length>0&&(0,P.jsx)(`div`,{className:`semiont-search-modal__results-list`,children:h.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>v(e),onMouseEnter:()=>l(t),className:`semiont-search-modal__result ${t===c?`semiont-search-modal__result--selected`:``}`,children:[(0,P.jsx)(`div`,{className:`semiont-search-modal__result-icon-wrapper`,children:e.type===`resource`?(0,P.jsx)(`svg`,{className:`semiont-search-modal__result-icon semiont-search-modal__result-icon--resource`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`})}):(0,P.jsx)(`svg`,{className:`semiont-search-modal__result-icon semiont-search-modal__result-icon--entity`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z`})})}),(0,P.jsxs)(`div`,{className:`semiont-search-modal__result-content`,children:[(0,P.jsxs)(`div`,{className:`semiont-search-modal__result-header`,children:[(0,P.jsx)(`span`,{className:`semiont-search-modal__result-name`,children:e.name}),e.type===`entity`&&e.entityType&&(0,P.jsx)(`span`,{className:`semiont-search-modal__result-badge`,children:e.entityType})]}),e.content&&(0,P.jsx)(`p`,{className:`semiont-search-modal__result-description`,children:e.content})]}),t===c&&(0,P.jsx)(`div`,{className:`semiont-search-modal__result-action`,children:(0,P.jsx)(`kbd`,{className:`semiont-search-modal__kbd`,children:u.enter})})]},`${e.type}-${e.id}`))}),!g&&!f&&(0,P.jsxs)(`div`,{className:`semiont-search-modal__help`,children:[(0,P.jsx)(`div`,{className:`semiont-search-modal__help-text`,children:u.startTyping}),(0,P.jsxs)(`div`,{className:`semiont-search-modal__shortcuts`,children:[(0,P.jsxs)(`div`,{className:`semiont-search-modal__shortcut`,children:[(0,P.jsx)(`kbd`,{className:`semiont-search-modal__kbd semiont-search-modal__kbd--small`,children:`↑↓`}),u.navigate]}),(0,P.jsxs)(`div`,{className:`semiont-search-modal__shortcut`,children:[(0,P.jsx)(`kbd`,{className:`semiont-search-modal__kbd semiont-search-modal__kbd--small`,children:u.enter}),u.select]}),(0,P.jsxs)(`div`,{className:`semiont-search-modal__shortcut`,children:[(0,P.jsx)(`kbd`,{className:`semiont-search-modal__kbd semiont-search-modal__kbd--small`,children:`Esc`}),u.close]})]})]})]})]})})})})]})})}u(Fh(),1);function GQ(){return(0,P.jsx)(`div`,{className:`semiont-skip-links`,children:(0,P.jsxs)(`div`,{className:`semiont-skip-links-container`,children:[(0,P.jsx)(`a`,{href:`#main-content`,className:`semiont-skip-link semiont-skip-link-first`,children:`Skip to main content`}),(0,P.jsx)(`a`,{href:`#main-navigation`,className:`semiont-skip-link`,children:`Skip to navigation`}),(0,P.jsx)(`a`,{href:`#search`,className:`semiont-skip-link semiont-skip-link-last`,children:`Skip to search`})]})})}function KQ({isFullyAuthenticated:e=!1,isAuthenticated:t=!1,hasValidBackendToken:n=!1}){let r=K(R().activeSession$)?.client,[i,a]=(0,m.useState)(null),[o,s]=(0,m.useState)(!0),[c,l]=(0,m.useState)(null);return(0,m.useEffect)(()=>{if(!r){s(!1);return}let e=()=>{r.admin.status().then(e=>{a(e),l(null),s(!1)}).catch(e=>{l(e instanceof Error?e:Error(String(e))),s(!1)})};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[r]),(0,P.jsxs)(`section`,{className:`semiont-status-display`,"data-status":t&&!n?`warning`:e?i?`success`:o?`loading`:`error`:`info`,role:`status`,"aria-live":`polite`,"aria-label":`System status information`,children:[(0,P.jsxs)(`p`,{className:`semiont-status-message`,children:[(0,P.jsx)(`span`,{className:`sr-only`,children:`System status: `}),(()=>{if(t&&!n)return`🚀 Frontend Status: Ready • Backend: Please sign out and sign in again to reconnect`;if(!e)return`🚀 Frontend Status: Ready • Backend: Authentication required`;if(i)return`\u{1F680} Frontend Status: Ready \u2022 Backend: ${i.status} (v${i.version})`;if(o)return`🚀 Frontend Status: Ready • Backend: Connecting...`;if(c){let e=c.message;return e.includes(`401`)||e.includes(`Unauthorized`)?`🚀 Frontend Status: Ready • Backend: Please sign out and sign in again`:`🚀 Frontend Status: Ready • Backend: Connection failed`}return`🚀 Frontend Status: Ready • Backend: Unknown`})()]}),e?c?(0,P.jsxs)(`p`,{className:`semiont-status-hint semiont-status-error-hint`,role:`alert`,children:[(0,P.jsx)(`span`,{className:`sr-only`,children:`Error: `}),`Check that the backend server is running and accessible`]}):null:(0,P.jsx)(`p`,{className:`semiont-status-hint`,children:`Sign in to view backend status`})]})}function qQ({t:e,className:t=``,size:n=`lg`,showTagline:r=!0,animated:i=!0,compactTagline:a=!1}){return(0,P.jsxs)(`div`,{className:`semiont-branding ${t}`,"data-size":n,"data-animated":i,"data-compact-tagline":a,children:[(0,P.jsx)(`h1`,{className:`semiont-branding-title`,children:(0,P.jsx)(`span`,{className:`semiont-branding-text`,children:`Semiont`})}),r&&(0,P.jsx)(`h2`,{className:`semiont-branding-tagline`,children:e(`tagline`)})]})}function JQ({Link:e,routes:t,t:n,tHome:r,showBranding:i=!0,brandingLink:a=`/`,variant:o=`standalone`,isAuthenticated:s=!1,isAdmin:c=!1,isModerator:l=!1,currentPath:u}){let{isOpen:d,toggle:f,close:p,dropdownRef:m}=yE();if(o===`floating`&&i)return(0,P.jsxs)(`div`,{className:`semiont-unified-header semiont-unified-header--floating`,"data-variant":`floating`,ref:m,children:[(0,P.jsx)(`button`,{onClick:f,className:`semiont-unified-header__branding-button`,"aria-label":`Navigation menu`,"aria-expanded":d,"aria-controls":`nav-menu-dropdown-1`,"aria-haspopup":`true`,id:`nav-menu-button-1`,children:(0,P.jsx)(qQ,{t:r,size:`sm`,showTagline:!0,animated:!1,compactTagline:!0,className:`semiont-unified-header__branding`})}),d&&s&&(0,P.jsx)(`div`,{id:`nav-menu-dropdown-1`,className:`semiont-unified-header__dropdown`,role:`menu`,"aria-orientation":`vertical`,"aria-labelledby":`nav-menu-button-1`,children:(0,P.jsx)(lY,{Link:e,routes:t,t:n,isAdmin:c,isModerator:l,brandingLink:a,onItemClick:p,currentPath:u})})]});let h=(0,P.jsxs)(`div`,{className:`semiont-unified-header__content`,"data-variant":o,children:[i?(0,P.jsxs)(`div`,{className:`semiont-unified-header__branding-wrapper`,ref:m,children:[(0,P.jsx)(`button`,{onClick:f,className:`semiont-unified-header__branding-button`,"aria-label":`Navigation menu`,"aria-expanded":d,"aria-controls":`nav-menu-dropdown-2`,"aria-haspopup":`true`,id:`nav-menu-button-2`,children:(0,P.jsx)(qQ,{t:r,size:`sm`,showTagline:!0,animated:!1,compactTagline:!0,className:`semiont-unified-header__branding`})}),d&&s&&(0,P.jsx)(`div`,{id:`nav-menu-dropdown-2`,className:`semiont-unified-header__dropdown`,role:`menu`,"aria-orientation":`vertical`,"aria-labelledby":`nav-menu-button-2`,children:(0,P.jsx)(lY,{Link:e,routes:t,t:n,isAdmin:c,isModerator:l,brandingLink:a,onItemClick:p,currentPath:u})})]}):(0,P.jsx)(`div`,{}),(0,P.jsx)(`div`,{className:`semiont-unified-header__actions`,"data-variant":o})]});return o===`standalone`?(0,P.jsx)(`header`,{className:`semiont-unified-header semiont-unified-header--standalone`,"data-variant":`standalone`,children:(0,P.jsx)(`div`,{className:`semiont-unified-header__container`,children:h})}):h}function YQ({Link:e,routes:t,t:n,tHome:r,children:i,brandingLink:a=`/`,collapsible:o=!1,storageKey:s=`leftSidebarCollapsed`,isAdmin:c=!1,isModerator:l=!1,currentPath:u}){let[d,f]=(0,m.useState)(!1),{width:p,setWidth:h,minWidth:g,maxWidth:_}=pE({defaultWidth:256,minWidth:192,maxWidth:400,storageKey:`semiont-left-sidebar-width`});return(0,m.useEffect)(()=>{o&&localStorage.getItem(s)===`true`&&f(!0)},[o,s]),(0,P.jsxs)(`aside`,{className:`semiont-left-sidebar`,"data-collapsed":d,style:d?void 0:{width:`${p}px`,position:`relative`},children:[!d&&(0,P.jsx)(XN,{onResize:h,minWidth:g,maxWidth:_,position:`right`,ariaLabel:`Resize left sidebar`}),(0,P.jsx)(`div`,{className:`semiont-left-sidebar__header`,"data-collapsed":d,children:(0,P.jsx)(e,{href:a,className:`semiont-left-sidebar__branding-button`,"aria-label":`Go to home page`,children:d?(0,P.jsx)(`div`,{className:`semiont-left-sidebar__logo-collapsed`,children:(0,P.jsx)(`span`,{className:`semiont-left-sidebar__logo-text`,children:`S`})}):(0,P.jsx)(qQ,{t:r,size:`sm`,showTagline:!1,animated:!1,className:``})})}),(0,P.jsx)(`nav`,{role:`navigation`,"aria-label":`Main navigation`,id:`main-navigation`,className:`semiont-left-sidebar__content`,children:typeof i==`function`?i(d,()=>{if(!o)return;let e=!d;f(e),localStorage.setItem(s,e.toString())},r=>(0,P.jsx)(lY,{Link:e,routes:t,t:n,isAdmin:c,isModerator:l,brandingLink:a,onItemClick:r,currentPath:u})):i})]})}function XQ({Link:e,routes:t,t:n,tNav:r,tHome:i,children:a,className:o=``,showAuthLinks:s=!0,CookiePreferences:c,onOpenKeyboardHelp:l}){return(0,P.jsxs)(`div`,{className:`semiont-page-layout`,children:[(0,P.jsx)(GQ,{}),(0,P.jsx)(`header`,{role:`banner`,className:`semiont-page-layout__header`,children:(0,P.jsx)(`div`,{className:`semiont-page-layout__header-container`,children:(0,P.jsx)(JQ,{Link:e,routes:t,t:r,tHome:i,showAuthLinks:s,brandingLink:`/`,variant:`embedded`})})}),(0,P.jsx)(`main`,{role:`main`,id:`main-content`,tabIndex:-1,className:`semiont-page-layout__main ${o}`,children:a}),(0,P.jsx)(cY,{Link:e,routes:t,t:n,...c&&{CookiePreferences:c},...l&&{onOpenKeyboardHelp:l}})]})}var ZQ={colors:{primary:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#0080ff`,600:`#0066cc`,700:`#0052a3`,800:`#1e40af`,900:`#1e3a8a`},secondary:{50:`#f0fffe`,100:`#e0fffd`,200:`#b3fffa`,300:`#66fff6`,400:`#1afff1`,500:`#00ffff`,600:`#00cccc`,700:`#00a3a3`,800:`#007a7a`,900:`#005252`},semantic:{error:`#ef4444`,errorLight:`#fca5a5`,errorDark:`#b91c1c`,warning:`#f59e0b`,warningLight:`#fcd34d`,warningDark:`#d97706`,success:`#10b981`,successLight:`#6ee7b7`,successDark:`#047857`,info:`#3b82f6`,infoLight:`#93c5fd`,infoDark:`#1d4ed8`},neutral:{0:`#ffffff`,50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`,1e3:`#000000`},background:{primary:`#ffffff`,secondary:`#f9fafb`,tertiary:`#f3f4f6`,inverse:`#111827`},text:{primary:`#111827`,secondary:`#4b5563`,tertiary:`#6b7280`,disabled:`#9ca3af`,inverse:`#ffffff`}},spacing:{0:`0`,xs:`0.25rem`,sm:`0.5rem`,md:`1rem`,lg:`1.5rem`,xl:`2rem`,"2xl":`2.5rem`,"3xl":`3rem`,"4xl":`4rem`,"5xl":`5rem`},typography:{fontFamily:{sans:`Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,mono:`JetBrains Mono, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},fontSize:{xs:`0.75rem`,sm:`0.875rem`,base:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`},fontWeight:{thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,black:900},lineHeight:{none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2}},borderRadius:{none:`0`,sm:`0.125rem`,base:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},shadows:{none:`none`,xs:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,sm:`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`,base:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,md:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,lg:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,xl:`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},transitions:{duration:{fast:`150ms`,base:`250ms`,slow:`350ms`,slower:`500ms`},timing:{linear:`linear`,ease:`cubic-bezier(0.4, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,easeOut:`cubic-bezier(0, 0, 0.2, 1)`,easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`}},breakpoints:{sm:`640px`,md:`768px`,lg:`1024px`,xl:`1280px`,"2xl":`1536px`}};function QQ(){let e=[`:root {`];return Object.entries(ZQ.colors.primary).forEach(([t,n])=>{e.push(` --semiont-color-primary-${t}: ${n};`)}),Object.entries(ZQ.colors.secondary).forEach(([t,n])=>{e.push(` --semiont-color-secondary-${t}: ${n};`)}),Object.entries(ZQ.colors.semantic).forEach(([t,n])=>{e.push(` --semiont-color-${t.toLowerCase().replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${n};`)}),Object.entries(ZQ.colors.neutral).forEach(([t,n])=>{e.push(` --semiont-color-neutral-${t}: ${n};`)}),Object.entries(ZQ.spacing).forEach(([t,n])=>{e.push(` --semiont-spacing-${t}: ${n};`)}),Object.entries(ZQ.typography.fontSize).forEach(([t,n])=>{e.push(` --semiont-text-${t}: ${n};`)}),Object.entries(ZQ.typography.fontWeight).forEach(([t,n])=>{e.push(` --semiont-font-${t}: ${n};`)}),e.push(` --semiont-font-sans: ${ZQ.typography.fontFamily.sans};`),e.push(` --semiont-font-mono: ${ZQ.typography.fontFamily.mono};`),Object.entries(ZQ.borderRadius).forEach(([t,n])=>{e.push(` --semiont-radius-${t}: ${n};`)}),Object.entries(ZQ.shadows).forEach(([t,n])=>{e.push(` --semiont-shadow-${t}: ${n};`)}),Object.entries(ZQ.transitions.duration).forEach(([t,n])=>{e.push(` --semiont-duration-${t}: ${n};`)}),e.push(`}`),e.join(`
|
|
140
|
+
`)}QQ();function $Q({message:e}){return(0,P.jsx)(`div`,{className:`semiont-loading-state-wrapper`,children:(0,P.jsx)(`div`,{className:`semiont-loading-state semiont-loading-state-compose`,children:(0,P.jsx)(`p`,{className:`semiont-loading-message`,children:e})})})}function e$(){return(0,P.jsx)(`div`,{className:`semiont-loading-state semiont-loading-state-resource`,children:(0,P.jsx)(`p`,{className:`semiont-loading-message`,children:`Loading resource...`})})}function t$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5`}))}var n$=m.forwardRef(t$);function r$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`}))}var i$=m.forwardRef(r$);function a$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`}))}var o$=m.forwardRef(a$);function s$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z`}))}var c$=m.forwardRef(s$);function l$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z`}))}var u$=m.forwardRef(l$);function d$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z`}))}var f$=m.forwardRef(d$);function p$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418`}))}var m$=m.forwardRef(p$);function h$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z`}))}var g$=m.forwardRef(h$);function _$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18`}))}var v$=m.forwardRef(_$);function y$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z`}))}var b$=m.forwardRef(y$);function x$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125`}))}var S$=m.forwardRef(x$);function C$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 4.5v15m7.5-7.5h-15`}))}var w$=m.forwardRef(C$);function T$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z`}))}var E$=m.forwardRef(T$);function D$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z`}))}var O$=m.forwardRef(D$);function k$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z`}),m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 6h.008v.008H6V6Z`}))}var A$=m.forwardRef(k$);function j$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0`}))}var M$=m.forwardRef(j$);function N$({title:e,titleId:t,...n},r){return m.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?m.createElement(`title`,{id:t},e):null,m.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`}))}var P$=m.forwardRef(N$),F$=u(Qm(),1),I$=[`knowledge-base`,`user`,`settings`],L$={linking:`reference`,commenting:`comment`,tagging:`tag`,highlighting:`highlight`,assessing:`assessment`},R$=0;function z$(e,t){let n=[],r=new F$.BehaviorSubject(t?.initialPanel??null),i=new F$.BehaviorSubject(null),a=new F$.BehaviorSubject(null);if(t?.onPanelChange){let e=t.onPanelChange;n.push(r.subscribe(e))}return n.push(e.stream(`panel:toggle`).subscribe(({panel:e})=>{let t=r.getValue();r.next(t===e?null:e)})),n.push(e.stream(`panel:open`).subscribe(({panel:e,scrollToAnnotationId:t,motivation:n})=>{if(t&&i.next(t),n){let e=L$[n]||`highlight`;a.next({tab:e,generation:++R$})}r.next(e)})),n.push(e.stream(`panel:close`).subscribe(()=>{r.next(null)})),{activePanel$:r.asObservable(),scrollToAnnotationId$:i.asObservable(),panelInitialTab$:a.asObservable(),openPanel:t=>e.emit(`panel:open`,{panel:t}),closePanel:()=>e.emit(`panel:close`,void 0),togglePanel:t=>e.emit(`panel:toggle`,{panel:t}),onScrollCompleted:()=>i.next(null),dispose(){n.forEach(e=>e.unsubscribe()),r.complete(),i.complete(),a.complete()}}}function B$({suggestedFeatures:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,StatusDisplay:a,ToolbarPanels:o,Toolbar:s}){return(0,P.jsxs)(`div`,{className:`semiont-page${r&&I$.includes(r)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:i.title}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:i.subtitle})]}),(0,P.jsxs)(`div`,{className:`semiont-admin__section`,children:[(0,P.jsx)(`h2`,{className:`semiont-admin__section-title`,children:i.systemStatus}),(0,P.jsx)(a,{})]}),(0,P.jsxs)(`div`,{className:`semiont-admin__section`,children:[(0,P.jsx)(`h2`,{className:`semiont-admin__section-title`,children:i.cliOperations}),(0,P.jsx)(`p`,{className:`semiont-admin__section-description`,children:i.cliOperationsDescription}),(0,P.jsx)(`div`,{className:`semiont-admin__features-grid`,children:e.map(e=>(0,P.jsx)(`div`,{className:`semiont-devops-feature`,children:(0,P.jsxs)(`div`,{className:`semiont-devops-feature__header`,children:[(0,P.jsx)(`div`,{className:`semiont-devops-feature__icon-box`,children:(0,P.jsx)(e.icon,{className:`semiont-devops-feature__icon`})}),(0,P.jsxs)(`div`,{className:`semiont-devops-feature__content`,children:[(0,P.jsx)(`h3`,{className:`semiont-devops-feature__title`,children:e.title}),(0,P.jsx)(`p`,{className:`semiont-devops-feature__description`,children:e.description}),(0,P.jsx)(`p`,{className:`semiont-devops-feature__available`,children:e.available})]})]})},e.title))})]}),(0,P.jsx)(`div`,{className:`semiont-admin__info-box`,children:(0,P.jsxs)(`div`,{className:`semiont-admin__info-box-content`,children:[(0,P.jsx)(`div`,{className:`semiont-admin__info-box-icon`,children:(0,P.jsx)(c$,{className:`semiont-icon semiont-icon--info`})}),(0,P.jsxs)(`div`,{className:`semiont-admin__info-box-text`,children:[(0,P.jsx)(`h3`,{className:`semiont-admin__info-box-title`,children:i.cliTitle}),(0,P.jsxs)(`div`,{className:`semiont-admin__info-box-description`,children:[(0,P.jsx)(`p`,{children:i.cliDescription}),(0,P.jsx)(`code`,{className:`semiont-admin__info-box-code`,children:`semiont --help`})]})]})]})})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(o,{activePanel:r,theme:t,showLineNumbers:n}),(0,P.jsx)(s,{context:`simple`,activePanel:r})]})]})}function V$({onExport:e,isExporting:t,translations:n}){return(0,P.jsxs)(`div`,{className:`semiont-admin__card`,children:[(0,P.jsx)(`h2`,{className:`semiont-admin__section-title`,children:n.title}),(0,P.jsx)(`p`,{className:`semiont-admin__section-description`,children:n.description}),(0,P.jsx)(`button`,{className:`semiont-exchange__button semiont-exchange__button--primary`,onClick:e,disabled:t,children:t?n.exporting:n.exportButton})]})}function H$({onFileSelected:e,onImport:t,onCancel:n,selectedFile:r,preview:i,isImporting:a,translations:o}){let s=(0,m.useRef)(null),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=(0,m.useCallback)(e=>{e.preventDefault(),l(!0)},[]),p=(0,m.useCallback)(()=>{l(!1)},[]),h=(0,m.useCallback)(t=>{t.preventDefault(),l(!1),d(!1);let n=t.dataTransfer.files[0];n&&e(n)},[e]),g=(0,m.useCallback)(t=>{d(!1);let n=t.target.files?.[0];n&&e(n)},[e]);return(0,P.jsxs)(`div`,{className:`semiont-admin__card`,children:[(0,P.jsx)(`h2`,{className:`semiont-admin__section-title`,children:o.title}),(0,P.jsx)(`p`,{className:`semiont-admin__section-description`,children:o.description}),(0,P.jsxs)(`div`,{className:`semiont-exchange__dropzone${c?` semiont-exchange__dropzone--active`:``}`,onDragOver:f,onDragLeave:p,onDrop:h,onClick:()=>s.current?.click(),children:[(0,P.jsx)(`p`,{className:`semiont-exchange__dropzone-text`,children:c?o.dropzoneActive:o.dropzoneLabel}),r&&(0,P.jsxs)(`p`,{className:`semiont-exchange__file-info`,children:[r.name,` (`,(r.size/1024).toFixed(1),` KB)`]})]}),(0,P.jsx)(`input`,{ref:s,type:`file`,accept:`.tar.gz,.jsonl,.gz`,onChange:g,style:{display:`none`}}),i&&(0,P.jsxs)(`div`,{className:`semiont-exchange__preview`,children:[(0,P.jsxs)(`div`,{className:`semiont-exchange__preview-row`,children:[(0,P.jsx)(`span`,{className:`semiont-exchange__preview-label`,children:o.detectedFormat}),(0,P.jsxs)(`span`,{className:`semiont-exchange__preview-value`,children:[i.format,` v`,i.version]})]}),i.sourceUrl&&(0,P.jsxs)(`div`,{className:`semiont-exchange__preview-row`,children:[(0,P.jsx)(`span`,{className:`semiont-exchange__preview-label`,children:`Source`}),(0,P.jsx)(`span`,{className:`semiont-exchange__preview-value`,children:i.sourceUrl})]}),Object.keys(i.stats).length>0&&(0,P.jsxs)(`div`,{className:`semiont-exchange__preview-row`,children:[(0,P.jsx)(`span`,{className:`semiont-exchange__preview-label`,children:o.statsPreview}),(0,P.jsx)(`span`,{className:`semiont-exchange__preview-value`,children:Object.entries(i.stats).map(([e,t])=>`${t} ${e}`).join(`, `)})]})]}),u&&(0,P.jsxs)(`div`,{className:`semiont-exchange__confirm`,children:[(0,P.jsx)(`p`,{className:`semiont-exchange__confirm-title`,children:o.importConfirmTitle}),(0,P.jsx)(`p`,{className:`semiont-exchange__confirm-message`,children:o.importConfirmMessage}),(0,P.jsxs)(`div`,{className:`semiont-exchange__confirm-actions`,children:[(0,P.jsx)(`button`,{className:`semiont-exchange__button semiont-exchange__button--primary`,onClick:()=>{d(!1),t()},children:o.confirmImport}),(0,P.jsx)(`button`,{className:`semiont-exchange__button semiont-exchange__button--secondary`,onClick:()=>{d(!1)},children:o.cancelImport})]})]}),!u&&(0,P.jsxs)(`div`,{className:`semiont-exchange__actions`,children:[(0,P.jsx)(`button`,{className:`semiont-exchange__button semiont-exchange__button--primary`,onClick:()=>{d(!0)},disabled:!i||a,children:a?o.importing:o.importButton}),r&&(0,P.jsx)(`button`,{className:`semiont-exchange__button semiont-exchange__button--secondary`,onClick:n,disabled:a,children:o.cancelImport})]})]})}var U$={started:`phaseStarted`,"entity-types":`phaseEntityTypes`,resources:`phaseResources`,annotations:`phaseAnnotations`,complete:`phaseComplete`,error:`phaseError`};function W$({phase:e,message:t,result:n,translations:r}){let i=U$[e],a=i?r[i]:e,o=e===`complete`,s=e===`error`;return(0,P.jsxs)(`div`,{className:`semiont-exchange__progress`,children:[(0,P.jsx)(`div`,{className:`semiont-exchange__phase-label${s?` semiont-exchange__phase-label--error`:o?` semiont-exchange__phase-label--complete`:``}`,children:a}),t&&!o&&!s&&(0,P.jsx)(`p`,{className:`semiont-exchange__progress-message`,children:t}),o&&n&&(0,P.jsxs)(`div`,{className:`semiont-exchange__result`,children:[n.stats!=null&&typeof n.stats==`object`&&(0,P.jsx)(P.Fragment,{children:Object.entries(n.stats).map(([e,t])=>{let n=e===`streams`?r.streams:e===`events`?r.events:e===`blobs`?r.blobs:e;return(0,P.jsxs)(`div`,{className:`semiont-exchange__result-stat`,children:[(0,P.jsx)(`span`,{className:`semiont-exchange__result-value`,children:t}),(0,P.jsx)(`span`,{className:`semiont-exchange__result-label`,children:n})]},e)})}),n.hashChainValid!==void 0&&(0,P.jsx)(`div`,{className:`semiont-exchange__hash-badge${n.hashChainValid?` semiont-exchange__hash-badge--valid`:` semiont-exchange__hash-badge--invalid`}`,children:n.hashChainValid?r.hashChainValid:r.hashChainInvalid})]}),s&&t&&(0,P.jsx)(`p`,{className:`semiont-exchange__error-message`,children:t})]})}function G$({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:o,isImporting:s,importPhase:c,importMessage:l,importResult:u,theme:d,showLineNumbers:f,activePanel:p,translations:m,ToolbarPanels:h,Toolbar:g}){return(0,P.jsxs)(`div`,{className:`semiont-page${p&&I$.includes(p)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:m.title}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:m.subtitle})]}),(0,P.jsxs)(`div`,{className:`semiont-exchange__cards`,children:[(0,P.jsx)(V$,{onExport:e,isExporting:t,translations:m.export}),(0,P.jsx)(H$,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:o,isImporting:s,translations:m.import})]}),c&&(0,P.jsx)(W$,{phase:c,message:l,result:u,translations:m.progress})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(h,{activePanel:p,theme:d,showLineNumbers:f}),(0,P.jsx)(g,{context:`simple`,activePanel:p})]})]})}function K$({providers:e,allowedDomains:t,isLoading:n,theme:r,showLineNumbers:i,activePanel:a,translations:o,ToolbarPanels:s,Toolbar:c}){return(0,P.jsxs)(`div`,{className:`semiont-page${a&&I$.includes(a)?` semiont-page--panel-open`:``}`,children:[(0,P.jsx)(`div`,{className:`semiont-page__content`,children:(0,P.jsxs)(`div`,{className:`semiont-page__sections`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:o.title}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:o.subtitle})]}),(0,P.jsxs)(`div`,{className:`semiont-admin__card`,children:[(0,P.jsxs)(`div`,{className:`semiont-admin__card-header`,children:[(0,P.jsx)(O$,{className:`semiont-admin__card-icon semiont-admin__card-icon--primary`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`semiont-admin__card-title`,children:o.oauthProviders}),(0,P.jsx)(`p`,{className:`semiont-admin__card-description`,children:o.oauthProvidersDescription})]})]}),n?(0,P.jsx)(`div`,{className:`semiont-skeleton-group`,children:(0,P.jsx)(`div`,{className:`semiont-skeleton semiont-skeleton--bar`})}):e.length>0?(0,P.jsx)(`div`,{className:`semiont-provider-list`,children:e.map(e=>(0,P.jsxs)(`div`,{className:`semiont-provider-item`,children:[(0,P.jsxs)(`div`,{className:`semiont-provider-item__info`,children:[(0,P.jsx)(i$,{className:`semiont-provider-item__icon semiont-provider-item__icon--success`}),(0,P.jsx)(`span`,{className:`semiont-provider-item__name`,children:e.name}),e.clientId&&(0,P.jsxs)(`span`,{className:`semiont-provider-item__client-id`,children:[o.clientId,`: `,e.clientId]})]}),(0,P.jsx)(`span`,{className:`semiont-badge semiont-badge--success`,children:o.configured})]},e.name))}):(0,P.jsx)(`div`,{className:`semiont-empty-message`,children:o.noProvidersConfigured})]}),(0,P.jsxs)(`div`,{className:`semiont-admin__card`,children:[(0,P.jsxs)(`div`,{className:`semiont-admin__card-header`,children:[(0,P.jsx)(m$,{className:`semiont-admin__card-icon semiont-admin__card-icon--primary`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`semiont-admin__card-title`,children:o.allowedDomains}),(0,P.jsx)(`p`,{className:`semiont-admin__card-description`,children:o.allowedDomainsDescription})]})]}),n?(0,P.jsxs)(`div`,{className:`semiont-skeleton-group`,children:[(0,P.jsx)(`div`,{className:`semiont-skeleton semiont-skeleton--chip`}),(0,P.jsx)(`div`,{className:`semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg`})]}):t.length>0?(0,P.jsx)(`div`,{className:`semiont-domain-list`,children:t.map(e=>(0,P.jsxs)(`div`,{className:`semiont-chip semiont-chip--primary`,children:[`@`,e]},e))}):(0,P.jsx)(`div`,{className:`semiont-empty-message`,children:o.noDomainsConfigured})]}),(0,P.jsx)(`div`,{className:`semiont-admin__info-box`,children:(0,P.jsxs)(`div`,{className:`semiont-info-box__content`,children:[(0,P.jsx)(g$,{className:`semiont-info-box__icon`}),(0,P.jsxs)(`div`,{className:`semiont-info-box__text`,children:[(0,P.jsx)(`p`,{className:`semiont-info-box__title`,children:o.configManagementTitle}),(0,P.jsx)(`p`,{className:`semiont-info-box__description`,children:o.configManagementDescription}),(0,P.jsxs)(`ul`,{className:`semiont-info-box__list`,children:[(0,P.jsx)(`li`,{children:o.configLocalDev}),(0,P.jsxs)(`li`,{children:[o.configCloudDeploy,` `,(0,P.jsx)(`code`,{className:`semiont-code-inline`,children:o.configCloudDeployCommand}),` `,o.configCloudDeployEnd]}),(0,P.jsx)(`li`,{children:o.configAWS})]})]})]})})]})}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(s,{activePanel:a,theme:r,showLineNumbers:i}),(0,P.jsx)(c,{context:`simple`,activePanel:a})]})]})}function q$({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:o,isImporting:s,importPhase:c,importMessage:l,importResult:u,theme:d,showLineNumbers:f,activePanel:p,translations:m,ToolbarPanels:h,Toolbar:g}){return(0,P.jsxs)(`div`,{className:`semiont-page${p&&I$.includes(p)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:m.title}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:m.subtitle})]}),(0,P.jsxs)(`div`,{className:`semiont-exchange__cards`,children:[(0,P.jsx)(V$,{onExport:e,isExporting:t,translations:m.export}),(0,P.jsx)(H$,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:o,isImporting:s,translations:m.import})]}),c&&(0,P.jsx)(W$,{phase:c,message:l,result:u,translations:m.progress})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(h,{activePanel:p,theme:d,showLineNumbers:f}),(0,P.jsx)(g,{context:`simple`,activePanel:p})]})]})}function J$({user:e,onUpdate:t,onDelete:n,translations:r}){let i={admin:`semiont-badge semiont-badge--danger`,user:`semiont-badge semiont-badge--default`},a={active:`semiont-badge semiont-badge--success`,inactive:`semiont-badge semiont-badge--default`},o=e.isAdmin?`admin`:`user`,s=e.isActive?`active`:`inactive`;return(0,P.jsxs)(`tr`,{className:`semiont-table__row`,children:[(0,P.jsx)(`td`,{className:`semiont-table__cell`,children:(0,P.jsxs)(`div`,{className:`semiont-user-info`,children:[(0,P.jsx)(P$,{className:`semiont-user-info__avatar`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`semiont-user-info__name`,children:e.name||r.noName}),(0,P.jsx)(`div`,{className:`semiont-user-info__email`,children:e.email})]})]})}),(0,P.jsx)(`td`,{className:`semiont-table__cell`,children:(0,P.jsxs)(`span`,{className:`semiont-table__text--secondary`,children:[`@`,e.domain]})}),(0,P.jsx)(`td`,{className:`semiont-table__cell`,children:(0,P.jsx)(`span`,{className:i[o],children:r[o]})}),(0,P.jsx)(`td`,{className:`semiont-table__cell`,children:(0,P.jsx)(`span`,{className:a[s],children:r[s]})}),(0,P.jsx)(`td`,{className:`semiont-table__cell semiont-table__text--secondary`,children:e.lastLogin?new Date(e.lastLogin).toLocaleDateString():r.never}),(0,P.jsx)(`td`,{className:`semiont-table__cell semiont-table__text--secondary`,children:new Date(e.created).toLocaleDateString()}),(0,P.jsx)(`td`,{className:`semiont-table__cell semiont-table__cell--actions`,children:(0,P.jsxs)(`div`,{className:`semiont-table__actions`,children:[(0,P.jsx)(`button`,{onClick:()=>t(e.id,{isAdmin:!e.isAdmin}),className:`semiont-action-button semiont-action-button--info`,title:e.isAdmin?r.removeAdmin:r.makeAdmin,children:(0,P.jsx)(O$,{className:`semiont-action-button__icon`})}),(0,P.jsx)(`button`,{onClick:()=>t(e.id,{isActive:!e.isActive}),className:`semiont-action-button semiont-action-button--warning`,title:e.isActive?r.deactivateUser:r.activateUser,children:(0,P.jsx)(S$,{className:`semiont-action-button__icon`})}),(0,P.jsx)(`button`,{onClick:()=>n(e.id),className:`semiont-action-button semiont-action-button--danger`,title:r.deleteUser,children:(0,P.jsx)(M$,{className:`semiont-action-button__icon`})})]})})]})}function Y$({users:e,userStats:t,isLoadingUsers:n,isLoadingStats:r,onUpdateUser:i,onDeleteUser:a,onAddUser:o,onExportUsers:s,theme:c,showLineNumbers:l,activePanel:u,translations:d,ToolbarPanels:f,Toolbar:p,buttonStyles:h}){let[g,_]=(0,m.useState)(``),[v,y]=(0,m.useState)(`all`),[b,x]=(0,m.useState)(`all`),S=e.filter(e=>{let t=(e.name||``).toLowerCase().includes(g.toLowerCase())||e.email.toLowerCase().includes(g.toLowerCase()),n=e.isAdmin?`admin`:`user`,r=e.isActive?`active`:`inactive`;return t&&(v===`all`||n===v)&&(b===`all`||r===b)});return(0,P.jsxs)(`div`,{className:`semiont-page${u&&I$.includes(u)?` semiont-page--panel-open`:``}`,children:[(0,P.jsx)(`div`,{className:`semiont-page__content`,children:(0,P.jsxs)(`div`,{className:`semiont-page__sections`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header-with-action`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:d.title}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:d.subtitle})]}),(0,P.jsxs)(`button`,{onClick:o,className:h.primary.base,children:[(0,P.jsx)(w$,{className:`semiont-button__icon`}),d.addUser]})]}),(0,P.jsx)(`div`,{className:`semiont-admin__stats-grid`,children:r?[,,,,].fill(0).map((e,t)=>(0,P.jsx)(`div`,{className:`semiont-stat-card semiont-stat-card--loading`,children:(0,P.jsxs)(`div`,{className:`semiont-stat-card__content`,children:[(0,P.jsx)(`div`,{className:`semiont-skeleton semiont-skeleton--icon`}),(0,P.jsxs)(`div`,{className:`semiont-stat-card__text`,children:[(0,P.jsx)(`div`,{className:`semiont-skeleton semiont-skeleton--text`}),(0,P.jsx)(`div`,{className:`semiont-skeleton semiont-skeleton--number`})]})]})},t)):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:`semiont-stat-card`,children:(0,P.jsxs)(`div`,{className:`semiont-stat-card__content`,children:[(0,P.jsx)(`div`,{className:`semiont-stat-card__icon-wrapper`,children:(0,P.jsx)(P$,{className:`semiont-stat-card__icon semiont-stat-card__icon--primary`})}),(0,P.jsxs)(`div`,{className:`semiont-stat-card__text`,children:[(0,P.jsx)(`p`,{className:`semiont-stat-card__label`,children:d.totalUsers}),(0,P.jsx)(`p`,{className:`semiont-stat-card__value`,children:t?.totalUsers??0})]})]})}),(0,P.jsx)(`div`,{className:`semiont-stat-card`,children:(0,P.jsxs)(`div`,{className:`semiont-stat-card__content`,children:[(0,P.jsx)(`div`,{className:`semiont-stat-card__icon-wrapper`,children:(0,P.jsx)(`div`,{className:`semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active`,children:(0,P.jsx)(`div`,{className:`semiont-stat-card__status-dot`})})}),(0,P.jsxs)(`div`,{className:`semiont-stat-card__text`,children:[(0,P.jsx)(`p`,{className:`semiont-stat-card__label`,children:d.activeUsers}),(0,P.jsx)(`p`,{className:`semiont-stat-card__value`,children:t?.activeUsers??0})]})]})}),(0,P.jsx)(`div`,{className:`semiont-stat-card`,children:(0,P.jsxs)(`div`,{className:`semiont-stat-card__content`,children:[(0,P.jsx)(`div`,{className:`semiont-stat-card__icon-wrapper`,children:(0,P.jsx)(O$,{className:`semiont-stat-card__icon semiont-stat-card__icon--danger`})}),(0,P.jsxs)(`div`,{className:`semiont-stat-card__text`,children:[(0,P.jsx)(`p`,{className:`semiont-stat-card__label`,children:d.administrators}),(0,P.jsx)(`p`,{className:`semiont-stat-card__value`,children:t?.adminUsers??0})]})]})}),(0,P.jsx)(`div`,{className:`semiont-stat-card`,children:(0,P.jsxs)(`div`,{className:`semiont-stat-card__content`,children:[(0,P.jsx)(`div`,{className:`semiont-stat-card__icon-wrapper`,children:(0,P.jsx)(f$,{className:`semiont-stat-card__icon semiont-stat-card__icon--warning`})}),(0,P.jsxs)(`div`,{className:`semiont-stat-card__text`,children:[(0,P.jsx)(`p`,{className:`semiont-stat-card__label`,children:d.recentUsers}),(0,P.jsx)(`p`,{className:`semiont-stat-card__value`,children:t?.recentSignups?.length??0})]})]})})]})}),(0,P.jsx)(`div`,{className:`semiont-admin__filters-card`,children:(0,P.jsxs)(`div`,{className:`semiont-admin__filters-grid`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`search`,className:`semiont-form__label`,children:d.searchUsers}),(0,P.jsxs)(`div`,{className:`semiont-search-input`,children:[(0,P.jsx)(`div`,{className:`semiont-search-input__icon`,children:(0,P.jsx)(b$,{className:`semiont-icon semiont-icon--small`})}),(0,P.jsx)(`input`,{type:`text`,id:`search`,className:`semiont-search-input__field`,placeholder:d.searchPlaceholder,value:g,onChange:e=>_(e.target.value)})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`role`,className:`semiont-form__label`,children:d.role}),(0,P.jsxs)(`select`,{id:`role`,className:`semiont-select`,value:v,onChange:e=>y(e.target.value),children:[(0,P.jsx)(`option`,{value:`all`,children:d.allRoles}),(0,P.jsx)(`option`,{value:`admin`,children:d.admin}),(0,P.jsx)(`option`,{value:`user`,children:d.user})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`status`,className:`semiont-form__label`,children:d.status}),(0,P.jsxs)(`select`,{id:`status`,className:`semiont-select`,value:b,onChange:e=>x(e.target.value),children:[(0,P.jsx)(`option`,{value:`all`,children:d.allStatus}),(0,P.jsx)(`option`,{value:`active`,children:d.active}),(0,P.jsx)(`option`,{value:`inactive`,children:d.inactive})]})]}),(0,P.jsx)(`div`,{className:`semiont-form__field semiont-form__field--align-end`,children:(0,P.jsx)(`button`,{onClick:s,className:`${h.secondary.base} semiont-button--full-width`,children:d.exportUsers})})]})}),(0,P.jsxs)(`div`,{className:`semiont-admin__table-card`,children:[(0,P.jsx)(`div`,{className:`semiont-table-container`,children:n?(0,P.jsxs)(`div`,{className:`semiont-loading-state`,children:[(0,P.jsx)(`div`,{className:`semiont-spinner`}),(0,P.jsx)(`p`,{className:`semiont-loading-state__text`,children:d.loadingUsers})]}):(0,P.jsxs)(`table`,{className:`semiont-table`,children:[(0,P.jsx)(`thead`,{className:`semiont-table__head`,children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{className:`semiont-table__header`,children:d.userColumn}),(0,P.jsx)(`th`,{className:`semiont-table__header`,children:d.domainColumn}),(0,P.jsx)(`th`,{className:`semiont-table__header`,children:d.roleColumn}),(0,P.jsx)(`th`,{className:`semiont-table__header`,children:d.statusColumn}),(0,P.jsx)(`th`,{className:`semiont-table__header`,children:d.lastLoginColumn}),(0,P.jsx)(`th`,{className:`semiont-table__header`,children:d.joinedColumn}),(0,P.jsx)(`th`,{className:`semiont-table__header semiont-table__header--actions`,children:d.actionsColumn})]})}),(0,P.jsx)(`tbody`,{className:`semiont-table__body`,children:S.map(e=>(0,P.jsx)(J$,{user:e,onUpdate:i,onDelete:a,translations:d},e.id))})]})}),!n&&S.length===0&&(0,P.jsxs)(`div`,{className:`semiont-empty-state`,children:[(0,P.jsx)(P$,{className:`semiont-empty-state__icon`}),(0,P.jsx)(`h3`,{className:`semiont-empty-state__title`,children:d.noUsersFound}),(0,P.jsx)(`p`,{className:`semiont-empty-state__description`,children:d.noUsersFoundDescription})]})]})]})}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(f,{activePanel:u,theme:c,showLineNumbers:l}),(0,P.jsx)(p,{context:`simple`,activePanel:u})]})]})}function X$(){return(0,P.jsxs)(`svg`,{className:`semiont-icon semiont-icon--small semiont-icon--inline`,viewBox:`0 0 24 24`,children:[(0,P.jsx)(`path`,{fill:`currentColor`,d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`}),(0,P.jsx)(`path`,{fill:`currentColor`,d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`}),(0,P.jsx)(`path`,{fill:`currentColor`,d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z`}),(0,P.jsx)(`path`,{fill:`currentColor`,d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z`})]})}function Z$({onSignUp:e,Link:t,translations:n}){let[r,i]=(0,m.useState)(!1);return(0,P.jsx)(`main`,{className:`semiont-auth__main`,role:`main`,children:(0,P.jsx)(`div`,{className:`semiont-auth__container`,children:(0,P.jsxs)(`div`,{className:`semiont-auth__content`,children:[(0,P.jsxs)(`section`,{"aria-labelledby":`signup-heading`,className:`semiont-auth__branding`,children:[(0,P.jsx)(`h1`,{id:`signup-heading`,className:`sr-only`,children:n.pageTitle}),(0,P.jsx)(qQ,{t:e=>n[e]||e,size:`xl`,animated:!0,className:`semiont-auth__logo`}),(0,P.jsx)(`p`,{className:`semiont-auth__welcome`,children:n.pageTitle}),(0,P.jsx)(`p`,{className:`semiont-auth__subtitle`,children:n.signUpPrompt})]}),(0,P.jsxs)(`div`,{className:`semiont-auth__forms`,children:[(0,P.jsxs)(`button`,{onClick:async()=>{i(!0);try{await e()}catch(e){console.error(`Failed to initiate Google sign-up:`,e),i(!1)}},disabled:r,className:`${Lh.primary.base} semiont-button--full-width`,children:[r?(0,P.jsx)(`div`,{className:`semiont-auth__spinner`}):(0,P.jsx)(X$,{}),r?n.creatingAccount:n.signUpWithGoogle]}),(0,P.jsxs)(`div`,{className:`semiont-auth__info`,children:[n.approvedDomainsInfo,(0,P.jsx)(`br`,{}),n.termsAgreement]})]}),(0,P.jsxs)(`div`,{className:`semiont-auth__links`,children:[(0,P.jsx)(t,{href:`/`,className:Lh.secondary.base,children:n.backToHome}),(0,P.jsx)(t,{href:`/auth/signin`,className:Lh.primary.base,children:n.alreadyHaveAccount})]})]})})})}function Q$(e,t){switch(e){case`Configuration`:return t.errorConfiguration;case`AccessDenied`:return t.errorAccessDenied;case`Verification`:return t.errorVerification;default:return t.errorGeneric}}function $$({errorType:e,Link:t,translations:n}){let r=Q$(e,n);return(0,P.jsx)(`div`,{className:`semiont-auth-error-display`,children:(0,P.jsxs)(`div`,{className:`semiont-auth-error-display__container`,children:[(0,P.jsx)(`div`,{children:(0,P.jsx)(`h2`,{className:`semiont-auth-error-display__title`,children:n.pageTitle})}),(0,P.jsx)(`div`,{className:`semiont-auth-error-display__error-box`,children:(0,P.jsx)(`div`,{className:`semiont-auth-error-display__error-message`,children:r})}),(0,P.jsx)(`div`,{className:`semiont-auth-error-display__actions`,children:(0,P.jsx)(t,{href:`/auth/signin`,className:`semiont-auth-error-display__link`,children:n.tryAgain})})]})})}function e1({userName:e,status:t,isProcessing:n,onAccept:r,onDecline:i,translations:a,PageLayout:o,Link:s}){return t===`loading`?(0,P.jsx)(o,{className:`semiont-welcome-page__layout`,children:(0,P.jsx)(`div`,{className:`semiont-welcome-page__loading`,children:(0,P.jsxs)(`div`,{className:`semiont-welcome-page__loading-content`,children:[(0,P.jsx)(`div`,{className:`semiont-welcome-page__spinner`}),(0,P.jsx)(`p`,{className:`semiont-welcome-page__loading-text`,children:a.loading})]})})}):t===`accepted`?(0,P.jsx)(o,{className:`semiont-welcome-page__layout`,children:(0,P.jsx)(`div`,{className:`semiont-welcome-page__accepted`,children:(0,P.jsxs)(`div`,{className:`semiont-welcome-page__accepted-content`,children:[(0,P.jsx)(`div`,{className:`semiont-welcome-page__accepted-icon`,children:(0,P.jsx)(`svg`,{className:`semiont-welcome-page__accepted-checkmark`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})})}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h2`,{className:`semiont-welcome-page__accepted-title`,children:a.welcomeTitle}),(0,P.jsx)(`p`,{className:`semiont-welcome-page__accepted-subtitle`,children:a.thanksForAccepting})]})]})})}):(0,P.jsx)(o,{className:`semiont-welcome-page__layout`,children:(0,P.jsx)(`div`,{className:`semiont-welcome-page__form-wrapper`,children:(0,P.jsxs)(`div`,{className:`semiont-welcome-page__form`,children:[(0,P.jsxs)(`div`,{className:`semiont-welcome-page__form-header`,children:[(0,P.jsx)(`div`,{className:`semiont-welcome-page__form-icon`,children:(0,P.jsx)(`svg`,{className:`semiont-welcome-page__form-icon-svg`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,P.jsx)(`h1`,{className:`semiont-welcome-page__form-title`,children:a.welcomeUser.replace(`{firstName}`,e||``)}),(0,P.jsx)(`p`,{className:`semiont-welcome-page__form-subtitle`,children:a.reviewTermsPrompt})]}),(0,P.jsx)(`div`,{className:`semiont-welcome-page__terms-content`,children:(0,P.jsxs)(`div`,{className:`semiont-welcome-page__prose`,children:[(0,P.jsx)(`h3`,{children:a.termsSummaryTitle}),(0,P.jsx)(`p`,{children:a.termsSummaryIntro}),(0,P.jsx)(`h4`,{children:a.acceptableUseTitle}),(0,P.jsxs)(`ul`,{children:[(0,P.jsx)(`li`,{children:a.acceptableUseResponsible}),(0,P.jsx)(`li`,{children:a.acceptableUseRespect}),(0,P.jsx)(`li`,{children:a.acceptableUseConduct})]}),(0,P.jsx)(`h4`,{children:a.prohibitedContentTitle}),(0,P.jsx)(`p`,{children:a.prohibitedContentIntro}),(0,P.jsxs)(`ul`,{children:[(0,P.jsx)(`li`,{children:a.prohibitedIllegal}),(0,P.jsx)(`li`,{children:a.prohibitedAdult}),(0,P.jsx)(`li`,{children:a.prohibitedHate}),(0,P.jsx)(`li`,{children:a.prohibitedViolence}),(0,P.jsx)(`li`,{children:a.prohibitedMisinformation}),(0,P.jsx)(`li`,{children:a.prohibitedPrivacy}),(0,P.jsx)(`li`,{children:a.prohibitedCopyright}),(0,P.jsx)(`li`,{children:a.prohibitedMalware}),(0,P.jsx)(`li`,{children:a.prohibitedSpam})]}),(0,P.jsx)(`h4`,{children:a.conductTitle}),(0,P.jsxs)(`p`,{children:[a.conductDescription,` `,(0,P.jsx)(`a`,{href:`https://ai-alliance.cdn.prismic.io/ai-alliance/Zl-MG5m069VX1dgH_AIAllianceCodeofConduct.pdf`,target:`_blank`,rel:`noopener noreferrer`,className:`semiont-link`,children:a.conductLink}),a.conductPromotion]}),(0,P.jsx)(`h4`,{children:a.responsibilitiesTitle}),(0,P.jsxs)(`ul`,{children:[(0,P.jsx)(`li`,{children:a.responsibilitiesSecure}),(0,P.jsx)(`li`,{children:a.responsibilitiesReport}),(0,P.jsx)(`li`,{children:a.responsibilitiesAccurate}),(0,P.jsx)(`li`,{children:a.responsibilitiesComply})]}),(0,P.jsx)(`p`,{className:`semiont-welcome-page__warning`,children:a.violationsWarning})]})}),(0,P.jsxs)(`div`,{className:`semiont-welcome-page__actions`,children:[(0,P.jsxs)(`p`,{className:`semiont-welcome-page__legal-links`,children:[a.readFullTerms,` `,(0,P.jsx)(s,{href:`/terms`,target:`_blank`,className:`semiont-welcome-page__link`,children:a.termsOfService}),` `,a.and,` `,(0,P.jsx)(s,{href:`/privacy`,target:`_blank`,className:`semiont-welcome-page__link`,children:a.privacyPolicy})]}),(0,P.jsxs)(`div`,{className:`semiont-welcome-page__buttons`,children:[(0,P.jsx)(`button`,{onClick:i,disabled:n,className:`semiont-welcome-page__button semiont-welcome-page__button--secondary`,children:a.declineAndSignOut}),(0,P.jsx)(`button`,{onClick:r,disabled:n,className:`semiont-welcome-page__button semiont-welcome-page__button--primary`,children:n?a.processing:a.acceptAndContinue})]}),(0,P.jsx)(`p`,{className:`semiont-welcome-page__legal-notice`,children:a.legallyBound})]})]})})})}function t1({entityTypes:e,error:t,newTag:n,onNewTagChange:r,onAddTag:i,isAddingTag:a,theme:o,showLineNumbers:s,activePanel:c,translations:l,ToolbarPanels:u,Toolbar:d}){return(0,P.jsxs)(`div`,{className:`semiont-page${c&&I$.includes(c)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:l.pageTitle}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:l.pageDescription})]}),(0,P.jsxs)(`div`,{className:`semiont-card`,children:[(0,P.jsxs)(`div`,{className:`semiont-entity-tags__header`,children:[(0,P.jsx)(`div`,{className:`semiont-entity-tags__icon-box`,children:(0,P.jsx)(A$,{className:`semiont-entity-tags__icon`})}),(0,P.jsxs)(`div`,{className:`semiont-entity-tags__content`,children:[(0,P.jsx)(`h3`,{className:`semiont-entity-tags__title`,children:l.sectionTitle}),(0,P.jsx)(`p`,{className:`semiont-entity-tags__description`,children:l.sectionDescription})]})]}),(0,P.jsx)(`div`,{className:`semiont-entity-tags__tags-section`,children:(0,P.jsx)(`div`,{className:`semiont-tags`,children:e.map(e=>(0,P.jsx)(`span`,{className:`semiont-tag semiont-tag--info semiont-tag--rounded-md`,children:e},e))})}),(0,P.jsxs)(`div`,{className:`semiont-entity-tags__input-group`,children:[(0,P.jsx)(`input`,{type:`text`,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&i()},placeholder:l.inputPlaceholder,className:`semiont-entity-tags__input`,disabled:a}),(0,P.jsx)(`button`,{onClick:i,disabled:a||!n.trim(),className:`semiont-button semiont-button--primary`,children:a?l.adding:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(w$,{className:`semiont-icon semiont-icon--small semiont-icon--inline`}),l.addTag]})})]}),t&&(0,P.jsxs)(`div`,{className:`semiont-entity-tags__error`,children:[(0,P.jsx)(u$,{className:`semiont-entity-tags__error-icon`}),t]})]})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(u,{activePanel:c,theme:o,showLineNumbers:s}),(0,P.jsx)(d,{context:`simple`,activePanel:c})]})]})}function n1({isLoading:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,ToolbarPanels:a,Toolbar:o}){return e?(0,P.jsx)(`div`,{className:`semiont-page__loading`,children:(0,P.jsx)(`p`,{className:`semiont-page__loading-text`,children:i.loading})}):(0,P.jsxs)(`div`,{className:`semiont-page${r&&I$.includes(r)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:i.pageTitle}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:i.pageDescription})]}),(0,P.jsxs)(`div`,{className:`semiont-card`,children:[(0,P.jsxs)(`div`,{className:`semiont-recent-docs__header`,children:[(0,P.jsx)(`div`,{className:`semiont-recent-docs__icon-box`,children:(0,P.jsx)(o$,{className:`semiont-recent-docs__icon`})}),(0,P.jsxs)(`div`,{className:`semiont-recent-docs__content`,children:[(0,P.jsx)(`h3`,{className:`semiont-recent-docs__title`,children:i.sectionTitle}),(0,P.jsx)(`p`,{className:`semiont-recent-docs__description`,children:i.sectionDescription})]})]}),(0,P.jsxs)(`div`,{className:`semiont-recent-docs__empty-state`,children:[(0,P.jsx)(`svg`,{className:`semiont-recent-docs__empty-icon`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`})}),(0,P.jsx)(`p`,{className:`semiont-recent-docs__empty-message`,children:i.noDocuments}),(0,P.jsx)(`p`,{className:`semiont-recent-docs__empty-hint`,children:i.activityWillAppear})]})]})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(a,{activePanel:r,theme:t,showLineNumbers:n}),(0,P.jsx)(o,{context:`simple`,activePanel:r})]})]})}var r1={legal:E$,scientific:n$,general:v$},i1={legal:`semiont-schema-domain--legal`,scientific:`semiont-schema-domain--scientific`,general:`semiont-schema-domain--general`};function a1({schemas:e,isLoading:t,theme:n,showLineNumbers:r,activePanel:i,translations:a,ToolbarPanels:o,Toolbar:s}){return t?(0,P.jsx)(`div`,{className:`semiont-page__loading`,children:(0,P.jsx)(`p`,{className:`semiont-page__loading-text`,children:a.loading})}):(0,P.jsxs)(`div`,{className:`semiont-page${i&&I$.includes(i)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:a.pageTitle}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:a.pageDescription})]}),(0,P.jsx)(`div`,{className:`semiont-card-grid semiont-card-grid--two-columns`,children:e.map(e=>{let t=r1[e.domain]||v$,n=i1[e.domain]||i1.general;return(0,P.jsxs)(`div`,{className:`semiont-card`,children:[(0,P.jsxs)(`div`,{className:`semiont-schema__header`,children:[(0,P.jsx)(`div`,{className:`semiont-schema__icon-wrapper ${n}`,children:t&&(0,P.jsx)(t,{className:`semiont-schema__icon`})}),(0,P.jsxs)(`div`,{className:`semiont-schema__content`,children:[(0,P.jsx)(`h3`,{className:`semiont-schema__title`,children:e.name}),(0,P.jsx)(`p`,{className:`semiont-schema__description`,children:e.description}),(0,P.jsx)(`span`,{className:`semiont-schema__badge ${n}`,children:e.domain})]})]}),(0,P.jsxs)(`div`,{className:`semiont-schema__categories`,children:[(0,P.jsx)(`h4`,{className:`semiont-schema__categories-title`,children:a.categories}),e.tags.map(e=>(0,P.jsxs)(`div`,{className:`semiont-schema__category`,children:[(0,P.jsx)(`div`,{className:`semiont-schema__category-name`,children:e.name}),(0,P.jsx)(`div`,{className:`semiont-schema__category-description`,children:e.description}),(0,P.jsxs)(`div`,{className:`semiont-schema__examples`,children:[e.examples.slice(0,2).map((e,t)=>(0,P.jsx)(`span`,{className:`semiont-schema__example`,children:e},t)),e.examples.length>2&&(0,P.jsxs)(`span`,{className:`semiont-schema__example-more`,children:[`+`,e.examples.length-2,` more`]})]})]},e.name))]})]},e.id)})})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(o,{activePanel:i,theme:n,showLineNumbers:r}),(0,P.jsx)(s,{context:`simple`,activePanel:i})]})]})}function o1(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function s1({progress:e,label:t=`Upload`}){if(!e)return null;if(e.phase===`started`)return(0,P.jsxs)(`div`,{className:`semiont-progress-wrapper`,role:`status`,"aria-live":`polite`,children:[(0,P.jsx)(`div`,{className:`semiont-progress__label`,children:(0,P.jsxs)(`span`,{children:[t,`: starting…`]})}),(0,P.jsx)(`div`,{className:`semiont-progress semiont-progress--indeterminate`,children:(0,P.jsx)(`div`,{className:`semiont-progress__fill`})})]});if(e.phase===`progress`){let n=e.totalBytes<=0,r=n?0:Math.min(100,Math.round(e.bytesUploaded/e.totalBytes*100));return(0,P.jsxs)(`div`,{className:`semiont-progress-wrapper`,role:`status`,"aria-live":`polite`,children:[(0,P.jsx)(`div`,{className:`semiont-progress__label`,children:n?(0,P.jsxs)(`span`,{children:[t,`: `,o1(e.bytesUploaded),`…`]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`span`,{children:[t,`: `,r,`%`]}),(0,P.jsxs)(`span`,{children:[o1(e.bytesUploaded),` / `,o1(e.totalBytes)]})]})}),(0,P.jsx)(`div`,{className:`semiont-progress${n?` semiont-progress--indeterminate`:``}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":n?void 0:100,"aria-valuenow":n?void 0:r,children:(0,P.jsx)(`div`,{className:`semiont-progress__fill`,style:n?void 0:{width:`${r}%`}})})]})}return(0,P.jsxs)(`div`,{className:`semiont-progress-wrapper`,role:`status`,"aria-live":`polite`,children:[(0,P.jsx)(`div`,{className:`semiont-progress__label`,children:(0,P.jsxs)(`span`,{children:[t,`: uploaded`]})}),(0,P.jsx)(`div`,{className:`semiont-progress`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":100,children:(0,P.jsx)(`div`,{className:`semiont-progress__fill semiont-progress__fill--success`,style:{width:`100%`}})})]})}function c1({mode:e,cloneData:t,referenceData:n,gatheredContext:r,availableEntityTypes:i,initialLocale:a,theme:o,showLineNumbers:s,hoverDelayMs:c,activePanel:l,onSaveResource:u,onCancel:d,uploadProgress:f=null,translations:p,ToolbarPanels:h,Toolbar:g}){let{announceFormSubmitting:_,announceFormSuccess:v,announceFormError:y}=DE(),[b,x]=(0,m.useState)(``),[S,C]=(0,m.useState)(``),[w,T]=(0,m.useState)([]),[E,D]=(0,m.useState)(!1),[O,k]=(0,m.useState)(`write`),[A,ee]=(0,m.useState)(null),[te,j]=(0,m.useState)(`text/markdown`),[ne,re]=(0,m.useState)(null),[ie,ae]=(0,m.useState)(`text/markdown`),[M,oe]=(0,m.useState)(a),[se,ce]=(0,m.useState)(``),[le,ue]=(0,m.useState)(``),[N,de]=(0,m.useState)(!0);(0,m.useEffect)(()=>{e===`clone`&&t?(x(t.sourceResource.name),C(t.sourceContent)):e===`reference`&&n&&(x(n.name),n.entityTypes.length>0&&T(n.entityTypes))},[e,t,n]);let fe=e=>{let t=e.target.files?.[0];if(t)if(ee(t),j(t.type),k(`upload`),b||x(t.name.replace(/\.[^/.]+$/,``)),Fo(t.type)||Lo(t.type))re(URL.createObjectURL(t));else{let e=new FileReader;e.onload=e=>{let t=e.target?.result;C(t)},e.readAsText(t)}};(0,m.useEffect)(()=>()=>{ne&&URL.revokeObjectURL(ne)},[ne]);let pe=async t=>{if(t.preventDefault(),b.trim()){D(!0),_();try{let t={mode:e,name:b,storageUri:`file://${le}`,content:S,format:A?te:ie,entityTypes:w,language:M};A&&(t.file=A),se&&(t.charset=se),e===`clone`&&(t.archiveOriginal=N),n?.annotationUri&&(t.annotationUri=n.annotationUri),n?.sourceDocumentId&&(t.sourceDocumentId=n.sourceDocumentId),await u(t),v(e===`clone`?`Resource cloned successfully`:e===`reference`?`Reference completed successfully`:`Resource created successfully`)}catch(e){throw y(`Failed to save resource. Please try again.`),e}finally{D(!1)}}},me=e===`clone`,he=e===`reference`;return(0,P.jsxs)(`div`,{className:`semiont-page${l&&I$.includes(l)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content semiont-page__compose`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:me?p.titleEditClone:he?p.titleCompleteReference:p.title}),(me||he)&&(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:me?p.subtitleClone:p.subtitleReference}),he&&(0,P.jsx)(`div`,{className:`semiont-page__reference-notice`,children:(0,P.jsx)(`p`,{className:`semiont-page__reference-notice-text`,children:p.linkedNoticePrefix})})]}),r&&(0,P.jsxs)(`div`,{className:`semiont-form__field`,style:{marginBottom:`1.5rem`,padding:`1rem`,backgroundColor:`var(--semiont-bg-secondary)`,borderRadius:`var(--semiont-radius-md)`,border:`1px solid var(--semiont-border-primary)`},children:[(0,P.jsx)(`h3`,{className:`semiont-form__label`,style:{marginBottom:`0.75rem`},children:`Gathered Context`}),r.sourceContext&&(0,P.jsx)(`div`,{style:{padding:`0.75rem`,backgroundColor:`var(--semiont-bg-primary)`,borderRadius:`var(--semiont-radius-md)`,border:`1px solid var(--semiont-border-primary)`,maxHeight:`150px`,overflowY:`auto`,marginBottom:`0.5rem`},children:(0,P.jsxs)(`div`,{style:{fontSize:`var(--semiont-text-sm)`,fontFamily:`monospace`,whiteSpace:`pre-wrap`,color:`var(--semiont-text-secondary)`},children:[r.sourceContext.before&&(0,P.jsx)(`span`,{children:r.sourceContext.before}),(0,P.jsx)(`span`,{style:{backgroundColor:`var(--semiont-color-primary-100)`,padding:`0 0.25rem`,fontWeight:600,color:`var(--semiont-color-primary-900)`},children:r.sourceContext.selected}),r.sourceContext.after&&(0,P.jsx)(`span`,{children:r.sourceContext.after})]})}),r.graphContext&&r.graphContext.connections&&r.graphContext.connections.length>0&&(0,P.jsxs)(`div`,{style:{padding:`0.5rem 0`,fontSize:`var(--semiont-text-sm)`,color:`var(--semiont-text-secondary)`},children:[(0,P.jsx)(`span`,{style:{fontSize:`var(--semiont-text-xs)`,fontWeight:500,marginRight:`0.5rem`},children:`Connections:`}),r.graphContext.connections.map(e=>(0,P.jsx)(`span`,{className:`semiont-chip`,style:{fontSize:`var(--semiont-text-xs)`,padding:`0.125rem 0.5rem`,marginRight:`0.25rem`},children:e.resourceName},e.resourceId))]})]}),(0,P.jsx)(`div`,{className:`semiont-form`,children:(0,P.jsxs)(`form`,{onSubmit:pe,className:`semiont-form__fields semiont-compose-grid`,children:[(0,P.jsxs)(`div`,{className:`semiont-compose-grid__meta`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`docName`,className:`semiont-form__label`,children:p.resourceName}),(0,P.jsx)(`input`,{id:`docName`,type:`text`,value:b,onChange:e=>x(e.target.value),placeholder:p.resourceNamePlaceholder,className:`semiont-input`,required:!0,disabled:E})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`storagePath`,className:`semiont-form__label`,children:`Save location`}),(0,P.jsxs)(`div`,{className:`semiont-input-addon`,children:[(0,P.jsx)(`span`,{className:`semiont-input-addon__prefix`,children:`file://`}),(0,P.jsx)(`input`,{id:`storagePath`,type:`text`,value:le,onChange:e=>ue(e.target.value),placeholder:`docs/my-resource.md`,required:!0,className:`semiont-input semiont-input--addon`,disabled:E})]})]}),(!he||w.length===0)&&(0,P.jsxs)(`div`,{className:`semiont-form__field semiont-form__entity-types`,children:[(0,P.jsx)(`div`,{className:`semiont-form__label`,children:p.entityTypes}),(0,P.jsx)(`div`,{className:`semiont-form__entity-type-buttons`,role:`group`,"aria-describedby":`entity-types-description`,children:i.map(e=>{let t=w.includes(e);return(0,P.jsx)(`button`,{type:`button`,onClick:()=>{T(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:`semiont-form__entity-type-button`,"data-selected":t,disabled:E,"aria-pressed":t,"aria-label":`${e} entity type, ${t?`selected`:`not selected`}`,children:e},e)})}),w.length>0&&(0,P.jsxs)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:[w.length,` entity type`,w.length===1?``:`s`,` selected: `,w.join(`, `)]})]}),he&&w.length>0&&(0,P.jsxs)(`div`,{className:`semiont-form__field semiont-form__entity-types-display`,role:`region`,"aria-labelledby":`selected-entity-types-label`,children:[(0,P.jsx)(`h3`,{id:`selected-entity-types-label`,className:`semiont-form__label`,children:p.entityTypes}),(0,P.jsx)(`div`,{className:`semiont-form__entity-type-tags`,role:`list`,children:w.map(e=>(0,P.jsx)(`span`,{role:`listitem`,className:`semiont-form__entity-type-tag`,"aria-label":`Entity type: ${e}`,children:e},e))}),(0,P.jsx)(`p`,{className:`semiont-form__helper-text`,id:`reference-entity-types-description`,children:`These entity types were selected when creating the reference`})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`language-select`,className:`semiont-form__label`,children:p.language}),(0,P.jsx)(`select`,{id:`language-select`,value:M,onChange:e=>oe(e.target.value),disabled:E,className:`semiont-select`,children:Co.map(e=>(0,P.jsx)(`option`,{value:e.code,children:e.nativeName},e.code))})]})]}),(0,P.jsxs)(`div`,{className:`semiont-compose-grid__content`,children:[!me&&!he&&(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{className:`semiont-form__label`,children:p.contentSource}),(0,P.jsxs)(`div`,{className:`semiont-form__content-source-toggle`,children:[(0,P.jsxs)(`button`,{type:`button`,onClick:()=>k(`upload`),disabled:E,className:`semiont-form__content-source-button`,"data-active":O===`upload`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__content-source-icon-wrapper`,children:[(0,P.jsx)(`span`,{className:`semiont-form__content-source-icon`,children:`📎`}),(0,P.jsx)(`span`,{className:`semiont-form__content-source-label`,children:p.uploadFile})]}),(0,P.jsx)(`div`,{className:`semiont-form__content-source-description`,children:p.uploadFileDescription})]}),(0,P.jsxs)(`button`,{type:`button`,onClick:()=>k(`write`),disabled:E,className:`semiont-form__content-source-button`,"data-active":O===`write`,children:[(0,P.jsxs)(`div`,{className:`semiont-form__content-source-icon-wrapper`,children:[(0,P.jsx)(`span`,{className:`semiont-form__content-source-icon`,children:`✍️`}),(0,P.jsx)(`span`,{className:`semiont-form__content-source-label`,children:p.writeContent})]}),(0,P.jsx)(`div`,{className:`semiont-form__content-source-description`,children:p.writeContentDescription})]})]})]}),!me&&!he&&O===`upload`&&(0,P.jsxs)(`div`,{className:`semiont-form__upload-section`,children:[(0,P.jsx)(`div`,{children:(0,P.jsxs)(`div`,{className:`semiont-form__upload-container`,children:[(0,P.jsx)(`label`,{className:`semiont-form__upload-dropzone`,children:(0,P.jsxs)(`div`,{className:`semiont-form__upload-area`,children:[(0,P.jsx)(`input`,{type:`file`,accept:`text/plain,text/markdown,image/png,image/jpeg,application/pdf`,onChange:fe,className:`semiont-form__upload-input`,disabled:E}),(0,P.jsx)(`p`,{className:`semiont-form__upload-text`,children:A?A.name:p.dropFileOrClick}),(0,P.jsx)(`p`,{className:`semiont-form__upload-hint`,children:p.supportedFormats})]})}),A&&(0,P.jsx)(`button`,{type:`button`,onClick:()=>{ee(null),re(null),j(`text/markdown`)},className:`semiont-button semiont-button--danger semiont-button--small`,disabled:E,children:`Clear`})]})}),A&&(0,P.jsxs)(`div`,{className:`semiont-form__media-type`,children:[(0,P.jsxs)(`span`,{className:`semiont-form__media-type-label`,children:[p.mediaType,`:`]}),(0,P.jsx)(`code`,{className:`semiont-form__media-type-value`,children:te}),(0,P.jsx)(`span`,{className:`semiont-form__media-type-lock`,title:p.autoDetected,children:`🔒`})]}),A&&ne&&Fo(te)&&(0,P.jsxs)(`div`,{className:`semiont-form__image-preview`,children:[(0,P.jsx)(`p`,{className:`semiont-form__image-preview-label`,children:`Preview:`}),(0,P.jsx)(`div`,{className:`semiont-form__image-preview-container`,children:(0,P.jsx)(`img`,{src:ne,alt:`Upload preview`,className:`semiont-form__image-preview-img`})})]})]}),(me||he||O===`write`)&&(0,P.jsxs)(`div`,{className:`semiont-form__write-section`,children:[!me&&!he&&(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`format-select`,className:`semiont-form__label`,children:p.format}),(0,P.jsxs)(`select`,{id:`format-select`,value:ie,onChange:e=>ae(e.target.value),disabled:E,className:`semiont-select`,children:[(0,P.jsx)(`option`,{value:`text/markdown`,children:`Markdown (text/markdown)`}),(0,P.jsx)(`option`,{value:`text/plain`,children:`Plain Text (text/plain)`}),(0,P.jsx)(`option`,{value:`text/html`,children:`HTML (text/html)`})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__field semiont-form__editor`,children:[(0,P.jsx)(`label`,{className:`semiont-form__label`,children:me?p.resourceContent:p.content}),(0,P.jsx)(`div`,{className:`semiont-form__editor-wrapper`,lang:M,children:(0,P.jsx)(WN,{content:S,editable:!E,sourceView:!0,showLineNumbers:s,hoverDelayMs:c,onChange:e=>C(e)})})]}),!me&&!he&&(0,P.jsxs)(`div`,{className:`semiont-form__field`,children:[(0,P.jsx)(`label`,{htmlFor:`charset-select`,className:`semiont-form__label`,children:p.encoding}),(0,P.jsxs)(`select`,{id:`charset-select`,value:se,onChange:e=>ce(e.target.value),disabled:E,className:`semiont-select`,children:[(0,P.jsx)(`option`,{value:``,children:`UTF-8 (default)`}),(0,P.jsx)(`option`,{value:`iso-8859-1`,children:`ISO-8859-1 (Latin-1)`}),(0,P.jsx)(`option`,{value:`windows-1252`,children:`Windows-1252`}),(0,P.jsx)(`option`,{value:`ascii`,children:`ASCII`}),(0,P.jsx)(`option`,{value:`utf-16le`,children:`UTF-16LE`})]})]})]}),me&&(0,P.jsxs)(`div`,{className:`semiont-form__checkbox-field`,children:[(0,P.jsx)(`input`,{id:`archiveOriginal`,type:`checkbox`,checked:N,onChange:e=>de(e.target.checked),className:`semiont-checkbox`,disabled:E}),(0,P.jsx)(`label`,{htmlFor:`archiveOriginal`,className:`semiont-form__checkbox-label`,children:p.archiveOriginal})]})]}),(0,P.jsxs)(`div`,{className:`semiont-form__actions`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:d,disabled:E||f!==null,className:Lh.tertiary.base,children:p.cancel}),(0,P.jsx)(`button`,{type:`submit`,disabled:E||f!==null||!b.trim(),className:Lh.primary.base,children:E?me?p.saving:he?p.creatingAndLinking:p.creating:me?p.saveClonedResource:he?p.createAndLinkResource:p.createResource})]}),(0,P.jsx)(s1,{progress:f})]})})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(h,{activePanel:l,theme:o,showLineNumbers:s}),(0,P.jsx)(g,{context:`simple`,activePanel:l})]})]})}var l1=m.memo(({resource:e,onOpen:t,tabIndex:n=0,archivedLabel:r,createdLabel:i})=>(0,P.jsxs)(`div`,{onClick:()=>t(e),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),t(e))},role:`button`,tabIndex:n,"aria-label":`Open resource: ${e.name}`,className:`semiont-resource-card`,children:[(0,P.jsxs)(`div`,{className:`semiont-resource-card__header`,children:[(0,P.jsx)(`h4`,{className:`semiont-resource-card__title`,children:e.name}),e.archived&&(0,P.jsx)(`span`,{className:`semiont-resource-card__badge`,"data-type":`archived`,children:r})]}),(0,P.jsxs)(`div`,{className:`semiont-resource-card__metadata`,children:[(0,P.jsxs)(`span`,{className:`semiont-resource-card__date`,children:[i,` `,e.dateCreated?new Date(e.dateCreated).toLocaleDateString():`N/A`]}),e.entityTypes&&e.entityTypes.length>0&&(0,P.jsxs)(`div`,{className:`semiont-tags`,children:[e.entityTypes.slice(0,2).map(e=>(0,P.jsx)(`span`,{className:`semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm`,children:e},e)),e.entityTypes.length>2&&(0,P.jsxs)(`span`,{className:`semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm`,children:[`+`,e.entityTypes.length-2]})]})]})]}));l1.displayName=`ResourceCard`;function u1({recentDocuments:e,searchDocuments:t,entityTypes:n,isLoadingRecent:r,isSearching:i,searchQuery:a,onSearchQueryChange:o,theme:s,showLineNumbers:c,activePanel:l,onNavigateToResource:u,onNavigateToCompose:d,translations:f,ToolbarPanels:p}){let[h,g]=(0,m.useState)(``),_=a.trim()!==``,v=_?t:e,y=h?v.filter(e=>e.entityTypes&&e.entityTypes.includes(h)):v,b=mE(n.length+1,{orientation:`horizontal`}),x=mE(y.length,{orientation:`grid`,cols:2}),S=(0,m.useRef)(u);S.current=u;let C=(0,m.useCallback)(e=>{g(e)},[]),w=(0,m.useCallback)(e=>{let t=po(e);t&&S.current(t)},[]);if(r)return(0,P.jsx)(`div`,{className:`semiont-page__loading`,children:(0,P.jsx)(`p`,{className:`semiont-page__loading-text`,children:f.loadingKnowledgeBase})});let T=_&&t.length===0&&!i;return(0,P.jsxs)(`div`,{className:`semiont-page${l&&I$.includes(l)?` semiont-page--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__content`,children:[(0,P.jsxs)(`div`,{className:`semiont-page__header`,children:[(0,P.jsx)(`h1`,{className:`semiont-page__title`,children:f.title}),(0,P.jsx)(`p`,{className:`semiont-page__subtitle`,children:f.subtitle})]}),(0,P.jsxs)(`div`,{className:`semiont-card`,children:[(0,P.jsx)(`div`,{className:`semiont-card__search-form`,children:(0,P.jsxs)(`div`,{className:`semiont-card__search-wrapper`,children:[(0,P.jsx)(`input`,{type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:f.searchPlaceholder,className:`semiont-card__search-input`,"aria-label":f.searchPlaceholder}),i&&(0,P.jsx)(`span`,{className:`semiont-card__search-status`,"aria-live":`polite`,children:f.searching})]})}),n.length>0&&(0,P.jsxs)(`div`,{className:`semiont-card__filters`,children:[(0,P.jsx)(`h3`,{className:`semiont-card__filters-label`,children:f.filterByEntityType}),(0,P.jsxs)(`div`,{ref:b.containerRef,onKeyDown:b.handleKeyDown,className:`semiont-card__filter-buttons`,role:`group`,"aria-label":`Entity type filters`,children:[(0,P.jsx)(`button`,{onClick:()=>C(``),tabIndex:0,"aria-pressed":h===``,className:`semiont-card__filter-button`,"data-active":h===``,children:f.all}),n.map(e=>(0,P.jsx)(`button`,{onClick:()=>C(e),tabIndex:-1,"aria-pressed":h===e,className:`semiont-card__filter-button`,"data-active":h===e,children:e},e))]})]}),(0,P.jsxs)(`div`,{className:`semiont-card__documents`,children:[(0,P.jsx)(`h3`,{className:`semiont-card__documents-label`,children:_&&t.length>0?f.searchResults(t.length):h?f.documentsTaggedWith(h):f.recentResources}),T&&(0,P.jsx)(`div`,{className:`semiont-card__warning`,children:(0,P.jsx)(`p`,{className:`semiont-card__warning-text`,children:f.noResultsFound(a)})}),y.length>0?(0,P.jsx)(`div`,{ref:x.containerRef,onKeyDown:x.handleKeyDown,className:`semiont-card-grid`,role:`group`,"aria-label":`Document grid`,children:y.map((e,t)=>(0,P.jsx)(l1,{resource:e,onOpen:w,tabIndex:t===0?0:-1,archivedLabel:f.archived,createdLabel:f.created},po(e)))}):(0,P.jsxs)(`div`,{className:`semiont-card__empty`,children:[(0,P.jsx)(`p`,{className:`semiont-card__empty-text`,children:f.noResourcesAvailable}),!_&&(0,P.jsx)(`button`,{onClick:d,className:`semiont-card__empty-button`,children:f.composeFirstResource})]})]})]})]}),(0,P.jsxs)(`div`,{className:`semiont-page__sidebar`,children:[(0,P.jsx)(p,{activePanel:l,theme:s,showLineNumbers:c}),(0,P.jsx)(ZN,{context:`simple`,activePanel:l})]})]})}function d1(e){let t=K(R().activeSession$)?.client,[n,r]=(0,m.useState)(void 0),[i,a]=(0,m.useState)(!0);return(0,m.useEffect)(()=>{if(!t||!e){a(!1);return}let n=!1;a(!0),t.auth.mediaToken(e).then(({token:e})=>{n||(r(e),a(!1))}).catch(()=>{n||a(!1)});let i=setInterval(()=>{t.auth.mediaToken(e).then(({token:e})=>{n||r(e)}).catch(()=>{})},240*1e3);return()=>{n=!0,clearInterval(i)}},[t,e]),{token:n,loading:i}}var f1=u(Qm(),1),p1={open:!1,annotationId:null,resourceId:null,defaultTitle:``,entityTypes:[]};function m1(e,t,n,r,i){let a=zu(),o=Vu(e),s=qu(e,t),c=Uu(e,t),l=Wu(e,t),u=Gu(e,t,n);a.add(o),a.add(r),a.add(s),a.add(c),a.add(l),a.add(u);let d=e.browse.annotations(t).pipe((0,f1.map)(e=>e??[])),f=d.pipe((0,f1.map)(e=>{let t={highlights:[],comments:[],assessments:[],references:[],tags:[]};for(let n of e)no(n)?t.highlights.push(n):ao(n)?t.comments.push(n):io(n)?t.assessments.push(n):ro(n)?t.references.push(n):oo(n)&&t.tags.push(n);return t})),p=e.browse.entityTypes().pipe((0,f1.map)(e=>e??[])),m=e.browse.events(t).pipe((0,f1.map)(e=>e??[])),h=e.browse.referencedBy(t).pipe((0,f1.map)(e=>e??[])),g=new f1.BehaviorSubject(``),_=new f1.BehaviorSubject(!1),v=new f1.BehaviorSubject(null),y=i?.mediaType||`text/plain`,b=y.startsWith(`image/`)||y===`application/pdf`;!b&&y&&(_.next(!0),e.browse.resourceRepresentation(t,{accept:y}).then(({data:e})=>{g.next(Po(e,y)),_.next(!1)}).catch(()=>{_.next(!1)})),b&&e.auth.mediaToken(t).then(({token:e})=>v.next(e)).catch(()=>{});let x=new f1.BehaviorSubject(p1),S=e.subscribeToResource(t);a.add(S);let C=e.bus.get(`bind:initiate`).subscribe(t=>{x.next({open:!0,annotationId:t.annotationId,resourceId:t.resourceId,defaultTitle:t.defaultTitle,entityTypes:t.entityTypes}),e.bus.get(`gather:requested`).next({correlationId:crypto.randomUUID(),annotationId:t.annotationId,resourceId:t.resourceId,options:{contextWindow:2e3}})});return a.add(()=>C.unsubscribe()),{beckon:o,browse:r,mark:s,gather:c,yield:u,annotations$:d,annotationGroups$:f,entityTypes$:p,events$:m,referencedBy$:h,content$:g.asObservable(),contentLoading$:_.asObservable(),mediaToken$:v.asObservable(),wizard$:x.asObservable(),closeWizard:()=>x.next(p1),dispose:()=>{x.complete(),g.complete(),_.complete(),v.complete(),a.dispose()}}}function h1(){return typeof window>`u`?null:localStorage.getItem(`activeToolbarPanel`)||`knowledge-base`}function g1(e){typeof window>`u`||(e?localStorage.setItem(`activeToolbarPanel`,e):localStorage.removeItem(`activeToolbarPanel`))}function _1(){let e=R();return iE(()=>z$(e,{initialPanel:h1(),onPanelChange:g1}))}function v1({resource:e,rUri:t,locale:n,Link:r,routes:i,ToolbarPanels:a,refetchDocument:o,streamStatus:s,knowledgeBaseName:c}){let l=hh(`ReferenceWizard`),u=R(),d=K(u.activeSession$),f=d?.client,{showError:p,showSuccess:h,showInfo:g}=sh(),{theme:_,setTheme:v}=vE(),{showLineNumbers:y,toggleLineNumbers:b}=lE(),{hoverDelayMs:x}=dE(),{triggerSparkleAnimation:S,clearNewAnnotationId:C}=jE(),w=Ro(ho(e)||`text/plain`)===`image`,{content:T,loading:E}=bE(t,e,!w),{token:D,loading:O}=d1(t),k=w&&D&&f?`${f.baseUrl}/api/resources/${t}?token=${D}`:``,A=w?k:T,ee=w?O:E,te=_1(),j=iE(()=>m1(f,t,n,te)),ne=K(j.annotations$)??[],re=K(j.annotationGroups$),ie=K(j.entityTypes$)??[],ae=K(j.referencedBy$),M=ae??[],oe=ae===void 0,se=K(j.beckon.hoveredAnnotationId$)??null,ce=K(j.mark.pendingAnnotation$)??null,le=K(j.mark.assistingMotivation$)??null,ue=K(j.mark.progress$)??null,N=K(j.browse.activePanel$)??null,de=K(j.browse.scrollToAnnotationId$)??null,fe=K(j.browse.panelInitialTab$)??null,pe=j.browse.onScrollCompleted,me=K(j.yield.progress$)??null,he=K(j.gather.context$)??null,ge=K(j.gather.loading$)??!1,_e=K(j.gather.error$)??null,ve=K(j.wizard$),ye=ve?.open??!1,be=ve?.annotationId??null,xe=ve?.resourceId??null,Se=ve?.defaultTitle??``,Ce=ve?.entityTypes??[],we=(0,m.useCallback)(()=>{j.closeWizard()},[j]),Te=(0,m.useCallback)((t,n)=>{C(za(t)),j.yield.generate(t,{title:n.title,storageUri:n.storagePath,prompt:n.prompt,language:n.language,sourceLanguage:go(e),temperature:n.temperature,maxTokens:n.maxTokens,context:n.context})},[j,C,e]),Ee=(0,m.useCallback)(async(e,n)=>{if(f)try{await f.bind.body(t,za(e),[{op:`add`,item:{type:`SpecificResource`,source:n,purpose:`linking`}}]),h(`Reference linked successfully`)}catch(e){p(`Failed to link reference: ${e instanceof Error?e.message:String(e)}`)}},[t,f,h,p]),De=(0,m.useCallback)((e,t,n,r,i)=>{sessionStorage.setItem(`gather-context:${t}`,JSON.stringify(e));let a=new URLSearchParams({annotationUri:t,sourceDocumentId:n,name:r,entityTypes:i.join(`,`)});u.emit(`nav:push`,{path:`/know/compose?${a.toString()}`,reason:`compose-from-wizard`})},[d]);(0,m.useEffect)(()=>{if(e&&t){let n=ho(e);u.addOpenResource(t,e.name,n||void 0,e.storageUri),typeof localStorage<`u`&&localStorage.setItem(`lastViewedDocumentId`,t)}},[e,t,u]),(0,m.useEffect)(()=>{ce&&u.emit(`panel:open`,{panel:`annotations`})},[ce,u]);let Oe=(0,m.useCallback)(async()=>{if(f)try{await f.mark.archive(t),await o()}catch(e){console.error(`Failed to archive document:`,e),p(`Failed to archive document`)}},[f,t,o,p]),ke=(0,m.useCallback)(async()=>{if(f)try{await f.mark.unarchive(t),await o()}catch(e){console.error(`Failed to unarchive document:`,e),p(`Failed to unarchive document`)}},[f,t,o,p]),Ae=(0,m.useCallback)(async()=>{if(f)try{let e=(await f.yield.cloneToken(t)).token;u.emit(`nav:push`,{path:`/know/compose?mode=clone&token=${e}`,reason:`clone`})}catch(e){console.error(`Failed to generate clone token:`,e),p(`Failed to generate clone link`)}},[f,t,p,d]),je=(0,m.useCallback)(({annotationId:e})=>{S(e)},[S]),Me=(0,m.useCallback)(e=>{S(e.payload.annotation.id)},[S]),Ne=(0,m.useCallback)(({message:e})=>p(`Failed to create annotation: ${e||`unknown error`}`),[p]),Pe=(0,m.useCallback)(({message:e})=>p(`Failed to delete annotation: ${e||`unknown error`}`),[p]),Fe=(0,m.useCallback)(()=>{},[]),Ie=(0,m.useCallback)(({message:e})=>p(`Failed to update reference: ${e}`),[p]),Le=(0,m.useCallback)(({theme:e})=>v(e),[v]),Re=(0,m.useCallback)(t=>{if(t.resourceId===e.id)if(t.jobType===`generation`){let e=t.result?.resourceName;h(e?`Resource "${e}" created successfully!`:`Resource created successfully!`)}else h(`Annotation complete`)},[e.id,h]),ze=(0,m.useCallback)(t=>{t.resourceId===e.id&&(t.jobType===`generation`?p(`Resource generation failed: ${t.error}`):p(t.error||`Annotation failed`))},[e.id,p]),Be=(0,m.useCallback)(({resourceId:e})=>{if(i.resourceDetail){let t=i.resourceDetail(e);u.emit(`nav:push`,{path:t,reason:`reference-link`})}},[i.resourceDetail,d]),Ve=(0,m.useCallback)(({entityType:e})=>{if(i.know){let t=`${i.know}?entityType=${encodeURIComponent(e)}`;u.emit(`nav:push`,{path:t,reason:`entity-type-filter`})}},[i.know,d]);SE({"mark:mode-toggled":(0,m.useCallback)(()=>{Ye(e=>!e)},[]),"mark:archive":Oe,"mark:unarchive":ke,"yield:clone":Ae,"beckon:sparkle":je,"mark:added":Me,"mark:create-failed":Ne,"mark:delete-failed":Pe,"mark:body-updated":Fe,"bind:body-update-failed":Ie,"settings:theme-changed":Le,"settings:line-numbers-toggled":b,"job:complete":Re,"job:fail":ze,"mark:assist-cancelled":()=>g(`Annotation cancelled`),"browse:reference-navigate":Be,"browse:entity-type-clicked":Ve});let{announceResourceLoading:He,announceResourceLoaded:Ue}=EE();(0,m.useEffect)(()=>{ee?He(e.name):A&&Ue(e.name)},[ee,A,e.name,He,Ue]);let We=e.entityTypes||[],Ge=mo(e),Ke=Ge?.mediaType,qe=Ge?.byteSize,[Je,Ye]=(0,m.useState)(()=>typeof window<`u`?localStorage.getItem(`annotateMode`)===`true`:!1),Xe={...e,content:A},Ze=(0,m.useCallback)(e=>{e&&d?.client.beckon.sparkle(za(e))},[d]),Qe=(0,m.useCallback)(e=>{},[]);return(0,P.jsxs)(`div`,{className:`semiont-document-viewer${N?` semiont-document-viewer--panel-open`:``}`,children:[(0,P.jsxs)(`div`,{className:`semiont-document-viewer__main`,children:[(0,P.jsxs)(`div`,{className:`semiont-document-viewer__content`,children:[(0,P.jsx)(`div`,{className:`semiont-document-viewer__header`,children:(0,P.jsx)(`div`,{className:`semiont-document-viewer__header-inner`,children:(0,P.jsx)(`h2`,{className:`semiont-document-viewer__title`,children:e.name})})}),(0,P.jsx)(`div`,{className:`semiont-document-viewer__scrollable-body`,lang:go(e)||void 0,children:(0,P.jsx)(KN,{fallback:(e,t)=>(0,P.jsxs)(`div`,{className:`semiont-document-viewer__error`,children:[(0,P.jsx)(`h3`,{className:`semiont-document-viewer__error-title`,children:`Error loading document viewer`}),(0,P.jsx)(`p`,{className:`semiont-document-viewer__error-message`,children:e.message}),(0,P.jsx)(`button`,{onClick:t,className:`semiont-document-viewer__error-button`,children:`Try again`})]}),children:ee?(0,P.jsx)(`div`,{className:`semiont-document-viewer__loading`,children:`Loading document content...`}):(0,P.jsx)(kJ,{resource:Xe,annotations:re??{highlights:[],comments:[],assessments:[],references:[],tags:[]},generatingReferenceId:me?.annotationId??null,showLineNumbers:y,hoverDelayMs:x,hoveredAnnotationId:se})})})]}),(0,P.jsxs)(`div`,{className:`semiont-document-viewer__sidebar`,children:[(0,P.jsxs)(a,{activePanel:N,theme:_,showLineNumbers:y,width:N===`jsonld`?`w-[600px]`:N===`annotations`?`w-[400px]`:`w-64`,children:[Je&&e.archived&&(0,P.jsx)(`div`,{className:`semiont-document-viewer__archived-status`,children:(0,P.jsx)(`div`,{className:`semiont-document-viewer__archived-text`,children:`📦 Archived`})}),N===`annotations`&&!e.archived&&(0,P.jsx)(sY,{annotations:ne,annotators:Ih,annotateMode:Je,assistingMotivation:le,progress:ue,pendingAnnotation:ce,allEntityTypes:ie,generatingReferenceId:me?.annotationId??null,referencedBy:M,referencedByLoading:oe,resourceId:t,locale:n,sourceLanguage:go(e),scrollToAnnotationId:de,hoveredAnnotationId:se,onScrollCompleted:pe,initialTab:fe?.tab,initialTabGeneration:fe?.generation,Link:r,routes:i}),N===`history`&&(0,P.jsx)(UR,{rUri:t,hoveredAnnotationId:se,onEventHover:Ze,onEventClick:Qe,Link:r,routes:i}),N===`info`&&(0,P.jsx)(tY,{resourceId:t,documentEntityTypes:We,documentLocale:go(e),primaryMediaType:Ke,primaryByteSize:qe,storageUri:e.storageUri,isArchived:e.archived??!1,dateCreated:e.dateCreated,dateModified:e.dateModified,wasAttributedTo:e.wasAttributedTo,wasDerivedFrom:e.wasDerivedFrom,generator:e.generator}),N===`collaboration`&&(0,P.jsx)(zJ,{state:s,eventCount:0,knowledgeBaseName:c}),N===`jsonld`&&(0,P.jsx)(qJ,{resource:e})]}),(0,P.jsx)(ZN,{context:`document`,activePanel:N,isArchived:e.archived??!1})]})]}),(0,P.jsx)(zQ,{isOpen:ye,onClose:we,annotationId:be,resourceId:xe,defaultTitle:Se,entityTypes:Ce,locale:n,context:he,contextLoading:ge,contextError:_e,onGenerateSubmit:Te,onLinkResource:Ee,onComposeNavigate:De,translations:{gatherTitle:l(`gatherTitle`),configureGenerationTitle:l(`configureGenerationTitle`),configureSearchTitle:l(`configureSearchTitle`),searchResultsTitle:l(`searchResultsTitle`),sourceContextLabel:l(`sourceContextLabel`),connectionsLabel:l(`connectionsLabel`),citedByLabel:l(`citedByLabel`),userHintLabel:l(`userHintLabel`),userHintPlaceholder:l(`userHintPlaceholder`),loadingContext:l(`loadingContext`),failedContext:l(`failedContext`),cancel:l(`cancel`),search:l(`search`),searching:l(`searching`),generate:l(`generate`),compose:l(`compose`),resolutionStrategyLabel:l(`resolutionStrategyLabel`),back:l(`back`),link:l(`link`),score:l(`score`),noResults:l(`noResults`),resourceTitle:l(`resourceTitle`),resourceTitlePlaceholder:l(`resourceTitlePlaceholder`),additionalInstructions:l(`additionalInstructions`),additionalInstructionsPlaceholder:l(`additionalInstructionsPlaceholder`),language:l(`language`),languageHelp:l(`languageHelp`),creativity:l(`creativity`),creativityFocused:l(`creativityFocused`),creativityCreative:l(`creativityCreative`),maxLength:l(`maxLength`),maxLengthHelp:l(`maxLengthHelp`),maxResults:l(`maxResults`),semanticScoring:l(`semanticScoring`),semanticScoringHelp:l(`semanticScoringHelp`)}})]})}var y1=u(Qm(),1);function b1(e){let t=new y1.BehaviorSubject(!1);return{isLoggingOut$:t.asObservable(),logout:async()=>{t.next(!0);try{await e.auth.logout()}catch{}finally{t.next(!1)}},dispose:()=>{t.complete()}}}var x1=u(Qm(),1);function S1(e,t,n,r){let i=zu();i.add(t);let a=!!(n.annotationUri&&n.sourceDocumentId&&n.name),o=n.mode===`clone`&&!!n.token,s=o?`clone`:a?`reference`:`new`,c=new x1.BehaviorSubject(s),l=new x1.BehaviorSubject(!0),u=new x1.BehaviorSubject(null),d=new x1.BehaviorSubject(null),f=new x1.BehaviorSubject(null),p=new x1.BehaviorSubject(null),m=e.browse.entityTypes().pipe((0,x1.map)(e=>e??[]));if(a){let e=n.entityTypes?n.entityTypes.split(`,`):[];if(d.next({annotationUri:n.annotationUri,sourceDocumentId:n.sourceDocumentId,name:n.name,entityTypes:e}),n.storedContext)try{f.next(JSON.parse(n.storedContext))}catch{}l.next(!1)}else o?(async()=>{try{let t=await e.yield.fromToken(n.token);if(t&&r){let n=Ra(t[`@id`]),r=ho(t)||`text/plain`,{data:i}=await e.browse.resourceRepresentation(n,{accept:r}),a=Po(i,r);u.next({sourceResource:t,sourceContent:a})}}catch{}l.next(!1)})():l.next(!1);return{browse:t,mode$:c.asObservable(),loading$:l.asObservable(),cloneData$:u.asObservable(),referenceData$:d.asObservable(),gatheredContext$:f.asObservable(),entityTypes$:m,uploadProgress$:p.asObservable(),save:async t=>{if(t.mode===`clone`)return(await e.yield.createFromToken({token:n.token,name:t.name,content:t.content,archiveOriginal:t.archiveOriginal??!0})).resourceId;let r,i;if(t.file)r=t.file,i=t.format??`application/octet-stream`;else{let e=new Blob([t.content||``],{type:t.format??`application/octet-stream`}),n=t.format===`text/plain`?`.txt`:t.format===`text/html`?`.html`:`.md`;r=new File([e],t.name+n,{type:t.format??`application/octet-stream`}),i=t.format??`application/octet-stream`}let a=t.charset&&!t.file?`${i}; charset=${t.charset}`:i,o=await new Promise((n,i)=>{e.yield.resource({name:t.name,file:r,format:a,entityTypes:t.entityTypes||[],language:t.language,storageUri:t.storageUri}).subscribe({next:e=>{p.next(e),e.phase===`finished`&&n(e.resourceId)},error:e=>{p.next(null),i(e)},complete:()=>p.next(null)})});return t.mode===`reference`&&t.annotationUri&&t.sourceDocumentId&&await e.bind.body(Ra(t.sourceDocumentId),za(t.annotationUri),[{op:`add`,item:{type:`SpecificResource`,source:o,purpose:`linking`}}]),o},dispose:()=>{c.complete(),l.complete(),u.complete(),d.complete(),f.complete(),i.dispose()}}}var C1=u(Qm(),1);function w1(e,t){let n=e.browse.resource(t);return{resource$:n,isLoading$:n.pipe((0,C1.map)(e=>e===void 0)),invalidate:()=>e.browse.invalidateResourceDetail(t),dispose:()=>{}}}var T1=u(Qm(),1);function E1(e,t){let n=zu();n.add(t);let r=new T1.BehaviorSubject([]),i=new T1.BehaviorSubject(null),a=new T1.BehaviorSubject(!0),o=new T1.BehaviorSubject(!0),s=()=>{a.next(!0),e.admin.users().then(e=>{r.next(e.users??[]),a.next(!1)}).catch(()=>a.next(!1))},c=()=>{o.next(!0),e.admin.userStats().then(e=>{i.next(e.stats??null),o.next(!1)}).catch(()=>o.next(!1))};return s(),c(),{browse:t,users$:r.asObservable(),stats$:i.asObservable(),usersLoading$:a.asObservable(),statsLoading$:o.asObservable(),updateUser:async(t,n)=>{await e.admin.updateUser(Fa(t),n),s(),c()},dispose:()=>{r.complete(),i.complete(),a.complete(),o.complete(),n.dispose()}}}var D1=u(Qm(),1);function O1(e,t){let n=zu();n.add(t);let r=new D1.BehaviorSubject([]),i=new D1.BehaviorSubject([]),a=new D1.BehaviorSubject(!0);return e.admin.oauthConfig().then(e=>{let t=e;r.next(t.providers??[]),i.next(t.allowedDomains??[]),a.next(!1)}).catch(()=>a.next(!1)),{browse:t,providers$:r.asObservable(),allowedDomains$:i.asObservable(),isLoading$:a.asObservable(),dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}var k1=u(Qm(),1),A1=u(Fh(),1);function j1(e,t,n){let r=zu();r.add(e);let i=new k1.BehaviorSubject(null),a=new k1.BehaviorSubject(null),o=new k1.BehaviorSubject(null),s=new k1.BehaviorSubject(void 0),c=new k1.BehaviorSubject(void 0),l=new k1.BehaviorSubject(!1),u=new k1.BehaviorSubject(!1);return{browse:e,selectedFile$:i.asObservable(),preview$:a.asObservable(),importPhase$:o.asObservable(),importMessage$:s.asObservable(),importResult$:c.asObservable(),isExporting$:l.asObservable(),isImporting$:u.asObservable(),selectFile:e=>{i.next(e),o.next(null),s.next(void 0),c.next(void 0),a.next({format:e.name.endsWith(`.tar.gz`)||e.name.endsWith(`.gz`)?`semiont-linked-data`:`unknown`,version:1,sourceUrl:``,stats:{}})},cancelImport:()=>{i.next(null),a.next(null),o.next(null),s.next(void 0),c.next(void 0)},doExport:async()=>{l.next(!0);try{let e=await t();return{blob:await new Response(e.stream).blob(),filename:e.filename??`semiont-export-${Date.now()}.tar.gz`}}finally{l.next(!1)}},doImport:async()=>{let e=i.getValue();if(e){u.next(!0),o.next(`started`),s.next(void 0),c.next(void 0);try{await(0,k1.lastValueFrom)(n(e).pipe((0,A1.tap)(e=>{o.next(e.phase),s.next(e.message),e.result&&c.next(e.result)})))}finally{u.next(!1)}}},dispose:()=>{i.complete(),a.complete(),o.complete(),s.complete(),c.complete(),l.complete(),u.complete(),r.dispose()}}}var M1=u(Qm(),1);function N1(e){let t=zu(),n=new M1.BehaviorSubject(null),r=new M1.BehaviorSubject(!1);return e.auth.me().then(e=>n.next(e)).catch(()=>{}),{userData$:n.asObservable(),isProcessing$:r.asObservable(),acceptTerms:async()=>{r.next(!0);try{await e.auth.acceptTerms(),n.next({...n.getValue(),termsAcceptedAt:new Date().toISOString()})}finally{r.next(!1)}},dispose:()=>{n.complete(),r.complete(),t.dispose()}}}var P1=u(Qm(),1),F1=10,I1=20;function L1(e,t){let n=zu(),r=Bu(t=>e.browse.resources({search:t,limit:I1}));n.add(r),n.add(t);let i=e.browse.resources({limit:F1,archived:!1}),a=i.pipe((0,P1.map)(e=>e??[])),o=i.pipe((0,P1.map)(e=>e===void 0));return{browse:t,search:r,recentResources$:a,entityTypes$:e.browse.entityTypes().pipe((0,P1.map)(e=>e??[])),isLoadingRecent$:o,dispose:()=>n.dispose()}}var R1=u(Qm(),1);function z1(e,t){let n=zu();n.add(t);let r=new R1.BehaviorSubject(``),i=new R1.BehaviorSubject(``),a=new R1.BehaviorSubject(!1),o=e.browse.entityTypes();return{browse:t,entityTypes$:o.pipe((0,R1.map)(e=>e??[])),isLoading$:o.pipe((0,R1.map)(e=>e===void 0)),newTag$:r.asObservable(),error$:i.asObservable(),isAdding$:a.asObservable(),setNewTag:e=>r.next(e),addTag:async()=>{let t=r.getValue().trim();if(t){i.next(``),a.next(!0);try{await e.frame.addEntityType(t),r.next(``)}catch(e){i.next(e instanceof Error?e.message:`Failed to add entity type`)}finally{a.next(!1)}}},dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}function B1({children:e}){return(0,P.jsxs)(JN,{resetKeys:[et().pathname],children:[(0,P.jsx)(OR,{}),(0,P.jsx)(DR,{}),e]})}var V1=m.lazy(()=>b(()=>import(`./layout-DolG9tOf.js`),__vite__mapDeps([6,3,7,8,4,5]))),H1=m.lazy(()=>b(()=>import(`./page-D6oe9LkY.js`),__vite__mapDeps([9,3,8,4,5]))),U1=m.lazy(()=>b(()=>import(`./page-6YupxiP8.js`),__vite__mapDeps([10,3,11,7,8,4,5,12,13]))),W1=m.lazy(()=>b(()=>import(`./page-CXVPWK3i.js`),__vite__mapDeps([14,3,11,7,8,4,5,12,13]))),G1=m.lazy(()=>b(()=>import(`./page-A6_MoyUb2.js`),__vite__mapDeps([15,3,11,7,8,4,5,12,13]))),K1=m.lazy(()=>b(()=>import(`./page-DbwiMF1N.js`),__vite__mapDeps([16,3,8,4,5]))),q1=m.lazy(()=>b(()=>import(`./page-BrSlkHj9.js`),__vite__mapDeps([17,3,11,7,8,4,5,12,13]))),J1=m.lazy(()=>b(()=>import(`./page-C5gTlI4M.js`),__vite__mapDeps([18,3,11,7,8,4,5,12,13]))),Y1=m.lazy(()=>b(()=>import(`./page-Bl8sZu8k.js`),__vite__mapDeps([19,3,8,4,5]))),X1=m.lazy(()=>b(()=>import(`./layout-xDEqzpvE.js`),__vite__mapDeps([20,3,11,7,8,4,5,12,21,13,22]))),Z1=m.lazy(()=>b(()=>import(`./page-7cCGgkUd.js`),__vite__mapDeps([23,3,8,4,5]))),Q1=m.lazy(()=>b(()=>import(`./page-B9EYfbrY.js`),__vite__mapDeps([24,3,21,8,4,5,12]))),$1=m.lazy(()=>b(()=>import(`./page-BioSV21A.js`),__vite__mapDeps([25,3,21,8,4,5,12]))),e0=m.lazy(()=>b(()=>import(`./page-DVCVvH_S.js`),__vite__mapDeps([26,3,21,8,4,5,12,13]))),t0=m.lazy(()=>b(()=>import(`./layout-BhnmJA6O.js`),__vite__mapDeps([27,3,11,7,8,4,5,12,13,28,22,29]))),n0=m.lazy(()=>b(()=>import(`./page-BOhOKDMk.js`),__vite__mapDeps([30,8,3,4,5]))),r0=m.lazy(()=>b(()=>import(`./client-uEoQ8iJO.js`),__vite__mapDeps([31,3,21,8,4,5,12]))),i0=m.lazy(()=>b(()=>import(`./client-DkMJxPA7.js`),__vite__mapDeps([32,3,21,8,4,5,12]))),a0=m.lazy(()=>b(()=>import(`./client-DvALJ3DL.js`),__vite__mapDeps([33,3,21,8,4,5,12]))),o0=m.lazy(()=>b(()=>import(`./page-D0bYoQZI.js`),__vite__mapDeps([34,3,21,8,4,5,12,29]))),s0=m.lazy(()=>b(()=>import(`./layout-e6QyrD0Y.js`),__vite__mapDeps([35,3,11,7,8,4,5,12,13,28,22]))),c0=m.lazy(()=>b(()=>import(`./page-D1veR3Kp.js`),__vite__mapDeps([36,3,8,4,5]))),l0=m.lazy(()=>b(()=>import(`./page-8sXDEos5.js`),__vite__mapDeps([37,3,21,8,4,5,12]))),u0=m.lazy(()=>b(()=>import(`./page-CkHE2rPM.js`),__vite__mapDeps([38,3,21,8,4,5,12]))),d0=m.lazy(()=>b(()=>import(`./page-CXhfUrZM.js`),__vite__mapDeps([39,3,21,8,4,5,12]))),f0=m.lazy(()=>b(()=>import(`./client-DxlEW_QJ.js`),__vite__mapDeps([40,3,21,8,4,5,12]))),p0=m.lazy(()=>b(()=>import(`./not-found-4iuCkpA7.js`),__vite__mapDeps([41,3,8,4,5])));function m0({children:e}){let{locale:t}=st(),{i18n:n}=r();return(0,m.useEffect)(()=>{if(!t)return;let e=vr(t)?t:`en`;n.language!==e&&n.changeLanguage(e)},[t,n]),!t||!vr(t)?(0,P.jsx)(jt,{to:`/en`,replace:!0}):(0,P.jsx)(P.Fragment,{children:e})}function h0(){return(0,P.jsx)(B1,{children:(0,P.jsx)(Mt,{})})}function g0(){let e=rt();return(0,m.useEffect)(()=>{let t=navigator.language.split(`-`)[0]??`en`;e(`/${vr(t)?t:`en`}`,{replace:!0})},[e]),null}function _0(){return(0,P.jsx)(m.Suspense,{fallback:null,children:(0,P.jsxs)(Ft,{children:[(0,P.jsx)(Nt,{path:`/`,element:(0,P.jsx)(g0,{})}),(0,P.jsxs)(Nt,{path:`/:locale`,element:(0,P.jsx)(m0,{children:(0,P.jsx)(V1,{})}),children:[(0,P.jsx)(Nt,{index:!0,element:(0,P.jsx)(H1,{})}),(0,P.jsx)(Nt,{path:`about`,element:(0,P.jsx)(U1,{})}),(0,P.jsx)(Nt,{path:`privacy`,element:(0,P.jsx)(W1,{})}),(0,P.jsx)(Nt,{path:`terms`,element:(0,P.jsx)(G1,{})}),(0,P.jsx)(Nt,{path:`auth/connect`,element:(0,P.jsx)(K1,{})}),(0,P.jsx)(Nt,{path:`auth/signup`,element:(0,P.jsx)(q1,{})}),(0,P.jsx)(Nt,{path:`auth/error`,element:(0,P.jsx)(J1,{})}),(0,P.jsxs)(Nt,{element:(0,P.jsx)(h0,{}),children:[(0,P.jsx)(Nt,{path:`auth/welcome`,element:(0,P.jsx)(Y1,{})}),(0,P.jsxs)(Nt,{path:`know`,element:(0,P.jsx)(X1,{}),children:[(0,P.jsx)(Nt,{index:!0,element:(0,P.jsx)(Z1,{})}),(0,P.jsx)(Nt,{path:`discover`,element:(0,P.jsx)(Q1,{})}),(0,P.jsx)(Nt,{path:`compose`,element:(0,P.jsx)($1,{})}),(0,P.jsx)(Nt,{path:`resource/:id`,element:(0,P.jsx)(e0,{})})]}),(0,P.jsxs)(Nt,{path:`admin`,element:(0,P.jsx)(t0,{}),children:[(0,P.jsx)(Nt,{index:!0,element:(0,P.jsx)(n0,{})}),(0,P.jsx)(Nt,{path:`users`,element:(0,P.jsx)(r0,{})}),(0,P.jsx)(Nt,{path:`security`,element:(0,P.jsx)(i0,{})}),(0,P.jsx)(Nt,{path:`exchange`,element:(0,P.jsx)(a0,{})}),(0,P.jsx)(Nt,{path:`devops`,element:(0,P.jsx)(o0,{})})]}),(0,P.jsxs)(Nt,{path:`moderate`,element:(0,P.jsx)(s0,{}),children:[(0,P.jsx)(Nt,{index:!0,element:(0,P.jsx)(c0,{})}),(0,P.jsx)(Nt,{path:`recent`,element:(0,P.jsx)(l0,{})}),(0,P.jsx)(Nt,{path:`entity-tags`,element:(0,P.jsx)(u0,{})}),(0,P.jsx)(Nt,{path:`tag-schemas`,element:(0,P.jsx)(d0,{})}),(0,P.jsx)(Nt,{path:`linked-data`,element:(0,P.jsx)(f0,{})})]})]}),(0,P.jsx)(Nt,{path:`*`,element:(0,P.jsx)(p0,{})})]}),(0,P.jsx)(Nt,{path:`*`,element:(0,P.jsx)(jt,{to:`/en`,replace:!0})})]})})}var v0={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_OTEL_OTLP_ENDPOINT;v0&&b(async()=>{let{initObservabilityWeb:e}=await import(`./web-Dr6mdA1A.js`);return{initObservabilityWeb:e}},[]).then(({initObservabilityWeb:e})=>{e({serviceName:`semiont-frontend`,otlpEndpoint:v0})});var y0=document.getElementById(`root`);if(!y0)throw Error(`Root element not found`);g.createRoot(y0).render((0,P.jsx)(m.StrictMode,{children:(0,P.jsx)(wn,{children:(0,P.jsx)(_0,{})})}));export{hE as $,a1 as A,Ra as At,j1 as B,WQ as C,Cc as Ct,uY as D,Js as Dt,Z$ as E,tc as Et,O1 as F,et as Ft,rE as G,b1 as H,E1 as I,rt as It,dE as J,cE as K,S1 as L,st as Lt,ZN as M,Dn as Mt,e1 as N,jt as Nt,GQ as O,La as Ot,Lh as P,Mt as Pt,pE as Q,L1 as R,Fn as Rt,v1 as S,Pc as St,QN as T,nc as Tt,N1 as U,w1 as V,aE as W,lE as X,sE as Y,K as Z,XN as _,il as _t,$$ as a,mh as at,u1 as b,Kc as bt,$Q as c,uu as ct,ER as d,Eu as dt,_1 as et,YQ as f,Bl as ft,n1 as g,al as gt,XQ as h,_l as ht,Y$ as i,oh as it,_E as j,vr as jt,KQ as k,to as kt,t1 as l,Hu as lt,TE as m,yl as mt,G$ as n,vE as nt,I$ as o,R as ot,q$ as p,zl as pt,SE as q,K$ as r,th as rt,NQ as s,sh as st,B$ as t,iE as tt,cY as u,wu as ut,AE as v,rl as vt,qQ as w,rc as wt,e$ as x,Fc as xt,c1 as y,Jc as yt,z1 as z};
|
|
141
|
+
//# sourceMappingURL=index-DjtRDlfn.js.map
|