@vellumai/web 0.0.1 → 0.8.6
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/assets/{QueryClientProvider-3h1PDgiK.js → QueryClientProvider-B6PnMGWJ.js} +1 -1
- package/dist/assets/about-page-CnlFBAlo.js +1 -0
- package/dist/assets/account-page-DZ08DwDd.js +1 -0
- package/dist/assets/{account-shell-Dw8jAeLG.js → account-shell-CKkPHgS9.js} +1 -1
- package/dist/assets/add-credits-modal-DBN3IiqI.js +1 -0
- package/dist/assets/{advanced-page-FCPOBhRy.js → advanced-page-D4WM0z2t.js} +1 -1
- package/dist/assets/ai-page-BfQitl93.js +1 -0
- package/dist/assets/{angular-html-DhOd7AN5.js → angular-html-BNkT9eyS.js} +1 -1
- package/dist/assets/{angular-ts-xGO-_6Bd.js → angular-ts-BDnVtklc.js} +1 -1
- package/dist/assets/{api-Du21iE99.js → api-DbR15MBi.js} +1 -1
- package/dist/assets/{apl-BVUryqD5.js → apl-Cvfre3ur.js} +1 -1
- package/dist/assets/{app-html-cache-BuUjtDuD.js → app-html-cache-CJYf8NER.js} +1 -1
- package/dist/assets/archive-page-BLEve1DA.js +1 -0
- package/dist/assets/arrow-up-yLYY3n8J.js +1 -0
- package/dist/assets/assistant-identity-store-BV4ukE7H.js +1 -0
- package/dist/assets/{assistant-status-panel-83EaWImU.js → assistant-status-panel-DdVjK_zY.js} +1 -1
- package/dist/assets/{astro-D96BhhwV.js → astro-jLJZU875.js} +1 -1
- package/dist/assets/auth-store-B6yNvrw4.js +1 -0
- package/dist/assets/{avatar-api-IlDWh3Gv.js → avatar-api-CIOvIRtJ.js} +1 -1
- package/dist/assets/{billing-page-DiItxvfm.js → billing-page-CHX3U91U.js} +4 -4
- package/dist/assets/{blade-CYOVT3-Y.js → blade-wilAfCxp.js} +1 -1
- package/dist/assets/{book-open-BprZriYY.js → book-open-hfriGSXm.js} +1 -1
- package/dist/assets/{bsl-p34U-2Lx.js → bsl-BWfsS9fN.js} +1 -1
- package/dist/assets/button-aAWi2gw6.js +1 -0
- package/dist/assets/{cairo-Cd8z051b.js → cairo-uikTSnm5.js} +1 -1
- package/dist/assets/{calendar-BIR8yc1r.js → calendar-DuFqXuuD.js} +1 -1
- package/dist/assets/card-CaVHvRGL.js +1 -0
- package/dist/assets/check-BFZgpbzl.js +1 -0
- package/dist/assets/checkbox-BT0BEiJ_.js +1 -0
- package/dist/assets/{chevron-up-DPJUr6aL.js → chevron-up-Bo3-OB-v.js} +1 -1
- package/dist/assets/cn-B70VuHjM.js +1 -0
- package/dist/assets/{cobol-CJjZVzvm.js → cobol-CIiUbggr.js} +1 -1
- package/dist/assets/{coffee-CfZkBTrB.js → coffee-CEYJB2K9.js} +1 -1
- package/dist/assets/command-palette-PBnYsqsq.js +1 -0
- package/dist/assets/community-page-F488D9ad.js +1 -0
- package/dist/assets/connect-page-BuLQWuNT.js +1 -0
- package/dist/assets/contacts-page-route-B_b4lEcp.js +1 -0
- package/dist/assets/{cpp-DbB_FtMQ.js → cpp-mde4ZU9c.js} +1 -1
- package/dist/assets/{create-selectors-DoMh4y1G.js → create-selectors-Bi35YIGD.js} +1 -1
- package/dist/assets/{createLucideIcon-Btk32rD9.js → createLucideIcon-C9oV_FLv.js} +1 -1
- package/dist/assets/createLucideIcon-CeYGTD1f.js +1 -0
- package/dist/assets/{crystal-Hmeas4cw.js → crystal-DvUAeN8f.js} +1 -1
- package/dist/assets/danger-zone-redirect-page-C2oVQP1D.js +1 -0
- package/dist/assets/debug-page-D6h6VUQe.js +3 -0
- package/dist/assets/deploy-dialogs-Bv1QJrTq.js +1 -0
- package/dist/assets/{detail-card-CzJ5gLcw.js → detail-card-XLnEy7rv.js} +1 -1
- package/dist/assets/developer-page-0nBXlNRW.js +1 -0
- package/dist/assets/{devices-page-CDcmwZ7U.js → devices-page-N4kBGW8N.js} +1 -1
- package/dist/assets/dist-CTD_Ut2j.js +45 -0
- package/dist/assets/{dist-mYLcZ3ps.js → dist-Cu3p6ULF.js} +3 -3
- package/dist/assets/dist-DwtfUqIl.js +1 -0
- package/dist/assets/document-viewer-page-BGPZ66Xt.js +1 -0
- package/dist/assets/{dollar-sign-Cm87Rklw.js → dollar-sign-CrzJnMOM.js} +1 -1
- package/dist/assets/{domain-field-CXJQDRmA.js → domain-field-KsEz6xZI.js} +1 -1
- package/dist/assets/dropdown-C8OVNOei.js +1 -0
- package/dist/assets/{edge-BgPXu-UE.js → edge-BOBmGDxF.js} +1 -1
- package/dist/assets/{elixir-DM6-ccDJ.js → elixir-DUPuwEVX.js} +1 -1
- package/dist/assets/{ellipsis-vertical-DxSLIqf8.js → ellipsis-vertical-BEukgUyo.js} +1 -1
- package/dist/assets/{elm-9gnJ98w0.js → elm-5TzY042r.js} +1 -1
- package/dist/assets/emails-page-C22gGUAv.js +1 -0
- package/dist/assets/{erb-DtlP8jgO.js → erb-Dme7vl56.js} +1 -1
- package/dist/assets/{erlang-DsE57DRS.js → erlang-qP3U3mvq.js} +1 -1
- package/dist/assets/error-report-sc-aicjG.js +1 -0
- package/dist/assets/esm-BVjuoASL.js +2 -0
- package/dist/assets/esm-BbhMzrwe.js +2 -0
- package/dist/assets/esm-CsGTlVMU.js +2 -0
- package/dist/assets/esm-DBgkZZR_.js +2 -0
- package/dist/assets/{esm-BPIIkf0Q.js → esm-DxV3a7UZ.js} +2 -2
- package/dist/assets/{event-bus-store-Bi6GfBog.js → event-bus-store-BE6deqo9.js} +1 -1
- package/dist/assets/{external-link-BFBjpAS9.js → external-link-BzN68Baf.js} +1 -1
- package/dist/assets/{feature-flag-catalog-CSWHhMDD.js → feature-flag-catalog-JWwXDw7v.js} +1 -1
- package/dist/assets/{file-markdown-CEnRkeWg.js → file-markdown-BeBUXXva.js} +1 -1
- package/dist/assets/{format-date-CQpXfTVd.js → format-date-CB3SQEqd.js} +1 -1
- package/dist/assets/{fortran-fixed-form-D5hdDjfh.js → fortran-fixed-form-D0yi1x_F.js} +1 -1
- package/dist/assets/{fsharp-Bfi3XTPy.js → fsharp-DC4DLJa3.js} +1 -1
- package/dist/assets/{gdresource-BSaMHim7.js → gdresource-CK0esNja.js} +1 -1
- package/dist/assets/general-page-D9RIl6J5.js +1 -0
- package/dist/assets/{git-commit-Cz5QKywc.js → git-commit-CtQrm65C.js} +1 -1
- package/dist/assets/{git-rebase-BMQ0Bk9S.js → git-rebase-BEYA8QIR.js} +1 -1
- package/dist/assets/{glimmer-js-BN-NGpp_.js → glimmer-js-DK_nUSGb.js} +1 -1
- package/dist/assets/{glimmer-ts-C9VChylV.js → glimmer-ts-CfPJjfB9.js} +1 -1
- package/dist/assets/{globe-7UmDuKqs.js → globe-wFgNRLYC.js} +1 -1
- package/dist/assets/{glsl-CpFEXvu-.js → glsl-BLTb4pw5.js} +1 -1
- package/dist/assets/{graphql-V09t51SF.js → graphql-Dmm8h7KV.js} +1 -1
- package/dist/assets/{hack-oitWBBvW.js → hack-CE-G0PM6.js} +1 -1
- package/dist/assets/{haml-CV2rgaHM.js → haml-X4fw6GmH.js} +1 -1
- package/dist/assets/{handlebars-BgAPxny7.js → handlebars-rJYAy9gV.js} +1 -1
- package/dist/assets/hatching-screen-gO2HHyic.js +1 -0
- package/dist/assets/home-page-route-fnsklykY.js +1 -0
- package/dist/assets/hosting-screen-B5nQ8yuX.js +1 -0
- package/dist/assets/{html-B_nL9zO9.js → html-BJ9sAXe_.js} +1 -1
- package/dist/assets/{html-derivative-BWIcZuDp.js → html-derivative-Bysi4tv4.js} +1 -1
- package/dist/assets/{http-CrTxb7et.js → http-BS7Jqdgv.js} +1 -1
- package/dist/assets/{hurl-B-EymzsD.js → hurl-_C9yb954.js} +1 -1
- package/dist/assets/{hxml-CXbAEQJQ.js → hxml-DqH_d5Aw.js} +1 -1
- package/dist/assets/identity-page-route-BA650DxB.js +1 -0
- package/dist/assets/index-D6-nsIUa.js +160 -0
- package/dist/assets/index-jvwn-vUC.css +2 -0
- package/dist/assets/input-DMJDsLW2.js +1 -0
- package/dist/assets/{inspect-page-sZtDl3Y1.js → inspect-page-CkllaIUi.js} +2 -2
- package/dist/assets/integrations-page-Jw4FUhet.js +1 -0
- package/dist/assets/intelligence-layout-zCvScYek.js +1 -0
- package/dist/assets/{jinja-Dl-w9ndv.js → jinja-kFAIX1rC.js} +1 -1
- package/dist/assets/{jison-DqiJxacS.js → jison-efOvWr8V.js} +1 -1
- package/dist/assets/{julia-CRSYmK9Q.js → julia-DpX7Fjmm.js} +1 -1
- package/dist/assets/{just-DwPU65eq.js → just-IdY1z9FD.js} +1 -1
- package/dist/assets/{latex-kFHU0AiV.js → latex-9FXC3ncb.js} +1 -1
- package/dist/assets/{lib-CreNldEg.js → lib-KV3M-JnZ.js} +1 -1
- package/dist/assets/library-detail-page-Bf5UPSVB.js +1 -0
- package/dist/assets/library-page-WKkVYmYF.js +1 -0
- package/dist/assets/{link-2-nd9oRqHR.js → link-2-8I3QXA-n.js} +1 -1
- package/dist/assets/{liquid-BqJmG_-p.js → liquid-Dmd--mKG.js} +1 -1
- package/dist/assets/loader-circle-DfyYkLlZ.js +1 -0
- package/dist/assets/local-mode-DTyhlxIJ.js +1 -0
- package/dist/assets/{login-flow-C9O7X98K.js → login-flow-C1czXxt_.js} +1 -1
- package/dist/assets/login-page-Bs98MBVV.js +1 -0
- package/dist/assets/logout-page-B-cqUfTT.js +1 -0
- package/dist/assets/logs-layout-CJqMV8_W.js +1 -0
- package/dist/assets/{lua-Bm8pAWjJ.js → lua-B9l8P4B3.js} +1 -1
- package/dist/assets/{marko-CtYsAbA9.js → marko-BLKIGWCO.js} +1 -1
- package/dist/assets/{mdc-CIWadW2_.js → mdc-DqnMcfsN.js} +1 -1
- package/dist/assets/memory-router-playground-page-CHa4g1Wq.js +3 -0
- package/dist/assets/{misc-C48PHiZA.js → misc-CBjwzlgT.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-BPjlJDFT.js → mobile-sidebar-drawer-C6Gyr33c.js} +1 -1
- package/dist/assets/modal-BhjmOSWp.js +1 -0
- package/dist/assets/native-biometric-D17G0wwQ.js +6 -0
- package/dist/assets/{native-file-DAT4q2dZ.js → native-file-DH3T-Yy4.js} +2 -2
- package/dist/assets/{nextflow-CfF50ZWD.js → nextflow-D6uJA-4H.js} +1 -1
- package/dist/assets/{nginx-DolsBkZw.js → nginx-DpJLfokZ.js} +1 -1
- package/dist/assets/{nim-C2UmDq2M.js → nim-BhJPviH3.js} +1 -1
- package/dist/assets/notice-C9Zmf-rY.js +1 -0
- package/dist/assets/notifications-page-DbC865Ee.js +1 -0
- package/dist/assets/{oauth-complete-page-BKhMJwKk.js → oauth-complete-page-Yae_ACRB.js} +2 -2
- package/dist/assets/{oauth-popup-complete-page-BEJRVVVY.js → oauth-popup-complete-page-DIxZ73Tq.js} +2 -2
- package/dist/assets/{octagon-x-JZskQa-B.js → octagon-x-DgCpvPRH.js} +1 -1
- package/dist/assets/{onboarding-layout-9Hg63IFb.js → onboarding-layout-CWG_GDpU.js} +1 -1
- package/dist/assets/{page-shell-CFZbOuiy.js → page-shell-2Pocdjh8.js} +1 -1
- package/dist/assets/panel-item-CH4BnWiy.js +1 -0
- package/dist/assets/password-reset-page-B421l998.js +1 -0
- package/dist/assets/{pdf-D2iKihRr.js → pdf-BUHzSUqO.js} +1 -1
- package/dist/assets/{pencil-obxZd0L0.js → pencil-rsHfEBVu.js} +1 -1
- package/dist/assets/{perl-bEEhNNIc.js → perl-C94Kq8Vf.js} +1 -1
- package/dist/assets/{php-lzz2TUwQ.js → php-BjvEifTN.js} +1 -1
- package/dist/assets/plugins-page-KBZxx4RX.js +1 -0
- package/dist/assets/portal-container-T4u-kJy6.js +1 -0
- package/dist/assets/pre-chat-flow--eyTMO3O.js +1 -0
- package/dist/assets/prefs-DBzVLQNO.js +1 -0
- package/dist/assets/preload-helper-CS_K7l1U.js +1 -0
- package/dist/assets/privacy-page-nfKw-hpQ.js +1 -0
- package/dist/assets/privacy-screen-dPprxJBH.js +1 -0
- package/dist/assets/progress-bar-BpNHPD3g.js +1 -0
- package/dist/assets/provider-callback-page-BgDcw9wR.js +1 -0
- package/dist/assets/provider-signup-page-DR57-8of.js +1 -0
- package/dist/assets/{pug-Du3Nit4O.js → pug-Bes6CgOS.js} +1 -1
- package/dist/assets/{qml-4L72CoUN.js → qml-Br-eozzh.js} +1 -1
- package/dist/assets/{query-tags-D8ub83Qe.js → query-tags-CuHlkyMo.js} +1 -1
- package/dist/assets/{razor-nRRX0DFG.js → razor-CI0vZK4x.js} +1 -1
- package/dist/assets/react-dom-CuYvR46t.js +1 -0
- package/dist/assets/{react-query.gen-DA3VkUYA.js → react-query.gen-C9LHPeRr.js} +1 -1
- package/dist/assets/{resize-errors-DGTY2nAB.js → resize-errors-CVxnnl9j.js} +1 -1
- package/dist/assets/routes-Bc63mRsk.js +1 -0
- package/dist/assets/{rst--ZORQ5yS.js → rst-gAYJ4hB7.js} +1 -1
- package/dist/assets/{ruby-BfMO6qcI.js → ruby-wkizT7Hc.js} +1 -1
- package/dist/assets/{sas-DZ8XHRjc.js → sas-BOBTpuDj.js} +1 -1
- package/dist/assets/{save-Df8bLDyG.js → save-dqBojVBU.js} +1 -1
- package/dist/assets/{schedules-page-CYguL66k.js → schedules-page-CwAYzq9f.js} +1 -1
- package/dist/assets/{scss-hLIrK7lC.js → scss-D4rXmeJf.js} +1 -1
- package/dist/assets/settings-layout-B-gZsVPl.js +1 -0
- package/dist/assets/{shaderlab-D9aDW2b6.js → shaderlab-1WaRBvWr.js} +1 -1
- package/dist/assets/share-feedback-modal-DTruEHXl.js +1 -0
- package/dist/assets/{shellsession-BUDRJq28.js → shellsession-CHvhGC18.js} +1 -1
- package/dist/assets/sidebar-tree-B_R8bNLb.js +1 -0
- package/dist/assets/signup-page-Bw5wdYLf.js +1 -0
- package/dist/assets/{skill-detail-DgRyktTW.js → skill-detail-DJAAupq5.js} +1 -1
- package/dist/assets/skills-page-CFXPf98E.js +1 -0
- package/dist/assets/{sounds-page-Duno_f9p.js → sounds-page-DTaMvwZR.js} +1 -1
- package/dist/assets/{soy-dsk6RE9u.js → soy-CC4jhDb2.js} +1 -1
- package/dist/assets/{sparql-C95gzauI.js → sparql-D35QugD4.js} +1 -1
- package/dist/assets/{src-DzD6V_-s.js → src-kyqznrcv.js} +3 -3
- package/dist/assets/stat-square-C4k7AFbD.js +1 -0
- package/dist/assets/{stata-5DLAJEsU.js → stata-CGSSTS3B.js} +1 -1
- package/dist/assets/step-indicator-dots-HcCBE3eb.js +1 -0
- package/dist/assets/{subagent-detail-panel-DIWBSLWn.js → subagent-detail-panel-DLYXaUCC.js} +2 -2
- package/dist/assets/{surrealql-Bd5MMIOc.js → surrealql-BdswqyEk.js} +1 -1
- package/dist/assets/{svelte-Db0PLX4z.js → svelte-MSsWfmYM.js} +1 -1
- package/dist/assets/{system-events-page-DC6mlB3O.js → system-events-page-DdDTzp8J.js} +1 -1
- package/dist/assets/system-events-redirect-page-CVMCk5Ug.js +1 -0
- package/dist/assets/tag-Bq7LZ7NN.js +1 -0
- package/dist/assets/{target-uRVZvIcc.js → target-BxPTyI8x.js} +1 -1
- package/dist/assets/{templ-DqszTP4R.js → templ-BarTQ1Ke.js} +1 -1
- package/dist/assets/{tex-BKxy02eW.js → tex-CFh-xGZ2.js} +1 -1
- package/dist/assets/{tiptap-document-editor-DqrxIFNH.js → tiptap-document-editor-Bj7lmYZq.js} +3 -3
- package/dist/assets/toast-BRhiclkk.js +1 -0
- package/dist/assets/toggle-Ba6zbjWC.js +1 -0
- package/dist/assets/{tool-detail-panel-CtJ0Mc2d.js → tool-detail-panel-CRHrxhJk.js} +1 -1
- package/dist/assets/trace-page-CRobJzr1.js +1 -0
- package/dist/assets/{ts-tags-CdR5yq4h.js → ts-tags-BbyYMTDf.js} +1 -1
- package/dist/assets/{twig-uOUM9nP_.js → twig-DVqAieqO.js} +1 -1
- package/dist/assets/typography-X3i-p9De.js +1 -0
- package/dist/assets/upgrade-cancel-page-DX66i0gg.js +1 -0
- package/dist/assets/upgrade-success-page-192bn-iX.js +1 -0
- package/dist/assets/usage-page-DB_MUKAx.js +1 -0
- package/dist/assets/use-active-assistant-id-BNTrFfbP.js +1 -0
- package/dist/assets/use-current-platform-assistant-BSNVkqHJ.js +1 -0
- package/dist/assets/{use-is-mobile-Dkb-QHwX.js → use-is-mobile-L-si1_f-.js} +1 -1
- package/dist/assets/use-oauth-complete-deep-link-listener-ChUbzwXg.js +1 -0
- package/dist/assets/{use-reduced-motion-C8MjY0gt.js → use-reduced-motion-C44fEWVQ.js} +1 -1
- package/dist/assets/{useMutation-DO5gkGJX.js → useMutation-Cq8DErPD.js} +1 -1
- package/dist/assets/{useQuery-Cihv2Mys.js → useQuery-DQMwUXEx.js} +1 -1
- package/dist/assets/voice-page-gNQLbCww.js +1 -0
- package/dist/assets/{vue-BlLLuGzo.js → vue-ZcyTzC7t.js} +1 -1
- package/dist/assets/{vue-html-qXCpw_5J.js → vue-html-BwbWezq9.js} +1 -1
- package/dist/assets/{vue-vine-p-PcMUu-.js → vue-vine-ie3wWKPT.js} +1 -1
- package/dist/assets/{wand-sparkles-jBh4Oi5W.js → wand-sparkles-C7VKsA2r.js} +1 -1
- package/dist/assets/{weather-forecast-display-BGHYvMUU.js → weather-forecast-display-AStDyQ3C.js} +1 -1
- package/dist/assets/{web-BtTWxP77.js → web-MvGEGUgv.js} +1 -1
- package/dist/assets/welcome-screen-CIlYxrxN.js +1 -0
- package/dist/assets/{with-selector-CLdxmz2Q.js → with-selector-DE2FUwCr.js} +1 -1
- package/dist/assets/workspace-page-7df9edRz.js +1 -0
- package/dist/assets/x-D9hhnMwf.js +1 -0
- package/dist/assets/x-x84-Y-pw.js +1 -0
- package/dist/assets/{xml-ZpZBIidV.js → xml-D9pOU8XJ.js} +1 -1
- package/dist/assets/{xsl-DLmLvndi.js → xsl-BcbVml5f.js} +1 -1
- package/dist/index.html +65 -74
- package/package.json +109 -3
- package/dist/assets/account-page-mLTPbjvL.js +0 -1
- package/dist/assets/add-credits-modal-Bl0Bh2Go.js +0 -1
- package/dist/assets/ai-page-CQnqBX-M.js +0 -1
- package/dist/assets/archive-CVmkE0UZ.js +0 -1
- package/dist/assets/archive-page-gPcbutQd.js +0 -1
- package/dist/assets/arrow-up-tR4McxO9.js +0 -1
- package/dist/assets/assistant-context-BFnqXVaa.js +0 -1
- package/dist/assets/assistant-identity-store-ouefMZDR.js +0 -1
- package/dist/assets/auth-store-Dy6ebqwf.js +0 -1
- package/dist/assets/bell-D6safcBY.js +0 -1
- package/dist/assets/bug-CqWa4aqP.js +0 -1
- package/dist/assets/button-aOWst_o4.js +0 -1
- package/dist/assets/card-DnfZJiuP.js +0 -1
- package/dist/assets/check-R2i_nIpE.js +0 -1
- package/dist/assets/checkbox-DKXy3MWj.js +0 -1
- package/dist/assets/chunk-5KNZJZUH-DdB2N3P3.js +0 -4
- package/dist/assets/client-ChXJae8j.js +0 -1
- package/dist/assets/cn-CjywcAuq.js +0 -1
- package/dist/assets/command-palette-BlS50uTB.js +0 -1
- package/dist/assets/community-page-CqzBRDpi.js +0 -1
- package/dist/assets/connect-page-DxmIoKzq.js +0 -1
- package/dist/assets/contacts-page-route-D6Krd6C5.js +0 -1
- package/dist/assets/conversation-id-wire-field-1lxFUhFO.js +0 -39
- package/dist/assets/conversations-DsLnxwFV.js +0 -1
- package/dist/assets/createLucideIcon-BsE6w02i.js +0 -1
- package/dist/assets/danger-zone-redirect-page-Do365LOh.js +0 -1
- package/dist/assets/debug-page-CsRe4giP.js +0 -3
- package/dist/assets/deploy-dialogs-M04VhTt7.js +0 -1
- package/dist/assets/developer-page-CP5daBen.js +0 -1
- package/dist/assets/dist-B2HM0OLN2.js +0 -1
- package/dist/assets/dist-Bsw_3G-z.js +0 -1
- package/dist/assets/dist-CuKiMkvX.js +0 -1
- package/dist/assets/dist-D52VCGJ3.js +0 -45
- package/dist/assets/document-viewer-page-DLI8SRag.js +0 -1
- package/dist/assets/dropdown-GgPqNVMy.js +0 -1
- package/dist/assets/emails-page-1R_kLl2Z.js +0 -1
- package/dist/assets/error-report-C0plV8M2.js +0 -1
- package/dist/assets/esm-Cvsy6Km4.js +0 -2
- package/dist/assets/esm-DUi7Rn40.js +0 -2
- package/dist/assets/esm-FGLqm2MN.js +0 -2
- package/dist/assets/esm-XjY7or7q.js +0 -2
- package/dist/assets/general-page-BuBX2YwQ.js +0 -1
- package/dist/assets/hatching-screen-BYbFCv5M.js +0 -1
- package/dist/assets/home-page-route-CW4m4-Ja.js +0 -1
- package/dist/assets/hosting-screen-Cl6VkyWS.js +0 -1
- package/dist/assets/identity-page-route-BBY720B5.js +0 -1
- package/dist/assets/index-C8e7KvxW.css +0 -2
- package/dist/assets/index-aLxsGtfC.js +0 -119
- package/dist/assets/input-Wbm6eptw.js +0 -1
- package/dist/assets/integrations-page-B8SCBk4Y.js +0 -1
- package/dist/assets/intelligence-layout-3b4qm2Kl.js +0 -1
- package/dist/assets/library-detail-page-V05KsJng.js +0 -1
- package/dist/assets/library-page-CP4sGQ5J.js +0 -1
- package/dist/assets/loader-circle-DaEOga2S.js +0 -1
- package/dist/assets/local-mode-BO8mMNsq.js +0 -1
- package/dist/assets/login-page-BPJpblPt.js +0 -1
- package/dist/assets/logout-page-BOesBxfe.js +0 -1
- package/dist/assets/logs-layout-B43V0N93.js +0 -1
- package/dist/assets/memory-router-playground-page-pa7bYqYJ.js +0 -3
- package/dist/assets/modal-1PrCjlTg.js +0 -1
- package/dist/assets/native-biometric-BPPNP_Sl.js +0 -6
- package/dist/assets/notice-whIbTA0N.js +0 -1
- package/dist/assets/notifications-page-BVWqstpZ.js +0 -1
- package/dist/assets/panel-item-ChHVXS-W.js +0 -1
- package/dist/assets/password-reset-page-C-dZStkw.js +0 -1
- package/dist/assets/plugins-page-CH_Vocd5.js +0 -1
- package/dist/assets/portal-container-CYxfRy4f.js +0 -1
- package/dist/assets/pre-chat-flow-DLHzM5QY.js +0 -1
- package/dist/assets/prechat-D2oqOkVm.js +0 -1
- package/dist/assets/preload-helper-S68_7Byc.js +0 -1
- package/dist/assets/privacy-page-C-Vj_p8l.js +0 -1
- package/dist/assets/privacy-screen-DWFpv0Fo.js +0 -1
- package/dist/assets/progress-bar-CgM2b0gB.js +0 -1
- package/dist/assets/provider-callback-page-VFddaky4.js +0 -1
- package/dist/assets/provider-signup-page-CgDYbapA.js +0 -1
- package/dist/assets/react-dom-S1h5pQqq.js +0 -1
- package/dist/assets/routes-CHnF8N9D.js +0 -1
- package/dist/assets/settings-layout-CTEOskoj.js +0 -1
- package/dist/assets/share-feedback-modal-B2uHY8-X.js +0 -1
- package/dist/assets/sidebar-tree-BEaTbIwA.js +0 -1
- package/dist/assets/signup-page-DEuLzFY7.js +0 -1
- package/dist/assets/skills-page-BYdkBLR0.js +0 -1
- package/dist/assets/stat-square-Di_bhDMh.js +0 -1
- package/dist/assets/step-indicator-dots-C5bemV-h.js +0 -1
- package/dist/assets/system-events-redirect-page-S94e1yM8.js +0 -1
- package/dist/assets/tag-D_G_KF4_.js +0 -1
- package/dist/assets/toast-B74YN17b.js +0 -1
- package/dist/assets/toggle-Brqq7_4W.js +0 -1
- package/dist/assets/trace-page-Cw-wj7A7.js +0 -1
- package/dist/assets/typography-DEzNhGy_.js +0 -1
- package/dist/assets/upgrade-cancel-page-DvdPrIVz.js +0 -1
- package/dist/assets/upgrade-success-page-Bawb68MQ.js +0 -1
- package/dist/assets/usage-page-BnW56hOn.js +0 -1
- package/dist/assets/use-current-platform-assistant-B8PKBExd.js +0 -1
- package/dist/assets/use-oauth-complete-deep-link-listener-CdJy7YJb.js +0 -1
- package/dist/assets/voice-page-B4bYnhST.js +0 -1
- package/dist/assets/welcome-screen-Csb7OEuR.js +0 -1
- package/dist/assets/workspace-page-Wx3-2mgb.js +0 -1
- package/dist/assets/x-CUFf_mCR.js +0 -1
- package/dist/assets/x-DMasRVxp.js +0 -1
- /package/dist/assets/{abap-S720j6HC.js → abap-DNUpiG8A.js} +0 -0
- /package/dist/assets/{actionscript-3-BJvigUfR.js → actionscript-3-Bo2fXZ6X.js} +0 -0
- /package/dist/assets/{ada-DQ2OWYpf.js → ada-CX4zIdvl.js} +0 -0
- /package/dist/assets/{andromeeda-_EhmqsVp.js → andromeeda-DRyK6uS2.js} +0 -0
- /package/dist/assets/{apache-BsyG71ag.js → apache-Df13Lvky.js} +0 -0
- /package/dist/assets/{apex-Ccw0eeCe.js → apex-Chnf7MTn.js} +0 -0
- /package/dist/assets/{api-errors-BK1-O3Nx.js → api-errors-Cb5XX5_j.js} +0 -0
- /package/dist/assets/{applescript-ha7qmUXh.js → applescript-Ctc_PVwP.js} +0 -0
- /package/dist/assets/{ara-BgWiE2ox.js → ara-8aWxaf_S.js} +0 -0
- /package/dist/assets/{asciidoc-Dn70l7h4.js → asciidoc-DT2KgubG.js} +0 -0
- /package/dist/assets/{asm-DR7r0jUw.js → asm-vqnSgROr.js} +0 -0
- /package/dist/assets/{aurora-x-B9nEusFo.js → aurora-x-CTu0bZlN.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-zv0dj2l3.js → avatar-bundled-components-B4Qvdjm-.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-CwF7LSJ9.js → avatar-svg-compositor-B7_Irzdj.js} +0 -0
- /package/dist/assets/{awk-BJdTQ5Hx.js → awk-BLYIprkI.js} +0 -0
- /package/dist/assets/{ayu-dark-DqQbu2-w.js → ayu-dark-C1nqQ7ZO.js} +0 -0
- /package/dist/assets/{ayu-light--8qST3j8.js → ayu-light-CcUJeQaT.js} +0 -0
- /package/dist/assets/{ayu-mirage-DrJzVJ_F.js → ayu-mirage-IZ3AFYVd.js} +0 -0
- /package/dist/assets/{ballerina-BYRinlHo.js → ballerina-DIr0Mnnk.js} +0 -0
- /package/dist/assets/{bat-CUMUh9XV.js → bat-CpUMzNgl.js} +0 -0
- /package/dist/assets/{beancount-CsLlzN8M.js → beancount-BobOo5zN.js} +0 -0
- /package/dist/assets/{berry-CdPki7q8.js → berry-Ccgj4CiA.js} +0 -0
- /package/dist/assets/{bibtex-B8xm9XLj.js → bibtex-CVITMyxL.js} +0 -0
- /package/dist/assets/{bicep-CnLpnmf8.js → bicep-C4egU_bX.js} +0 -0
- /package/dist/assets/{bird2-Cqt8sSVG.js → bird2-CYfTnGm_.js} +0 -0
- /package/dist/assets/{c-VnVOqj0C.js → c-DZ6nPbF_.js} +0 -0
- /package/dist/assets/{c3-DpiHWuuX.js → c3-Bm97WyY3.js} +0 -0
- /package/dist/assets/{cadence-DgcVki5R.js → cadence-Bl3iDFGB.js} +0 -0
- /package/dist/assets/{catppuccin-frappe-C_yfKP-L.js → catppuccin-frappe-BicMddtJ.js} +0 -0
- /package/dist/assets/{catppuccin-latte-CtoBMVdv.js → catppuccin-latte-B-eVCkn1.js} +0 -0
- /package/dist/assets/{catppuccin-macchiato-xFP5yO7O.js → catppuccin-macchiato-CJEhjVZk.js} +0 -0
- /package/dist/assets/{catppuccin-mocha-60sqJvv0.js → catppuccin-mocha-VLn722eu.js} +0 -0
- /package/dist/assets/{clarity-Rka6Ibys.js → clarity-BzEOBBx4.js} +0 -0
- /package/dist/assets/{client-BRb8najC.js → client-CxU24LyV.js} +0 -0
- /package/dist/assets/{clojure-CQ5DpGM1.js → clojure-nX7NgSDb.js} +0 -0
- /package/dist/assets/{clsx-D1MxZxYX.js → clsx-DhcQR1oF.js} +0 -0
- /package/dist/assets/{cmake-DsAm9QpO.js → cmake-CEeIa3iP.js} +0 -0
- /package/dist/assets/{codeowners-BDBDyRC_.js → codeowners-BP42p7Bn.js} +0 -0
- /package/dist/assets/{codeql-CZfFhTX0.js → codeql-DE7I523g.js} +0 -0
- /package/dist/assets/{common-lisp-Dz6SVlfw.js → common-lisp-Dvijln0X.js} +0 -0
- /package/dist/assets/{coq-D2tyWqdS.js → coq-p4_rGKEV.js} +0 -0
- /package/dist/assets/{csharp-B6wLYKms.js → csharp-D1-Vrrzm.js} +0 -0
- /package/dist/assets/{css-Cs4MPfhN.js → css-C0lcjSm8.js} +0 -0
- /package/dist/assets/{csv-D3H5ikhE.js → csv-GH5M7Aoj.js} +0 -0
- /package/dist/assets/{cue-Lq7mpKOq.js → cue-D7vDT7xE.js} +0 -0
- /package/dist/assets/{cypher-CODl5eKV.js → cypher-BF-7MPbx.js} +0 -0
- /package/dist/assets/{d-DZC76yx1.js → d-DcsICAjO.js} +0 -0
- /package/dist/assets/{dark-plus-CBASO-cg.js → dark-plus-Cal9Cy_n.js} +0 -0
- /package/dist/assets/{dart-CmrdZv7c.js → dart-DPfMdfDn.js} +0 -0
- /package/dist/assets/{dax-R1bAmQ_D.js → dax-BDcxvPW6.js} +0 -0
- /package/dist/assets/{definitions-DNF_njzj.js → definitions-gMlRm8A_.js} +0 -0
- /package/dist/assets/{desktop-5nM7o7HH.js → desktop-DmetOriX.js} +0 -0
- /package/dist/assets/{diff-CcKimul9.js → diff-BTv5s55n.js} +0 -0
- /package/dist/assets/{docker-TG47LLyN.js → docker-B84PvePO.js} +0 -0
- /package/dist/assets/{dotenv-CiUEiZKH.js → dotenv-CM30jnus.js} +0 -0
- /package/dist/assets/{dracula-soft-BXFmyviC.js → dracula-soft-ortSsJzr.js} +0 -0
- /package/dist/assets/{dracula-CT0oGdNT.js → dracula-tOsQSJSR.js} +0 -0
- /package/dist/assets/{dream-maker-CAM2D_UX.js → dream-maker-BMXKWh7r.js} +0 -0
- /package/dist/assets/{emacs-lisp-CzK3ExcO.js → emacs-lisp-I4D2eRgr.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-CmIAmDSt.js → emoji-catalog-data-y-nZS0_U.js} +0 -0
- /package/dist/assets/{everforest-dark-CQlB3mCO.js → everforest-dark-BbuuIlHG.js} +0 -0
- /package/dist/assets/{everforest-light-BA4ay6iM.js → everforest-light-BNk8Csve.js} +0 -0
- /package/dist/assets/{exports-rSCybWxk.js → exports-DfyYqtWD.js} +0 -0
- /package/dist/assets/{fennel-eG2_iaTI.js → fennel-DFsKO9y1.js} +0 -0
- /package/dist/assets/{fish-zI3emtm-.js → fish-DvqK9JLk.js} +0 -0
- /package/dist/assets/{fluent-BZo6aiNu.js → fluent-gfd9SBYr.js} +0 -0
- /package/dist/assets/{format-hyvuWewV.js → format-DvVeYaVl.js} +0 -0
- /package/dist/assets/{fortran-free-form-57r0sG8y.js → fortran-free-form-DvnCB3mS.js} +0 -0
- /package/dist/assets/{gdscript-1YmxJL3Q.js → gdscript-Cum68Rfn.js} +0 -0
- /package/dist/assets/{gdshader-BfYwvVWN.js → gdshader-Bdw_vrfE.js} +0 -0
- /package/dist/assets/{genie-CWE9MH2Z.js → genie-DGL6epfr.js} +0 -0
- /package/dist/assets/{gherkin-DylFqTNM.js → gherkin-DKP8C3S5.js} +0 -0
- /package/dist/assets/{github-dark-xIytAWi0.js → github-dark-DenWerWF.js} +0 -0
- /package/dist/assets/{github-dark-default-BK9X8oxX.js → github-dark-default-CSOAoAA7.js} +0 -0
- /package/dist/assets/{github-dark-dimmed-CurnRG13.js → github-dark-dimmed-CLVzfuGo.js} +0 -0
- /package/dist/assets/{github-dark-high-contrast-DxF4Jnoi.js → github-dark-high-contrast-FMEczBGH.js} +0 -0
- /package/dist/assets/{github-light-DAfSDMwO.js → github-light-CAxis8VP.js} +0 -0
- /package/dist/assets/{github-light-default-CCtzMk6P.js → github-light-default-AwK-IReR.js} +0 -0
- /package/dist/assets/{github-light-high-contrast-KEzODQXH.js → github-light-high-contrast-V1Zvs65Q.js} +0 -0
- /package/dist/assets/{gleam-DdIPhrNi.js → gleam-BL786rUo.js} +0 -0
- /package/dist/assets/{gn-pxGNTpNA.js → gn-SXKhqpGI.js} +0 -0
- /package/dist/assets/{gnuplot-CGxnsTQL.js → gnuplot-o4b-hOMZ.js} +0 -0
- /package/dist/assets/{go-DkMdryeU.js → go-Fy8CAqoa.js} +0 -0
- /package/dist/assets/{groovy-Dd5mdG4N.js → groovy-CkybMBjt.js} +0 -0
- /package/dist/assets/{gruvbox-dark-hard-B20DGFjy.js → gruvbox-dark-hard-cr7F5Ei8.js} +0 -0
- /package/dist/assets/{gruvbox-dark-medium-DQ-yywkT.js → gruvbox-dark-medium-CdfKHaW0.js} +0 -0
- /package/dist/assets/{gruvbox-dark-soft-CKAoLyhO.js → gruvbox-dark-soft-BhjMakzc.js} +0 -0
- /package/dist/assets/{gruvbox-light-hard-DTReY2fY.js → gruvbox-light-hard-Br7DaceI.js} +0 -0
- /package/dist/assets/{gruvbox-light-medium-3mzIc6xO.js → gruvbox-light-medium-Dgq_qIGX.js} +0 -0
- /package/dist/assets/{gruvbox-light-soft-D41InbYG.js → gruvbox-light-soft-D_ggJWiO.js} +0 -0
- /package/dist/assets/{haskell-I8C-JODX.js → haskell-XYheirt-.js} +0 -0
- /package/dist/assets/{haxe-CvAJ9gVe.js → haxe-DnGntDfe.js} +0 -0
- /package/dist/assets/{hcl-COD-gUFt.js → hcl-CCY9Se-u.js} +0 -0
- /package/dist/assets/{hjson-BB-7M6Aw.js → hjson-C9WnX9lx.js} +0 -0
- /package/dist/assets/{hlsl-evA1LyhB.js → hlsl-C3AzQq04.js} +0 -0
- /package/dist/assets/{horizon-DiEWIIog.js → horizon-DwCI16hp.js} +0 -0
- /package/dist/assets/{horizon-bright-ClSn0MBy.js → horizon-bright-Cpa65OQf.js} +0 -0
- /package/dist/assets/{houston-CL8GXgL9.js → houston-DBa6DcY7.js} +0 -0
- /package/dist/assets/{hy-CLelu6yL.js → hy-ClfbeOZN.js} +0 -0
- /package/dist/assets/{imba-DQ72tITW.js → imba-DcxUW-wx.js} +0 -0
- /package/dist/assets/{ini-BXuaV21y.js → ini-DhtXMm-i.js} +0 -0
- /package/dist/assets/{java-BTrCroH7.js → java-CKvSfw0c.js} +0 -0
- /package/dist/assets/{javascript-CvaqMKLK.js → javascript-BwEwwHgf.js} +0 -0
- /package/dist/assets/{json-BPes1XR5.js → json-G-m-vE3h.js} +0 -0
- /package/dist/assets/{json5-Bra3_FRS.js → json5-IgZ1Is9k.js} +0 -0
- /package/dist/assets/{jsonc-BfapMXPh.js → jsonc-_pBTLcGT.js} +0 -0
- /package/dist/assets/{jsonl-BqVSdGk9.js → jsonl-Sa5wNLrm.js} +0 -0
- /package/dist/assets/{jsonnet-mH4WdtrV.js → jsonnet-BtUJ4OTu.js} +0 -0
- /package/dist/assets/{jssm-BxRMgAQF.js → jssm-CLhTkxxx.js} +0 -0
- /package/dist/assets/{jsx-Geb0rb06.js → jsx-BBG89ojQ.js} +0 -0
- /package/dist/assets/{kanagawa-dragon-Tgm3mfbN.js → kanagawa-dragon--Qu5IFRs.js} +0 -0
- /package/dist/assets/{kanagawa-lotus-dJMGjVhA.js → kanagawa-lotus-R-ZX3jlF.js} +0 -0
- /package/dist/assets/{kanagawa-wave-Ci4QO7t9.js → kanagawa-wave-Dr1nqAI2.js} +0 -0
- /package/dist/assets/{kdl-MiMB75si.js → kdl-D0nszg2B.js} +0 -0
- /package/dist/assets/{kotlin-gUlkTc0q.js → kotlin-B0DCiK42.js} +0 -0
- /package/dist/assets/{kusto-CN_8kOel.js → kusto-nT_Fmo0Y.js} +0 -0
- /package/dist/assets/{laserwave-BOEefu-D.js → laserwave-DlB4MU6V.js} +0 -0
- /package/dist/assets/{lean-BO7mZZoh.js → lean-DhOVDhCh.js} +0 -0
- /package/dist/assets/{less-BBnf20HC.js → less-Dh-4e8MC.js} +0 -0
- /package/dist/assets/{lib-DXeTRAgG.js → lib-BZXpTQaD.js} +0 -0
- /package/dist/assets/{light-plus-CL09gsxH.js → light-plus-C6nWIJDZ.js} +0 -0
- /package/dist/assets/{llm-dimension-B9qfQX3Y.js → llm-dimension-Com-uEL8.js} +0 -0
- /package/dist/assets/{llvm-CeY51NZh.js → llvm-DH9YS7kW.js} +0 -0
- /package/dist/assets/{local-settings-CS-DDnd1.js → local-settings-lVNyIOJ_.js} +0 -0
- /package/dist/assets/{log-BdCwBbX4.js → log-DGyRW4Yu.js} +0 -0
- /package/dist/assets/{logo-BoxZga1S.js → logo-CpTJpw-N.js} +0 -0
- /package/dist/assets/{luau-BDLcP78o.js → luau-BdrPFhCA.js} +0 -0
- /package/dist/assets/{make-BACowfgt.js → make-BWqrzVrZ.js} +0 -0
- /package/dist/assets/{markdown-Dhb8xNDt.js → markdown-B7ABVAOk.js} +0 -0
- /package/dist/assets/{material-theme-Ez0bd6Np.js → material-theme-DsfbG_93.js} +0 -0
- /package/dist/assets/{material-theme-darker-BrTZKIk1.js → material-theme-darker-BOYhcZVv.js} +0 -0
- /package/dist/assets/{material-theme-lighter-GBL_nuBb.js → material-theme-lighter-BsUaNSYL.js} +0 -0
- /package/dist/assets/{material-theme-ocean-W4K6pv_o.js → material-theme-ocean-gCQDxtdX.js} +0 -0
- /package/dist/assets/{material-theme-palenight-CE5pyPkh.js → material-theme-palenight-DyQiZfLe.js} +0 -0
- /package/dist/assets/{matlab-oLNWLDxt.js → matlab-CQRZ4zL0.js} +0 -0
- /package/dist/assets/{mdx-CCShXdHK.js → mdx-DatRQiQI.js} +0 -0
- /package/dist/assets/{mermaid-iMeSjHhd.js → mermaid-gyMkSpkM.js} +0 -0
- /package/dist/assets/{middleware-B7I04D_Q.js → middleware-DJdXCbpc.js} +0 -0
- /package/dist/assets/{min-dark-2BIYkZDD.js → min-dark-BDsS6QdN.js} +0 -0
- /package/dist/assets/{min-light-D7jRpC7L.js → min-light-C4auzl9H.js} +0 -0
- /package/dist/assets/{mipsasm-D32ZHktK.js → mipsasm-52d4hrT5.js} +0 -0
- /package/dist/assets/{mojo-DTv7azE-.js → mojo-ReGWoUrl.js} +0 -0
- /package/dist/assets/{monokai-C69QrEpq.js → monokai-7Vjupg4U.js} +0 -0
- /package/dist/assets/{moonbit-Drvpmm67.js → moonbit-u2c36Msk.js} +0 -0
- /package/dist/assets/{move-BoJQbLBf.js → move-BsGpRiYx.js} +0 -0
- /package/dist/assets/{narrat-CGvHu8pV.js → narrat-C8eS3QuF.js} +0 -0
- /package/dist/assets/{native-deep-link-ic-1ub-k.js → native-deep-link-C4IUgLby.js} +0 -0
- /package/dist/assets/{nextflow-groovy-TrjQfV-x.js → nextflow-groovy-B4EOlBh1.js} +0 -0
- /package/dist/assets/{night-owl-Cm3tKSTe.js → night-owl-jqGB_AJC.js} +0 -0
- /package/dist/assets/{night-owl-light-DL1zFuhS.js → night-owl-light-DJpSUPM6.js} +0 -0
- /package/dist/assets/{nix-gE49qUYl.js → nix-CIk4aIJt.js} +0 -0
- /package/dist/assets/{nord-hcMUEYjI.js → nord-DhYX4sDa.js} +0 -0
- /package/dist/assets/{nushell-YGZpsKrm.js → nushell-Bw9o-_U9.js} +0 -0
- /package/dist/assets/{oauth-popup-BD5GDUMi.js → oauth-popup-DOiKxIt3.js} +0 -0
- /package/dist/assets/{objective-c-C8_U-Oq6.js → objective-c-BkOBe0B7.js} +0 -0
- /package/dist/assets/{objective-cpp-CTnjRelq.js → objective-cpp-PDR4so4c.js} +0 -0
- /package/dist/assets/{ocaml-CIH-y4RO.js → ocaml-CFXWY8j_.js} +0 -0
- /package/dist/assets/{odin-xNGfOpBm.js → odin-kspmECgu.js} +0 -0
- /package/dist/assets/{one-dark-pro-vcbuKlOy.js → one-dark-pro-BFWg7LIX.js} +0 -0
- /package/dist/assets/{one-light-BVcy1mYE.js → one-light-DlM8WZz3.js} +0 -0
- /package/dist/assets/{openscad-ryRBrPrD.js → openscad-Badon6BV.js} +0 -0
- /package/dist/assets/{pascal-Dtt9frDg.js → pascal-CmfHLDzg.js} +0 -0
- /package/dist/assets/{pkl-BPOm0CDI.js → pkl-DdCYUxoM.js} +0 -0
- /package/dist/assets/{plastic-BvPiAeG8.js → plastic-CR7bohBy.js} +0 -0
- /package/dist/assets/{plsql-C0n-sewY.js → plsql-BaM1LDLA.js} +0 -0
- /package/dist/assets/{po-DNpQeTYU.js → po-BkO2Svmr.js} +0 -0
- /package/dist/assets/{poimandres-CkMSnt1R.js → poimandres-D0O61fdS.js} +0 -0
- /package/dist/assets/{polar-DhQvttpS.js → polar-BJiJ13gV.js} +0 -0
- /package/dist/assets/{postcss-CDzao07y.js → postcss-CjX6Je85.js} +0 -0
- /package/dist/assets/{powerquery-0yv17wtC.js → powerquery-CrTtEEHJ.js} +0 -0
- /package/dist/assets/{powershell-CoAU4s9Q.js → powershell-CeyBY4Ux.js} +0 -0
- /package/dist/assets/{prisma-BT02a--B.js → prisma-DUVeuIW2.js} +0 -0
- /package/dist/assets/{prolog-H1D05Gz_.js → prolog-DOIhdAwp.js} +0 -0
- /package/dist/assets/{proto-CxS8PWa-.js → proto-BUbUT3Wx.js} +0 -0
- /package/dist/assets/{public-asset-BYzGMAVy.js → public-asset-BNpOWIkb.js} +0 -0
- /package/dist/assets/{puppet-B3d9-q2A.js → puppet-DjDgZm1H.js} +0 -0
- /package/dist/assets/{purescript-D_BNdk7z.js → purescript-6oUK_FNT.js} +0 -0
- /package/dist/assets/{python-Bex1-Oq0.js → python-CNZqNZKJ.js} +0 -0
- /package/dist/assets/{qmldir-DeiHaMqx.js → qmldir-CzQgdBMq.js} +0 -0
- /package/dist/assets/{qss-DLk0oe6x.js → qss-BA9J31sG.js} +0 -0
- /package/dist/assets/{r-DrmzhlcM.js → r-Cgso_yG8.js} +0 -0
- /package/dist/assets/{racket-4J6CwdmV.js → racket-BbjYWtUw.js} +0 -0
- /package/dist/assets/{raku-DM8GLjLA.js → raku-CHANBUFX.js} +0 -0
- /package/dist/assets/{react-BD5vCCEH.js → react-BlnqVGWw.js} +0 -0
- /package/dist/assets/{red-C7bJmhtt.js → red-Ds_qC_g5.js} +0 -0
- /package/dist/assets/{reg-DtQSbcdw.js → reg-C0Wud1Dh.js} +0 -0
- /package/dist/assets/{regexp-D1yQk9KY.js → regexp-CAdeCauu.js} +0 -0
- /package/dist/assets/{rel-B5cTLqnC.js → rel-B9eJnUl_.js} +0 -0
- /package/dist/assets/{riscv-Bs7uVNV2.js → riscv-BPVhY_ca.js} +0 -0
- /package/dist/assets/{ron-DnVQvg3N.js → ron-LOoqfhER.js} +0 -0
- /package/dist/assets/{rose-pine-ClM-MJKX.js → rose-pine-OL_nLgyo.js} +0 -0
- /package/dist/assets/{rose-pine-dawn-ByNDqq_L.js → rose-pine-dawn-CQ29Ujg-.js} +0 -0
- /package/dist/assets/{rose-pine-moon-CTzvG4V8.js → rose-pine-moon-Ci03ycU_.js} +0 -0
- /package/dist/assets/{rosmsg-Dyz4B4pk.js → rosmsg-DDoaH2Y-.js} +0 -0
- /package/dist/assets/{rust-DO_lfDWX.js → rust-DCessToL.js} +0 -0
- /package/dist/assets/{sass-D0v6FpTm.js → sass-CnIiNj11.js} +0 -0
- /package/dist/assets/{scala-Cv_C__Vn.js → scala-DlQuinCN.js} +0 -0
- /package/dist/assets/{scheme-Tf_7H8Hg.js → scheme-Br1c3eSM.js} +0 -0
- /package/dist/assets/{sdbl-D7AqUQ1Z.js → sdbl-L4TWJGSX.js} +0 -0
- /package/dist/assets/{sdk.gen-LsY3RZ9d.js → sdk.gen-CpEhy2hU.js} +0 -0
- /package/dist/assets/{semver-D9bo-f7O.js → semver-DsaRCj6a.js} +0 -0
- /package/dist/assets/{shellscript-CkL9lXSm.js → shellscript-CR_zcVmb.js} +0 -0
- /package/dist/assets/{signals-B8JnlKDT.js → signals-p6C5D4Qf.js} +0 -0
- /package/dist/assets/{slack-dark-BZYmSreQ.js → slack-dark-DIgRzo04.js} +0 -0
- /package/dist/assets/{slack-ochin-141qUvWP.js → slack-ochin-DL7QpWFU.js} +0 -0
- /package/dist/assets/{smalltalk-BpKhbXk9.js → smalltalk-L7jQXua0.js} +0 -0
- /package/dist/assets/{snazzy-light-C6W3FDJs.js → snazzy-light-DWympol9.js} +0 -0
- /package/dist/assets/{solarized-dark-CvRYuMr5.js → solarized-dark-DFuC6LpI.js} +0 -0
- /package/dist/assets/{solarized-light-BrZYeWGp.js → solarized-light-Cv9L4wdZ.js} +0 -0
- /package/dist/assets/{solidity-BEwj5bU5.js → solidity-DeCdbXvR.js} +0 -0
- /package/dist/assets/{splunk-X43VxyaD.js → splunk-58oMfK82.js} +0 -0
- /package/dist/assets/{sql-BbM3W9qz.js → sql-B0ZI3DYA.js} +0 -0
- /package/dist/assets/{ssh-config-xEesUMnx.js → ssh-config-BCRqvx5K.js} +0 -0
- /package/dist/assets/{stylus-kaERDi0y.js → stylus-BJjwPJql.js} +0 -0
- /package/dist/assets/{swift-BauIFypW.js → swift-EeyUyWzq.js} +0 -0
- /package/dist/assets/{synthwave-84-C8sViQ2U.js → synthwave-84-C1xi6dxV.js} +0 -0
- /package/dist/assets/{system-verilog-CpFKRfen.js → system-verilog-B12ndnhe.js} +0 -0
- /package/dist/assets/{systemd-qI6s8zvr.js → systemd--it6RcB0.js} +0 -0
- /package/dist/assets/{talonscript-NlxFbnqo.js → talonscript-D8lIdKMp.js} +0 -0
- /package/dist/assets/{tasl-zK97s-oI.js → tasl-BmcKtOps.js} +0 -0
- /package/dist/assets/{tcl-CyGMFep3.js → tcl-CEkgEEsq.js} +0 -0
- /package/dist/assets/{terraform-ru__bYLC.js → terraform-DJT5zXqt.js} +0 -0
- /package/dist/assets/{tokyo-night-DkrZxYbM.js → tokyo-night-BGZyTCtK.js} +0 -0
- /package/dist/assets/{toml-CqdhxcbT.js → toml-B7t8PDen.js} +0 -0
- /package/dist/assets/{tsv-DzGUqBRN.js → tsv-DMCtrWtN.js} +0 -0
- /package/dist/assets/{tsx-BnfMflsQ.js → tsx-CrroWwfF.js} +0 -0
- /package/dist/assets/{turtle-qlP_hCPz.js → turtle-CTRvaxbL.js} +0 -0
- /package/dist/assets/{typescript-DzaF40lK.js → typescript-BIp7QN-G.js} +0 -0
- /package/dist/assets/{typespec-DxkwZz32.js → typespec-CX9Z5_ZB.js} +0 -0
- /package/dist/assets/{typst-CjRZvpar.js → typst-C-SBr8a2.js} +0 -0
- /package/dist/assets/{v-BHw8aKkn.js → v-D0ScLbsZ.js} +0 -0
- /package/dist/assets/{vala-62mcSMXh.js → vala-CGqeULn4.js} +0 -0
- /package/dist/assets/{vb-R9JRY5dv.js → vb-Cxo8x-Op.js} +0 -0
- /package/dist/assets/{verilog-CBb5pO04.js → verilog-CSfc9NxX.js} +0 -0
- /package/dist/assets/{vesper-3VOUMDB2.js → vesper-CoPmLhNq.js} +0 -0
- /package/dist/assets/{vhdl-C_FT61W-.js → vhdl-CunL_Ln5.js} +0 -0
- /package/dist/assets/{viml-DEQKYU1P.js → viml-BJkh9-D0.js} +0 -0
- /package/dist/assets/{vitesse-black-Rgn8kizg.js → vitesse-black-BwYIG_yQ.js} +0 -0
- /package/dist/assets/{vitesse-dark-CfPYcErz.js → vitesse-dark-CTjSPNe4.js} +0 -0
- /package/dist/assets/{vitesse-light-DHXkidwh.js → vitesse-light-BGxhfK2G.js} +0 -0
- /package/dist/assets/{vyper-rhxQa2DT.js → vyper-DXKiLUHC.js} +0 -0
- /package/dist/assets/{wasm-Wg1MAZEP.js → wasm-ChtccNfv.js} +0 -0
- /package/dist/assets/{wasm-mG28qlcp.js → wasm-k1w8QFn2.js} +0 -0
- /package/dist/assets/{web-DwEQfgUn.js → web-BJFOKMLV.js} +0 -0
- /package/dist/assets/{web-DV3iiXuP.js → web-C0UeTCAq.js} +0 -0
- /package/dist/assets/{web-am9pHjIz.js → web-D8J6gL8c.js} +0 -0
- /package/dist/assets/{web-BUTlZuwF.js → web-DEF_PvZf.js} +0 -0
- /package/dist/assets/{web-DMfbmsYR.js → web-DlXZWSqt.js} +0 -0
- /package/dist/assets/{web-oo3gTRUT.js → web-gAwEO0jl.js} +0 -0
- /package/dist/assets/{wenyan-BZqJVxWr.js → wenyan-DRgZ3SJe.js} +0 -0
- /package/dist/assets/{wgsl-BwR2WZrW.js → wgsl-S5iKzSms.js} +0 -0
- /package/dist/assets/{wikitext-DJWsiwoA.js → wikitext-CD4_smiT.js} +0 -0
- /package/dist/assets/{wit-DVlt00VB.js → wit-CeLfBbkX.js} +0 -0
- /package/dist/assets/{wolfram-QTkYOFmX.js → wolfram-4LwsT0lL.js} +0 -0
- /package/dist/assets/{xterm-DQdPOO_X.js → xterm-_0qzMgvB.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-hTsMfDk1.js → xterm-addon-fit-DBA_HPLR.js} +0 -0
- /package/dist/assets/{yaml-GNU-2TIP.js → yaml-B95PTw_r.js} +0 -0
- /package/dist/assets/{zenscript-DIZc3H0b.js → zenscript-DFY9FRJP.js} +0 -0
- /package/dist/assets/{zig-Br5kHs8v.js → zig-BwVjLGiI.js} +0 -0
package/dist/assets/{tiptap-document-editor-DqrxIFNH.js → tiptap-document-editor-Bj7lmYZq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,r as t,t as n}from"./chunk-jRWAZmH_.js";import{t as r}from"./react-BD5vCCEH.js";import{t as i}from"./jsx-runtime-2-RJdKf7.js";import{t as a}from"./cn-CjywcAuq.js";import"./src-DzD6V_-s.js";import{t as o}from"./createLucideIcon-Btk32rD9.js";import{Pn as s,Zt as c,an as l,ii as u}from"./index-aLxsGtfC.js";import{n as d,t as f}from"./with-selector-CLdxmz2Q.js";var p=o(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),m=o(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),h=o(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),g=e(r(),1);function _(e){this.content=e}_.prototype={constructor:_,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new _(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new _(n)},addToStart:function(e,t){return new _([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new _(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new _(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=_.from(e),e.size?new _(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=_.from(e),e.size?new _(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=_.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},_.from=function(e){if(e instanceof _)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new _(t)};function v(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=v(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function y(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=y(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var b=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return v(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return y(this,e,t,n)}findIndex(e){if(e==0)return S(0,e);if(e==this.size)return S(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?S(t+1,i):S(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};b.empty=new b([],0);var x={index:0,offset:0};function S(e,t){return x.index=e,x.offset=t,x}function C(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!C(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!C(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var w=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else !n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&C(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(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].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};w.none=[];var T=class extends Error{},E=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=te(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ee(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(b.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};E.empty=new E(b.empty,0,0);function ee(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ee(a.content,t-i-1,n-i-1)))}function te(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=te(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function ne(e,t,n){if(n.openStart>e.depth)throw new T(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new T(`Inconsistent open depths`);return re(e,t,n,0)}function re(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=re(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return ce(a,ue(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return ce(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=de(n,e);return ce(a,le(e,i,o,t,r))}}function ie(e,t){if(!t.type.compatibleContent(e.type))throw new T(`Cannot join `+t.type.name+` onto `+e.type.name)}function ae(e,t,n){let r=e.node(n);return ie(r,t.node(n)),r}function oe(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function se(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(oe(e.nodeAfter,r),a++));for(let e=a;e<o;e++)oe(i.child(e),r);t&&t.depth==n&&t.textOffset&&oe(t.nodeBefore,r)}function ce(e,t){return e.type.checkContent(t),e.copy(t)}function le(e,t,n,r,i){let a=e.depth>i&&ae(e,t,i+1),o=r.depth>i&&ae(n,r,i+1),s=[];return se(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(ie(a,o),oe(ce(a,le(e,t,n,r,i+1)),s)):(a&&oe(ce(a,ue(e,t,i+1)),s),se(t,n,i,s),o&&oe(ce(o,ue(n,r,i+1)),s)),se(r,null,i,s),new b(s)}function ue(e,t,n){let r=[];return se(null,e,n,r),e.depth>n&&oe(ce(ae(e,t,n+1),ue(e,t,n+1)),r),se(t,null,n,r),new b(r)}function de(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(b.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var fe=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return w.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new ge(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=he.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else he.set(t,r=new pe);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%me,i}},pe=class{constructor(){this.elts=[],this.i=0}},me=12,he=new WeakMap,ge=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},_e=Object.create(null),ve=class e{constructor(e,t,n,r=w.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||b.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&C(this.attrs,t||e.defaultAttrs||_e)&&w.sameSet(this.marks,n||w.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return E.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new E(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return ne(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return fe.resolveCached(this,e)}resolveNoCache(e){return fe.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),be(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=b.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=w.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!w.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=b.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};ve.prototype.text=void 0;var ye=class e extends ve{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):be(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function be(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var xe=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Se(t,n);if(r.next==null)return e.empty;let i=Ce(r);r.next&&r.err(`Unexpected trailing text`);let a=Ne(Ae(i));return Pe(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return b.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
1
|
+
import{o as e,r as t,t as n}from"./chunk-jRWAZmH_.js";import{t as r}from"./react-BlnqVGWw.js";import{t as i}from"./react-dom-CuYvR46t.js";import{t as a}from"./jsx-runtime-2-RJdKf7.js";import{t as o}from"./cn-B70VuHjM.js";import"./src-kyqznrcv.js";import{t as s}from"./createLucideIcon-C9oV_FLv.js";import{$t as c,In as l,sn as u}from"./index-D6-nsIUa.js";import{n as d,t as f}from"./with-selector-DE2FUwCr.js";var p=s(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),m=s(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),h=s(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),g=e(r(),1);function _(e){this.content=e}_.prototype={constructor:_,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new _(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new _(n)},addToStart:function(e,t){return new _([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new _(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new _(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=_.from(e),e.size?new _(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=_.from(e),e.size?new _(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=_.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},_.from=function(e){if(e instanceof _)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new _(t)};function v(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=v(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function y(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=y(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var b=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return v(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return y(this,e,t,n)}findIndex(e){if(e==0)return S(0,e);if(e==this.size)return S(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?S(t+1,i):S(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};b.empty=new b([],0);var x={index:0,offset:0};function S(e,t){return x.index=e,x.offset=t,x}function C(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!C(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!C(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var w=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else !n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&C(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(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].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};w.none=[];var T=class extends Error{},E=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=te(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ee(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(b.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};E.empty=new E(b.empty,0,0);function ee(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ee(a.content,t-i-1,n-i-1)))}function te(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=te(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function ne(e,t,n){if(n.openStart>e.depth)throw new T(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new T(`Inconsistent open depths`);return re(e,t,n,0)}function re(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=re(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return ce(a,ue(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return ce(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=de(n,e);return ce(a,le(e,i,o,t,r))}}function ie(e,t){if(!t.type.compatibleContent(e.type))throw new T(`Cannot join `+t.type.name+` onto `+e.type.name)}function ae(e,t,n){let r=e.node(n);return ie(r,t.node(n)),r}function oe(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function se(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(oe(e.nodeAfter,r),a++));for(let e=a;e<o;e++)oe(i.child(e),r);t&&t.depth==n&&t.textOffset&&oe(t.nodeBefore,r)}function ce(e,t){return e.type.checkContent(t),e.copy(t)}function le(e,t,n,r,i){let a=e.depth>i&&ae(e,t,i+1),o=r.depth>i&&ae(n,r,i+1),s=[];return se(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(ie(a,o),oe(ce(a,le(e,t,n,r,i+1)),s)):(a&&oe(ce(a,ue(e,t,i+1)),s),se(t,n,i,s),o&&oe(ce(o,ue(n,r,i+1)),s)),se(r,null,i,s),new b(s)}function ue(e,t,n){let r=[];return se(null,e,n,r),e.depth>n&&oe(ce(ae(e,t,n+1),ue(e,t,n+1)),r),se(t,null,n,r),new b(r)}function de(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(b.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var fe=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return w.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new ge(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=he.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else he.set(t,r=new pe);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%me,i}},pe=class{constructor(){this.elts=[],this.i=0}},me=12,he=new WeakMap,ge=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},_e=Object.create(null),ve=class e{constructor(e,t,n,r=w.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||b.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&C(this.attrs,t||e.defaultAttrs||_e)&&w.sameSet(this.marks,n||w.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return E.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new E(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return ne(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return fe.resolveCached(this,e)}resolveNoCache(e){return fe.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),be(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=b.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=w.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!w.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=b.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};ve.prototype.text=void 0;var ye=class e extends ve{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):be(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function be(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var xe=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Se(t,n);if(r.next==null)return e.empty;let i=Ce(r);r.next&&r.err(`Unexpected trailing text`);let a=Ne(Ae(i));return Pe(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return b.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
2
2
|
`)}};xe.empty=new xe(!0);var Se=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function Ce(e){let t=[];do t.push(we(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function we(e){let t=[];do t.push(Te(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Te(e){let t=ke(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=De(e,t);else break;return t}function Ee(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function De(e,t){let n=Ee(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Ee(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function Oe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function ke(e){if(e.eat(`(`)){let t=Ce(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=Oe(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function Ae(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function je(e,t){return t-e}function Me(e,t){let n=[];return r(t),n.sort(je);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Ne(e){let t=Object.create(null);return n(Me(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Me(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new xe(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(je);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function Pe(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Fe(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Ie(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function Le(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function Re(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Ve(e,r,t[r]);return n}var ze=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=Re(e,n.attrs),this.defaultAttrs=Fe(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==xe.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ie(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new ve(this,this.computeAttrs(e),b.from(t),w.setFrom(n))}createChecked(e=null,t,n){return t=b.from(t),this.checkContent(t),new ve(this,this.computeAttrs(e),t,w.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=b.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(b.empty,!0);return i?new ve(this,e,t.append(i),w.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Le(this.attrs,e,`node`,this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:w.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function Be(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Ve=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?Be(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},He=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Re(e,r.attrs),this.excluded=null;let i=Fe(this.attrs);this.instance=i?new w(this,i):null}create(e=null){return!e&&this.instance?this.instance:new w(this,Ie(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Le(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},Ue=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=_.from(e.nodes),t.marks=_.from(e.marks||{}),this.nodes=ze.compile(this.spec.nodes,this),this.marks=He.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=xe.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?We(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:We(this,n.split(` `))}this.nodeFromJSON=e=>ve.fromJSON(this,e),this.markFromJSON=e=>w.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof ze))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ye(n,n.defaultAttrs,e,w.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function We(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Ge(e){return e.tag!=null}function Ke(e){return e.style!=null}var qe=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Ge(e))this.tags.push(e);else if(Ke(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new nt(this,t,!1);return n.addAll(e,w.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new nt(this,t,!0);return n.addAll(e,w.none,t.from,t.to),E.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(it(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=at(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=at(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},Je={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ye={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Xe={ol:!0,ul:!0},Ze=1,Qe=2,$e=4;function et(e,t,n){return t==null?e&&e.whitespace==`pre`?Ze|Qe:n&~$e:(t?Ze:0)|(t===`full`?Qe:0)}var tt=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=w.none,this.match=i||(a&$e?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ze)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Je.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},nt=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=et(null,t.preserveWhitespace,0)|(n?$e:0);i=r?new tt(r.type,r.attrs,w.none,!0,t.topMatch||r.type.contentMatch,a):n?new tt(null,null,w.none,!0,null,a):new tt(e.schema.topNodeType,null,w.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&Qe?`full`:this.localPreserveWS||(r.options&Ze)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;Xe.hasOwnProperty(a)&&this.parser.normalizeLists&&rt(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:Ye.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(Je.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=w.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):ot(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=et(e,i,a.options);a.options&$e&&a.content.length==0&&(o|=$e);let s=w.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):ot(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new tt(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=Ze);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function rt(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&Xe.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function it(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function at(e){let t={};for(let n in e)t[n]=e[n];return t}function ot(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var st=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=lt(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return lt(t).createTextNode(e.text);let{dom:n,contentDOM:r}=pt(lt(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&pt(lt(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:pt(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=ct(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return ct(e.marks)}};function ct(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function lt(e){return e.document||window.document}var ut=new WeakMap;function dt(e){let t=ut.get(e);return t===void 0&&ut.set(e,t=ft(e)),t}function ft(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function pt(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=dt(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=pt(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var mt=65535,ht=2**16;function gt(e,t){return e+t*ht}function _t(e){return e&mt}function vt(e){return(e-(e&mt))/ht}var yt=1,bt=2,xt=4,St=8,Ct=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&St)>0}get deletedBefore(){return(this.delInfo&(yt|xt))>0}get deletedAfter(){return(this.delInfo&(bt|xt))>0}get deletedAcross(){return(this.delInfo&xt)>0}},wt=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=_t(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+vt(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:gt(o/3,e-s),f=e==s?bt:e==u?yt:xt;return(t<0?e!=s:e!=u)&&(f|=St),new Ct(a,f,d)}r+=l-c}return n?e+r:new Ct(e+r,0,null)}touches(e,t){let n=0,r=_t(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};wt.empty=new wt([]);var Tt=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Ct(e,r,null)}},Et=Object.create(null),D=class{getMap(){return wt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=Et[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Et)throw RangeError(`Duplicate use of step JSON ID `+e);return Et[e]=t,t.prototype.jsonID=e,t}},Dt=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof T)return e.fail(t.message);throw t}}};function Ot(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(Ot(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return b.fromArray(r)}var kt=class e extends D{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new E(Ot(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return Dt.fromReplace(e,this.from,this.to,i)}invert(){return new At(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};D.jsonID(`addMark`,kt);var At=class e extends D{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new E(Ot(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return Dt.fromReplace(e,this.from,this.to,n)}invert(){return new kt(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};D.jsonID(`removeMark`,At);var jt=class e extends D{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Dt.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Dt.fromReplace(e,this.pos,this.pos+1,new E(b.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new Mt(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};D.jsonID(`addNodeMark`,jt);var Mt=class e extends D{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Dt.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Dt.fromReplace(e,this.pos,this.pos+1,new E(b.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new jt(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};D.jsonID(`removeNodeMark`,Mt);var Nt=class e extends D{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Ft(e,this.from,this.to)?Dt.fail(`Structure replace would overwrite content`):Dt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new wt([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?E.empty:new E(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?E.empty:new E(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,E.fromJSON(t,n.slice),!!n.structure)}};Nt.MAP_BIAS=1,D.jsonID(`replace`,Nt);var Pt=class e extends D{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(Ft(e,this.from,this.gapFrom)||Ft(e,this.gapTo,this.to)))return Dt.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Dt.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?Dt.fromReplace(e,this.from,this.to,n):Dt.fail(`Content does not fit in gap`)}getMap(){return new wt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,E.fromJSON(t,n.slice),n.insert,!!n.structure)}};D.jsonID(`replaceAround`,Pt);function Ft(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function It(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new At(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new kt(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function Lt(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof He){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new At(t.from,t.to,t.style)))}function Rt(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Nt(s,l,E.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new At(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new E(b.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new Nt(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(b.empty,!0);e.replace(s,s,new E(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function zt(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Bt(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!zt(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function Vt(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=b.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=b.from(r.node(e).copy(u)),d++):c--;let f=b.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=b.from(i.node(e).copy(f)),p++):l++;e.step(new Pt(c,l,o,s,new E(u.append(f),d,p),u.size-d,!0))}function Ht(e,t,n=null,r=e){let i=Wt(e,t),a=i&&Gt(r,t);return a?i.map(Ut).concat({type:t,attrs:n}).concat(a.map(Ut)):null}function Ut(e){return{type:e,attrs:null}}function Wt(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function Gt(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function Kt(e,t,n){let r=b.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=b.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new Pt(i,a,i,a,new E(r,0,0),n.length,!0))}function qt(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&Xt(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&Yt(e,t,n,a),Rt(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new Pt(c,l,c+1,l-1,new E(b.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&Jt(e,t,n,a),!1}})}function Jt(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function Yt(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
@@ -99,7 +99,7 @@ ${t.renderChildren(e.content||[],`
|
|
|
99
99
|
`);s+=e.type===`paragraph`?`
|
|
100
100
|
|
|
101
101
|
${n}`:`
|
|
102
|
-
${n}`}}),s}function Gd(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var W=class e extends ad{constructor(){super(...arguments),this.type=`node`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function Kd(e){return new cd({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=V(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(lu(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var qd=[`top`,`right`,`bottom`,`left`],Jd=[`start`,`end`],Yd=qd.reduce((e,t)=>e.concat(t,t+`-`+Jd[0],t+`-`+Jd[1]),[]),Xd=Math.min,Zd=Math.max,Qd=Math.round,$d=e=>({x:e,y:e}),ef={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function tf(e,t,n){return Zd(e,Xd(t,n))}function nf(e,t){return typeof e==`function`?e(t):e}function rf(e){return e.split(`-`)[0]}function af(e){return e.split(`-`)[1]}function of(e){return e===`x`?`y`:`x`}function sf(e){return e===`y`?`height`:`width`}function cf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function lf(e){return of(cf(e))}function uf(e,t,n){n===void 0&&(n=!1);let r=af(e),i=lf(e),a=sf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=yf(o)),[o,yf(o)]}function df(e){let t=yf(e);return[ff(e),t,ff(t)]}function ff(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pf=[`left`,`right`],mf=[`right`,`left`],hf=[`top`,`bottom`],gf=[`bottom`,`top`];function _f(e,t,n){switch(e){case`top`:case`bottom`:return n?t?mf:pf:t?pf:mf;case`left`:case`right`:return t?hf:gf;default:return[]}}function vf(e,t,n,r){let i=af(e),a=_f(rf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ff)))),a}function yf(e){let t=rf(e);return ef[t]+e.slice(t.length)}function bf(e){return{top:0,right:0,bottom:0,left:0,...e}}function xf(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:bf(e)}function Sf(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Cf(e,t,n){let{reference:r,floating:i}=e,a=cf(t),o=lf(t),s=sf(o),c=rf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(af(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function wf(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=nf(t,e),p=xf(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Sf(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Sf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Tf=50,Ef=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wf},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Cf(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Tf&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Cf(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Df=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=nf(e,t)||{};if(l==null)return{};let d=xf(u),f={x:n,y:r},p=lf(i),m=sf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Xd(d[_],T),ee=Xd(d[v],T),te=E,ne=C-h[m]-ee,re=C/2-h[m]/2+w,ie=tf(te,re,ne),ae=!c.arrow&&af(i)!=null&&re!==ie&&a.reference[m]/2-(re<te?E:ee)-h[m]/2<0,oe=ae?re<te?re-te:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}});function Of(e,t,n){return(e?[...n.filter(t=>af(t)===e),...n.filter(t=>af(t)!==e)]:n.filter(e=>rf(e)===e)).filter(n=>e?af(n)===e||(t?ff(n)!==n:!1):!0)}var kf=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Yd,autoAlignment:u=!0,...d}=nf(e,t),f=c!==void 0||l===Yd?Of(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=uf(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[rf(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=af(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,af(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},Af=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=nf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=rf(r),_=cf(o),v=rf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[yf(o)]:df(o)),x=p!==`none`;!d&&x&&b.push(...vf(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=uf(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==cf(t))||T.every(e=>cf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=cf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function jf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mf(e){return qd.some(t=>e[t]>=0)}var Nf=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=nf(e,t);switch(i){case`referenceHidden`:{let e=jf(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Mf(e)}}}case`escaped`:{let e=jf(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Mf(e)}}}default:return{}}}}};function Pf(e){let t=Xd(...e.map(e=>e.left)),n=Xd(...e.map(e=>e.top)),r=Zd(...e.map(e=>e.right)),i=Zd(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Ff(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Sf(Pf(e)))}var If=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=nf(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=Ff(u),f=Sf(Pf(u)),p=xf(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(cf(n)===`y`){let e=d[0],t=d[d.length-1],r=rf(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=rf(n)===`left`,t=Zd(...d.map(e=>e.right)),r=Xd(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Lf=new Set([`left`,`top`]);async function Rf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=rf(n),s=af(n),c=cf(n)===`y`,l=Lf.has(o)?-1:1,u=a&&c?-1:1,d=nf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Rf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Bf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=nf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=cf(rf(i)),p=of(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=tf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=tf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Vf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=nf(e,t),u=await o.detectOverflow(t,l),d=rf(i),f=af(i),p=cf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Xd(h-u[g],v),x=Xd(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Zd(u.left,0),t=Zd(u.right,0),n=Zd(u.top,0),r=Zd(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Zd(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Zd(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Hf(){return typeof window<`u`}function Uf(e){return Kf(e)?(e.nodeName||``).toLowerCase():`#document`}function Wf(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gf(e){return((Kf(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Kf(e){return Hf()?e instanceof Node||e instanceof Wf(e).Node:!1}function qf(e){return Hf()?e instanceof Element||e instanceof Wf(e).Element:!1}function Jf(e){return Hf()?e instanceof HTMLElement||e instanceof Wf(e).HTMLElement:!1}function Yf(e){return!Hf()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Wf(e).ShadowRoot}function Xf(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=sp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Zf(e){return/^(table|td|th)$/.test(Uf(e))}function Qf(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var $f=/transform|translate|scale|rotate|perspective|filter/,ep=/paint|layout|strict|content/,tp=e=>!!e&&e!==`none`,np;function rp(e){let t=qf(e)?sp(e):e;return tp(t.transform)||tp(t.translate)||tp(t.scale)||tp(t.rotate)||tp(t.perspective)||!ap()&&(tp(t.backdropFilter)||tp(t.filter))||$f.test(t.willChange||``)||ep.test(t.contain||``)}function ip(e){let t=lp(e);for(;Jf(t)&&!op(t);){if(rp(t))return t;if(Qf(t))return null;t=lp(t)}return null}function ap(){return np??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),np}function op(e){return/^(html|body|#document)$/.test(Uf(e))}function sp(e){return Wf(e).getComputedStyle(e)}function cp(e){return qf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lp(e){if(Uf(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Yf(e)&&e.host||Gf(e);return Yf(t)?t.host:t}function up(e){let t=lp(e);return op(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jf(t)&&Xf(t)?t:up(t)}function dp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=up(e),i=r===e.ownerDocument?.body,a=Wf(r);if(i){let e=fp(a);return t.concat(a,a.visualViewport||[],Xf(r)?r:[],e&&n?dp(e):[])}else return t.concat(r,dp(r,[],n))}function fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pp(e){let t=sp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Jf(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Qd(n)!==a||Qd(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function mp(e){return qf(e)?e:e.contextElement}function hp(e){let t=mp(e);if(!Jf(t))return $d(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=pp(t),o=(a?Qd(n.width):n.width)/r,s=(a?Qd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var gp=$d(0);function _p(e){let t=Wf(e);return!ap()||!t.visualViewport?gp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wf(e)?!1:t}function yp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=mp(e),o=$d(1);t&&(r?qf(r)&&(o=hp(r)):o=hp(e));let s=vp(a,n,r)?_p(a):$d(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Wf(a),t=r&&qf(r)?Wf(r):r,n=e,i=fp(n);for(;i&&r&&t!==n;){let e=hp(i),t=i.getBoundingClientRect(),r=sp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Wf(i),i=fp(n)}}return Sf({width:u,height:d,x:c,y:l})}function bp(e,t){let n=cp(e).scrollLeft;return t?t.left+n:yp(Gf(e)).left+n}function xp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-bp(e,n),y:n.top+t.scrollTop}}function Sp(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Gf(r),s=t?Qf(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=$d(1),u=$d(0),d=Jf(r);if((d||!d&&!a)&&((Uf(r)!==`body`||Xf(o))&&(c=cp(r)),d)){let e=yp(r);l=hp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?xp(o,c):$d(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Cp(e){return Array.from(e.getClientRects())}function wp(e){let t=Gf(e),n=cp(e),r=e.ownerDocument.body,i=Zd(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Zd(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+bp(e),s=-n.scrollTop;return sp(r).direction===`rtl`&&(o+=Zd(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Tp=25;function Ep(e,t){let n=Wf(e),r=Gf(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ap();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=bp(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Tp&&(a-=o)}else l<=Tp&&(a+=l);return{width:a,height:o,x:s,y:c}}function Dp(e,t){let n=yp(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Jf(e)?hp(e):$d(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Op(e,t,n){let r;if(t===`viewport`)r=Ep(e,n);else if(t===`document`)r=wp(Gf(e));else if(qf(t))r=Dp(t,n);else{let n=_p(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sf(r)}function kp(e,t){let n=lp(e);return n===t||!qf(n)||op(n)?!1:sp(n).position===`fixed`||kp(n,t)}function Ap(e,t){let n=t.get(e);if(n)return n;let r=dp(e,[],!1).filter(e=>qf(e)&&Uf(e)!==`body`),i=null,a=sp(e).position===`fixed`,o=a?lp(e):e;for(;qf(o)&&!op(o);){let t=sp(o),n=rp(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Xf(o)&&!n&&kp(e,o))?r=r.filter(e=>e!==o):i=t,o=lp(o)}return t.set(e,r),r}function jp(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Qf(t)?[]:Ap(t,this._c):[].concat(n),r],o=Op(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Op(t,a[e],i);s=Zd(n.top,s),c=Xd(n.right,c),l=Xd(n.bottom,l),u=Zd(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Mp(e){let{width:t,height:n}=pp(e);return{width:t,height:n}}function Np(e,t,n){let r=Jf(t),i=Gf(t),a=n===`fixed`,o=yp(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=$d(0);function l(){c.x=bp(i)}if(r||!r&&!a)if((Uf(t)!==`body`||Xf(i))&&(s=cp(t)),r){let e=yp(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?xp(i,s):$d(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Pp(e){return sp(e).position===`static`}function Fp(e,t){if(!Jf(e)||sp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Gf(e)===n&&(n=n.ownerDocument.body),n}function Ip(e,t){let n=Wf(e);if(Qf(e))return n;if(!Jf(e)){let t=lp(e);for(;t&&!op(t);){if(qf(t)&&!Pp(t))return t;t=lp(t)}return n}let r=Fp(e,t);for(;r&&Zf(r)&&Pp(r);)r=Fp(r,t);return r&&op(r)&&Pp(r)&&!rp(r)?n:r||ip(e)||n}var Lp=async function(e){let t=this.getOffsetParent||Ip,n=this.getDimensions,r=await n(e.floating);return{reference:Np(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rp(e){return sp(e).direction===`rtl`}var zp={convertOffsetParentRelativeRectToViewportRelativeRect:Sp,getDocumentElement:Gf,getClippingRect:jp,getOffsetParent:Ip,getElementRects:Lp,getClientRects:Cp,getDimensions:Mp,getScale:hp,isElement:qf,isRTL:Rp},Bp=zf,Vp=kf,Hp=Bf,Up=Af,Wp=Vf,Gp=Nf,Kp=Df,qp=If,Jp=(e,t,n)=>{let r=new Map,i={platform:zp,...n},a={...i.platform,_c:r};return Ef(e,t,{...i,platform:a})},Yp,Xp;if(typeof WeakMap<`u`){let e=new WeakMap;Yp=t=>e.get(t),Xp=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;Yp=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},Xp=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var Zp=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,!(i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return Yp(e)||Xp(e,Qp(e))}};function Qp(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=$p(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new Zp(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&em(s,o,e),s}function $p(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function em(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r!=null&&(!c.colwidth||c.colwidth[n]!=r)&&((s||=tm(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function tm(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function nm(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}new M(`selectingCells`);function rm(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function im(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function am(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=rm(t.$head)||om(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function om(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function sm(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function cm(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function lm(e,t,n){let r=e.node(-1),i=Zp.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function um(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}var dm=class e extends O{constructor(e,t=e){let n=e.node(-1),r=Zp.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new On(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(sm(r)&&sm(i)&&cm(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return k.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=Zp.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=um(e,0,l)),u>0&&(e=um(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(b.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new E(b.from(o),1,1)}replace(e,t=E.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?E.empty:t)}let i=O.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new E(b.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=Zp.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=Zp.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=Zp.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=Zp.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new fm(this.$anchorCell.pos,this.$headCell.pos)}};dm.prototype.visible=!1,O.jsonID(`cell`,dm);var fm=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&cm(t,n)?new dm(t,n):O.near(n,1)}};new M(`fix-tables`);function pm(e){let t=e.selection,n=am(e),r=n.node(-1),i=n.start(-1),a=Zp.get(r);return{...t instanceof dm?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function mm(e){return function(t,n){if(!im(t))return!1;if(n){let r=nm(t.schema),i=pm(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function hm(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function gm(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?mm(e):function(t,n){if(!im(t))return!1;if(n){let r=nm(t.schema),i=pm(t),a=t.tr,o=hm(`row`,i,r),s=hm(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}gm(`row`,{useDeprecatedLogic:!0}),gm(`column`,{useDeprecatedLogic:!0}),gm(`cell`,{useDeprecatedLogic:!0});function _m(e,t){let n=e.selection;if(!(n instanceof dm))return!1;if(t){let r=e.tr,i=nm(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new E(i,0,0))}),r.docChanged&&t(r)}return!0}_c({ArrowLeft:ym(`horiz`,-1),ArrowRight:ym(`horiz`,1),ArrowUp:ym(`vert`,-1),ArrowDown:ym(`vert`,1),"Shift-ArrowLeft":bm(`horiz`,-1),"Shift-ArrowRight":bm(`horiz`,1),"Shift-ArrowUp":bm(`vert`,-1),"Shift-ArrowDown":bm(`vert`,1),Backspace:_m,"Mod-Backspace":_m,Delete:_m,"Mod-Delete":_m});function vm(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ym(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof dm)return vm(n,r,O.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=xm(i,e,t);if(o==null)return!1;if(e==`horiz`)return vm(n,r,O.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=lm(i,e,t),s;return s=a?O.near(a,1):t<0?O.near(n.doc.resolve(i.before(-1)),-1):O.near(n.doc.resolve(i.after(-1)),1),vm(n,r,s)}}}function bm(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof dm)o=a;else{let r=xm(i,e,t);if(r==null)return!1;o=new dm(n.doc.resolve(r))}let s=lm(o.$headCell,e,t);return s?vm(n,r,new dm(o.$anchorCell,s)):!1}}function xm(e,t,n){if(!(e.state.selection instanceof k))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}new M(`tableColumnResizing`);function Sm(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),a=Math.max(e.right,t.right)-i,o=r-n;return new DOMRect(i,n,a,o)}var Cm=class{constructor({editor:e,element:t,view:n,pluginKey:r=`bubbleMenu`,updateDelay:i=250,resizeDelay:a=60,shouldShow:o,appendTo:s,getReferencedVirtualElement:c,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:`absolute`,placement:`top`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:a}=t,{empty:o}=a,s=!i.textBetween(n,r).length&&Uc(t.selection),c=this.element.contains(document.activeElement);return!(!(e.hasFocus()||c)||o||s||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(e,t)=>{let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);!n&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=l?.scrollTarget??window,this.getReferencedVirtualElement=c,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,o&&(this.shouldShow=o),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener(`dragstart`,this.dragstartHandler),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Up(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(Hp(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Bp(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(Kp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Wp(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(Vp(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(Gp(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(qp(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}get virtualElement(){let{selection:e}=this.editor.state,t=this.getReferencedVirtualElement?.call(this);if(t)return t;if(!this.view?.dom?.parentNode)return;let n=Tu(this.view,e.from,e.to),r={getBoundingClientRect:()=>n,getClientRects:()=>[n]};if(e instanceof A){let t=this.view.nodeDOM(e.from),n=t.dataset.nodeViewWrapper?t:t.querySelector(`[data-node-view-wrapper]`);n&&(t=n),t&&(r={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(e instanceof dm){let{$anchorCell:t,$headCell:n}=e,i=t?t.pos:n.pos,a=n?n.pos:t.pos,o=this.view.nodeDOM(i),s=this.view.nodeDOM(a);if(!o||!s)return;let c=o===s?o.getBoundingClientRect():Sm(o.getBoundingClientRect(),s.getBoundingClientRect());r={getBoundingClientRect:()=>c,getClientRects:()=>[c]}}return r}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&Jp(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,i,a,t)}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:e,from:i,to:a})||!1}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener(`dragstart`,this.dragstartHandler),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},wm=e=>new j({key:typeof e.pluginKey==`string`?new M(e.pluginKey):e.pluginKey,view:t=>new Cm({view:t,...e})});U.create({name:`bubbleMenu`,addOptions(){return{element:null,pluginKey:`bubbleMenu`,updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[wm({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Tm=e(u(),1),G=i(),Em=d(),{getOwnPropertyNames:Dm,getOwnPropertySymbols:Om}=Object,{hasOwnProperty:km}=Object.prototype;function Am(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function jm(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Mm(e){return e?.[Symbol.toStringTag]}function Nm(e){return Dm(e).concat(Om(e))}var Pm=Object.hasOwn||((e,t)=>km.call(e,t));function Fm(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Im=`__v`,Lm=`__o`,Rm=`_owner`,{getOwnPropertyDescriptor:zm,keys:Bm}=Object;function Vm(e,t){return e.byteLength===t.byteLength&&eh(new Uint8Array(e),new Uint8Array(t))}function Hm(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Um(e,t){return e.byteLength===t.byteLength&&eh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Wm(e,t){return Fm(e.getTime(),t.getTime())}function Gm(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Km(e,t){return e===t}function qm(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var Jm=Fm;function Ym(e,t,n){let r=Bm(e),i=r.length;if(Bm(t).length!==i)return!1;for(;i-- >0;)if(!nh(e,t,n,r[i]))return!1;return!0}function Xm(e,t,n){let r=Nm(e),i=r.length;if(Nm(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!nh(e,t,n,a)||(o=zm(e,a),s=zm(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Zm(e,t){return Fm(e.valueOf(),t.valueOf())}function Qm(e,t){return e.source===t.source&&e.flags===t.flags}function $m(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function eh(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function th(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function nh(e,t,n,r){return(r===Rm||r===Lm||r===Im)&&(e.$$typeof||t.$$typeof)?!0:Pm(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var rh=`[object ArrayBuffer]`,ih=`[object Arguments]`,ah=`[object Boolean]`,oh=`[object DataView]`,sh=`[object Date]`,ch=`[object Error]`,lh=`[object Map]`,uh=`[object Number]`,dh=`[object Object]`,fh=`[object RegExp]`,ph=`[object Set]`,mh=`[object String]`,hh={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},gh=`[object URL]`,_h=Object.prototype.toString;function vh({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=_h.call(h);if(b===sh)return r(h,g,_);if(b===fh)return u(h,g,_);if(b===lh)return o(h,g,_);if(b===ph)return d(h,g,_);if(b===dh)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===gh)return p(h,g,_);if(b===ch)return i(h,g,_);if(b===ih)return c(h,g,_);if(hh[b])return f(h,g,_);if(b===rh)return e(h,g,_);if(b===oh)return n(h,g,_);if(b===ah||b===uh||b===mh)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Mm(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function yh({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Vm,areArraysEqual:n?Xm:Hm,areDataViewsEqual:Um,areDatesEqual:Wm,areErrorsEqual:Gm,areFunctionsEqual:Km,areMapsEqual:n?Am(qm,Xm):qm,areNumbersEqual:Jm,areObjectsEqual:n?Xm:Ym,arePrimitiveWrappersEqual:Zm,areRegExpsEqual:Qm,areSetsEqual:n?Am($m,Xm):$m,areTypedArraysEqual:n?Am(eh,Xm):eh,areUrlsEqual:th,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=jm(r.areArraysEqual),t=jm(r.areMapsEqual),n=jm(r.areObjectsEqual),i=jm(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function bh(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function xh({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var Sh=Ch();Ch({strict:!0}),Ch({circular:!0}),Ch({circular:!0,strict:!0}),Ch({createInternalComparator:()=>Fm}),Ch({strict:!0,createInternalComparator:()=>Fm}),Ch({circular:!0,createInternalComparator:()=>Fm}),Ch({circular:!0,createInternalComparator:()=>Fm,strict:!0});function Ch(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=vh(yh(e));return xh({circular:t,comparator:a,createState:r,equals:n?n(a):bh(a),strict:i})}var wh=f(),Th=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},Eh=({contentComponent:e})=>{let t=(0,Em.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,G.jsx)(G.Fragment,{children:Object.values(t)})};function Dh(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:Tm.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var Oh=class extends g.Component{constructor(e){super(e),this.editorContentRef=g.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=Dh(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{ref:Th(t,this.editorContentRef),...n}),e?.contentComponent&&(0,G.jsx)(Eh,{contentComponent:e.contentComponent})]})}},kh=(0,g.forwardRef)((e,t)=>{let n=g.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return g.createElement(Oh,{key:n,innerRef:t,...e})}),Ah=g.memo(kh),jh=typeof window<`u`?g.useLayoutEffect:g.useEffect,Mh=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function Nh(e){let[t]=(0,g.useState)(()=>new Mh(e.editor)),n=(0,wh.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??Sh);return jh(()=>t.watch(e.editor),[e.editor,t]),(0,g.useDebugValue)(n),n}var Ph=!1,Fh=typeof window>`u`,Ih=Fh||!!(typeof window<`u`&&window.next),Lh=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=e??!0;return Fh?(t&&Ph&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),t=!1):Ih&&e===void 0&&(t=!1,Ph&&console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")),t?this.createEditor():null}createEditor(){return new Ad({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length?e.extensions.every((e,n)=>e===t.extensions?.[n]):!1:e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Rh(e={},t=[]){let n=(0,g.useRef)(e);n.current=e;let[r]=(0,g.useState)(()=>new Lh(n)),i=(0,Em.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,g.useDebugValue)(i),(0,g.useEffect)(r.onRender(t)),Nh({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var zh=(0,g.createContext)({editor:null});zh.Consumer;var Bh=()=>(0,g.useContext)(zh),Vh=(0,g.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Hh=()=>(0,g.useContext)(Vh);g.forwardRef((e,t)=>{let{onDragStart:n}=Hh();return(0,G.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})}),g.createContext({markViewContentRef:()=>{}});var Uh=(0,g.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});Uh.displayName=`TiptapContext`;var Wh=()=>(0,g.useContext)(Uh);function Gh({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,g.useMemo)(()=>({editor:r}),[r]),a=(0,g.useMemo)(()=>({editor:r}),[r]);return(0,G.jsx)(zh.Provider,{value:a,children:(0,G.jsx)(Uh.Provider,{value:i,children:n})})}Gh.displayName=`Tiptap`;function Kh({...e}){let{editor:t}=Wh();return(0,G.jsx)(Ah,{editor:t,...e})}Kh.displayName=`Tiptap.Content`,Object.assign(Gh,{Content:Kh});var qh=class{constructor({editor:e,element:t,view:n,pluginKey:r=`floatingMenu`,updateDelay:i=250,resizeDelay:a=60,options:o,appendTo:s,shouldShow:c}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:n}=t,{$anchor:r,empty:i}=n,a=r.depth===1,o=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&r.parent.childCount===0&&!this.getTextContent(r.parent);return!(!e.hasFocus()||!i||!a||!o||!this.editor.isEditable)},this.floatingUIOptions={strategy:`absolute`,placement:`right`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=o?.scrollTarget??window,this.floatingUIOptions={...this.floatingUIOptions,...o},this.element.tabIndex=0,c&&(this.shouldShow=c),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return nu(e,{textSerializers:ru(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Up(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(Hp(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Bp(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(Kp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Wp(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(Vp(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(Gp(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(qp(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,view:this.view,state:t,oldState:e,from:i,to:a})}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){if(!this.view?.dom?.parentNode)return;let{selection:e}=this.editor.state,t=Tu(this.view,e.from,e.to);Jp({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Jh=e=>new j({key:typeof e.pluginKey==`string`?new M(e.pluginKey):e.pluginKey,view:t=>new qh({view:t,...e})});U.create({name:`floatingMenu`,addOptions(){return{element:null,options:{},pluginKey:`floatingMenu`,updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,`updatePosition`),!0)}},addProseMirrorPlugins(){return this.options.element?[Jh({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function Yh(e,t){return e??new M(t)}var Xh=typeof window<`u`?g.useLayoutEffect:g.useEffect,Zh=new Set([`left`,`opacity`,`position`,`top`,`visibility`,`width`]),Qh=new Set(`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom`.split(`.`)),$h=new Set([`children`,`className`,`style`]),eg=new Set([`tabIndex`]),tg=new Set([`accessKey`,`autoCapitalize`,`contentEditable`,`contextMenu`,`dir`,`draggable`,`enterKeyHint`,`hidden`,`id`,`lang`,`nonce`,`role`,`slot`,`spellCheck`,`tabIndex`,`title`,`translate`]),ng={Blur:`focusout`,DoubleClick:`dblclick`,Focus:`focusin`,MouseEnter:`mouseenter`,MouseLeave:`mouseleave`};function rg(e,t){return/^on[A-Z]/.test(e)&&typeof t==`function`}function ig(e){return e.startsWith(`aria-`)||e.startsWith(`data-`),e}function ag(e){return e.startsWith(`aria-`)||e.startsWith(`data-`)||tg.has(e)}function og(e){return e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function sg(e){let t=e.endsWith(`Capture`),n=(t?e.slice(0,-7):e).slice(2);return{eventName:ng[n]??n.toLowerCase(),options:t?{capture:!0}:void 0}}function cg(e,t){let n=t.defaultPrevented,r=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{r=!0,t.stopPropagation()}}}),i}function lg(e){return eg.has(e)}function ug(e,t,n){if(t===`tabIndex`){e.tabIndex=Number(n);return}e[t]=n}function dg(e,t){if(t===`tabIndex`){e.removeAttribute(`tabindex`);return}let n=e[t];if(typeof n==`boolean`){e[t]=!1;return}if(typeof n==`number`){e[t]=0;return}e[t]=``}function fg(e,t){return typeof t!=`number`||t===0||e.startsWith(`--`)||Qh.has(e)?String(t):`${t}px`}function pg(e,t){Zh.has(t)||e.style.removeProperty(og(t))}function mg(e,t,n){Zh.has(t)||e.style.setProperty(og(t),fg(t,n))}function hg(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach(r=>{if($h.has(r)||!ag(r)||rg(r,t[r])||rg(r,n[r]))return;let i=t[r],a=n[r];if(i===a)return;let o=ig(r);if(a==null||a===!1){lg(r)&&dg(e,r),e.removeAttribute(o);return}if(a===!0){lg(r)&&ug(e,r,!0),e.setAttribute(o,``);return}if(lg(r)){ug(e,r,a);return}e.setAttribute(o,String(a))})}function gg(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute(`class`)}}function _g(e,t,n){let r=t??{},i=n??{};new Set([...Object.keys(r),...Object.keys(i)]).forEach(t=>{let n=r[t],a=i[t];if(n!==a){if(a==null){pg(e,t);return}mg(e,t,a)}})}function vg(e,t,n){t.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)});let r=[];return Object.entries(n).forEach(([t,n])=>{if(!rg(t,n))return;let{eventName:i,options:a}=sg(t),o=t=>{n(cg(e,t))};e.addEventListener(i,o,a),r.push({eventName:i,listener:o,options:a})}),r}function yg(e,t){let n=(0,g.useRef)({}),r=(0,g.useRef)([]);Xh(()=>{let i=n.current;return gg(e,i.className,t.className),_g(e,i.style,t.style),hg(e,i,t),r.current=vg(e,r.current,t),n.current=t,()=>{r.current.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),r.current=[]}},[e,t])}var bg=g.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,getReferencedVirtualElement:o,options:s,children:c,...l},u)=>{let d=(0,g.useRef)(document.createElement(`div`)),f=(0,g.useRef)(Yh(e,`bubbleMenu`)).current;yg(d.current,l),typeof u==`function`?u(d.current):u&&(u.current=d.current);let{editor:p}=Bh(),m=t||p,h={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:f,shouldShow:a,getReferencedVirtualElement:o,options:s},_=(0,g.useRef)(h);_.current=h;let[v,y]=(0,g.useState)(!1),b=(0,g.useRef)(!0);return(0,g.useEffect)(()=>{if(m?.isDestroyed)return;if(!m){console.warn(`BubbleMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=d.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=wm({..._.current,editor:m,element:e});m.registerPlugin(t);let n=_.current.pluginKey;return b.current=!0,y(!0),()=>{y(!1),m.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[m]),(0,g.useEffect)(()=>{if(!(!v||!m||m.isDestroyed)){if(b.current){b.current=!1;return}m.view.dispatch(m.state.tr.setMeta(f,{type:`updateOptions`,options:_.current}))}},[v,m,n,r,a,s,i,o,f]),(0,Tm.createPortal)(c,d.current)});g.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,options:o,children:s,...c},l)=>{let u=(0,g.useRef)(document.createElement(`div`)),d=(0,g.useRef)(Yh(e,`floatingMenu`)).current;yg(u.current,c),typeof l==`function`?l(u.current):l&&(l.current=u.current);let{editor:f}=Bh(),p=t||f,m={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:d,shouldShow:a,options:o},h=(0,g.useRef)(m);h.current=m;let[_,v]=(0,g.useState)(!1),y=(0,g.useRef)(!0);return(0,g.useEffect)(()=>{if(p?.isDestroyed)return;if(!p){console.warn(`FloatingMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=u.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=Jh({...h.current,editor:p,element:e});p.registerPlugin(t);let n=h.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),p.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,g.useEffect)(()=>{if(!(!_||!p||p.isDestroyed)){if(y.current){y.current=!1;return}p.view.dispatch(p.state.tr.setMeta(d,{type:`updateOptions`,options:h.current}))}},[_,p,n,r,a,o,i,d]),(0,Tm.createPortal)(s,u.current)});var xg=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,Sg=`ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2`,Cg=`numeric`,wg=`ascii`,Tg=`alpha`,Eg=`asciinumeric`,Dg=`alphanumeric`,Og=`domain`,kg=`emoji`,Ag=`scheme`,jg=`slashscheme`,Mg=`whitespace`;function Ng(e,t){return e in t||(t[e]=[]),t[e]}function Pg(e,t,n){t[Cg]&&(t[Eg]=!0,t[Dg]=!0),t[wg]&&(t[Eg]=!0,t[Tg]=!0),t[Eg]&&(t[Dg]=!0),t[Tg]&&(t[Dg]=!0),t[Dg]&&(t[Og]=!0),t[kg]&&(t[Og]=!0);for(let r in t){let t=Ng(r,n);t.indexOf(e)<0&&t.push(e)}}function Fg(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Ig(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Ig.groups={},Ig.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=Ig.groups;let i;return t&&t.j?i=t:(i=new Ig(t),n&&r&&Pg(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=Ig.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new Ig,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new Ig,a&&(r&&(o.t&&typeof o.t==`string`?Pg(a,Object.assign(Fg(o.t,r),n),r):n&&Pg(a,n,r)),o.t=a),i.j[e]=o,o}};var K=(e,t,n,r,i)=>e.ta(t,n,r,i),q=(e,t,n,r,i)=>e.tr(t,n,r,i),Lg=(e,t,n,r,i)=>e.ts(t,n,r,i),J=(e,t,n,r,i)=>e.tt(t,n,r,i),Rg=`WORD`,zg=`UWORD`,Bg=`ASCIINUMERICAL`,Vg=`ALPHANUMERICAL`,Hg=`LOCALHOST`,Ug=`TLD`,Wg=`UTLD`,Gg=`SCHEME`,Kg=`SLASH_SCHEME`,qg=`NUM`,Jg=`WS`,Yg=`NL`,Xg=`OPENBRACE`,Zg=`CLOSEBRACE`,Qg=`OPENBRACKET`,$g=`CLOSEBRACKET`,e_=`OPENPAREN`,t_=`CLOSEPAREN`,n_=`OPENANGLEBRACKET`,r_=`CLOSEANGLEBRACKET`,i_=`FULLWIDTHLEFTPAREN`,a_=`FULLWIDTHRIGHTPAREN`,o_=`LEFTCORNERBRACKET`,s_=`RIGHTCORNERBRACKET`,c_=`LEFTWHITECORNERBRACKET`,l_=`RIGHTWHITECORNERBRACKET`,u_=`FULLWIDTHLESSTHAN`,d_=`FULLWIDTHGREATERTHAN`,f_=`AMPERSAND`,p_=`APOSTROPHE`,m_=`ASTERISK`,h_=`AT`,g_=`BACKSLASH`,__=`BACKTICK`,v_=`CARET`,y_=`COLON`,b_=`COMMA`,x_=`DOLLAR`,S_=`DOT`,C_=`EQUALS`,w_=`EXCLAMATION`,T_=`HYPHEN`,E_=`PERCENT`,D_=`PIPE`,O_=`PLUS`,k_=`POUND`,A_=`QUERY`,j_=`QUOTE`,M_=`FULLWIDTHMIDDLEDOT`,N_=`SEMI`,P_=`SLASH`,F_=`TILDE`,I_=`UNDERSCORE`,L_=`EMOJI`,R_=`SYM`,z_=Object.freeze({__proto__:null,ALPHANUMERICAL:Vg,AMPERSAND:f_,APOSTROPHE:p_,ASCIINUMERICAL:Bg,ASTERISK:m_,AT:h_,BACKSLASH:g_,BACKTICK:__,CARET:v_,CLOSEANGLEBRACKET:r_,CLOSEBRACE:Zg,CLOSEBRACKET:$g,CLOSEPAREN:t_,COLON:y_,COMMA:b_,DOLLAR:x_,DOT:S_,EMOJI:L_,EQUALS:C_,EXCLAMATION:w_,FULLWIDTHGREATERTHAN:d_,FULLWIDTHLEFTPAREN:i_,FULLWIDTHLESSTHAN:u_,FULLWIDTHMIDDLEDOT:M_,FULLWIDTHRIGHTPAREN:a_,HYPHEN:T_,LEFTCORNERBRACKET:o_,LEFTWHITECORNERBRACKET:c_,LOCALHOST:Hg,NL:Yg,NUM:qg,OPENANGLEBRACKET:n_,OPENBRACE:Xg,OPENBRACKET:Qg,OPENPAREN:e_,PERCENT:E_,PIPE:D_,PLUS:O_,POUND:k_,QUERY:A_,QUOTE:j_,RIGHTCORNERBRACKET:s_,RIGHTWHITECORNERBRACKET:l_,SCHEME:Gg,SEMI:N_,SLASH:P_,SLASH_SCHEME:Kg,SYM:R_,TILDE:F_,TLD:Ug,UNDERSCORE:I_,UTLD:Wg,UWORD:zg,WORD:Rg,WS:Jg}),B_=/[a-z]/,V_=/\p{L}/u,H_=/\p{Emoji}/u,U_=/\d/,W_=/\s/,G_=`\r`,K_=`
|
|
102
|
+
${n}`}}),s}function Gd(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var W=class e extends ad{constructor(){super(...arguments),this.type=`node`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function Kd(e){return new cd({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=V(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(lu(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var qd=[`top`,`right`,`bottom`,`left`],Jd=[`start`,`end`],Yd=qd.reduce((e,t)=>e.concat(t,t+`-`+Jd[0],t+`-`+Jd[1]),[]),Xd=Math.min,Zd=Math.max,Qd=Math.round,$d=e=>({x:e,y:e}),ef={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function tf(e,t,n){return Zd(e,Xd(t,n))}function nf(e,t){return typeof e==`function`?e(t):e}function rf(e){return e.split(`-`)[0]}function af(e){return e.split(`-`)[1]}function of(e){return e===`x`?`y`:`x`}function sf(e){return e===`y`?`height`:`width`}function cf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function lf(e){return of(cf(e))}function uf(e,t,n){n===void 0&&(n=!1);let r=af(e),i=lf(e),a=sf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=yf(o)),[o,yf(o)]}function df(e){let t=yf(e);return[ff(e),t,ff(t)]}function ff(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pf=[`left`,`right`],mf=[`right`,`left`],hf=[`top`,`bottom`],gf=[`bottom`,`top`];function _f(e,t,n){switch(e){case`top`:case`bottom`:return n?t?mf:pf:t?pf:mf;case`left`:case`right`:return t?hf:gf;default:return[]}}function vf(e,t,n,r){let i=af(e),a=_f(rf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ff)))),a}function yf(e){let t=rf(e);return ef[t]+e.slice(t.length)}function bf(e){return{top:0,right:0,bottom:0,left:0,...e}}function xf(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:bf(e)}function Sf(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Cf(e,t,n){let{reference:r,floating:i}=e,a=cf(t),o=lf(t),s=sf(o),c=rf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(af(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function wf(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=nf(t,e),p=xf(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Sf(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Sf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Tf=50,Ef=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wf},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Cf(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Tf&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Cf(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Df=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=nf(e,t)||{};if(l==null)return{};let d=xf(u),f={x:n,y:r},p=lf(i),m=sf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Xd(d[_],T),ee=Xd(d[v],T),te=E,ne=C-h[m]-ee,re=C/2-h[m]/2+w,ie=tf(te,re,ne),ae=!c.arrow&&af(i)!=null&&re!==ie&&a.reference[m]/2-(re<te?E:ee)-h[m]/2<0,oe=ae?re<te?re-te:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}});function Of(e,t,n){return(e?[...n.filter(t=>af(t)===e),...n.filter(t=>af(t)!==e)]:n.filter(e=>rf(e)===e)).filter(n=>e?af(n)===e||(t?ff(n)!==n:!1):!0)}var kf=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Yd,autoAlignment:u=!0,...d}=nf(e,t),f=c!==void 0||l===Yd?Of(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=uf(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[rf(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=af(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,af(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},Af=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=nf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=rf(r),_=cf(o),v=rf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[yf(o)]:df(o)),x=p!==`none`;!d&&x&&b.push(...vf(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=uf(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==cf(t))||T.every(e=>cf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=cf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function jf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mf(e){return qd.some(t=>e[t]>=0)}var Nf=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=nf(e,t);switch(i){case`referenceHidden`:{let e=jf(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Mf(e)}}}case`escaped`:{let e=jf(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Mf(e)}}}default:return{}}}}};function Pf(e){let t=Xd(...e.map(e=>e.left)),n=Xd(...e.map(e=>e.top)),r=Zd(...e.map(e=>e.right)),i=Zd(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Ff(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Sf(Pf(e)))}var If=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=nf(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=Ff(u),f=Sf(Pf(u)),p=xf(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(cf(n)===`y`){let e=d[0],t=d[d.length-1],r=rf(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=rf(n)===`left`,t=Zd(...d.map(e=>e.right)),r=Xd(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Lf=new Set([`left`,`top`]);async function Rf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=rf(n),s=af(n),c=cf(n)===`y`,l=Lf.has(o)?-1:1,u=a&&c?-1:1,d=nf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Rf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Bf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=nf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=cf(rf(i)),p=of(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=tf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=tf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Vf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=nf(e,t),u=await o.detectOverflow(t,l),d=rf(i),f=af(i),p=cf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Xd(h-u[g],v),x=Xd(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Zd(u.left,0),t=Zd(u.right,0),n=Zd(u.top,0),r=Zd(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Zd(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Zd(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Hf(){return typeof window<`u`}function Uf(e){return Kf(e)?(e.nodeName||``).toLowerCase():`#document`}function Wf(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gf(e){return((Kf(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Kf(e){return Hf()?e instanceof Node||e instanceof Wf(e).Node:!1}function qf(e){return Hf()?e instanceof Element||e instanceof Wf(e).Element:!1}function Jf(e){return Hf()?e instanceof HTMLElement||e instanceof Wf(e).HTMLElement:!1}function Yf(e){return!Hf()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Wf(e).ShadowRoot}function Xf(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=sp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Zf(e){return/^(table|td|th)$/.test(Uf(e))}function Qf(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var $f=/transform|translate|scale|rotate|perspective|filter/,ep=/paint|layout|strict|content/,tp=e=>!!e&&e!==`none`,np;function rp(e){let t=qf(e)?sp(e):e;return tp(t.transform)||tp(t.translate)||tp(t.scale)||tp(t.rotate)||tp(t.perspective)||!ap()&&(tp(t.backdropFilter)||tp(t.filter))||$f.test(t.willChange||``)||ep.test(t.contain||``)}function ip(e){let t=lp(e);for(;Jf(t)&&!op(t);){if(rp(t))return t;if(Qf(t))return null;t=lp(t)}return null}function ap(){return np??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),np}function op(e){return/^(html|body|#document)$/.test(Uf(e))}function sp(e){return Wf(e).getComputedStyle(e)}function cp(e){return qf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lp(e){if(Uf(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Yf(e)&&e.host||Gf(e);return Yf(t)?t.host:t}function up(e){let t=lp(e);return op(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jf(t)&&Xf(t)?t:up(t)}function dp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=up(e),i=r===e.ownerDocument?.body,a=Wf(r);if(i){let e=fp(a);return t.concat(a,a.visualViewport||[],Xf(r)?r:[],e&&n?dp(e):[])}else return t.concat(r,dp(r,[],n))}function fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pp(e){let t=sp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Jf(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Qd(n)!==a||Qd(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function mp(e){return qf(e)?e:e.contextElement}function hp(e){let t=mp(e);if(!Jf(t))return $d(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=pp(t),o=(a?Qd(n.width):n.width)/r,s=(a?Qd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var gp=$d(0);function _p(e){let t=Wf(e);return!ap()||!t.visualViewport?gp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wf(e)?!1:t}function yp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=mp(e),o=$d(1);t&&(r?qf(r)&&(o=hp(r)):o=hp(e));let s=vp(a,n,r)?_p(a):$d(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Wf(a),t=r&&qf(r)?Wf(r):r,n=e,i=fp(n);for(;i&&r&&t!==n;){let e=hp(i),t=i.getBoundingClientRect(),r=sp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Wf(i),i=fp(n)}}return Sf({width:u,height:d,x:c,y:l})}function bp(e,t){let n=cp(e).scrollLeft;return t?t.left+n:yp(Gf(e)).left+n}function xp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-bp(e,n),y:n.top+t.scrollTop}}function Sp(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Gf(r),s=t?Qf(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=$d(1),u=$d(0),d=Jf(r);if((d||!d&&!a)&&((Uf(r)!==`body`||Xf(o))&&(c=cp(r)),d)){let e=yp(r);l=hp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?xp(o,c):$d(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Cp(e){return Array.from(e.getClientRects())}function wp(e){let t=Gf(e),n=cp(e),r=e.ownerDocument.body,i=Zd(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Zd(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+bp(e),s=-n.scrollTop;return sp(r).direction===`rtl`&&(o+=Zd(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Tp=25;function Ep(e,t){let n=Wf(e),r=Gf(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ap();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=bp(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Tp&&(a-=o)}else l<=Tp&&(a+=l);return{width:a,height:o,x:s,y:c}}function Dp(e,t){let n=yp(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Jf(e)?hp(e):$d(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Op(e,t,n){let r;if(t===`viewport`)r=Ep(e,n);else if(t===`document`)r=wp(Gf(e));else if(qf(t))r=Dp(t,n);else{let n=_p(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sf(r)}function kp(e,t){let n=lp(e);return n===t||!qf(n)||op(n)?!1:sp(n).position===`fixed`||kp(n,t)}function Ap(e,t){let n=t.get(e);if(n)return n;let r=dp(e,[],!1).filter(e=>qf(e)&&Uf(e)!==`body`),i=null,a=sp(e).position===`fixed`,o=a?lp(e):e;for(;qf(o)&&!op(o);){let t=sp(o),n=rp(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Xf(o)&&!n&&kp(e,o))?r=r.filter(e=>e!==o):i=t,o=lp(o)}return t.set(e,r),r}function jp(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Qf(t)?[]:Ap(t,this._c):[].concat(n),r],o=Op(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Op(t,a[e],i);s=Zd(n.top,s),c=Xd(n.right,c),l=Xd(n.bottom,l),u=Zd(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Mp(e){let{width:t,height:n}=pp(e);return{width:t,height:n}}function Np(e,t,n){let r=Jf(t),i=Gf(t),a=n===`fixed`,o=yp(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=$d(0);function l(){c.x=bp(i)}if(r||!r&&!a)if((Uf(t)!==`body`||Xf(i))&&(s=cp(t)),r){let e=yp(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?xp(i,s):$d(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Pp(e){return sp(e).position===`static`}function Fp(e,t){if(!Jf(e)||sp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Gf(e)===n&&(n=n.ownerDocument.body),n}function Ip(e,t){let n=Wf(e);if(Qf(e))return n;if(!Jf(e)){let t=lp(e);for(;t&&!op(t);){if(qf(t)&&!Pp(t))return t;t=lp(t)}return n}let r=Fp(e,t);for(;r&&Zf(r)&&Pp(r);)r=Fp(r,t);return r&&op(r)&&Pp(r)&&!rp(r)?n:r||ip(e)||n}var Lp=async function(e){let t=this.getOffsetParent||Ip,n=this.getDimensions,r=await n(e.floating);return{reference:Np(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rp(e){return sp(e).direction===`rtl`}var zp={convertOffsetParentRelativeRectToViewportRelativeRect:Sp,getDocumentElement:Gf,getClippingRect:jp,getOffsetParent:Ip,getElementRects:Lp,getClientRects:Cp,getDimensions:Mp,getScale:hp,isElement:qf,isRTL:Rp},Bp=zf,Vp=kf,Hp=Bf,Up=Af,Wp=Vf,Gp=Nf,Kp=Df,qp=If,Jp=(e,t,n)=>{let r=new Map,i={platform:zp,...n},a={...i.platform,_c:r};return Ef(e,t,{...i,platform:a})},Yp,Xp;if(typeof WeakMap<`u`){let e=new WeakMap;Yp=t=>e.get(t),Xp=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;Yp=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},Xp=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var Zp=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,!(i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return Yp(e)||Xp(e,Qp(e))}};function Qp(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=$p(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new Zp(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&em(s,o,e),s}function $p(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function em(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r!=null&&(!c.colwidth||c.colwidth[n]!=r)&&((s||=tm(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function tm(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function nm(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}new M(`selectingCells`);function rm(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function im(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function am(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=rm(t.$head)||om(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function om(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function sm(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function cm(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function lm(e,t,n){let r=e.node(-1),i=Zp.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function um(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}var dm=class e extends O{constructor(e,t=e){let n=e.node(-1),r=Zp.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new On(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(sm(r)&&sm(i)&&cm(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return k.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=Zp.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=um(e,0,l)),u>0&&(e=um(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(b.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new E(b.from(o),1,1)}replace(e,t=E.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?E.empty:t)}let i=O.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new E(b.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=Zp.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=Zp.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=Zp.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=Zp.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new fm(this.$anchorCell.pos,this.$headCell.pos)}};dm.prototype.visible=!1,O.jsonID(`cell`,dm);var fm=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&cm(t,n)?new dm(t,n):O.near(n,1)}};new M(`fix-tables`);function pm(e){let t=e.selection,n=am(e),r=n.node(-1),i=n.start(-1),a=Zp.get(r);return{...t instanceof dm?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function mm(e){return function(t,n){if(!im(t))return!1;if(n){let r=nm(t.schema),i=pm(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function hm(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function gm(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?mm(e):function(t,n){if(!im(t))return!1;if(n){let r=nm(t.schema),i=pm(t),a=t.tr,o=hm(`row`,i,r),s=hm(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}gm(`row`,{useDeprecatedLogic:!0}),gm(`column`,{useDeprecatedLogic:!0}),gm(`cell`,{useDeprecatedLogic:!0});function _m(e,t){let n=e.selection;if(!(n instanceof dm))return!1;if(t){let r=e.tr,i=nm(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new E(i,0,0))}),r.docChanged&&t(r)}return!0}_c({ArrowLeft:ym(`horiz`,-1),ArrowRight:ym(`horiz`,1),ArrowUp:ym(`vert`,-1),ArrowDown:ym(`vert`,1),"Shift-ArrowLeft":bm(`horiz`,-1),"Shift-ArrowRight":bm(`horiz`,1),"Shift-ArrowUp":bm(`vert`,-1),"Shift-ArrowDown":bm(`vert`,1),Backspace:_m,"Mod-Backspace":_m,Delete:_m,"Mod-Delete":_m});function vm(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ym(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof dm)return vm(n,r,O.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=xm(i,e,t);if(o==null)return!1;if(e==`horiz`)return vm(n,r,O.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=lm(i,e,t),s;return s=a?O.near(a,1):t<0?O.near(n.doc.resolve(i.before(-1)),-1):O.near(n.doc.resolve(i.after(-1)),1),vm(n,r,s)}}}function bm(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof dm)o=a;else{let r=xm(i,e,t);if(r==null)return!1;o=new dm(n.doc.resolve(r))}let s=lm(o.$headCell,e,t);return s?vm(n,r,new dm(o.$anchorCell,s)):!1}}function xm(e,t,n){if(!(e.state.selection instanceof k))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}new M(`tableColumnResizing`);function Sm(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),a=Math.max(e.right,t.right)-i,o=r-n;return new DOMRect(i,n,a,o)}var Cm=class{constructor({editor:e,element:t,view:n,pluginKey:r=`bubbleMenu`,updateDelay:i=250,resizeDelay:a=60,shouldShow:o,appendTo:s,getReferencedVirtualElement:c,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:`absolute`,placement:`top`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:a}=t,{empty:o}=a,s=!i.textBetween(n,r).length&&Uc(t.selection),c=this.element.contains(document.activeElement);return!(!(e.hasFocus()||c)||o||s||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(e,t)=>{let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);!n&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=l?.scrollTarget??window,this.getReferencedVirtualElement=c,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,o&&(this.shouldShow=o),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener(`dragstart`,this.dragstartHandler),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Up(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(Hp(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Bp(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(Kp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Wp(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(Vp(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(Gp(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(qp(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}get virtualElement(){let{selection:e}=this.editor.state,t=this.getReferencedVirtualElement?.call(this);if(t)return t;if(!this.view?.dom?.parentNode)return;let n=Tu(this.view,e.from,e.to),r={getBoundingClientRect:()=>n,getClientRects:()=>[n]};if(e instanceof A){let t=this.view.nodeDOM(e.from),n=t.dataset.nodeViewWrapper?t:t.querySelector(`[data-node-view-wrapper]`);n&&(t=n),t&&(r={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(e instanceof dm){let{$anchorCell:t,$headCell:n}=e,i=t?t.pos:n.pos,a=n?n.pos:t.pos,o=this.view.nodeDOM(i),s=this.view.nodeDOM(a);if(!o||!s)return;let c=o===s?o.getBoundingClientRect():Sm(o.getBoundingClientRect(),s.getBoundingClientRect());r={getBoundingClientRect:()=>c,getClientRects:()=>[c]}}return r}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&Jp(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,i,a,t)}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:e,from:i,to:a})||!1}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener(`dragstart`,this.dragstartHandler),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},wm=e=>new j({key:typeof e.pluginKey==`string`?new M(e.pluginKey):e.pluginKey,view:t=>new Cm({view:t,...e})});U.create({name:`bubbleMenu`,addOptions(){return{element:null,pluginKey:`bubbleMenu`,updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[wm({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Tm=e(i(),1),G=a(),Em=d(),{getOwnPropertyNames:Dm,getOwnPropertySymbols:Om}=Object,{hasOwnProperty:km}=Object.prototype;function Am(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function jm(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Mm(e){return e?.[Symbol.toStringTag]}function Nm(e){return Dm(e).concat(Om(e))}var Pm=Object.hasOwn||((e,t)=>km.call(e,t));function Fm(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Im=`__v`,Lm=`__o`,Rm=`_owner`,{getOwnPropertyDescriptor:zm,keys:Bm}=Object;function Vm(e,t){return e.byteLength===t.byteLength&&eh(new Uint8Array(e),new Uint8Array(t))}function Hm(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Um(e,t){return e.byteLength===t.byteLength&&eh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Wm(e,t){return Fm(e.getTime(),t.getTime())}function Gm(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Km(e,t){return e===t}function qm(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var Jm=Fm;function Ym(e,t,n){let r=Bm(e),i=r.length;if(Bm(t).length!==i)return!1;for(;i-- >0;)if(!nh(e,t,n,r[i]))return!1;return!0}function Xm(e,t,n){let r=Nm(e),i=r.length;if(Nm(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!nh(e,t,n,a)||(o=zm(e,a),s=zm(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Zm(e,t){return Fm(e.valueOf(),t.valueOf())}function Qm(e,t){return e.source===t.source&&e.flags===t.flags}function $m(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function eh(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function th(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function nh(e,t,n,r){return(r===Rm||r===Lm||r===Im)&&(e.$$typeof||t.$$typeof)?!0:Pm(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var rh=`[object ArrayBuffer]`,ih=`[object Arguments]`,ah=`[object Boolean]`,oh=`[object DataView]`,sh=`[object Date]`,ch=`[object Error]`,lh=`[object Map]`,uh=`[object Number]`,dh=`[object Object]`,fh=`[object RegExp]`,ph=`[object Set]`,mh=`[object String]`,hh={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},gh=`[object URL]`,_h=Object.prototype.toString;function vh({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=_h.call(h);if(b===sh)return r(h,g,_);if(b===fh)return u(h,g,_);if(b===lh)return o(h,g,_);if(b===ph)return d(h,g,_);if(b===dh)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===gh)return p(h,g,_);if(b===ch)return i(h,g,_);if(b===ih)return c(h,g,_);if(hh[b])return f(h,g,_);if(b===rh)return e(h,g,_);if(b===oh)return n(h,g,_);if(b===ah||b===uh||b===mh)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Mm(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function yh({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Vm,areArraysEqual:n?Xm:Hm,areDataViewsEqual:Um,areDatesEqual:Wm,areErrorsEqual:Gm,areFunctionsEqual:Km,areMapsEqual:n?Am(qm,Xm):qm,areNumbersEqual:Jm,areObjectsEqual:n?Xm:Ym,arePrimitiveWrappersEqual:Zm,areRegExpsEqual:Qm,areSetsEqual:n?Am($m,Xm):$m,areTypedArraysEqual:n?Am(eh,Xm):eh,areUrlsEqual:th,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=jm(r.areArraysEqual),t=jm(r.areMapsEqual),n=jm(r.areObjectsEqual),i=jm(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function bh(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function xh({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var Sh=Ch();Ch({strict:!0}),Ch({circular:!0}),Ch({circular:!0,strict:!0}),Ch({createInternalComparator:()=>Fm}),Ch({strict:!0,createInternalComparator:()=>Fm}),Ch({circular:!0,createInternalComparator:()=>Fm}),Ch({circular:!0,createInternalComparator:()=>Fm,strict:!0});function Ch(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=vh(yh(e));return xh({circular:t,comparator:a,createState:r,equals:n?n(a):bh(a),strict:i})}var wh=f(),Th=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},Eh=({contentComponent:e})=>{let t=(0,Em.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,G.jsx)(G.Fragment,{children:Object.values(t)})};function Dh(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:Tm.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var Oh=class extends g.Component{constructor(e){super(e),this.editorContentRef=g.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=Dh(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{ref:Th(t,this.editorContentRef),...n}),e?.contentComponent&&(0,G.jsx)(Eh,{contentComponent:e.contentComponent})]})}},kh=(0,g.forwardRef)((e,t)=>{let n=g.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return g.createElement(Oh,{key:n,innerRef:t,...e})}),Ah=g.memo(kh),jh=typeof window<`u`?g.useLayoutEffect:g.useEffect,Mh=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function Nh(e){let[t]=(0,g.useState)(()=>new Mh(e.editor)),n=(0,wh.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??Sh);return jh(()=>t.watch(e.editor),[e.editor,t]),(0,g.useDebugValue)(n),n}var Ph=!1,Fh=typeof window>`u`,Ih=Fh||!!(typeof window<`u`&&window.next),Lh=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=e??!0;return Fh?(t&&Ph&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),t=!1):Ih&&e===void 0&&(t=!1,Ph&&console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")),t?this.createEditor():null}createEditor(){return new Ad({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length?e.extensions.every((e,n)=>e===t.extensions?.[n]):!1:e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Rh(e={},t=[]){let n=(0,g.useRef)(e);n.current=e;let[r]=(0,g.useState)(()=>new Lh(n)),i=(0,Em.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,g.useDebugValue)(i),(0,g.useEffect)(r.onRender(t)),Nh({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var zh=(0,g.createContext)({editor:null});zh.Consumer;var Bh=()=>(0,g.useContext)(zh),Vh=(0,g.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Hh=()=>(0,g.useContext)(Vh);g.forwardRef((e,t)=>{let{onDragStart:n}=Hh();return(0,G.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})}),g.createContext({markViewContentRef:()=>{}});var Uh=(0,g.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});Uh.displayName=`TiptapContext`;var Wh=()=>(0,g.useContext)(Uh);function Gh({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,g.useMemo)(()=>({editor:r}),[r]),a=(0,g.useMemo)(()=>({editor:r}),[r]);return(0,G.jsx)(zh.Provider,{value:a,children:(0,G.jsx)(Uh.Provider,{value:i,children:n})})}Gh.displayName=`Tiptap`;function Kh({...e}){let{editor:t}=Wh();return(0,G.jsx)(Ah,{editor:t,...e})}Kh.displayName=`Tiptap.Content`,Object.assign(Gh,{Content:Kh});var qh=class{constructor({editor:e,element:t,view:n,pluginKey:r=`floatingMenu`,updateDelay:i=250,resizeDelay:a=60,options:o,appendTo:s,shouldShow:c}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:n}=t,{$anchor:r,empty:i}=n,a=r.depth===1,o=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&r.parent.childCount===0&&!this.getTextContent(r.parent);return!(!e.hasFocus()||!i||!a||!o||!this.editor.isEditable)},this.floatingUIOptions={strategy:`absolute`,placement:`right`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=o?.scrollTarget??window,this.floatingUIOptions={...this.floatingUIOptions,...o},this.element.tabIndex=0,c&&(this.shouldShow=c),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return nu(e,{textSerializers:ru(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Up(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(Hp(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Bp(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(Kp(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Wp(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(Vp(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(Gp(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(qp(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,view:this.view,state:t,oldState:e,from:i,to:a})}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){if(!this.view?.dom?.parentNode)return;let{selection:e}=this.editor.state,t=Tu(this.view,e.from,e.to);Jp({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Jh=e=>new j({key:typeof e.pluginKey==`string`?new M(e.pluginKey):e.pluginKey,view:t=>new qh({view:t,...e})});U.create({name:`floatingMenu`,addOptions(){return{element:null,options:{},pluginKey:`floatingMenu`,updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,`updatePosition`),!0)}},addProseMirrorPlugins(){return this.options.element?[Jh({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function Yh(e,t){return e??new M(t)}var Xh=typeof window<`u`?g.useLayoutEffect:g.useEffect,Zh=new Set([`left`,`opacity`,`position`,`top`,`visibility`,`width`]),Qh=new Set(`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom`.split(`.`)),$h=new Set([`children`,`className`,`style`]),eg=new Set([`tabIndex`]),tg=new Set([`accessKey`,`autoCapitalize`,`contentEditable`,`contextMenu`,`dir`,`draggable`,`enterKeyHint`,`hidden`,`id`,`lang`,`nonce`,`role`,`slot`,`spellCheck`,`tabIndex`,`title`,`translate`]),ng={Blur:`focusout`,DoubleClick:`dblclick`,Focus:`focusin`,MouseEnter:`mouseenter`,MouseLeave:`mouseleave`};function rg(e,t){return/^on[A-Z]/.test(e)&&typeof t==`function`}function ig(e){return e.startsWith(`aria-`)||e.startsWith(`data-`),e}function ag(e){return e.startsWith(`aria-`)||e.startsWith(`data-`)||tg.has(e)}function og(e){return e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function sg(e){let t=e.endsWith(`Capture`),n=(t?e.slice(0,-7):e).slice(2);return{eventName:ng[n]??n.toLowerCase(),options:t?{capture:!0}:void 0}}function cg(e,t){let n=t.defaultPrevented,r=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{r=!0,t.stopPropagation()}}}),i}function lg(e){return eg.has(e)}function ug(e,t,n){if(t===`tabIndex`){e.tabIndex=Number(n);return}e[t]=n}function dg(e,t){if(t===`tabIndex`){e.removeAttribute(`tabindex`);return}let n=e[t];if(typeof n==`boolean`){e[t]=!1;return}if(typeof n==`number`){e[t]=0;return}e[t]=``}function fg(e,t){return typeof t!=`number`||t===0||e.startsWith(`--`)||Qh.has(e)?String(t):`${t}px`}function pg(e,t){Zh.has(t)||e.style.removeProperty(og(t))}function mg(e,t,n){Zh.has(t)||e.style.setProperty(og(t),fg(t,n))}function hg(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach(r=>{if($h.has(r)||!ag(r)||rg(r,t[r])||rg(r,n[r]))return;let i=t[r],a=n[r];if(i===a)return;let o=ig(r);if(a==null||a===!1){lg(r)&&dg(e,r),e.removeAttribute(o);return}if(a===!0){lg(r)&&ug(e,r,!0),e.setAttribute(o,``);return}if(lg(r)){ug(e,r,a);return}e.setAttribute(o,String(a))})}function gg(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute(`class`)}}function _g(e,t,n){let r=t??{},i=n??{};new Set([...Object.keys(r),...Object.keys(i)]).forEach(t=>{let n=r[t],a=i[t];if(n!==a){if(a==null){pg(e,t);return}mg(e,t,a)}})}function vg(e,t,n){t.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)});let r=[];return Object.entries(n).forEach(([t,n])=>{if(!rg(t,n))return;let{eventName:i,options:a}=sg(t),o=t=>{n(cg(e,t))};e.addEventListener(i,o,a),r.push({eventName:i,listener:o,options:a})}),r}function yg(e,t){let n=(0,g.useRef)({}),r=(0,g.useRef)([]);Xh(()=>{let i=n.current;return gg(e,i.className,t.className),_g(e,i.style,t.style),hg(e,i,t),r.current=vg(e,r.current,t),n.current=t,()=>{r.current.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),r.current=[]}},[e,t])}var bg=g.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,getReferencedVirtualElement:o,options:s,children:c,...l},u)=>{let d=(0,g.useRef)(document.createElement(`div`)),f=(0,g.useRef)(Yh(e,`bubbleMenu`)).current;yg(d.current,l),typeof u==`function`?u(d.current):u&&(u.current=d.current);let{editor:p}=Bh(),m=t||p,h={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:f,shouldShow:a,getReferencedVirtualElement:o,options:s},_=(0,g.useRef)(h);_.current=h;let[v,y]=(0,g.useState)(!1),b=(0,g.useRef)(!0);return(0,g.useEffect)(()=>{if(m?.isDestroyed)return;if(!m){console.warn(`BubbleMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=d.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=wm({..._.current,editor:m,element:e});m.registerPlugin(t);let n=_.current.pluginKey;return b.current=!0,y(!0),()=>{y(!1),m.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[m]),(0,g.useEffect)(()=>{if(!(!v||!m||m.isDestroyed)){if(b.current){b.current=!1;return}m.view.dispatch(m.state.tr.setMeta(f,{type:`updateOptions`,options:_.current}))}},[v,m,n,r,a,s,i,o,f]),(0,Tm.createPortal)(c,d.current)});g.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,options:o,children:s,...c},l)=>{let u=(0,g.useRef)(document.createElement(`div`)),d=(0,g.useRef)(Yh(e,`floatingMenu`)).current;yg(u.current,c),typeof l==`function`?l(u.current):l&&(l.current=u.current);let{editor:f}=Bh(),p=t||f,m={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:d,shouldShow:a,options:o},h=(0,g.useRef)(m);h.current=m;let[_,v]=(0,g.useState)(!1),y=(0,g.useRef)(!0);return(0,g.useEffect)(()=>{if(p?.isDestroyed)return;if(!p){console.warn(`FloatingMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=u.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=Jh({...h.current,editor:p,element:e});p.registerPlugin(t);let n=h.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),p.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,g.useEffect)(()=>{if(!(!_||!p||p.isDestroyed)){if(y.current){y.current=!1;return}p.view.dispatch(p.state.tr.setMeta(d,{type:`updateOptions`,options:h.current}))}},[_,p,n,r,a,o,i,d]),(0,Tm.createPortal)(s,u.current)});var xg=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,Sg=`ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2`,Cg=`numeric`,wg=`ascii`,Tg=`alpha`,Eg=`asciinumeric`,Dg=`alphanumeric`,Og=`domain`,kg=`emoji`,Ag=`scheme`,jg=`slashscheme`,Mg=`whitespace`;function Ng(e,t){return e in t||(t[e]=[]),t[e]}function Pg(e,t,n){t[Cg]&&(t[Eg]=!0,t[Dg]=!0),t[wg]&&(t[Eg]=!0,t[Tg]=!0),t[Eg]&&(t[Dg]=!0),t[Tg]&&(t[Dg]=!0),t[Dg]&&(t[Og]=!0),t[kg]&&(t[Og]=!0);for(let r in t){let t=Ng(r,n);t.indexOf(e)<0&&t.push(e)}}function Fg(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Ig(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Ig.groups={},Ig.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=Ig.groups;let i;return t&&t.j?i=t:(i=new Ig(t),n&&r&&Pg(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=Ig.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new Ig,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new Ig,a&&(r&&(o.t&&typeof o.t==`string`?Pg(a,Object.assign(Fg(o.t,r),n),r):n&&Pg(a,n,r)),o.t=a),i.j[e]=o,o}};var K=(e,t,n,r,i)=>e.ta(t,n,r,i),q=(e,t,n,r,i)=>e.tr(t,n,r,i),Lg=(e,t,n,r,i)=>e.ts(t,n,r,i),J=(e,t,n,r,i)=>e.tt(t,n,r,i),Rg=`WORD`,zg=`UWORD`,Bg=`ASCIINUMERICAL`,Vg=`ALPHANUMERICAL`,Hg=`LOCALHOST`,Ug=`TLD`,Wg=`UTLD`,Gg=`SCHEME`,Kg=`SLASH_SCHEME`,qg=`NUM`,Jg=`WS`,Yg=`NL`,Xg=`OPENBRACE`,Zg=`CLOSEBRACE`,Qg=`OPENBRACKET`,$g=`CLOSEBRACKET`,e_=`OPENPAREN`,t_=`CLOSEPAREN`,n_=`OPENANGLEBRACKET`,r_=`CLOSEANGLEBRACKET`,i_=`FULLWIDTHLEFTPAREN`,a_=`FULLWIDTHRIGHTPAREN`,o_=`LEFTCORNERBRACKET`,s_=`RIGHTCORNERBRACKET`,c_=`LEFTWHITECORNERBRACKET`,l_=`RIGHTWHITECORNERBRACKET`,u_=`FULLWIDTHLESSTHAN`,d_=`FULLWIDTHGREATERTHAN`,f_=`AMPERSAND`,p_=`APOSTROPHE`,m_=`ASTERISK`,h_=`AT`,g_=`BACKSLASH`,__=`BACKTICK`,v_=`CARET`,y_=`COLON`,b_=`COMMA`,x_=`DOLLAR`,S_=`DOT`,C_=`EQUALS`,w_=`EXCLAMATION`,T_=`HYPHEN`,E_=`PERCENT`,D_=`PIPE`,O_=`PLUS`,k_=`POUND`,A_=`QUERY`,j_=`QUOTE`,M_=`FULLWIDTHMIDDLEDOT`,N_=`SEMI`,P_=`SLASH`,F_=`TILDE`,I_=`UNDERSCORE`,L_=`EMOJI`,R_=`SYM`,z_=Object.freeze({__proto__:null,ALPHANUMERICAL:Vg,AMPERSAND:f_,APOSTROPHE:p_,ASCIINUMERICAL:Bg,ASTERISK:m_,AT:h_,BACKSLASH:g_,BACKTICK:__,CARET:v_,CLOSEANGLEBRACKET:r_,CLOSEBRACE:Zg,CLOSEBRACKET:$g,CLOSEPAREN:t_,COLON:y_,COMMA:b_,DOLLAR:x_,DOT:S_,EMOJI:L_,EQUALS:C_,EXCLAMATION:w_,FULLWIDTHGREATERTHAN:d_,FULLWIDTHLEFTPAREN:i_,FULLWIDTHLESSTHAN:u_,FULLWIDTHMIDDLEDOT:M_,FULLWIDTHRIGHTPAREN:a_,HYPHEN:T_,LEFTCORNERBRACKET:o_,LEFTWHITECORNERBRACKET:c_,LOCALHOST:Hg,NL:Yg,NUM:qg,OPENANGLEBRACKET:n_,OPENBRACE:Xg,OPENBRACKET:Qg,OPENPAREN:e_,PERCENT:E_,PIPE:D_,PLUS:O_,POUND:k_,QUERY:A_,QUOTE:j_,RIGHTCORNERBRACKET:s_,RIGHTWHITECORNERBRACKET:l_,SCHEME:Gg,SEMI:N_,SLASH:P_,SLASH_SCHEME:Kg,SYM:R_,TILDE:F_,TLD:Ug,UNDERSCORE:I_,UTLD:Wg,UWORD:zg,WORD:Rg,WS:Jg}),B_=/[a-z]/,V_=/\p{L}/u,H_=/\p{Emoji}/u,U_=/\d/,W_=/\s/,G_=`\r`,K_=`
|
|
103
103
|
`,q_=`️`,J_=``,Y_=``,X_=null,Z_=null;function Q_(e=[]){let t={};Ig.groups=t;let n=new Ig;X_??=nv(xg),Z_??=nv(Sg),J(n,`'`,p_),J(n,`{`,Xg),J(n,`}`,Zg),J(n,`[`,Qg),J(n,`]`,$g),J(n,`(`,e_),J(n,`)`,t_),J(n,`<`,n_),J(n,`>`,r_),J(n,`(`,i_),J(n,`)`,a_),J(n,`「`,o_),J(n,`」`,s_),J(n,`『`,c_),J(n,`』`,l_),J(n,`<`,u_),J(n,`>`,d_),J(n,`&`,f_),J(n,`*`,m_),J(n,`@`,h_),J(n,"`",__),J(n,`^`,v_),J(n,`:`,y_),J(n,`,`,b_),J(n,`$`,x_),J(n,`.`,S_),J(n,`=`,C_),J(n,`!`,w_),J(n,`-`,T_),J(n,`%`,E_),J(n,`|`,D_),J(n,`+`,O_),J(n,`#`,k_),J(n,`?`,A_),J(n,`"`,j_),J(n,`/`,P_),J(n,`;`,N_),J(n,`~`,F_),J(n,`_`,I_),J(n,`\\`,g_),J(n,`・`,M_);let r=q(n,U_,qg,{[Cg]:!0});q(r,U_,r);let i=q(r,B_,Bg,{[Eg]:!0}),a=q(r,V_,Vg,{[Dg]:!0}),o=q(n,B_,Rg,{[wg]:!0});q(o,U_,i),q(o,B_,o),q(i,U_,i),q(i,B_,i);let s=q(n,V_,zg,{[Tg]:!0});q(s,B_),q(s,U_,a),q(s,V_,s),q(a,U_,a),q(a,B_),q(a,V_,a);let c=J(n,K_,Yg,{[Mg]:!0}),l=J(n,G_,Jg,{[Mg]:!0}),u=q(n,W_,Jg,{[Mg]:!0});J(n,Y_,u),J(l,K_,c),J(l,Y_,u),q(l,W_,u),J(u,G_),J(u,K_),q(u,W_,u),J(u,Y_,u);let d=q(n,H_,L_,{[kg]:!0});J(d,`#`),q(d,H_,d),J(d,q_,d);let f=J(d,J_);J(f,`#`),q(f,H_,d);let p=[[B_,o],[U_,i]],m=[[B_,null],[V_,s],[U_,a]];for(let e=0;e<X_.length;e++)tv(n,X_[e],Ug,Rg,p);for(let e=0;e<Z_.length;e++)tv(n,Z_[e],Wg,zg,m);Pg(Ug,{tld:!0,ascii:!0},t),Pg(Wg,{utld:!0,alpha:!0},t),tv(n,`file`,Gg,Rg,p),tv(n,`mailto`,Gg,Rg,p),tv(n,`http`,Kg,Rg,p),tv(n,`https`,Kg,Rg,p),tv(n,`ftp`,Kg,Rg,p),tv(n,`ftps`,Kg,Rg,p),Pg(Gg,{scheme:!0,ascii:!0},t),Pg(Kg,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[Ag]:!0}:{[jg]:!0};r.indexOf(`-`)>=0?i[Og]=!0:B_.test(r)?U_.test(r)?i[Eg]=!0:i[wg]=!0:i[Cg]=!0,Lg(n,r,r,i)}return Lg(n,`localhost`,Hg,{ascii:!0}),n.jd=new Ig(R_),{start:n,tokens:Object.assign({groups:t},z_)}}function $_(e,t){let n=ev(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function ev(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function tv(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new Ig(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new Ig(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function nv(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var rv={defaultProtocol:`http`,events:null,format:av,formatHref:av,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function iv(e,t=null){let n=Object.assign({},rv);e&&(n=Object.assign(n,e instanceof iv?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}iv.prototype={o:rv,ignoreTags:[],defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:rv[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function av(e){return e}function ov(e,t){this.t=`token`,this.v=e,this.tk=t}ov.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=rv.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function sv(e,t){class n extends ov{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var cv=sv(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),lv=sv(`text`),uv=sv(`nl`),dv=sv(`url`,{isLink:!0,toHref(e=rv.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Hg&&e[1].t===y_}}),fv=e=>new Ig(e);function pv({groups:e}){let t=e.domain.concat([f_,m_,h_,g_,__,v_,x_,C_,T_,qg,E_,D_,O_,k_,P_,R_,F_,I_]),n=[p_,y_,b_,S_,w_,E_,A_,j_,N_,n_,r_,Xg,Zg,$g,Qg,e_,t_,i_,a_,o_,s_,c_,l_,u_,d_],r=[f_,p_,m_,g_,__,v_,x_,C_,T_,Xg,Zg,E_,D_,O_,k_,A_,P_,R_,F_,I_],i=fv(),a=J(i,F_);K(a,r,a),K(a,e.domain,a);let o=fv(),s=fv(),c=fv();K(i,e.domain,o),K(i,e.scheme,s),K(i,e.slashscheme,c),K(o,r,a),K(o,e.domain,o);let l=J(o,h_);J(a,h_,l),J(s,h_,l),J(c,h_,l);let u=J(a,S_);K(u,r,a),K(u,e.domain,a);let d=fv();K(l,e.domain,d),K(d,e.domain,d);let f=J(d,S_);K(f,e.domain,d);let p=fv(cv);K(f,e.tld,p),K(f,e.utld,p),J(l,Hg,p);let m=J(d,T_);J(m,T_,m),K(m,e.domain,d),K(p,e.domain,d),J(p,S_,f),J(p,T_,m);let h=J(o,T_),g=J(o,S_);J(h,T_,h),K(h,e.domain,o),K(g,r,a),K(g,e.domain,o);let _=fv(dv);K(g,e.tld,_),K(g,e.utld,_),K(_,e.domain,o),K(_,r,a),J(_,S_,g),J(_,T_,h),J(_,h_,l);let v=J(_,y_),y=fv(dv);K(v,e.numeric,y);let b=fv(dv),x=fv();K(b,t,b),K(b,n,x),K(x,t,b),K(x,n,x),J(_,P_,b),J(y,P_,b);let S=J(s,y_),C=J(J(J(c,y_),P_),P_);K(s,e.domain,o),J(s,S_,g),J(s,T_,h),K(c,e.domain,o),J(c,S_,g),J(c,T_,h),K(S,e.domain,b),J(S,P_,b),J(S,A_,b),K(C,e.domain,b),K(C,t,b),J(C,P_,b);let w=[[Xg,Zg],[Qg,$g],[e_,t_],[n_,r_],[i_,a_],[o_,s_],[c_,l_],[u_,d_]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=J(b,r);J(x,r,a);let o=fv(dv);K(a,t,o);let s=fv();K(a,n,s),J(a,i,b),K(o,t,o),K(o,n,s),K(s,t,o),K(s,n,s),J(o,i,b),J(s,i,b)}return J(i,Hg,_),J(i,Yg,uv),{start:i,tokens:z_}}function mv(e,t,n){let r=n.length,i=0,a=[],o=[];for(;i<r;){let s=e,c=null,l=null,u=0,d=null,f=-1;for(;i<r&&!(c=s.go(n[i].t));)o.push(n[i++]);for(;i<r&&(l=c||s.go(n[i].t));)c=null,s=l,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push(hv(lv,t,o)),o=[]),i-=f,u-=f;let e=d.t,r=n.slice(i-u,i);a.push(hv(e,t,r))}}return o.length>0&&a.push(hv(lv,t,o)),a}function hv(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var gv=typeof console<`u`&&console&&console.warn||(()=>{}),_v=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,Y={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function vv(){return Ig.groups={},Y.scanner=null,Y.parser=null,Y.tokenQueue=[],Y.pluginQueue=[],Y.customSchemes=[],Y.initialized=!1,Y}function yv(e,t=!1){if(Y.initialized&&gv(`linkifyjs: already initialized - will not register custom scheme "${e}" ${_v}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
104
104
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
105
105
|
2. Cannot start or end with "-"
|
|
@@ -167,7 +167,7 @@ ${t.innerHTML}
|
|
|
167
167
|
`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){e.set({langPrefix:this.options.languageClassPrefix??`language-`})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,`</code></pre>`)}}}}}}),TT=W.create({name:`hardBreak`}).extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type){e.write(e.inTable?yT.storage.markdown.serialize.call(this,e,t,n):`\\
|
|
168
168
|
`);return}},parse:{}}}}}),ET=W.create({name:`heading`}).extend({addStorage(){return{markdown:{serialize:Zw.nodes.heading,parse:{}}}}}),DT=W.create({name:`horizontalRule`}).extend({addStorage(){return{markdown:{serialize:Zw.nodes.horizontal_rule,parse:{}}}}}),OT=W.create({name:`image`}).extend({addStorage(){return{markdown:{serialize:Zw.nodes.image,parse:{}}}}}),kT=W.create({name:`listItem`}).extend({addStorage(){return{markdown:{serialize:Zw.nodes.list_item,parse:{}}}}}),AT=W.create({name:`orderedList`});function jT(e,t,n){let r=0;for(;n-r>0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var MT=AT.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let i=t.attrs.start||1,a=String(i+t.childCount-1).length,o=e.repeat(` `,a+2),s=jT(t,n,r)%2?`) `:`. `;e.renderList(t,o,t=>{let n=String(i+t);return e.repeat(` `,a-n.length)+n+s})},parse:{}}}}}),NT=W.create({name:`paragraph`}).extend({addStorage(){return{markdown:{serialize:Zw.nodes.paragraph,parse:{}}}}});function PT(e){var t;return(e==null||(t=e.content)==null?void 0:t.content)??[]}var FT=W.create({name:`table`}).extend({addStorage(){return{markdown:{serialize(e,t,n){if(!LT(t)){yT.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((t,n,r)=>{if(e.write(`| `),t.forEach((t,n,r)=>{r&&e.write(` | `);let i=t.firstChild;i.textContent.trim()&&e.renderInline(i)}),e.write(` |`),e.ensureNewLine(),!r){let n=Array.from({length:t.childCount}).map(()=>`---`).join(` | `);e.write(`| ${n} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function IT(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function LT(e){let t=PT(e),n=t[0],r=t.slice(1);return!(PT(n).some(e=>e.type.name!==`tableHeader`||IT(e)||e.childCount>1)||r.some(e=>PT(e).some(e=>e.type.name===`tableHeader`||IT(e)||e.childCount>1)))}var RT=[ST,CT,wT,TT,ET,DT,yT,OT,kT,MT,NT,FT,W.create({name:`taskItem`}).extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?`[x]`:`[ ]`;e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(`.task-list-item`)].forEach(e=>{let t=e.querySelector(`input`);e.setAttribute(`data-type`,`taskItem`),t&&(e.setAttribute(`data-checked`,t.checked),t.remove())})}}}}}}),W.create({name:`taskList`}).extend({addStorage(){return{markdown:{serialize:CT.storage.markdown.serialize,parse:{setup(e){e.use(tT.default)},updateDOM(e){[...e.querySelectorAll(`.contains-task-list`)].forEach(e=>{e.setAttribute(`data-type`,`taskList`)})}}}}}}),W.create({name:`text`}).extend({addStorage(){return{markdown:{serialize(e,t){e.text(gT(t.text))},parse:{}}}}}),od.create({name:`bold`}).extend({addStorage(){return{markdown:{serialize:Zw.marks.strong,parse:{}}}}}),od.create({name:`code`}).extend({addStorage(){return{markdown:{serialize:Zw.marks.code,parse:{}}}}}),pT,od.create({name:`italic`}).extend({addStorage(){return{markdown:{serialize:Zw.marks.em,parse:{}}}}}),od.create({name:`link`}).extend({addStorage(){return{markdown:{serialize:Zw.marks.link,parse:{}}}}}),od.create({name:`strike`}).extend({addStorage(){return{markdown:{serialize:{open:`~~`,close:`~~`,expelEnclosingWhitespace:!0},parse:{}}}}})];function zT(e){let t=e.storage?.markdown,n=RT.find(t=>t.name===e.name)?.storage.markdown;return t||n?{...n,...t}:null}var BT=class{constructor(e){iT(this,`editor`,null),this.editor=e}serialize(e){let t=new fT(this.nodes,this.marks,{hardBreakNodeName:TT.name});return t.renderContent(e),t.out}get nodes(){return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(e=>[e,this.serializeNode(yT)])),...Object.fromEntries(this.editor.extensionManager.extensions.filter(e=>e.type===`node`&&this.serializeNode(e)).map(e=>[e.name,this.serializeNode(e)])??[])}}get marks(){return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(e=>[e,this.serializeMark(pT)])),...Object.fromEntries(this.editor.extensionManager.extensions.filter(e=>e.type===`mark`&&this.serializeMark(e)).map(e=>[e.name,this.serializeMark(e)])??[])}}serializeNode(e){var t;return(t=zT(e))==null||(t=t.serialize)==null?void 0:t.bind({editor:this.editor,options:e.options})}serializeMark(e){let t=zT(e)?.serialize;return t?{...t,open:typeof t.open==`function`?t.open.bind({editor:this.editor,options:e.options}):t.open,close:typeof t.close==`function`?t.close.bind({editor:this.editor,options:e.options}):t.close}:null}},VT=class{constructor(e,t){iT(this,`editor`,null),iT(this,`md`,null);let{html:n,linkify:r,breaks:i}=t;this.editor=e,this.md=this.withPatchedRenderer(zw({html:n,linkify:r,breaks:i}))}parse(e){let{inline:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e==`string`){this.editor.extensionManager.extensions.forEach(e=>{var t;return(t=zT(e))==null||(t=t.parse)==null||(t=t.setup)==null?void 0:t.call({editor:this.editor,options:e.options},this.md)});let n=hT(this.md.render(e));return this.editor.extensionManager.extensions.forEach(e=>{var t;return(t=zT(e))==null||(t=t.parse)==null||(t=t.updateDOM)==null?void 0:t.call({editor:this.editor,options:e.options},n)}),this.normalizeDOM(n,{inline:t,content:e}),n.innerHTML}return e}normalizeDOM(e,t){let{inline:n,content:r}=t;return this.normalizeBlocks(e),e.querySelectorAll(`*`).forEach(e=>{e.nextSibling?.nodeType===Node.TEXT_NODE&&!e.closest(`pre`)&&(e.nextSibling.textContent=e.nextSibling.textContent.replace(/^\n/,``))}),n&&this.normalizeInline(e,r),e}normalizeBlocks(e){let t=Object.values(this.editor.schema.nodes).filter(e=>e.isBlock).map(e=>e.spec.parseDOM?.map(e=>e.tag)).flat().filter(Boolean).join(`,`);t&&[...e.querySelectorAll(t)].forEach(e=>{e.parentElement.matches(`p`)&&_T(e)})}normalizeInline(e,t){var n;if((n=e.firstElementChild)!=null&&n.matches(`p`)){let n=e.firstElementChild,{nextElementSibling:r}=n,i=t.match(/^\s+/)?.[0]??``,a=r?``:t.match(/\s+$/)?.[0]??``;if(t.match(/^\n\n/)){n.innerHTML=`${n.innerHTML}${a}`;return}vT(n),e.innerHTML=`${i}${e.innerHTML}${a}`}}withPatchedRenderer(e){let t=e=>function(){let t=e(...arguments);return t===`
|
|
169
169
|
`?t:t[t.length-1]===`
|
|
170
|
-
`?t.slice(0,-1):t};return e.renderer.rules.hardbreak=t(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=t(e.renderer.rules.softbreak),e.renderer.rules.fence=t(e.renderer.rules.fence),e.renderer.rules.code_block=t(e.renderer.rules.code_block),e.renderer.renderToken=t(e.renderer.renderToken.bind(e.renderer)),e}},HT=U.create({name:`markdownClipboard`,addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new j({key:new M(`markdownClipboard`),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return qe.fromSchema(this.editor.schema).parseSlice(hT(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),UT=U.create({name:`markdown`,priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:`tight`,bulletListMarker:`-`,linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=hd.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>i=>e.insertContentAt(t,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new VT(this.editor,this.options),serializer:new BT(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[aT.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),HT.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function WT(e,t){let n=0,r=-1;return e.descendants((e,i)=>{if(r>=0)return!1;if(e.isText){let a=e.text??``,o=n+a.length;if(t<=o)return r=i+(t-n),!1;n=o}return!0}),r<0&&(r=e.content.size),r}function GT(e,t){let n=0;return e.descendants((e,r)=>{if(e.isText){let i=e.text??``;if(t<=r+i.length){let e=Math.max(0,t-r);return n+=e,!1}n+=i.length}return!0}),n}function KT(e){return e.storage.markdown.getMarkdown()}var qT=new M(`commentAnchorHighlights`),JT=new M(`activeHighlight`),YT=U.create({name:`commentAnchorHighlight`,addOptions(){return{anchors:[]}},addProseMirrorPlugins(){let{anchors:e}=this.options;return[new j({key:qT,state:{init(t,{doc:n}){return XT(n,e)},apply(e,t){let n=e.getMeta(qT);return n?XT(e.doc,n.anchors):e.docChanged?t.map(e.mapping,e.doc):t}},props:{decorations(e){return this.getState(e)}}})]}});function XT(e,t){let n=[];for(let r of t){let t=WT(e,r.anchorStart),i=WT(e,r.anchorEnd);t<i&&n.push(gs.inline(t,i,{class:`comment-anchor-highlight`}))}return I.create(e,n)}var ZT=U.create({name:`activeHighlight`,addOptions(){return{range:null}},addProseMirrorPlugins(){let{range:e}=this.options;return[new j({key:JT,state:{init(t,{doc:n}){return QT(n,e)},apply(e,t){let n=e.getMeta(JT);return n?QT(e.doc,n.range):e.docChanged?t.map(e.mapping,e.doc):t}},props:{decorations(e){return this.getState(e)}}})]}});function QT(e,t){if(!t)return I.empty;let n=WT(e,t.start),r=WT(e,t.end);return n>=r?I.empty:I.create(e,[gs.inline(n,r,{class:`active-highlight`})])}function $T({editor:e,onCommentSubmit:t,commentSubmitting:n}){let[r,i]=(0,g.useState)(!1),[
|
|
170
|
+
`?t.slice(0,-1):t};return e.renderer.rules.hardbreak=t(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=t(e.renderer.rules.softbreak),e.renderer.rules.fence=t(e.renderer.rules.fence),e.renderer.rules.code_block=t(e.renderer.rules.code_block),e.renderer.renderToken=t(e.renderer.renderToken.bind(e.renderer)),e}},HT=U.create({name:`markdownClipboard`,addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new j({key:new M(`markdownClipboard`),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return qe.fromSchema(this.editor.schema).parseSlice(hT(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),UT=U.create({name:`markdown`,priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:`tight`,bulletListMarker:`-`,linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=hd.Commands.config.addCommands();return{setContent:(t,n)=>r=>e.setContent(r.editor.storage.markdown.parser.parse(t),n)(r),insertContentAt:(t,n,r)=>i=>e.insertContentAt(t,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new VT(this.editor,this.options),serializer:new BT(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[aT.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),HT.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function WT(e,t){let n=0,r=-1;return e.descendants((e,i)=>{if(r>=0)return!1;if(e.isText){let a=e.text??``,o=n+a.length;if(t<=o)return r=i+(t-n),!1;n=o}return!0}),r<0&&(r=e.content.size),r}function GT(e,t){let n=0;return e.descendants((e,r)=>{if(e.isText){let i=e.text??``;if(t<=r+i.length){let e=Math.max(0,t-r);return n+=e,!1}n+=i.length}return!0}),n}function KT(e){return e.storage.markdown.getMarkdown()}var qT=new M(`commentAnchorHighlights`),JT=new M(`activeHighlight`),YT=U.create({name:`commentAnchorHighlight`,addOptions(){return{anchors:[]}},addProseMirrorPlugins(){let{anchors:e}=this.options;return[new j({key:qT,state:{init(t,{doc:n}){return XT(n,e)},apply(e,t){let n=e.getMeta(qT);return n?XT(e.doc,n.anchors):e.docChanged?t.map(e.mapping,e.doc):t}},props:{decorations(e){return this.getState(e)}}})]}});function XT(e,t){let n=[];for(let r of t){let t=WT(e,r.anchorStart),i=WT(e,r.anchorEnd);t<i&&n.push(gs.inline(t,i,{class:`comment-anchor-highlight`}))}return I.create(e,n)}var ZT=U.create({name:`activeHighlight`,addOptions(){return{range:null}},addProseMirrorPlugins(){let{range:e}=this.options;return[new j({key:JT,state:{init(t,{doc:n}){return QT(n,e)},apply(e,t){let n=e.getMeta(JT);return n?QT(e.doc,n.range):e.docChanged?t.map(e.mapping,e.doc):t}},props:{decorations(e){return this.getState(e)}}})]}});function QT(e,t){if(!t)return I.empty;let n=WT(e,t.start),r=WT(e,t.end);return n>=r?I.empty:I.create(e,[gs.inline(n,r,{class:`active-highlight`})])}function $T({editor:e,onCommentSubmit:t,commentSubmitting:n}){let[r,i]=(0,g.useState)(!1),[a,s]=(0,g.useState)(``),d=(0,g.useCallback)(()=>{i(t=>{let n=!t;if(n&&e){let{from:t,to:n}=e.state.selection;if(t!==n){let r=e.state.tr.setMeta(JT,{range:{start:GT(e.state.doc,t),end:GT(e.state.doc,n)}});e.view.dispatch(r)}}else if(e){let t=e.state.tr.setMeta(JT,{range:null});e.view.dispatch(t)}return n})},[e]);if(!e)return null;let f=o(`h-7 w-7 rounded-md flex items-center justify-center`,`text-[var(--content-secondary)]`,`hover:bg-[var(--surface-hover)] hover:text-[var(--content-emphasised)]`,`transition-colors`),_=o(`bg-[var(--surface-active)] text-[var(--content-emphasised)]`),v=[{name:`bold`,icon:(0,G.jsx)(p,{size:14}),action:()=>e.chain().focus().toggleBold().run()},{name:`italic`,icon:(0,G.jsx)(m,{size:14}),action:()=>e.chain().focus().toggleItalic().run()},{name:`strike`,icon:(0,G.jsx)(h,{size:14}),action:()=>e.chain().focus().toggleStrike().run(),separator:!0},{name:`code`,icon:(0,G.jsx)(l,{size:14}),action:()=>e.chain().focus().toggleCode().run(),separator:!0},{name:`link`,icon:(0,G.jsx)(u,{size:14}),action:()=>{if(e.isActive(`link`))e.chain().focus().unsetLink().run();else{let t=window.prompt(`Enter URL:`);t&&e.chain().focus().setLink({href:t}).run()}}}],y=()=>{if(!(!a.trim()||n)&&(t?.(a.trim()),s(``),i(!1),e)){let t=e.state.tr.setMeta(JT,{range:null});e.view.dispatch(t)}};return(0,G.jsxs)(`div`,{className:o(`bg-[var(--surface-lift)] rounded-lg`,`shadow-[var(--shadow-popover)]`,`border border-[var(--border-base)]`),children:[(0,G.jsxs)(`div`,{className:`p-1 flex items-center gap-0.5`,children:[v.map((t,n)=>(0,G.jsxs)(`span`,{className:`contents`,children:[n>0&&v[n-1]?.separator&&(0,G.jsx)(`span`,{className:`mx-0.5 h-4 w-px bg-[var(--border-base)]`}),(0,G.jsx)(`button`,{type:`button`,className:o(f,e.isActive(t.name)&&_),onClick:t.action,"aria-label":t.name,"aria-pressed":e.isActive(t.name),children:t.icon})]},t.name)),t?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`mx-0.5 h-4 w-px bg-[var(--border-base)]`}),(0,G.jsx)(`button`,{type:`button`,className:o(f,r&&_),onClick:d,"aria-label":`Comment`,"aria-pressed":r,children:(0,G.jsx)(c,{size:14})})]}):null]}),r?(0,G.jsxs)(`div`,{className:`w-64 border-t border-[var(--border-base)] p-2`,children:[(0,G.jsx)(`textarea`,{className:`w-full resize-none rounded-md border border-[var(--field-border)] bg-[var(--field-bg)] px-3 py-2 text-body-medium-lighter text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none transition-[border-color] duration-150 ease-out focus-visible:border-[var(--border-active)]`,rows:2,placeholder:`Add your feedback…`,value:a,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),y())},autoFocus:!0}),(0,G.jsx)(`div`,{className:`mt-1.5 flex justify-end`,children:(0,G.jsx)(`button`,{type:`button`,className:o(`rounded-md px-2.5 py-1 text-label-medium-default transition-colors`,a.trim()&&!n?`bg-[var(--primary-base)] text-white hover:opacity-90`:`bg-[var(--surface-active)] text-[var(--content-disabled)] cursor-not-allowed`),onClick:y,disabled:n||!a.trim(),children:n?`Adding…`:`Comment`})})]}):null]})}function eE({content:e,editable:t=!0,onContentChange:n,onTextSelect:r,commentAnchors:i=[],highlightRange:a=null,onCommentSubmit:s,commentSubmitting:c,className:l}){let u=(0,g.useRef)(n);u.current=n;let d=(0,g.useRef)(r);d.current=r;let f=Rh({extensions:[Fb.configure({}),Nv.configure({openOnClick:!1}),UT,YT.configure({anchors:i}),ZT.configure({range:a})],content:e,editable:t,onUpdate({editor:e}){u.current?.(KT(e))},onSelectionUpdate({editor:e}){let{from:t,to:n}=e.state.selection;if(t===n){let t=e.state.tr.setMeta(JT,{range:null});e.view.dispatch(t),d.current?.(null);return}let r=e.state.doc.textBetween(t,n);if(!r.trim())return;let i=GT(e.state.doc,t),a=GT(e.state.doc,n),o=e.view.dom.ownerDocument.getSelection();if(!o||o.rangeCount===0)return;let s=o.getRangeAt(0).getBoundingClientRect();d.current?.({start:i,end:a,text:r,rect:s})}}),p=(0,g.useRef)(e);(0,g.useEffect)(()=>{f&&e!==p.current&&(p.current=e,KT(f)!==e&&f.commands.setContent(e))},[e,f]);let m=(0,g.useCallback)(e=>{if(!f)return;let t=f.state.tr.setMeta(qT,{anchors:e});f.view.dispatch(t)},[f]);(0,g.useEffect)(()=>{m(i)},[i,m]);let h=(0,g.useCallback)(e=>{if(!f)return;let t=f.state.tr.setMeta(JT,{range:e});if(f.view.dispatch(t),e){let t=WT(f.state.doc,e.start),n=f.view.domAtPos(t);n.node instanceof HTMLElement?n.node.scrollIntoView({behavior:`smooth`,block:`center`}):n.node.parentElement&&n.node.parentElement.scrollIntoView({behavior:`smooth`,block:`center`})}},[f]);return(0,g.useEffect)(()=>{h(a)},[a,h]),(0,G.jsxs)(`div`,{className:o(`flex flex-col`,l),children:[(0,G.jsx)(`style`,{children:tE}),(0,G.jsx)(Ah,{editor:f,className:`flex-1 overflow-y-auto`}),f?(0,G.jsx)(bg,{editor:f,updateDelay:100,children:(0,G.jsx)($T,{editor:f,onCommentSubmit:s,commentSubmitting:c},`${f.state.selection.from}-${f.state.selection.to}`)}):null]})}var tE=`
|
|
171
171
|
.tiptap {
|
|
172
172
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
173
173
|
font-size: 15px;
|